With PowerShell 2.0 you can bypass the security policy with :
C:\WINNT\SysWOW64\windowspowershell\v1.0\powershell.exe -executionpolicy bypass -file E:\Powershell_scripts\OSD_Provisioning_SCCM\email_OSD.ps1 %msgsys
Hello, it's working fine for me but for uninstall I did not find del.exe, so for install I set :
xcopy.exe cmtrace.exe "%windir%\system32\" /y
and for uninstall :
cmd /c del "%windir%\system32\cmtrace.exe" /F /Q
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.