登陆到$ComputerName
以本地管理员的Windows Server 2008 R2 SP1的PowerShell:更改本地管理员密码
这个脚本:
$admin=[adsi]("WinNT://" + $ComputerName + "/administrator, user")
$admin.psbase.invoke("SetPassword", $Password)
$admin.psbase.CommitChanges()
在本地运行抛出异常:Exception calling "Invoke" with "2" argument(s):"The network path was not found"
什么是$计算机名的价值? – 2013-05-14 07:47:01
'$ ComputerName =“WS08-SF-QA-1”' – BaltoStar 2013-05-14 14:05:07