Here is a collection of Azure AD URLs and commands I frequently use:
Disclaimer: These commands have not been tested in all environments or implementations. They may contain typos or errors. Updates not guaranteed so some commands may be deprecated. Edit closely and use at your own peril.
URLs:
https://portal.office.com/commerce/subscriptions.aspx
https://portal.office.com/admin/default.aspx
https://portal.office.com/Partner/ModernShell.aspx#DashboardView
https://portal.azure.com/
https://manage.windowsazure.com
https://account.windowsazure.com/Subscriptions
PowerShell Commands:
To force Azure AD Connect to perform a synchronization between on-prem AD and Azure AD:
First:
Import-Module ADSync
To perform a full sync:
Start-ADSyncSyncCycle -PolicyType Initial
or
To perform a delta sync:
Start-ADSyncSyncCycle -PolicyType Delta
Remove One User
Remove-MsolUser -UserPrincipalName username@contoso.onmicrosoft.com
Remove-MsolUser -UserPrincipalName username@contoso.onmicrosoft.com -RemoveFromRecycleBin
Remove Users enMasse
Connect-msolservice
Get-MsolUser | Select UserPrincipalName | Export-Csv C:\working\MSOLusers.csv
Then remove the global admins from that list and then save it. Please do not change the format of the file.
Import-Csv C:\users.csv | foreach { Remove-MsolUser -UserPrincipalName $_.userprincipalname -Force}
Get-MsolUser -ReturnDeletedUser -All | Remove-Msoluser -RemovefromRecycleBin –Force
Rename User
set-msoluserprincipalname -newuserprincipalname newname@contoso.com -userprincipalname oldname@contoso.com
Comments
Post a Comment
Thanks for your input!