Important:
You must use your global administrator account to perform these steps.
The password expiration policy applies to all users.
First, you need to make sure the MSOnline module is installed on your computer and then imported into your Powershell session. To do that, you should use the following commands.
Install-Module MSOnline
Import-Module MSOnline
If you need video guidance to install PowerShell Module please visit the below link:
• Video
Licensed users command:
Get-MSOLUser | Where-Object { $_isLicensed -eq"True"} | Select-Object DisplayName,UserPrincipalName, isLicensed | Export-Csv C:\LicensedUsers\LicensedUsers.csv
If you want to customize your filters to get the specific information you can use any of the below filter in PowerShell code.
BlockCredential: Whether or not the user is able to sign in.
• City: The user's city.
• Country: The user's country.
• Department: The user's department.
• DisplayName: The user's display name.
• Errors: An array of errors. These are validation errors that may result in loss of services.
• Fax: The user's fax number.
• FirstName: The user's first name.
• ImmutableID: Only returned for federated users. This is the ID that is required to be federated with Microsoft Online Services.
• isBlackBerryUser: Returns whether or not the user has a BlackBerry device.
• isLicensed: Whether or not the user has any licenses assigned.
• LastDirSyncTime: The date and time of the last directory synchronization (only returned from users synced with Microsoft Online Services through AD DS synchronization).
• LastName: The user's last name.
• LicenseReconciliationNeeded: Whether or not the user currently has a mailbox without a license. In this case, the user should be licensed within 30 days to avoid losing their mailbox.
• Licenses: A list of the user's licenses.
• LiveID: The user's unique login ID.
🚀 For more tips and in-depth articles, follow my blog: iteepk.com
More Videos:
How to manage Office 365 password expiration via PowerShell: • How to manage Office 365 users passwo...
How to create an External Email Warning Banner in Exchange: • Create and apply an External Email Wa...
Manage Office 365 Email Archiving via PowerShell: • Manage Office 365 Email Archiving | E...
How to Disable Active Directory Sync with Entra ID via PowerShell: • How to Disable Active Directory Synch...
How to Enable SMTP authentication in Office 365: • How to enable SMTP authentication | M...
How to create and use Microsoft To-Do: • How to create and use Microsoft to do
Смотрите видео Export Office 365 licensed Users with PowerShell онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь ITeePK 18 Октябрь 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,150 раз и оно понравилось 15 людям.