Hey guys.
So I'm just trying to script powershell to restart all machines in AD (excluding XP machines)
So this is what I have so far.
dsquery computer "ou=test,ou=it computers,ou=computers ou,dc=DOMAIN,dc=ca" | foreach-object {restart-computer computername $_.name -force}
and when I do that I receive this error
I am being prompted for credentials so I assume thats a good sign.
I also havent added the filter for non XP computers cause everytime I tried it was just failing.
If anyone could spread a little light on both issues it would be much appreciated.