Link to home
Start Free TrialLog in
Avatar of lfrs-org
lfrs-orgFlag for United Kingdom of Great Britain and Northern Ireland

asked on

MDT 2013 - Running Powershell Script to remove Windows 10 Apps during deployment

Hello,

We currently have a PowerShell script which removes all unnecessary Windows 10 Store Apps, we would like to include this in our MDT 2013 deployments and currently run another PS script which automatically activates Windows and Office 2013 (this one works very well).

The method we are currently using is including the PS Script as an option under the Applications section of MDT 2013. It runs as a Standard Application with the following "Quiet Install Command:"

powershell.exe -ExecutionPolicy Bypass -Command "Copy-Item '\\ldeployment\deployshare$\Applications\remove-windows10-apps.ps1' -destination C:\Windows\Temp; C:\Windows\Temp\remove-windows10-apps.ps1; Remove-Item C:\Windows\temp\*.ps1 -Force"

Whilst the above method works well for the activation script, the remove Windows 10 apps script fails to run. I initially thought this was due to our domain group policy taking priority, so I changed group policy to allow local scripts and we are still running into issues.

If, post-deployment, we manually run powershell as an Administrator, set the execution policy, then run the script, it works fine but this is not ideal.

Any advice on how to get the script to run correctly as part of our deployment would be greatly appreciated. If you require any detailed information, please let me know.

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of lfrs-org
lfrs-org
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial