Microsoft Intune
Windows

Run Powershell Scripts Windows

In brief

The documentation now describes Intune’s precreated All Users and All Devices groups, excluding groups from assignments, soft-deleted groups, and assignment status values.

What Intune admins need to know

Administrators can use the updated guidance to target built-in groups and understand why assignments may not apply when groups are soft-deleted.

This summary was assembled from the tracked documentation change. Verify important details in the full Microsoft Learn article.

Documentation change

The comparison below shows only the changed extract. Use the full-page view for complete context.

    PowerShell scripts in Intune can be targeted to Microsoft Entra device security groups or Microsoft Entra user security groups. However, when targeting workplace joined (WPJ) devices, only Microsoft Entra device security groups can be used (user targeting is ignored).

    Intune provides precreated **All Users** and **All Devices** groups in the Microsoft Intune admin center. The groups have built-in optimizations for your convenience. It's highly recommended that you use these groups to target all users and all devices instead of any "all users" or "all devices" groups that you might create yourself.
- If you want to exclude any groups of users affected by this assignment, select **Exclude Groups**.
- Select **Next**.

    ![Assign or deploy PowerShell script to device groups in Microsoft Intune](media/management-extension-windows/mgmt-extension-assignments.png)
  1. In Review + add, a summary is shown of the settings you configured. Select Add to save the script. When you select Add, the policy is deployed to the groups you chose.

Note

If Microsoft Entra soft-deletes any of these groups, Intune shows them as soft deleted in the console, and their assignments don’t apply until the groups are restored.

For more information about including and excluding group assignments, see Include and exclude group assignments.

Note

You see the status of the selected group in the assignments. The possible status options are: Active, Deleted, or Soft-Deleted.

Scenario - Failure to run script

8 AM

Daily Intune.Admin.News

Get daily email updates

Get a concise summary of the latest Microsoft Intune updates delivered straight to your inbox.

Loading the secure signup form…