PowerShell Script to change local Administrator Password on XenApp servers

This is not one of my scripts. This was posted by Sitaram Pamarthi of http://techibee.com on the Technet forums

[code lang=”powershell”]
$strcomputers = Get-Content c:servers.txt

foreach ($strcomputer in $strcomputers) {

$admin=[adsi](“WinNT://” + $strComputer + “/Administrator”) `

$admin.psbase.invoke(“SetPassword”, “Password”)   }

[/code]

Comments

Be the first to comment!

Join the discussion