PowerShell 5.1
How does computer name array for invoke-comman
and gwmi work? Do I need to omit one of them? or include both of them? What is going to be the behavior?
function fx1(){
Invoke-Command -ComputerName Computer1, Computer2, doesNotexist -ScriptBlock {
gwmi win32_service -computer [computername] -filter "name='whatever'"
} -ErrorAction SilentlyContinue -ErrorVariable errors
}