Hi,
Does anyone know of a simple way of using Invoke-Command with multiple credentials. Looking at the Invoke-Command it seems that its because the -Credentials property does not accept arrays, only the -Computer property does.
$Job = Invoke-Command $MachineNames.Name -Credential $MachineNames.Credentials { "Hello from $(Hostname)" } -AsJob
The only thought I have at the moment, is to split the machines up into batches with the same credentials. Just wondering if there's a more elegant way of doing it though?