thycotic-ps / secretserver

Secret Server scripts that can be utilized to extend the abilities of Secret Server in your environment.
https://delinea.com/products/secret-server/
MIT License
24 stars 20 forks source link

'Run Script': Failed creating task: RunScript Error: Object reference not set to an instance of an object. #26

Closed e8link closed 5 months ago

e8link commented 8 months ago

Hi. I've followed the instructions, incorporated into a pipeline for a local group - when user added. But I'm getting an error when the script runs "'Run Script': Failed creating task: RunScript Error: Object reference not set to an instance of an object.". The users are arriving via AzureAD (not sure if that matters).

My customization sections looks like: ######### CHANGE ########## $PFolderBaseID = 141 $FolderOwnerUsers = @() $FolderOwnerGroups = @("Folder/Secret Owner") $AllowedTemplateIDs = @()

Where else might I look to troubleshoot the error message?

jagger commented 7 months ago

I'd validate that the arguments are all being passed into the script properly. Add something like $args | converto-json -compress | add-content c:\temp\EPH-args.txt to the script temporarily to validate the conditions when running