Skip to content

Using PowerShell to deploy Coro to Windows devices

Coro recommends the following Windows PowerShell script to enable organizations to deploy the Coro Agent software to their Windows endpoint devices.

New-Item "C:\Coroinstall" -itemType Directory
Invoke-WebRequest -Uri '<CORO PACKAGE DOWNLOAD URL>' -OutFile 'c:\Coroinstall\<INSTALLER FILENAME>'
msiexec /i C:\Coroinstall\<INSTALLER FILENAME> /qn /L*V "C:\CoroInstallerlog.txt"
Start-Sleep -Seconds 300
Get-ChildItem -Path C:\Coroinstall -File | Remove-Item -Verbose
Start-Sleep -Seconds 10
[System.IO.Directory]::Delete("C:\Coroinstall")

In this script, replace the following markers for real values:

  • <CORO PACKAGE DOWNLOAD URL>: The download URL for the latest version of the Coro Agent installer for Windows, obtained from the Coro Console. For details, see Deploying Coro on windows endpoints.
  • <INSTALLER FILENAME>: The unique installer .msi filename embedded in the download URL.

For example, if the download URL is:

https://s3.amazonaws.com/client-repo.coro.net/beta/win/releases/2.0.412.1/CoroInstaller.msi?response-content-disposition=attachment%3B%20filename%3DCoroInstaller_123abc-456def-789abc.msi&AWSAccessKeyId=AKIA5XP6&Signature=y4V3Tq2dU9mE%3D&Expires=2005954595

The installer filename (shown in bold) is then used within the PowerShell script as per the following example:

New-Item "C:\Coroinstall" -itemType Directory
Invoke-WebRequest -Uri 'https\://s3.amazonaws.com/client-repo.coro.net/beta/win/releases/2.0.412.1/CoroInstaller.msi?response-content-disposition=attachment%3B%20filename%3D<strong>CoroInstaller_123abc-456def-789abc.msi</strong>&AWSAccessKeyId=AKIA5XP6&Signature=y4V3Tq2dU9mE%3D&Expires=2005954595' -OutFile 'c:\Coroinstall\CoroInstaller_123abc-456def-789abc.msi'
msiexec /i C:\Coroinstall\CoroInstaller_123abc-456def-789abc.msi /qn /L*V "C:\CoroInstallerlog.txt"
Start-Sleep -Seconds 300
Get-ChildItem -Path C:\Coroinstall -File | Remove-Item -Verbose
Start-Sleep -Seconds 10
[System.IO.Directory]::Delete("C:\Coroinstall")