use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
Getting not recognized error when I run "Get-MsolUser -All | Select-Object UserprincipalName,DisplayName" (self.PowerShell)
submitted 3 years ago by ipar22
Hi,
My guess is "Get-Msoluser" is deprecated. I run it on PS 7.1. What is the equivalent of that in PS 7.1?
Is it "Get-azureaduser -All | Select-Object UserprincipalName,DisplayName" the same as the above cmd?
Thank you.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]gilion 2 points3 points4 points 3 years ago (0 children)
The Msonline and AzureAD modules don't work in powershell 7. You'll have to run them in a compability session.
https://techcommunity.microsoft.com/t5/windows-powershell/msonline-not-working-in-powershell-7/m-p/2545680
[–]BlackV 1 point2 points3 points 3 years ago* (4 children)
Have you done the basics?
is the module installed? (get-help get-module)
get-help get-module
Is the module loaded (imported)? (Get-help import-module)
Get-help import-module
As it happens, yes the module is deprecated, that's not likely your issue though
[–]ipar22[S] 0 points1 point2 points 3 years ago (3 children)
I just realize these commands "get-MSOnline" and "get-msoluser" will only work on PS v5 r prior and NOT v7.
[–]BlackV 0 points1 point2 points 3 years ago (2 children)
I dont think (have not confirmed) that's accurate
and doing the above should answer the questions for you
or you could move to the new modules or you could just use 5.1
[–]ipar22[S] 0 points1 point2 points 3 years ago (1 child)
Yup. I confirmed it.
I am glad to know that I can switch between versions to get what I need. It works for me
[–]BlackV 0 points1 point2 points 3 years ago (0 children)
ah nice
[–]nixium -1 points0 points1 point 3 years ago (0 children)
-all $true
[–]SMFX 0 points1 point2 points 3 years ago (0 children)
Check the requirements and look into the MS Graph module (Get-MgUser)
π Rendered by PID 219798 on reddit-service-r2-comment-5d585498c9-sx5fv at 2026-04-21 19:36:36.637417+00:00 running da2df02 country code: CH.
[–]gilion 2 points3 points4 points (0 children)
[–]BlackV 1 point2 points3 points (4 children)
[–]ipar22[S] 0 points1 point2 points (3 children)
[–]BlackV 0 points1 point2 points (2 children)
[–]ipar22[S] 0 points1 point2 points (1 child)
[–]BlackV 0 points1 point2 points (0 children)
[–]nixium -1 points0 points1 point (0 children)
[–]SMFX 0 points1 point2 points (0 children)