make inline process a variable
This commit is contained in:
@@ -23,7 +23,7 @@ Write-Output "Setting Emberkom Cloud Backup agent edition to ""$AgentEdition"""
|
|||||||
Try {
|
Try {
|
||||||
Switch ([string]::IsNullOrEmpty($MasterPassword)) {
|
Switch ([string]::IsNullOrEmpty($MasterPassword)) {
|
||||||
$true { Set-MBSAgentSetting -Edition $AgentEdition -Verbose }
|
$true { Set-MBSAgentSetting -Edition $AgentEdition -Verbose }
|
||||||
$false { Set-MBSAgentSetting -Edition $AgentEdition -MasterPassword (ConvertTo-SecureString -String $MasterPassword -AsPlainText -Force) -Verbose }
|
$false { Set-MBSAgentSetting -Edition $AgentEdition -MasterPassword $(ConvertTo-SecureString -String $MasterPassword -AsPlainText -Force) -Verbose }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Catch { Write-Error $_.Exception.Message }
|
Catch { Write-Error $_.Exception.Message }
|
||||||
|
|||||||
Reference in New Issue
Block a user