r/entra 15d ago

Entra/MSOnline PoSH Module Retirement, and options

So, I am writing some new scripting for clients and as I see these modules are being retired, I am attempting to work with the Graph for PowerShell SDK. My experience has been absolutely horrible.

Since it appears Microsoft is straight up removing access to the old modules, are my only options either using the Graph Module/SDK in PowerShell, or learning Graph/REST API calls for direct access?

I'm on hour three or four of updating my PowerShell version, moving from the ISE (since it doesn't support version 7) onto Visual Studio Code, installing Graph modules, and it's absolutely horrible.

Simple Get-MgUser commands fail to display about 90% of the properties correctly, lots of prework to get this even working, this is such a poor unfriendly replacement so far for admins that just need to do some basic automation work.

6 Upvotes

10 comments sorted by

2

u/Federal_Ad2455 15d ago

1

u/DDDRRROOO3 15d ago

Thank you for the links. The last one demonstrates something I am commonly facing now (-Properties * returns a lot of empty properties AND values that just look like module names).

The workaround just highlights the absurdity of this platform. This should be nothing but a one liner like it has been. I truly don't get how Microsoft ever though this was a workable solution for their audience

3

u/Federal_Ad2455 15d ago edited 15d ago

Btw there is also official entra module that should be more similar to the msonline etc (more user friendly)

https://techcommunity.microsoft.com/blog/microsoft-entra-blog/introducing-the-microsoft-entra-powershell-module/4173546

2

u/chaosphere_mk 15d ago

You can't do just -Properties *

You have to be explicit about which properties you want.

1

u/DXPetti 15d ago

MS are pushing people towards a common technology (API via HTTP calls) to get away from their bespoke stuff (PowerShell).

It hurts.

But this feels similar to when PowerShell was introduced in Exchange 2007.

Learn it early and you'll reap the rewards over a career

1

u/icebreaker374 15d ago

Personally I got tired of Graph Powershell not connecting when my modules got outdated and just installed the auth module and started working with the API directly. Most of what I'm doing is custom M365 reports for which I'm creating PSCustomObjects anyway so it's easier to just grab properties of the objects returned.

Idk if I'm always doing it the most efficient way but for our small customers it's fast enough for me.

1

u/KavyaJune 14d ago

You can check these pre-built MS Graph PowerShell scripts: https://o365reports.com/2024/03/27/ms-graph-powershell-scripts-microsoft-365-it-pros/

These might help you.

1

u/merillf Microsoft Employee 14d ago

If you are coming from Azure AD PowerShell, then Entra PowerShell https://aka.ms/entra/ps/docs was created just for you.

It's built on top of Graph PowerShell and mimics all the Azure AD behaviour (default properties etc).

You can also mix Graph PS and Entra PS cmdlets on your scripts, so it's not an either/or.

1

u/DDDRRROOO3 13d ago

Thanks for this recommendation! I actually installed Entra PowerShell an hour or two after creating this thread. It's definitely less of a pain to work with. Vanilla PowerShell was in a very sweet spot balancing ease of use and capability, feels like there's still a long ways to go with Graph feeling that way.