Set-LocalUserPassword

Set-LocalUserPassword([string]$computername, [parameter(mandatory=$true)][string]$user, [parameter(mandatory=$true)][string]$password)
This function sets a password for a local user with ADSI.

Parameters
Name Necessary Summary
computername No target computer. If it's not inputted, the target will be the local computer.
user Yes local user.
password Yes password.


Returns
nothing.

ex)
Set-LocalUserPassword -user TestUser -password "P@ssw0rd!";

# for remote operation
Set-LocalUserPassword -computername $env:computername -user TestUser -password "P@ssw0rd!";

Last edited Mar 2, 2013 at 12:31 PM by Tom__S, version 3

Comments

No comments yet.