Flow Designer Powershell Action - Pass Output into Action from PS script?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2020 04:05 PM
I'm trying to capture the output in the flow designer "output" variable within my Powershell script. Example
if($action -eq "add"){
Write-Output "Adding Mailbox Permission"
try{
Add-MailboxPermission -Identity $mailbox -user $upn -AccessRights fullaccess -ErrorAction Stop -Confirm:$False
Write-host "Added Full Access"
Add-RecipientPermission -Identity $mailbox -AccessRights sendas -Trustee $upn -ErrorAction Stop -Confirm:$False
SNCLog-DebugInfo "SUCCESS: Added $upn to $mailbox, $task"
Write-Output "Success"
} catch{
#$returnObj.Add("Error", $_)
Write-Output "Error"
}
As you can see, I would like to find the syntax to associate the "Error" or "Success" with a variable within flow designer.
I'm able to access my input variables fine, like so:
$userEmail=$env:SNC_userEmail
Anyone have any ideas, or the proper syntax?
Labels:
- Labels:
-
Scripting and Coding
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2021 09:43 AM
I think it will help!