updates and remove rmm directory since that now contains non-public info
This commit is contained in:
@@ -17,15 +17,42 @@ switch ( $Edition.ToLower() ) {
|
|||||||
|
|
||||||
## Install and import the MSP360 Powershell module
|
## Install and import the MSP360 Powershell module
|
||||||
Run-Script -LivePSScript Install-MSP360PowershellModule
|
Run-Script -LivePSScript Install-MSP360PowershellModule
|
||||||
|
LogMsg "Importing MSP360 Powershell module"
|
||||||
Import-Module -Name MSP360
|
Import-Module -Name MSP360
|
||||||
|
|
||||||
## Install the agent
|
## Install the agent
|
||||||
LogMsg "Installing Emberkom Cloud Backup agent"
|
|
||||||
$INSTALLER = Download-File -URL $URL
|
$INSTALLER = Download-File -URL $URL
|
||||||
|
LogMsg "Installing Emberkom Cloud Backup agent"
|
||||||
Try { Start-Process $INSTALLER -ArgumentList "/S" -Wait }
|
Try { Start-Process $INSTALLER -ArgumentList "/S" -Wait }
|
||||||
Catch { LogErr $_.Exception.Message }
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
If ( Test-Path $INSTALLER ) {
|
||||||
|
LogMsg "Deleting Emberkom Cloud Backup agent installer: ""${INSTALLER}"""
|
||||||
|
Try { Remove-Item $INSTALLER -Force }
|
||||||
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
}
|
||||||
|
|
||||||
## Set the agent edition
|
## Set the agent edition
|
||||||
LogMsg "Setting Emberkom Cloud Backup agent edition to ""$AgentEdition"""
|
LogMsg "Setting Emberkom Cloud Backup agent edition to ""$AgentEdition"""
|
||||||
Try { Set-MBSAgentSetting -Edition $AgentEdition }
|
Try { Set-MBSAgentSetting -Edition $AgentEdition }
|
||||||
Catch { $_.Exception.Message }
|
Catch { $_.Exception.Message }
|
||||||
|
|
||||||
|
## Install and import the PSAtera Powershell Module
|
||||||
|
Run-Script -LivePSScript Install-PSAteraModule
|
||||||
|
LogMsg "Importing PSAtera Powershell module"
|
||||||
|
Import-Module -Name PSAtera
|
||||||
|
Set-AteraAPIKey = $AteraAPIKey
|
||||||
|
|
||||||
|
## Get agent details and custom fields from Atera
|
||||||
|
LogMsg "Getting Atera agent and custom field information"
|
||||||
|
Try {
|
||||||
|
$AteraAgent = Get-AteraAgent
|
||||||
|
$MSP360Username = Get-AteraCustomValue -ObjectType Customer -ObjectId $agent.CustomerID -FieldName 'MSP360 Account Username'
|
||||||
|
$MSP360Password = Get-AteraCustomValue -ObjectType Customer -ObjectId $agent.CustomerID -FieldName 'MSP360 Account Password'
|
||||||
|
$MSP360Password = ConvertTo-SecureString -string $MSP360Password -AsPlainText -Force
|
||||||
|
}
|
||||||
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
|
||||||
|
## Add account and password
|
||||||
|
LogMsg "Adding backup user account: ${MSP360Username}"
|
||||||
|
Try { Add-MBSUserAccount -User $MSP360Username -Password $MSP360Password }
|
||||||
|
Catch { LogErr $_.Exception.Message }
|
||||||
@@ -1,3 +1,12 @@
|
|||||||
LogMsg "Downloading and installing MSP360 Powershell module if not already installed"
|
## Check if the MSP360 module needs to be installed
|
||||||
Try { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://git.io/JUSAA'); Install-MSP360Module }
|
If (-not (Get-Module -ListAvailable -Name MSP360) ) {
|
||||||
Catch { LogErr $_.Exception.Message }
|
|
||||||
|
LogMsg "Setting Powershell Execution Policy to Unrestricted for this script"
|
||||||
|
Try { Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process }
|
||||||
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
|
||||||
|
LogMsg "Downloading and installing MSP360 Powershell module"
|
||||||
|
Try { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://git.io/JUSAA'); Install-MSP360Module }
|
||||||
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
|
||||||
|
} Else { LogMsg "MSP360 Powershell module is already installed" }
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
$PSAteraMinimumModuleVersion = '1.5.7'
|
$PSAteraMinimumModuleVersion = '1.5.7'
|
||||||
|
|
||||||
## Get the PSAtera module if it's installed
|
## Get the PSAtera module if it's installed
|
||||||
$module = (Get-Module -ListAvailable PSAtera)
|
$module = (Get-Module -ListAvailable -Name PSAtera)
|
||||||
|
|
||||||
## Install only if we're an admin
|
## Install only if we're an admin
|
||||||
If ( IsAdmin ) {
|
If ( IsAdmin ) {
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Cleanup-SystemTempFiles
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Create-LocalAdmin -Arguments "-Username $Username -Password $Password -FullName $FullName -Description $Description"
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Fix-AutodeskProductLicensing
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Fix-ClearOutlookAutoCompleteCache
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Fix-GroupPolicyUpdate
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Fix-MicrosoftTeams
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Fix-OfficeModernAuth
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Fix-Service-QuickBooksDB31
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Fix-SplashtopService
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Fix-SystemPrintQueue
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Fix-WindowsHealth
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Fix-WindowsUpdate
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Get-DisplayInformation
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Get-InstalledSoftware
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Install-4KVideoDownloader
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Install-AdobeConnect
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Install-AmazonCorretto
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
$VisionURL = ''
|
|
||||||
Run-Script -LivePSScript Install-DeltekVision -Arguments $VisionURL
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Install-DisplayLink
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
|
|
||||||
## Set the edition of the ECB agent.
|
|
||||||
## Valid options are 'desktop' 'server' or 'vm'
|
|
||||||
$Edition = '{[Edition]}'
|
|
||||||
|
|
||||||
Run-Script -LivePSScript Install-EmberkomCloudBackup
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Install-MSP360PowershellModule
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Install-Nextcloud
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Install-OpenVPN
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Install-PSAteraModule
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Install-SketchUp
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Install-SpecsIntact
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Install-Wireguard
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Remove-DeltekVision
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Set-EventLogs
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Start-Windows10UpdateAssistant
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
|
|
||||||
## This is an RMM script variable
|
|
||||||
$ProcessName = '{[ProcessName]}'
|
|
||||||
|
|
||||||
Run-Script -LivePSScript 'Stop-Process'
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Test-InternetBandwidth
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Uninstall-AdobeFlash
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Uninstall-AutodeskDesktopApp
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
. $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1')))
|
|
||||||
Run-Script -LivePSScript Uninstall-NCentralComponents
|
|
||||||
Reference in New Issue
Block a user