From 79c517d88cae58a687caf80e02b28c938c3770b1 Mon Sep 17 00:00:00 2001 From: dyoder Date: Thu, 23 Sep 2021 14:23:54 -0400 Subject: [PATCH] fix --- Install-EmberkomCloudBackup.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Install-EmberkomCloudBackup.ps1 b/Install-EmberkomCloudBackup.ps1 index 5d94795..c85c6ca 100644 --- a/Install-EmberkomCloudBackup.ps1 +++ b/Install-EmberkomCloudBackup.ps1 @@ -42,8 +42,8 @@ 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' - $MSP360Password = Get-AteraCustomValue -ObjectType Customer -ObjectId $AteraAgent.CustomerID -FieldName 'MSP360 Account Password' + $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