Managing Local Groups through PowerShell
Written by Niklas Goude on July 6, 2009 – 3:46 pm
When managing Local Groups through PowerShell, we can use the [ADSI] type adapter.
Starting off, We have to connect to the Local Group that we want to modify.
PS > $ComputerName = $env:COMPUTERNAME
PS > $Group = “Administrators”
PS > $LocalGroup = [adsi]“WinNT://$computerName/$Group,group”
PS > $LocalGroup
distinguishedName :
Path [...]

