When using the PowerShell command Get-MsolUser, you’ll sometimes see the error message “You must call the Connect-MsolService cmdlet before calling any other cmdlets”.
The output may be similar to this:
PS C:\> Get-MsolUser -UserPrincipalName morten@skrubbeltrang.onmicrosoft.com
Get-MsolUser : You must call the Connect-MsolService cmdlet before calling
any other cmdlets.
At line:1 char:1
+ Get-MsolUser -UserPrincipalName morten@skrubbeltrang.onmicrosoft.com
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [Get-MsolUser],
MicrosoftOnlineException
+ FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.
MicrosoftOnlineException,Microsoft.Online.Administration.Automation.GetUser
This error message indicates that you have not established a connection to the Azure AD yet.
To fix this issue, you must connect using the Connect-MsolService command like this:
PS C:\> Connect-MsolService
But even that is hardly going to help solve your PowerShell problem as the MSOnline PowerShell module died…
PowerShell Was Never Meant To Run Your Helpdesk
Here’s the thing: PowerShell is phenomenal for automation and bulk changes. But as an ad-hoc first-line support tool? It’s a nightmare. Trying to base your first-level ad-hoc user support on PowerShell will get you:
✖ Lost productivity at every level.
✖ Frustrated end-users waiting longer for resolution.
✖ Senior IT talent bogged down in first-line tasks instead of optimizing security or planning migrations.
This isn’t just inefficient – it’s costly.
EasyEntra Changes Everything
This is where EasyEntra comes in.
Designed from the ground up to feel like the well-known Active Directory Users & Computers (ADUC), EasyEntra provides a unified and intuitive interface for managing both on-premises/hybrid and cloud-only environments.
With EasyEntra, your support staff can:
Automate user onboarding and offboarding.
Trigger an Entra Connect delta sync.
Manage mailbox delegation and localization.
Configure Outlook auto-mapping.
- And lots more.
…all from a single, intuitive UI without depending on PowerShell.
Eliminate your PowerShell pain and download the EasyEntra 30-day trial.
“One of the best products I’ve used.” – CIO, Mirick Law, United States
“We really love working with EasyEntra.” – Head of IT, IKN GmbH, Germany
“EasyEntra has significantly streamlined our workflow, simplifying everything. It feels almost like a revolution.” – IT Manager, Arjeplog Kommun, Sweden
What MSOnline Connection Would Look Like (If It Actually Worked)
After typing Connect-MSOnline, the following authentication should show:
If the username and directory you entered are valid you’re requested to enter your password:
If multi-factor authentication is enabled for your account you’ll be asked to enter the validation token:
Once authenticated, you can rerun the Get-MsolUser command, and this time you should hopefully see the expected result:
PS C:\> Get-MsolUser -UserPrincipalName morten@skrubbeltrang.onmicrosoft.com UserPrincipalName DisplayName isLicensed ----------------- ----------- ---------- morten@skrubbeltrang.onmicrosoft.com morten skrubbeltrang True
The PowerShell MSOnline Module
The Get-MSOLUser command is part of the MSOnline PowerShell module.
In some cases, you can end up with multiple versions of the MSOnline module installed side by side. Troubleshooting which module is being loaded can be pretty confusing.
Also, in some cases, installing the module itself causes some headaches.
If you want to know more about the installation and troubleshooting of the MSOnline module, look at this article. It includes a full explanation of the module load order in PowerShell.
How to Manage AD and EXO Mailboxes In One Box
Many admins are frustrated that you need multiple web consoles, PowerShell, and an on-premises Exchange Server in order to manage Microsoft 365.
With EasyEntra, all daily Microsoft 365 mailbox operations will become available directly in standard AD user properties. Even the configuration of calendar permissions, which is normally only available via complex PowerShell scripting:
If you’re looking to make your first-line helpdesk work efficiently and confidently, EasyEntra has got you covered.
✅ Reduced training of new Junior IT staff.
✅ No more escalation of (what should be) simple tickets to Senior IT.
✅ Automated onboarding and offboarding of users without complex, ever-changing PowerShell scripts.
Watch how EasyEntra fuses ease of use with complexity to make user offboarding fast, accessible, and consistent:
Improve the efficiency of your helpdesk today: Download the 30-day trial.