Hi,
I'm trying to run a command on a remote machine with the invoke-command cmdlet. The command fails with access denied in the eventlog. I need to run the remote session with "Run As Administrator" on the remote machine. Any direction on how to this is greatly appreciated.
Example:
$computers= get-content "./servers.txt"
Invoke-command -ScriptBlock {c:\temp\example.cmd} -ComputerName $computers