major change to override Write-Error func

This commit is contained in:
2023-10-05 13:17:18 -04:00
parent bbb4884818
commit 5f4b4565de
42 changed files with 114 additions and 114 deletions
+2 -2
View File
@@ -19,13 +19,13 @@ Import-Module -Name MSP360
# Write-Output "Adding backup user account: ${MSP360Username}"
# Add-MBSUserAccount -User $MSP360Username -Password $MSP360Password
#}
#Catch { LogErr $_.Exception.Message }
#Catch { Write-Error $_.Exception.Message }
# Set the agent edition
# Note: the product edition must be set *after* the user is added
Write-Output "Setting Emberkom Cloud Backup agent edition to ""$AgentEdition"""
Try { Set-MBSAgentSetting -Edition $AgentEdition -Verbose }
Catch { LogErr $_.Exception.Message }
Catch { Write-Error $_.Exception.Message }
# Delete the desktop icon
"${Env:PUBLIC}\Desktop\Emberkom Backup.LNK",