This guide visually demonstrates steps described in Microsoft public documentation
Add PowerShell scripts to Windows 10/11 devices in Microsoft Intune
1. Sign in to the Microsoft Endpoint Manager admin center.
- Name: Enter a name for the PowerShell script.
- Description: Enter a description for the PowerShell script. This setting is optional, but recommended.
"Script location:" set it to "AddShortcuts.ps1"
“Run this script using the logged-on credentials” set it to No
"Enforce script signature check" set it to No
"Run script in 64 bit PowerShell Host" set it to Yes
Note: Device targeting is preferred in case the end users are not logged on.
Note 2: You don't have to add "-MpTaskBarRecoverUtilDownload" since the Powershell script "AddShortcuts.ps1" will download the MPTaskBarRecover.exe by default.
Note 3: When running the AddShortcuts.ps1, you should consider using the -force switch.
5. “Add groups” select an AAD group for script targeting. You may want to select a group of test devices and users.
Note: For MEM (Intune) PowerShell script troubleshooting, review: C:\ProgramData\Microsoft Intune Management Extension\Logs\IntuneManagementExtension.log and C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\AgentExecutor.log
For additional information and general troubleshooting of running PowerShell scripts via Intune please see product documentation at Add PowerShell scripts to Windows 10/11 devices in Microsoft Intune