![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #2 (permalink) | ||||||||||||
| Guest
Posts: n/a
| Re: powershell equivalent For a local machine I would just use "net user" command If you need to do this remotely: function New-LocalUser{ # From: Brandon Shell # Purpose: To Add User to Host Local SAM # Example: # -- To Add User # PS> New-LocalUser -user Jsmith -password H!Th3r3 -server myserver1 ################################################################# Param([string]$user,[string]$password,[string]$server) If(!($server)){$server = get-content env:COMPUTERNAME} $tUser = [ADSI]("WinNT://$server,computer") $newuser = $tUser.psbase.children.add("$user","user") $newuser.psbase.invoke("SetPassword",$password) $newuser.psbase.CommitChanges() } "Max2006" <alanalan1@xxxxxx> wrote in message news:EE568410-9175-46F6-82A5-68B5AA021BC1@xxxxxx
| ||||||||||||
| |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VBCRLF equivalent in Powershell? | Victag | PowerShell | 2 | 05-15-2008 08:35 PM |
| PowerShell equivalent of If (not) exist | greatbarrier86 | PowerShell | 10 | 01-11-2008 08:51 AM |
| Is there an equivalent in powershell to get the name of the script | Bob Landau | PowerShell | 9 | 09-10-2007 07:34 PM |
| PowerShell equivalent for ECHO ON | dtward@gmail.com | PowerShell | 3 | 01-08-2007 10:45 AM |
| PowerShell equivalent of StartName | Andrew Watt [MVP] | PowerShell | 1 | 06-28-2006 05:20 PM |