Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Invalid Characters Invoke-Command

$
0
0

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.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>