Get-MSOLUser has actually a default restrict of 500 therefore, the all banner we can get all account

Great now i’ve title for the sku I need to used to come across my student consumer base since all my people must be registered with that sku. To make sure I’m able to run an instant PowerShell order to pump out a list of the people which have that licenses. I will achieve this and now have they display straight for the PowerShell windows since I have only have 18 consumers nevertheless may choose to dispose of it to a CSV in your production atmosphere.

  1. In that exact same PowerShell windows operate: get-msoluser -all | where-object
  2. When that runs you really need to discover an inventory similar to this:

Notice that i’ve a€?-all’ placed in the order just after a€?get-msoluser’ though don’t use they during my screen photos; simply because my scholar matter are 18 nevertheless the’s is likely to be significantly more. Everything in my beginner license export is pleasing to the eye therefore I today know I’m able to select on just my personal people by their licenses and employ that to assign all of our recently produced texting coverage!

Assigning the messaging coverage to only youngsters according to their license

We intend to merge our PowerShell demand from above that people regularly see all users using the permit of M65EDU_A5_STUDENT because of the Cs-TeamsMessagingPolicy command to subsequently put it on to those consumers.

To get this done we’re going to utilize an adjustable to house the users we pull in then pipe those consumers in to the Cs-Teams order. The following is exactly what the general demand appears like: $members=get-msoluser -all | where-object

Let’s break up that order actual rapid:a€“ $members will be the variable that may dwelling the consumers we are pulling ina€“ Get-MSOLUser is actually a typical demand whenever using consumers in Azure offer / Office 365a€“ the audience is then looking for individual things that have an AccountSkuID match of a€?M365EDU_A5_STUDENTa€?

As soon as it operates we’re able to subsequently just type $customers and press enter to see the complete number (again you need to pipe yours to a CSV for evaluation in generation). Below you’ll see the preliminary command run in addition to myself examining the people inside the varying:

The audience is now ready to progress along with his, and all of other youngsters, to your new no speak policy

Before we alter the texting policy why don’t we see just what a student is allocated in order that when we manage with our changes we’ve something you should contrast. Within the groups Admin middle head to customers inside the left hand routing pane.

We can note that Al provides 9 international strategies allocated and 0 per-user procedures designated. This means he or she is merely allotted to international standard policies which we could examine by hovering across the strategies allocated text.

We can also confirm just what messaging rules is used on students by working the following: Get-CsOnlineUser -Identity userUPN | ft DisplayName, TeamsMessagingPolicy

We can read my test scholar Al has nothing listed for Messaging coverage because he or she is allocated the Global standard:

Fast idea: when making major modifications via PowerShell it might be wise to break this up into batches. We don’t include tips accomplish that in this post but certainly one thing to think about.

While you are willing to change the texting coverage task to your children use the exact same PowerShell administrator windows from earlier operated this order: foreach($associate in $customers)

Let us break down that demand genuine fast:a€“ our company is working a foreach and generating a temporary variable of $member which is always go user by individual from your set of $membersa€“ we’re after that incorporating the policy (granting) of a€?EDU No Private Chata€? that individuals created early in the day every single member utilizing their UserPrincipalName from our $customers list