Handle PowerShell Execution Policy during OSD
During OSD and utilizing built-in "Install Applications" action. If the application has a detection method that utilizes a PowerShell script, the installation will fail.
Having a variable to set this globally or having the default behavior with the TS environment change the execution policy would allow that scenario to work with out issue. In addition, it will allow the execution of posh scripts with having to specify the execution policy at each iteration of running powershell.exe.
Andrew Felber commented
Right. Why can't the OSD environment respect the value that is set locally via client settings when not in OSD? With all the advancements with PowerShell in detection methods and requirements, how is it that there is no built-in support for this already? This basically means I either have to jeopardize security by globally setting the execution level or go back to using VBScript for complex detection methods and global conditions.
Yes, please! Another application model gotcha that should be easy to resolve.
An alternative solution would be to bypass this by for all PowerShell application detection. There's no option to sign the code so the only configuration that works is to ignore the execution policy.