Streamline Your Workflow: Upgrade to Microsoft Graph PowerShell now!

Are you wondering what to do now that Azure AD, Azure AD Preview and MSOnline PowerShell modules are officially deprecated?

It’s time to upgrade to Microsoft Graph PowerShell for a seamless experience!

Simplify Your Workflow with Microsoft Graph PowerShell

With the official deprecation of Azure AD, Azure AD Preview, and MSOnline PowerShell modules Microsoft Graph PowerShell is now the preferred PowerShell module to use for interacting with Microsoft Entra ID and other Microsoft services.  

So, here’s the deal: Scripts that you’ve written in Azure AD PowerShell won’t just seamlessly switch over to Microsoft Graph PowerShell. They’re like two different languages. But don’t sweat it too much – the new cmdlet names are pretty straightforward. Instead of the old ‘AzureAD’ or ‘AzureADMS’, you’ll be using ‘Mg’. For instance, if you’re used to ‘Get-AzureADUser’, now it’s ‘Get-MgUser’.

But here’s the kicker: It’s not just about memorising new names. There’s a bit more to it. We’re talking about renamed modules, tweaked parameters, and other nitty-gritty changes.

We’ve got your back though! We’ve cooked up a simple process to help you upgrade your existing scripts. It’s a two-step dance: first, you’ll need to jot down what your scripts are all about, and then it’s time to give them a makeover. Easy peasy, right?

Document your current scripts

Alright, let’s get down to it. Documentation is important! How many of you can say you feel like you’re 100% on top of your documentation? Here’s the breakdown on documenting your current scripts:

  1. Purpose: What’s the script all about? What’s its main gig?
  2. Location: Where are you keeping this script safe and sound? And where does it do its thing?
  3. Frequency of execution: How often does this script get a workout? And where does it flex its muscles?
  4. Importance: How crucial is this script for business? Is it a big player or more of a supporting act?
  5. Length: Is this script a short and snappy read or a long and winding tale?
  6. Cmdlets used and number of calls: What tools does this script rely on, and how often does it call upon them?
  7. Still required: Can you get the job done with something else, or is this script still the star of the show?
  8. Improvement points: Could this script do with a bit of a makeover? Maybe a new filter or a modern authentication touch-up?

Overall score: Fancy applying a score to each criteria to help you figure out what needs your attention first? You know, like a boss prioritising tasks. For example, is this script a critical player, or is it more of a background extra?

Got all that? Nice. Let’s move on!

Update your current scripts

Alright, so you’ve documented your scripts – nice one! Now, let’s roll up our sleeves and get them upgraded. Here’s how: 

  1. Start simple / low score: If you’re using a scoring system, kick things off by testing the upgrade with your less complex, non-critical scripts. Get a feel for how things are going before diving into the deep end. 
  2. Map cmdlets: Use the Cmdlet map to find the Microsoft Graph PowerShell versions of your cmdlets. It’s like finding the right key for each door. 
  3. Map parameters / switches: Switch over to Microsoft Graph PowerShell syntax and map out your parameters and switches. It’s all about speaking the same language. 
  4. Map filters: Do the same with your filters, translating them into Microsoft Graph PowerShell syntax. Think of it like translating from one dialect to another. 
  5. Check cmdlet documentation: Keep an eye out for updates from real people adding examples for using the new cmdlets. It’s like getting tips from the pros. 
  6. Use dedicated apps and adhere to least privilege: Because Microsoft Graph PowerShell permissions aren’t pre-authorized, you’ll need to request permissions based on your needs. It’s all about playing it safe. 
  7. Understand required permissions: Use Find-MgGraphCommand and Find-MgGraphPermission to suss out what permissions your cmdlets need. It’s like knowing which keys unlock which doors. 
  8. Understand output objects: Get to grips with the changes in output objects in Microsoft Graph PowerShell. The Get-Member cmdlet will be your best mate for understanding what’s what. 
  9. Optionally, understand the underlying API: Want to go even deeper? Use Find-MgGraphCommand to track down the API path a cmdlet calls. And if you’re feeling really adventurous, dive into Graph Explorer to explore the underlying API calls. Just be sure to reference the API reference content along the way for extra guidance.

    Example 

    The equivalent of the Get-AzureADUser cmdlet is Get-MgUser. This cmdlet has additional parameters that let you do more with its output. For example, the -ConsistencyLevel parameter that allows you to do Count, Filter, and Search. 

    Connect-MgGraph -Scopes ‘User.Read.All’ 

    Get-MgUser -ConsistencyLevel eventual -Count userCount -Filter “startsWith(DisplayName, ‘a’)” -Top 1 

Are there Limitations with Graph?

The short answer is yes. Let’s talk about the nitty-gritty limitations you might bump into with Microsoft Graph PowerShell: 

  1. For the equivalent of -SearchString, you’ll need to use -Search and -ConsistencyLevel eventual in all cases. Keep in mind, the query might still work without ‘eventual’. Alternatively, you can use -Filter instead. So, for instance, if you want to find a user named ‘Lee Gu’, you’d use Get-MgUser -Filter “DisplayName eq ‘Lee Gu'”. 
  2. When it comes to passing nested parameters, you’ll need to use hash tables. Think of it like packing your luggage – everything needs its own little compartment. Check out a sample of nested parameters to get the hang of it. 
  3. Pro-tip alert! Make the most of the Microsoft Graph PowerShell -ConsistencyLevel parameter. It’s a game-changer, allowing you to do things like count with $count! For more juicy details, dive into Advanced query parameters. 

What’s next?

Alright, let’s talk about what’s next on your to-do list: 

  1. Uninstall AzureAD PowerShell: Before diving into the new stuff, make sure to bid farewell to the old module. Give it a good uninstall to clear the way for the shiny new Microsoft Graph PowerShell. 
  2. Install the Microsoft Graph PowerShell SDK: Ready to jump into the future? Follow these step-by-step instructions to get the Microsoft Graph PowerShell SDK up and running. It’s like installing a new app on your phone – but for your scripts. 
  3. Cmdlet map: Feeling a bit lost in the transition? No worries! Use the Cmdlet map to find the Microsoft Graph PowerShell equivalents of your old cmdlets. It’s like a treasure map leading you to all the new goodies. 

Check our Microsoft’s advanced query parameters here 

Related Post

How well do you use the
Apple Apps Google Workspace Microsoft 365
tools in your workplace?

Find out if you’re working with the tools OR if you’ve got the
tools working for you.

What Industry Are You In?

Using Apple Apps, Google Workspace or Microsoft 365?

What Type of user are you?

🫣 Entry User | 🤹 Skilled User | 👑 Elite User

Take the quiz to find out. 

Privacy Policy

Using Technology Better Privacy Commitment

Introduction

We hold the privacy of your personal information in the highest regard.

Using Technology Better regards customer privacy as an important part of our relationship with our customers. The following privacy policy applies to all Using Technology Better users, and conforms to Internet privacy standards.

This policy will be continuously assessed against new technologies, business practices and our customers’ needs.

If you have questions or concerns regarding this statement, you should first contact the support team on our Contact Us Page.

Collection of Information

In order to use the Using Technology Better website, we may require information from you in order to provide the best service possible.

All correspondence may also be collected and stored, particularly in regard to sales, support and accounts, including Email.

Any information collected by Using Technology Better is collected via correspondence from you or your company. This may be via the telephone, Email, mail, fax or directly through our website.

Visitors and customers of japan.usingtechnologybetter.com will have their information shared back to DAIWABO INFORMATION SYSTEM CO., LTD. and DIS Service & Solution Co., Ltd.

Use of Collection Information

Any details collected from Using Technology Better customers is required in order to provide you with our

products and/or services, and a high level of customer service.

Correspondence is recorded in order to provide service references, and to assist in our staff development.

Web Site Use Information

Similar to other commercial Web sites, our Web sites utilize a standard technology called “cookies” (see explanation below, “What Are Cookies?”) and web server log files to collect information about how our Web site is used.

Information gathered through cookies and Web server logs may include the date and time of visits, the pages viewed, time spent at our Web site, and the Web sites visited just before and just after our Web site.

Storage of Collected Information

The security of your personal information is important to us. When you enter sensitive information (such as credit card numbers) on our website, we encrypt that information using secure socket layer technology (SSL).

When Credit Card details are collected, we simply pass them on in order to be processed as required. We never permanently store complete Credit Card details.

We follow generally accepted industry standards to protect the personal information submitted to us, both during transmission and once we receive it.

If you have any questions about security on our Website, you can email us at <ContactEmail>.

Access to Collected Information

If your personally identifiable information changes, or if you no longer desire our service, you may correct, update, delete or deactivate it by emailing us at <ContactEmail>.

Orders

If you purchase a product or service from us, we may request certain personally identifiable information from you.

You may be required to provide contact information such as:

Name

Email

Postal address

Your school or organisation

Financial information (such as credit card number, expiration date, name on card, card billing address).

We use this information for billing purposes and to fill your orders. If we have trouble processing an order, we will use this information to contact you.

Communications

Using Technology Better uses personally identifiable information for essential communications, such as

Emails

Accounts information

Critical service details.

We may also use this information for other purposes, including some promotional Emails.

If at any time a customer wishes not to receive such correspondence, they can request to be removed from any mailing lists by contacting support.

You will be notified when your personal information is collected by any third party that is not our agent/service provider, so you can make an informed choice as to whether or not to share your information with that party.

Third Parties

Using Technology Better may at its discretion use other third parties to provide essential services on our site or for our business processes.

We may share your details as necessary for the third party to provide that service.

These third parties are prohibited from using your personally identifiable information for any other purpose.

Using Technology Better does not share any information with third parties for any unknown or unrelated uses.

What Are Cookies?

A cookie is a very small text document, which often includes an anonymous unique identifier. When you visit a Web site, that site’s computer asks your computer for permission to store this file in a part of your hard drive specifically designated for cookies.

Each Web site can send its own cookie to your browser if your browser’s preferences allow it, but (to protect your privacy) your browser only permits a Web site to access the cookies it has already sent to you, not the cookies sent to you by other sites.

Browsers are usually set to accept cookies. However, if you would prefer not to receive cookies, you may alter the configuration of your browser to refuse cookies.

If you choose to have your browser refuse cookies, it is possible that some areas of our site will not function as effectively when viewed by the users.

A cookie cannot retrieve any other data from your hard drive or pass on computer viruses.

How Do We Use Information We Collect from Cookies?

As you visit and browse our Web site, the site uses cookies to differentiate you from other users. In some cases, we also use cookies to prevent you from having to log in more than is necessary for security.

Cookies, in conjunction with our Web server’s log files, allow us to calculate the aggregate number of people visiting our Web site and which parts of the site are most popular. This helps us gather feedback to constantly improve our Web site and better serve our clients.

Cookies do not allow us to gather any personal information about you and we do not intentionally store any personal information that your browser provided to us in your cookies.

Legal

We reserve the right to disclose your personally identifiable information as required by law and when we believe that disclosure is necessary to protect our rights and/or comply with a judicial proceeding, court order, or legal process served on our Website.

Links

Links on the Using Technology Better site to external entities are not covered within this policy. The terms and conditions set out in this privacy statement only cover the domain name of usingtechnologybetter.com

Changes to Privacy Policy

If we decide to change our privacy policy, we will post those changes to this privacy statement, and other places we deem appropriate so that you are aware of what information we collect, how we use it, and under what circumstances, if any, we disclose it.

We reserve the right to modify this privacy statement at any time, so please review it periodically. If we make material changes to this policy, we will not use the personal information you have submitted to us under this Privacy Policy in a manner that is materially inconsistent with this Privacy Policy, without your prior consent

Delivery Policy

Most goods are digitally delivered instantly via email.  Our services may be delivered either via an online medium or live in person.

For our online delivery see below.  For services delivered live onsite, please refer to our speaker agreement form which is emailed to you on confirmation of booking.

Refund Policy

We do not offer refunds or returns unless we cannot supply goods or services or the goods or services are not delivered as promised.

Australian law is the governing body for all work, goods and services supplied by Using Technology Better.

Marketing Release

Using Technology Better (UTB) may film, record, and photograph me (the results of which are the “Recordings”). UTB may also incorporate into any production(s) any separate content (e.g., quotes, testimonials, biographical information, profiles, photos, videos, sound recordings, artwork, etc.) I provide to UTB or approve in writing (“Materials”).

1.License

I grant to UTB an irrevocable, perpetual, worldwide, royalty-free license to, in its sole discretion, (i) edit, translate, and modify the Recordings and the Materials, (ii) attribute the Recordings and Materials to me by my name, age, and city and state of residence, (iii) incorporate the Recordings and the Materials into content to promote UTB, its programs, or products (“Content”), and (iv) publicly use, distribute, reproduce, create derivative works from, and perform/display the Content, and any excerpts thereof, in any language.

2. No Compensation.

I grant this permission without any financial or other obligation of any nature.

 

For any issues or concerns please contact us