major update to override Write-Output func

This commit is contained in:
2023-10-05 13:11:38 -04:00
parent 31a06a9206
commit bbb4884818
52 changed files with 377 additions and 378 deletions
+3 -3
View File
@@ -23,21 +23,21 @@ Import-Module -Name MSP360
$Installer = Download-File -URL $URL
# Install the agent
LogMsg "Installing Emberkom Cloud Backup agent"
Write-Output "Installing Emberkom Cloud Backup agent"
Try { Start-Process "${Installer}" -ArgumentList "/S" -Wait }
Catch { LogErr $_.Exception.Message }
# Add backup user to installed product
Try {
$MSP360Password = ConvertTo-SecureString -string $MSP360Password -AsPlainText -Force
LogMsg "Adding backup user account: ${MSP360Username}"
Write-Output "Adding backup user account: ${MSP360Username}"
Add-MBSUserAccount -User $MSP360Username -Password $MSP360Password
}
Catch { LogErr $_.Exception.Message }
# Set the agent edition
# Note: the product edition must be set *after* the user is added
LogMsg "Setting Emberkom Cloud Backup agent edition to ""$AgentEdition"""
Write-Output "Setting Emberkom Cloud Backup agent edition to ""$AgentEdition"""
Try { Set-MBSAgentSetting -Edition $AgentEdition -Verbose }
Catch { LogErr $_.Exception.Message }