Share all details about your problem, including any error messages you may have received.
hello everyone,
i’m running a powershell script through IIQ and i noticed that those script run under the NT Authority\System account, is it possible to have those scripts run with the account of the application i specified here : Application ad = context.getObjectByName(Application.class, “applicationname”);?
By default, PowerShell scripts triggered from IIQ run under the NT AUTHORITY\SYSTEM account. IIQ doesn’t support running scripts directly under the account tied to the application object like:
Application ad = context.getObjectByName(Application.class, "applicationname");
Workaround Options:
Scheduled Task: Run the script via a Windows Task configured with the desired user account.
External Service/API: Call a service that executes scripts under the target account.
Yes, the script runs under NT AUTHORITY\SYSTEM because that’s the account the IQService is running under. If you change the service to run under a different account (e.g., a domain service account), the script will execute under that account instead.
Just make sure the new account has the necessary permissions to perform the actions in your script.