PowerShell script deployment from Intune

Copper Contributor

Hi All,

 

We are deploying powershell script to remove Microsoft store from windows 10 devices. We are using "Scripts" option in Intune. 

Commands are working fine manually but not when deploying as file from Intune. 

One reason I think is because Intune is calling powershell script path with " " and that's not running it properly.

When I tried to run file manually with " " it is not working but with ' ' it is working fine.

Can anyone suggest how I should proceed from here.

2 Replies
Without seeing the actual script it's hard to say but you can disable the store natively in Intune without a script.

@SeanMcAvinue I am using below script:

 

Get-AppxPackage -allusers *WindowsStore* | Remove-AppxPackage

 

Can you please share native way to remove Store.