I am using PSADT v. 4.0.4
Currently I am attempting to run an active setup when new users login.
Here is my current command:
Set-ADTActiveSetup -StubExePath "$Destination\timeStampUserProfile.ps1" -ExecutionPolicy 'Bypass' -Description 'timeStampUserProfile' -Key 'timeStampUserProfile'
I placed the script in the Files folder and the $Destination is the location I copy the script to on the local machine.
Here is the error I am gettting:
[Install] :: Standard error output from the process: File C:\ProgramData\AutoPilotConfig\Start-Menu\timeStampUserProfile.ps1 cannot be loaded because running scripts is
disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
+ CategoryInfo : SecurityError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnauthorizedAccess
Obviously this is an execution policy issue for the user. What changes do I need to make to the command to allow this script to run in the user context bypassing the execution policy?
Also, while I love the PSADT documentation I feel like some functions get a bare minimum explanation when it needs just a bit more. Set-ADTActiveSetup is one of those. does anyone have a slightly more comprehensive resource or writeup on the v. 4 active setup function and how to use it?
Please share any tips, tricks, and code on how you are using this function in v. 4. I would love to see what you all are doing.
