remove PSAtera dependency
This commit is contained in:
@@ -15,11 +15,9 @@ switch ( $Edition.ToLower() ) {
|
|||||||
default { $URL = $ECB_WIN_URL; $AgentEdition = 'desktop' }
|
default { $URL = $ECB_WIN_URL; $AgentEdition = 'desktop' }
|
||||||
}
|
}
|
||||||
|
|
||||||
## Install and import additional Powershell modules
|
## Install and import additional Powershell module
|
||||||
Install-MSP360Module
|
Install-MSP360Module
|
||||||
Import-Module -Name MSP360
|
Import-Module -Name MSP360
|
||||||
Install-PSAteraModule
|
|
||||||
Import-Module -Name PSAtera
|
|
||||||
|
|
||||||
## Install the agent
|
## Install the agent
|
||||||
LogMsg "Installing Emberkom Cloud Backup agent"
|
LogMsg "Installing Emberkom Cloud Backup agent"
|
||||||
@@ -28,11 +26,6 @@ Catch { LogErr $_.Exception.Message }
|
|||||||
|
|
||||||
## Add backup user to installed product
|
## Add backup user to installed product
|
||||||
Try {
|
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
|
$MSP360Password = ConvertTo-SecureString -string $MSP360Password -AsPlainText -Force
|
||||||
LogMsg "Adding backup user account: ${MSP360Username}"
|
LogMsg "Adding backup user account: ${MSP360Username}"
|
||||||
Add-MBSUserAccount -User $MSP360Username -Password $MSP360Password
|
Add-MBSUserAccount -User $MSP360Username -Password $MSP360Password
|
||||||
|
|||||||
Reference in New Issue
Block a user