For one of our Validator tests, we needed to execute a PowerShell script
to return a date 90 days in the future, then fill a variable with that
value so we could check that against an attribute in eDirectory.

To do this, I created an Execute Connector test, with an Action of "Get
Execute Results and Set Variable".

My Execute Command looked like this:
powershell -ExecutionPolicy Bypass
\\validator_server\path_to_validator_scripts\my_po wershell_script.ps1

(The ExecutionPolicy parameter is necessary unless the PowerShell
environment on the server you're running Validator on already has the
ExecutionPolicy set to Bypass. The reason for this is that any other
setting is interactive, and your script will fail.)

The content of my PowerShell script is simply this:
$future = ((Get-Date).AddDays(90)).ToString("yyyyMMddHHmmss")

micheleberg's Profile:
View this thread: