24 lines
864 B
PowerShell
24 lines
864 B
PowerShell
#Requires -Version 5.0
|
|||
|
|
# Syncro supplies DSAManifestSource, Zip, Upload, and DeleteAfterUpload.
|
||
|
|
# Preserve those caller variables for the repository script.
|
||
|
|
|
||
|
|
# This must run before downloading Tools.ps1, including on Server 2016.
|
||
|
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||
|
|
|
||
|
|
$RmmToolsUrl = 'https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1'
|
||
|
|
$RmmToolsClient = New-Object Net.WebClient
|
||
|
|
Try {
|
||
|
|
$RmmToolsText = $RmmToolsClient.DownloadString($RmmToolsUrl)
|
||
|
|
$RmmToolsScript = [Scriptblock]::Create($RmmToolsText)
|
||
|
|
}
|
||
|
|
Catch {
|
||
|
|
Throw "Unable to download or parse Tools.ps1 from ${RmmToolsUrl}: $($_.Exception.Message)"
|
||
|
|
}
|
||
|
|
Finally {
|
||
|
|
$RmmToolsClient.Dispose()
|
||
|
|
}
|
||
|
|
|
||
|
|
# Dot-source in this scope so the RMM input variables remain accessible.
|
||
|
|
. $RmmToolsScript
|
||
|
|
Run-Script -LivePSScript Get-DSAManifest
|