Running powershell script as custom Activity
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 01:25 PM
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