We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Running powershell script as custom Activity

AsheeshG
Tera Contributor

Hi,

I am using a PowerShell custom activity that creates ad group . I have some validations which throw error back.

Example 

if (@($AccountOwnerObject).count -gt 1) {
Throw "FAIL: Multiple accounts found for CA Account Owner $PrivilegedAccountOwner"
}

So when this is executed my output is Null. When i use 

if (@($AccountOwnerObject).count -gt 1) {
Write-Host "FAIL: Multiple accounts found for CA Account Owner $PrivilegedAccountOwner"

return
}

I get the output. 

The script is running on MID server.

Let me know where i am going wrong.

I am on Washington DC.

 

Thanks in advance.

 

0 REPLIES 0