Take some advantage of my script but I would recommend to rely on Azure LAPS. Ofcourse you still can use the script to create additional account but manage it with LAPS.
Run powershell script from Intune (MEM) for local administrator account.
Renaldo Jack
5
Reputation points
Hi, we are trying to run PowerShell scripts from Intune to do the following on workstations:
- To enable the local administrator account (some of our accounts are disabled)
- Remove the tick "change password at next logon" for local administrator account
- Search and remove all accounts from local administrator group apart from the local administrator account.
We try to run it in the context of the system account or logged in user, but it fails. I assume it needs admin rights, but you cannot set this via the script options in Intune. How can we get around this issue?
Windows for business Windows Server User experience PowerShell
8,330 questions
Microsoft Security Intune Other
5,569 questions
1 answer
Sort by: Most helpful
-
Pavel yannara Mirochnitchenko 13,331 Reputation points MVP
2023-08-02T07:05:44.0933333+00:00