Forum Discussion
ColtA
Aug 20, 2020Copper Contributor
Using Powershell to show users in O365 who do not have an ATP license (question)
Hi All, We are trying to script a way to show users in Exchange Online who do not have an ATP license attached to them. I found this script: Get-MsolUser -All | Where-Object...
harveer singh
Aug 20, 2020Iron Contributor
Hey ColtA ,
Try this as per your screenshot:
Get-MsolUser -All | Where-Object {$_.licenses.AccountSkuId -ne 'reseller-account:ATP_ENTERPRISE'} | Select-Object userprincipalname,licenses
Thanks