remove PSAtera dependency

This commit is contained in:
2022-09-26 16:05:43 -04:00
parent 4f6caa2869
commit b2a480f709
+1 -8
View File
@@ -15,11 +15,9 @@ switch ( $Edition.ToLower() ) {
default { $URL = $ECB_WIN_URL; $AgentEdition = 'desktop' }
}
## Install and import additional Powershell modules
## Install and import additional Powershell module
Install-MSP360Module
Import-Module -Name MSP360
Install-PSAteraModule
Import-Module -Name PSAtera
## Install the agent
LogMsg "Installing Emberkom Cloud Backup agent"
@@ -28,11 +26,6 @@ Catch { LogErr $_.Exception.Message }
## Add backup user to installed product
Try {
LogMsg "Getting Atera agent and custom field information"
Set-AteraAPIKey -APIKey $AteraAPIKey
$AteraAgent = Get-AteraAgent
$MSP360Username = $(Get-AteraCustomValue -ObjectType Customer -ObjectId $AteraAgent.CustomerID -FieldName 'MSP360 Account Username').ValueAsString
$MSP360Password = $(Get-AteraCustomValue -ObjectType Customer -ObjectId $AteraAgent.CustomerID -FieldName 'MSP360 Account Password').ValueAsString
$MSP360Password = ConvertTo-SecureString -string $MSP360Password -AsPlainText -Force
LogMsg "Adding backup user account: ${MSP360Username}"
Add-MBSUserAccount -User $MSP360Username -Password $MSP360Password