Share all details related to your problem, including any error messages you may have received.
Hello community,
I’m creating a rule of type “ConnectorAfterCreate” to run a powershell script. I would like to know if there is a possibility to invoke other ps scripts from different folders.
I called the script directly but it doesn’t seem to work ==> $PSScriptRoot/myScript1.ps1
Just invoke a PowerShell script from the ConnectorAfterCreate native Rule, don’t write much code in this Rule template, just use it as a template to call PS script.
You can call any number of scripts from this PS script file, just make sure that IQ Service account you are using in your AD source config has enough privileges to access the folders.
It is better if you can login to IQ Service server using the same service account.
As Krishna said, you can call multiple scripts, I’m just questioning why you would want to.
Personally, I have just the one script that does many things depending upon the input variables. It makes maintenance easier.
For example: In one implementation, I had to make below operations on AD account creation
Notify user AD password to the user’s manager
Enable Remote Mailbox
…etc
I feel it is not good idea to keep all the logics in single script, so I prefer to have different PS scripts, If something goes wrong, it is easy to troubleshoot and no need to touch entire code.
Yes indeed I wanted it to be more orgnaized and more important it’s a security matter.
To invoke the ps scripts you used the normal PS command to call a script please?