In my case the Powershell script is mapping some drives, copying some files and then running an application that's incompatible with Windows 7.
The solution in this case is to edit the shortcut and use the command prompt to run powershell.
So the target of the shortcut would be:
cmd /k "C:\Windows\System32\WindowsPowershell\v1.0\powershell.exe -noprofile -windowstyle hidden -executionpolicy bypass -file "C:\Folder\Script.ps1""
Use /c instead of /k if you want the command prompt disposed after it runs powershell.
No comments:
Post a Comment