Reputation: 1
Here is the command I am trying to run
Invoke-Command -ComputerName DOG-02 C:\Users\user\Documents\PowerShell\PowerShellmenuz.ps1
I want to be able to run the script PowerShellmenuz.ps1
on a remote machine. I am very close but am stuck at this point.
Upvotes: 0
Views: 426
Reputation: 1814
It is hard to tell where is the problem without error output, but probably you've missed first configuration step on remote machine. There things that should be done before executing scripts on remote machine.
Enable-PSRemoting -Force
- it will start service WinRM to allow incoming connections.
Upvotes: 1