Skip to main content

Handy Azure AD URLs & Commands

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

Popular posts from this blog

Welcome to The Egg Basket!

Welcome to The Egg Basket.  Here you'll find a mix of tech tips, fixes, and suggestions, as well as information about life in the digital age at large.  This will also serve as my own personal knowledgebase for issues I've come across.   Subjects may include but are not limited to Windows Server, Group Policy, Active Directory, Exchange Server, Exchange Migrations, Azure, Microsoft 365, VMware, Cisco ASA,  Windows 10, Windows 11, Android, Data Protection, Veeam, and Data Security. I hope you'll find it useful.

Denied by Default

I recently installed a fancy new firewall for a client.  Out of the box, the web filtering policies are blocking the installation of Office 365 apps from Microsoft. Curious, yes.  The category responsible for blocking is Risky Downloads .  Installing Office Apps? Risky, indeed. I had to add a Web Protection Exception with the following entries: ^([A-Za-z0-9.-]*\.)?microsoft\.com/ ^([A-Za-z0-9.-]*\.)?windowsupdate\.com/ ^([A-Za-z0-9.-]*\.)?officecdn.microsoft.com.edgesuite.net/ ^([A-Za-z0-9.-]*\.)?officecdn.microsoft\.com/ ^([A-Za-z0-9.-]*\.)?windows\.com/ What a wonky syntax.  Can you guess what the firewall vendor is?

Responding to Negative Reviews

Responding to Negative Reviews Sooner or later, it's bound to happen.  Someone visits your business and somehow they leave... less than impressed.  So much so, that they go public and leave a negative review.  Whatever the reason, there are appropriate ways to respond.  Keep in mind- when you're responding to that one review, your audience is not just the unhappy client; but also the potential thousands and thousands of folks that come across your reviews when they're looking for a product or service like yours.  Therefore, your review should not only address the issue at hand, but also let prospective clients know you genuinely care about their experience.  Here are some tips to help you craft the perfect response.  These are general tips but are applicable to most any industry; so, feel free to substitute customer/patient/visitor/reader/etc. where you see "client" below. Avoid:   Responding from emotion Reading something negative someone has to ...