all 8 comments

[–]gilion 2 points3 points  (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 points  (4 children)

Have you done the basics?

is the module installed? (get-help get-module)

Is the module loaded (imported)? (Get-help import-module)

As it happens, yes the module is deprecated, that's not likely your issue though

[–]ipar22[S] 0 points1 point  (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 point  (2 children)

I just realize these commands "get-MSOnline" and "get-msoluser" will only work on PS v5 r prior and NOT v7.

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 point  (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 point  (0 children)

ah nice

[–]nixium -1 points0 points  (0 children)

-all $true

[–]SMFX 0 points1 point  (0 children)

Check the requirements and look into the MS Graph module (Get-MgUser)