When recently undergoing a project in our organisation to update Windows 10 from 1607 to 1703 I came across an annoying issue where after the upgrade process Windows would add the Windows Mail UWP icon to the taskbar. Obviously in a corporate environment this is not a setup which is wanted.
I read a bunch of stuff online but things would work fine when running manually, but then when trying to deploy through SCCM it would not work.
In the end the only way I got it to work was with information thanks to the following link - https://www.windows-noob.com/forums/topic/15538-problems-running-a-powershell-script-on-a-task-sequence/
So in summary the steps to fix it were:
1.) Create a powershell script on a network share with the following:
'Uninstall Microsoft Mail and Calendar'
Get-AppxPackage *communi* | Remove-AppxPackage
2.) Setup an SCCM package and choose to create a program with source files
3.) Click on standard program
4.) In the command line option set the following parameters:
Powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "\\Networklocation\filename.ps1"
5.) This step is critical as this seems to be what stopped it working when I was trying other things. Set the 'program can run' to run only when a user is logged on and 'run mode' to run with users rights.
I read a bunch of stuff online but things would work fine when running manually, but then when trying to deploy through SCCM it would not work.
In the end the only way I got it to work was with information thanks to the following link - https://www.windows-noob.com/forums/topic/15538-problems-running-a-powershell-script-on-a-task-sequence/
So in summary the steps to fix it were:
1.) Create a powershell script on a network share with the following:
'Uninstall Microsoft Mail and Calendar'
Get-AppxPackage *communi* | Remove-AppxPackage
2.) Setup an SCCM package and choose to create a program with source files
3.) Click on standard program
4.) In the command line option set the following parameters:
Powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File "\\Networklocation\filename.ps1"
5.) This step is critical as this seems to be what stopped it working when I was trying other things. Set the 'program can run' to run only when a user is logged on and 'run mode' to run with users rights.
Comments
Post a Comment