Просто начните с
$cred = Get-Credential "XXXXXX\fanwx"
и после:
$s = Get-WmiObject -computer 10.10.zz.zz Win32_Service -Filter "Name='XXX'" -credential $cred
Вы можете поставить пароль на диск:
PS > $cred.Password | ConvertFrom-SecureString | Set-Content c:\temp\password.txt
И получить его с помощью:
$password = Get-Content c:\temp\password.txt | ConvertTo-SecureString
$cred = New-Object System.Management.Automation.PsCredential "UserName",$password