Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

Run an .exe file remotely from a UNC path

$
0
0

I am trying to use Invoke-Command to run an exe from a UNC path on a bath of computers and cannot figure it out…

 Invoke-Command -ComputerName $Computers -Credential $cred -ScriptBlock { Set-Location -Path $NGLocation } Invoke-Command -ComputerName $Computers -Credential $cred -ScriptBlock { Start-Process -FilePath $NGLocationvcp.exe } 

I have tried it this way and with a pipe between set location and start process and it won’t work.

submitted by /u/RebootTheServer
[link] [comments]

The post Run an .exe file remotely from a UNC path appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793

Latest Images

Trending Articles



Latest Images