How to unpin the Microsoft store from the taskbar in Windows 10 with Intune? At the time of writing, there is no option in Intune to easily remove the Microsoft store from the Taskbar. 

You can prepare a start menu and taskbar using XML, but the disadvantage of this is that the user can no longer make changes. If there are any developments or if you have a different or better solution please leave a commend.

The script below can be used to remove the Microsoft store from the Taskbar.

For devices using autopilot, it may take a while for the user to actually log in to the device. I have added a sleep command to the script, without it the script will finish before any profile is loaded to actually remove the Windows Store from the taskbar.

Copy the Powershell Script to a .ps1 file

Start-Sleep -s 900
$appname = "Microsoft Store"
((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'Unpin from taskbar'} | %{$_.DoIt(); $exec = $true}

Script execution retry interval when failed?

PowerShell scripts are executed through the agent on the target device. If an execution fails, the agent attempts to execute the script again during the next check-in. The current check-in interval is every 60 minutes. This process is limited to 3 retries! The following should be taken into account; no re-run of scripts occurs once a script is successful executed.
  • Sign in to the portal as either a Global administrator, or intune administrator.
  • Click Windows Devices, browse to Windows, select PowerShell scripts.
  • Press add to implement a PowerShell script.
  • Click folder to add Powershell script.
  • Select Yes; Run this script using the logged on credentials.
  • Select Yes; Run script in 64 bit PowersHell Host.
  • Check if all the settings are set correctly.
  • Assignments; Choose the right security group; the group in my picture is a User group.