New-MgUser — Export ResultsIT technician command center
Microsoft Graph · Entra ID and Graph

New-MgUser — Export Results

Export the output of New-MgUser for documentation or review.

Copy-ready commandNew-MgUser — Export Results
New-MgUser -DisplayName "Jane Smith" -UserPrincipalName jsmith@contoso.com -MailNickname jsmith -AccountEnabled -PasswordProfile $passwordProfile | Export-Csv .\output.csv -NoTypeInformation
Production warning

Directory write operations can affect tenant access.

Requirements and permissions

Requirements
Microsoft.Graph PowerShell SDK
Permissions
Graph delegated or application permissions
Last reviewed
2026-07-31

Examples

Export Results

Export the output of New-MgUser for documentation or review.

New-MgUser -DisplayName "Jane Smith" -UserPrincipalName jsmith@contoso.com -MailNickname jsmith -AccountEnabled -PasswordProfile $passwordProfile | Export-Csv .\output.csv -NoTypeInformation

Original command

Create a Microsoft Entra ID user.

New-MgUser -DisplayName "Jane Smith" -UserPrincipalName jsmith@contoso.com -MailNickname jsmith -AccountEnabled -PasswordProfile $passwordProfile

Common errors

Command not found

Confirm Microsoft.Graph PowerShell SDK is installed and available in your current shell.