clean exit on successful install
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
# This script is intended to be called from a Windows Provisioning Package.
|
||||||
|
# The provisioning package invokes this script the following way:
|
||||||
|
# powershell.exe -ExecutionPolicy Bypass -Command ". $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Install-SyncroAgent.ps1'))) ; Install-SyncroAgent -URL 'https://install.syncromsp.com/agent.msi'"
|
||||||
|
|
||||||
Function Install-SyncroAgent ([string]$URL) {
|
Function Install-SyncroAgent ([string]$URL) {
|
||||||
|
|
||||||
@@ -24,4 +27,5 @@ Function Install-SyncroAgent ([string]$URL) {
|
|||||||
Write-Error "The Syncro Agent installer was successfully downloaded but could not be found at ""${Installer}"""
|
Write-Error "The Syncro Agent installer was successfully downloaded but could not be found at ""${Installer}"""
|
||||||
Exit 1
|
Exit 1
|
||||||
}
|
}
|
||||||
|
Exit 0
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user