Office 365 Cmd Instant
Get-MgUser -All | Select-Object DisplayName, UserPrincipalName, Id, AccountEnabled | Export-Csv -Path "C:\Temp\Users.csv" -NoTypeInformation
cscript ospp.vbs /inpkey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
setup.exe /download downloadConfig.xml
New-MgGroupMember -GroupId $Group.Id -DirectoryObjectId $User.Id
Append this to any destructive command (like Remove or Update) to see what would happen without actually making the change. office 365 cmd
To prevent a user from signing in (disable the account):
In a corporate environment, "Content Search" is a tool within the used to find emails, documents, and instant messages. Get-MgUser -All | Select-Object DisplayName
Get-MgUser -UserId "john.doe@yourcompany.com"
Test if you are connected by pulling your basic account info: Get-MgContext Essential Office 365 Commands for Admins office 365 cmd
You need the user ID and the SKU ID.
