microsoft 365 license check
1 TopicMicrosoft 365 E3 User Check
Hello I am trying to adjust a script I have that checks if a user is licensed for E3 in Microsoft 365. The script I have below works by checking a list of users and seeing which ones are licensed for E3. However it does not tell me the users in that list that are NOT E3 licensed. The .csv output looks like this.... My question is can I have the "IsLicensed" column say "False" if the user does not have the E3 license? Currently it just skips it and does not include it in the output. The script I am working with now is below. Get-content c:\temp\users.txt | foreach {Get-MsolUser -UserPrincipalName $_ | Where-Object {($_.licenses).AccountSkuId -match "SPE_E3"}} | Select-Object UserPrincipalname,islicensed | Export-csv c:\temp\E3.csv Any help is GREATLY appreciated I am on a timeline new to Powershell and cant find an answer in Google . Thanks!Solved5.5KViews0likes3Comments