Ok I'm trying to run a invoke-command against my entire AD (computers).
For some reason it keeps returning:
"One or more computer names are not valid."
I have read it is probably an invalid character somewhere but I can't locate it. Is there a way to see the failing computer and/or character??
Invoke-Command -computerName ( Get-ADComputer -filter * | Select-Object -expand Name ) -ScriptBlock {w32tm /resync /force}
If I do a subset of the Get-ADComputers like a searchbase with a OU it works just fine for the computers in that OU.