We could add two additional steps after applying OS settings like "remove mail icon from task bar" and "disable sleep mode" and then deploy this task sequence to our required client.
- For remove mail step, we may use this script to remove the icon.Here is the script below(We must use the admin permission account):
if(Get-ProvisionedAppxPackage -Online | Where-Object {$.DisplayName -match "Microsoft.windowscommunicationsapps"}){Get-ProvisionedAppxPackage -Online | Where-Object {$.DisplayName -match "Microsoft.windowscommunicationsapps"} | Remove-AppxProvisionedPackage -Online -AllUsers -Verbose -ErrorAction Continue}
else { Write-Output "Mail app is not installed for the system"} - For disable sleep mode step, we could use powercfg command line to reach our goal.
we could run like this "c:\windows\system32\powercfg.exe -change -standby-timeout-ac 0"
The step image as shown below:
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.