Open forsteri95 opened 1 year ago
@@ -0,0 +1,20 @@
Connect-AzureAD
$groupName = "Group Name" $licenseName = "License Name"
$group = Get-AzureADGroup -SearchString $groupName
$license = Get-AzureADSubscribedSku | Where-Object {$_.SkuPartNumber -eq $licenseName}
$licenseAssignment = New-AzureADGroupLicenseAssignment -ObjectId $group.ObjectId -SkuId $license.SkuId
Connect to the Microsoft Intune PowerShell module
Connect-MSGraph
Retrieve all profiles
$profiles = Get-IntuneDeviceConfiguration
Loop through each profile and display the name and description
foreach ($profile in $profiles) { Write-Host "Name: $($profile.displayName)" Write-Host "Description: $($profile.description)" }
This script first uses the Connect-MSGraph cmdlet to connect to the Microsoft Intune PowerShell module. It then uses the Get-IntuneDeviceConfiguration cmdlet to retrieve all profiles, and then loops through each profile using a foreach loop, displaying the name and description of each profile.
You may also want to try the same thing with Microsoft Graph API and use the appropriate endpoints and permissions to retrieve the profile information.