Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, May 28, 2018 2:48 AM
Hi everyone,
Been fighting with this problem for a couple of days now. But I've been try to add a specific user account to the local Administrators Group on a Windows 10 Device. I am using ConnectWise Automate to pass through the command. As I'm trying to update / add the local admin account
The following scripts I've been using,
net localgroup administrators admin01 /add
Add-LocalGroupMember -Group Administrators -Member admin01
Error Recieving
CategoryInfo : PermissionDenied: (Administrators:String) [Add-LocalGroupMember], AccessDeniedException
FullyQualifiedErrorId : AccessDenied,Microsoft.PowerShell.Commands.AddLocalGroupMemberCommand
I know the error is relating to UAC, but has anyone managed to get around this problem? Using this commands on the local computer works without any issues. I've seen some bypass PowerShell Modules, but there must be a simpler way of doing this???
All replies (2)
Monday, May 28, 2018 8:16 PM
From The Official Scripting Guys Forum! they have pinned You cannot bypass the UAC prompt so if it is related to UAC do not think there is a way around that.
Have you seen LAPS ?
beyond that I would think PsExec could achieve this.
Tuesday, May 29, 2018 6:23 AM
To add a user to the local administrator group on a remote computer, please refer to:
https://4sysops.com/archives/add-a-user-to-the-local-administrators-group-on-a-remote-computer/
Note: this is a 3rd party link, we don't have any warranties on this website. It's just for your convenience.
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].