Get-MSOLUser keeps a standard restriction of 500 so that the all flag allows us to get all reports

Get-MSOLUser keeps a standard restriction of 500 so that the all flag allows us to get all reports

Great now i’ve title from the sku i have to used to get a hold of my personal college student user base since all my personal college students should always be trained thereupon sku. To make sure I am able to work a quick PowerShell demand to pump out a summary of the consumers that have that license. I will do this and have now it show directly from inside the PowerShell screen since I only have 18 customers but you should dump they to a CSV within production conditions.

  1. For the reason that same PowerShell screen run: get-msoluser -all | where-object
  2. Once that runs you need to see an inventory such as this:

Observe that I have a€?-all’ listed in the order right after a€?get-msoluser’ though avoid the use of it in my own monitor photos; the reason being my beginner matter is actually 18 nonetheless their’s can be far more. Everything in my college student license export is pleasing to the eye so I today learn I am able to select in just my pupils by their licenses and employ that to assign our very own newly created messaging coverage!

Assigning the texting coverage to only students according to their own license

We will mix our very own PowerShell command from above that people accustomed read all users with the licenses of M65EDU_A5_STUDENT using the Cs-TeamsMessagingPolicy order to then apply it to those consumers.

To get this done we intend to need an adjustable to accommodate the people we pull-in and then pipe those users inside Cs-Teams order. Below is exactly what the general order appears to be: $members=get-msoluser -all | where-object

Let’s break-down that demand actual fast:a€“ $customers is the varying that will dwelling the customers we are pulling ina€“ Get-MSOLUser is a standard demand whenever using consumers in Azure AD / Office 365a€“ we’re next looking individual items with an AccountSkuID match of a€?M365EDU_A5_STUDENTa€?

When they works we’re able to after that just type $users and newspapers insert observe the complete record (again you ought to pipe yours to a CSV for overview in manufacturing). Below you will observe the original order operate together with me personally reviewing the users in changeable:

We’re today prepared to move forward along with their, and all sorts of other pupils, to your brand new no chat policy

Before we replace the messaging rules let us see just what students is now assigned making sure that when we carry on with our change we have one thing to evaluate. Inside the Teams Admin heart check-out people from inside the left hand navigation pane.

We are able to see that Al provides 9 global guidelines assigned and 0 per-user procedures designated. This implies he or she is only allotted to worldwide default policies which we are able to verify by hovering during the guidelines designated text.

We are able to furthermore verify exactly what messaging policy is placed on a student by running the immediate following: Get-CsOnlineUser -Identity userUPN | ft DisplayName, TeamsMessagingPolicy

We can see my trial beginner Al doesn’t have anything listed for texting plan because he or she is assigned the Global standard:

Fast idea: when making major variations via PowerShell it could be a good idea to split this up into batches. We do not cover just how to do this in this post but certainly something you should think about.

While ready to alter the texting policy task to all your children make use of the same PowerShell admin screen from prior to operate this order: foreach($associate in $users)

Let’s break down that demand real fast:a€“ the audience is operating a foreach and promoting a short-term varying of $associate which will be used to get consumer by user from your a number of $membersa€“ our company is after that including the insurance policy (giving) of a€?EDU No personal Chata€? that people developed prior to each user using their UserPrincipalName from our $members number

Leave a Reply