When we are using Intune in the new Azureportal (Ibiza) then we what to take advanced of dynamic device groups.

In many cases we what to make Device Configuration and deploy to either to personal or corporate devices, the easy way is to create 2 dynamic devices groups.

 

One for personal devices:

All Personal Devices

Powershell:

New-AzureADMSGroup -Description “All Personal Devices” -DisplayName “All Personal Devices” -MailEnabled $false -SecurityEnabled $true -MailNickname “Win” -GroupTypes “DynamicMembership” -MembershipRule “(device.deviceOwnership -eq “Personal”)” -MembershipRuleProcessingState “On”

One for Corporate devices:

All Coporate Devices

Powershell:

New-AzureADMSGroup -Description “All Corporate Devices” -DisplayName “All Corporate Devices” -MailEnabled $false -SecurityEnabled $true -MailNickname “Win” -GroupTypes “DynamicMembership” -MembershipRule “(device.deviceOwnership -eq “Corporate”)” -MembershipRuleProcessingState “On”


As a request I have updated this post to also include combined Dynamic groups for Personal or Corporate device groups – the following examples are combined with OS type.

 

All Personal IOS devices

 New-AzureADMSGroup -Description “All Personal IOS Devices” -DisplayName “All Personal IOS Devices” -MailEnabled $false -SecurityEnabled $true -MailNickname “Win” -GroupTypes “DynamicMembership” -MembershipRule “(device.deviceOSType -eq “IOS”) -And (device.deviceOwnership -eq “Personal”)” -MembershipRuleProcessingState “On”

All Personal Android devices

New-AzureADMSGroup -Description “All Personal Android Devices” -DisplayName “All Personal Android Devices” -MailEnabled $false -SecurityEnabled $true -MailNickname “Win” -GroupTypes “DynamicMembership” -MembershipRule “(device.deviceOSType -eq “Android”) -And (device.deviceOwnership -eq “Personal”)” -MembershipRuleProcessingState “On”

All Corporate IOS devices

New-AzureADMSGroup -Description “All Corporate IOS Devices” -DisplayName “All Corporate IOS Devices” -MailEnabled $false -SecurityEnabled $true -MailNickname “Win” -GroupTypes “DynamicMembership” -MembershipRule “(device.deviceOSType -eq “IOS”) -And (device.deviceOwnership -eq “Corporate”)” -MembershipRuleProcessingState “On”

All Corporate Android devices

New-AzureADMSGroup -Description “All Corporate Android Devices” -DisplayName “All Corporate Android Devices” -MailEnabled $false -SecurityEnabled $true -MailNickname “Win” -GroupTypes “DynamicMembership” -MembershipRule “(device.deviceOSType -eq “Android”) -And (device.deviceOwnership -eq “Corporate”)” -MembershipRuleProcessingState “On”