Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Invoke-Command error when I try to run a script on a remote computer

$
0
0

Hi

I am trying to run a script which is located on my local computer on a remote computer and I have to problems:

first: it is trying to run the script on my local computer and I don't want it to do that

second: the script doesn't run on the remote computer

 

This is the error message in question:

PS C:\Users\administrator> Invoke-Command -ComputerName UKBTH05TSV08 -FilePath "C:\TaskSchedulerEventViewerSetup.ps1"

The "ICSweep Script" source is already registered on the "localhost" computer.

    + CategoryInfo          : InvalidOperation: (:) [New-EventLog], InvalidOperationException

    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.NewEventLogCommand

 

ERROR: The system cannot find the file specified.

    + CategoryInfo          : NotSpecified: (ERROR: The syst...file specified.:String) [], RemoteException

    + FullyQualifiedErrorId : NativeCommandError


Viewing all articles
Browse latest Browse all 6937

Trending Articles