简体   繁体   中英

Remote Installation of Remotely via Powershell

My organization uses a software called Remotely for remote access to some of our users devices. I'm trying to find a way to install the software remotely via PowerShell. I have the installer file copied locally on the root of the C drive on each machine. Here is what I've tried.

enterPS C:\Users\USER> Invoke-Command -ComputerName REMOTEPC -ScriptBlock {
Start-Process C:\Remotely_Installer.exe -install -quiet -organizationid "IDSTRING" -serverurl "https://remotely.CORP.com"
}

Running this command returns a "Paramater cannot be found that matches the names "install." This is what is on Remotely's website but it doesn't specify anything for remote installation via PowerShell.

Remotely_Installer.exe -install -quiet -organizationid "0b3d706b-9c5d-41e6-8ae9-5720d16324e6" -serverurl "https://remotely.mytechshop.com"

Ideally I'd be able to have a simple script where I can have the user copy the file to their C drive and then I can run the script, target their device, and have it show up in the remote management portal.

Does this work? Start-process isn't needed that often, except to wait for something started in the background. This assumes the installer is already on the remote computer.

# $s = new-pssession remotepc
# copy-item C:\Remotely_Installer.exe c:\ -tosession $s  # slow
Invoke-Command REMOTEPC {
  C:\Remotely_Installer.exe -install -quiet -organizationid IDSTRING -serverurl https://remotely.CORP.com
}

I was able to get it installed with the following command inside a .bat file

start "" "path\Remotely_Install.exe" -install -quiet -supportshortcut -organizationid "yourOrganizationId" -serverurl "yourServerUrl"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM