PowerShell : change local Administrator password -
logged-in $computername
local administrator windows server 2008 r2 sp1
this script :
$admin=[adsi]("winnt://" + $computername + "/administrator, user") $admin.psbase.invoke("setpassword", $password) $admin.psbase.commitchanges()
run locally throws exception : exception calling "invoke" "2" argument(s):"the network path not found"
have not tested found
([adsi]“winnt://<local or remote computer name>/<username>”).setpassword(“<password>”)
http://www.petri.co.il/how-to-change-user-password-with-powershell.htm
Comments
Post a Comment