$strComputer = "ComputerName" $computer = [ADSI]("WinNT://" + $strComputer + ",computer") $computer.name $Users = $computer.psbase.children |where{$_.psbase.schemaclassname -eq "User"} foreach ($member in $Users.psbase.syncroot) {$member.name}
Notify me of follow-up comments by email.
Notify me of new posts by email.
IT Tips and guides from real life.