Get-MSOLUser has a standard limit of 500 therefore the all banner allows us to have all accounts

January 28, 2022 Off By Virgil Olson

Get-MSOLUser has a standard limit of 500 therefore the all banner allows us to have all accounts

Great now We have the name for the sku i have to used to see my personal beginner individual base since all my children is licensed with that sku. To be sure I am able to work a simple PowerShell command to create a list of the customers having that licenses. I will do this and also it exhibit immediately within the PowerShell screen since I simply have 18 users nevertheless may choose to dispose of they to a CSV inside manufacturing conditions.

  1. In that same PowerShell windows run: get-msoluser -all | where-object
  2. Once that works you really need to discover a list similar to this:

Observe that i’ve a€?-all’ listed in the demand after a€?get-msoluser’ though do not use they in my own display photos; it is because my student number is actually 18 nevertheless their’s can be a lot more. All things in my college student licenses export looks good thus I now know I can select on merely my personal pupils by their unique licenses and use that to assign the newly produced messaging rules!

Assigning the texting policy to only children according to their own license

We’re going to integrate the PowerShell command from above that individuals used to read all consumers using the licenses of M65EDU_A5_STUDENT using the Cs-TeamsMessagingPolicy command to after that apply it to people users.

For this we intend to utilize a varying to house the users we pull in then pipe those customers to the Cs-Teams command. The following is really what the overall command looks like: $members=get-msoluser -all | where-object

Let us break-down that command real quick:a€“ $people could be the adjustable that hold the consumers our company is pulling ina€“ Get-MSOLUser is actually a regular order whenever using customers in Azure post / company 365a€“ We are next looking for consumer items that have an AccountSkuID match of a€?M365EDU_A5_STUDENTa€?

Once they runs we’re able to next just type $customers and hit submit observe the full list (again you should pipe your own to a CSV for analysis in creation). Below you will observe the initial order operate in conjunction with me looking at the people inside variable:

Our company is today prepared to progress along with his, and all of more people, to our brand new zero speak coverage

Before we change the texting plan why don’t we see just what students is assigned to make sure that as soon as we manage with our modification we’ve got something to examine. For the Teams Admin middle choose people within the left hand navigation pane.

We could observe that Al enjoys 9 international policies assigned and 0 per-user strategies designated. This simply means he or she is just allotted to global default guidelines which we are able to validate by hovering throughout the policies allocated book.

We can furthermore validate just what messaging coverage was used on a student by working the following: Get-CsOnlineUser -Identity userUPN | ft DisplayName, TeamsMessagingPolicy

We are able to read my sample college student Al has nothing noted for texting coverage because he or she is allocated the worldwide Default:

Quick tip: when creating large-scale modifications via PowerShell it could be a good idea to break this up into batches. We do not cover how to accomplish that in this article but undoubtedly something you should see.

When you find yourself ready to alter the texting coverage project to all your pupils make use of the exact same PowerShell administrator windows from earlier operate this order: foreach($representative in $members)

Let us breakdown that command genuine quick:a€“ our company is working a foreach and creating a temporary variable of $affiliate that’ll be accustomed get user by user from your a number of $membersa€“ our company is subsequently incorporating the policy (giving) of a€?EDU No exclusive Chata€? that people created prior to each and every affiliate employing their UserPrincipalName from our $members number