When using Invoke-Command -ComputerName $nodes.ComputerName, write the scriptblock such that the computername is echoed with the result.
Invoke-command -ComputerName $nodes.ComputerName -Credential $mycred -ScriptBlock {"$ENV:ComputerName, $(test-path D:\folder\file)"}
No comments:
Post a Comment