Abort Granfeldt PSMA script and pass status back to MIM.

tmunro55 351 Reputation points
2020-12-17T20:53:03.363+00:00

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.

Microsoft Identity Manager
Microsoft Identity Manager
A family of Microsoft products that manage a user's digital identity using identity synchronization, certificate management, and user provisioning.
617 questions
0 comments No comments
{count} votes

1 additional answer

Sort by: Most helpful
  1. tmunro55 351 Reputation points
    2021-05-06T15:57:02.49+00:00

    Thank you. Sounds easy enough.

    0 comments No comments