Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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