Microsoft Graph PowerShell Flags & Options
The Microsoft Graph PowerShell SDK: users, groups, licenses and the rest of Microsoft 365 through Graph.All Microsoft Graph PowerShell pages
- Connect-MgGraph -NoWelcome: hide the Welcome to Microsoft Graph! messageConnect-MgGraph -NoWelcome suppresses the Welcome to Microsoft Graph! message in scripts. A switch in every parameter set; check the session with Get-MgContext.
- Get-MgUser -All: return every user, not just the first 100Get-MgUser returns only the first page of 100 users unless you add -All. -Top and -PageSize compared, the List parameter set and the errors you can get.
- Get-MgUser -ConsistencyLevel eventual: advanced filters, -Search and -CountVariableendsWith, ne, not and -Search on users need -ConsistencyLevel eventual plus a count variable in Get-MgUser. Without them Graph returns Request_UnsupportedQuery.
- Get-MgUser -Property: why properties are empty and how to select themGet-MgUser returns a small default property set; AccountEnabled, Department or UsageLocation stay empty until requested with -Property (alias -Select).