Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Microsoft 365 Administration Cookbook

You're reading from   Microsoft 365 Administration Cookbook Enhance your Microsoft 365 productivity to manage and optimize its apps and services

Arrow left icon
Product type Paperback
Published in Nov 2024
Publisher Packt
ISBN-13 9781835888025
Length 516 pages
Edition 2nd Edition
Arrow right icon
Author (1):
Arrow left icon
Nate Chamberlain Nate Chamberlain
Author Profile Icon Nate Chamberlain
Nate Chamberlain
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Chapter 1: Microsoft 365 Setup and Basic Administration 2. Chapter 2: Microsoft 365 Identity and Roles FREE CHAPTER 3. Chapter 3: Administering Microsoft 365 with PowerShell 4. Chapter 4: Managing Exchange Online 5. Chapter 5: Setting Up and Configuring Microsoft Search 6. Chapter 6: Administering OneDrive for Business 7. Chapter 7: Configuring Power Platform 8. Chapter 8: Administering SharePoint Online 9. Chapter 9: Managing Microsoft Teams 10. Chapter 10: Managing Viva Engage 11. Chapter 11: Configuring and Managing Users in Microsoft Entra ID 12. Chapter 12: Understanding Microsoft Defender 13. Chapter 13: Understanding the Microsoft Purview Portal 14. Chapter 14: Monitoring Microsoft 365 Apps and Services 15. Index 16. Other Books You May Enjoy Appendix: Microsoft 365 Subscriptions and Licenses

Getting a list of all users with user properties

This recipe outlines how to retrieve a list of all users in your Microsoft 365 tenant along with their user properties using the Microsoft Graph PowerShell SDK. This can be valuable for audits, compliance checks, or general administrative overviews.

Getting ready

Follow the guidance in the Setting up PowerShell recipe from Chapter 1, Microsoft 365 Setup and Basic Administration, to connect to your Microsoft 365 tenant via PowerShell. Ensure you have administrative privileges on your system, as well as administrative permissions to modify user profiles in your Microsoft 365 tenant such as User Administrator or Global Administrator.

How to do it…

Run the Get-MgUser cmdlet with selected properties to retrieve information about all users:

Get-MgUser -All | Format-Table DisplayName, UserPrincipalName, JobTitle, Department

How it works…

The Get-MgUser cmdlet fetches users from your Microsoft 365 tenant. You...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image