Hello,
I have a situation where I need to abort a Granfeldt PSMA script in the BEGIN block. What I can’t figure out is what MIM is expecting back so I can show a result of failed. Following is the snippet of code I'm talking about.
$Configuration = "C:\MIMPowerShellResources\Environment.json"
if(test-Path $Configuration) {
$Config = Get-Content $Configuration | ConvertFrom-JSON
$Running_Environment = $Config.Running_Environment
$data_source = $Config.Data_Source.$Running_Environment
} else {
$retObj = @{}
$retobj."[ErrorName]" = 'failed'
$retobj."[ErrorDetail]" = 'Config file missing'
$retobj
Break
}
I need to abort the script and pass back a status of "failed". I'm always getting "success".
Any help would be greatly appreciated.