install using ps job
This commit is contained in:
@@ -21,7 +21,12 @@ Import-Module -Name MSP360
|
|||||||
|
|
||||||
# Install the agent
|
# Install the agent
|
||||||
LogMsg "Installing Emberkom Cloud Backup agent"
|
LogMsg "Installing Emberkom Cloud Backup agent"
|
||||||
Try { Install-MBSAgent -URL $URL -Force -Wait }
|
Try {
|
||||||
|
$JobName = "MSP360AgentInstall"
|
||||||
|
Start-Job -Name $JobName -Scriptblock { Install-MBSAgent -URL $URL -Force }
|
||||||
|
Wait-Job -Name $JobName
|
||||||
|
Remove-Job -Name $JobName -Force
|
||||||
|
}
|
||||||
Catch { LogErr $_.Exception.Message }
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
|
||||||
# Add backup user to installed product
|
# Add backup user to installed product
|
||||||
|
|||||||
Reference in New Issue
Block a user