Created
November 27, 2013 19:14
-
-
Save glombard/7681414 to your computer and use it in GitHub Desktop.
Create a local user on Windows XP using PowerShell and add the user to the local Administrators group.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$computer = [ADSI]"WinNT://ie6winxp" | |
$u = $computer.Create("User", "test") | |
$u.SetPassword("test") | |
$u.put("description", "Test user") | |
$u.SetInfo() | |
$group = [ADSI]"WinNT://ie6winxp/Administrators,group" | |
$group.add("WinNT://ie6winxp/test") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment