Dirsync Workflow is not executing PowerShell script
説明
Having trouble getting a PowerShell script to run in the Dirsync workflow. How do I get it to run in a specific environment? What am I doing wrong?
対策
The script will run in the environment selected in the Script wizard. This is not based on the workflow or where you place the script step in the workflow. Which environment did you select(Source or Target)?
The PowerShell script will run under the context of the service that is running. A script will never work as Local System will never have access to Active Directory. Create a script which will open a remote session to the AD and then run the AD commands. This is also described in the help file.
How do you add a new PowerShell script?
On the Scripts page, click the New button to add a new script to the collection. Name your script, and choose a local environment for it to apply to. Directory Sync does not validate your scripts, so be sure that you test them first in a non-production environment. Note that all scripts are run under the service account and an account with the required AD Rights must be configured to logon to the service.