Get-MSOLUser has a standard maximum of 500 so that the all flag permits us to have all records

Get-MSOLUser has a standard maximum of 500 so that the all flag permits us to have all records

Great now I have title of the sku I want to used to pick my beginner user base since all my pupils need registered with this sku. To make sure I am able to operated a fast PowerShell demand to generate a listing of the consumers having that permit. I’ll achieve this and have they exhibit immediately into the PowerShell screen since I simply have 18 consumers nevertheless should dispose of it to a CSV in your manufacturing environment.

  1. Where same PowerShell windows run: get-msoluser -all | where-object
  2. When that works you will want to discover an inventory similar to this:

Notice that You will find a€?-all’ placed in the demand just after a€?get-msoluser’ though don’t use they in my display screen photos; the reason being my personal pupil count is actually 18 but your’s is likely to be much more. All things in my pupil license export is pleasing to the eye and so I now learn I’m able to pick on merely my youngsters by her permit and rehearse that to assign our very own recently produced texting policy!

Assigning the texting policy to simply students according to her license

We’re going to merge all of our PowerShell demand from above that individuals used to read all people together with the license of M65EDU_A5_STUDENT making use of the Cs-TeamsMessagingPolicy demand to subsequently use it to those customers.

To do this we’re going to make use of a varying to accommodate the customers we pull in then pipe those people inside Cs-Teams order. Here is really what all round demand looks like: $members=get-msoluser -all | where-object

Why don’t we break up that demand actual rapid:a€“ $people will be the changeable that may hold the users our company is taking ina€“ Get-MSOLUser are a regular command whenever using users in Azure advertising / workplace 365a€“ Our company is then in search of individual objects with an AccountSkuID complement of a€?M365EDU_A5_STUDENTa€?

As soon as it operates we can easily next merely type $people and click enter to see the complete listing (once again you will want to pipe yours to a CSV for evaluation in generation). Below you will observe the first order run with myself looking at the users within the changeable:

The audience is today prepared move ahead and set their, and all sorts of other youngsters, to our brand-new no speak policy

Before we change the messaging rules why don’t we see what students is allocated to make sure that when we carry on with this changes we’ve something you should contrast. When you look at the groups Admin Center check-out consumers inside left hand navigation pane.

We could see that Al has actually 9 global guidelines designated and 0 per-user procedures assigned. This simply means he is merely allotted to worldwide default plans which we could verify by hovering around strategies assigned text.

We could additionally confirm what chatting coverage is put on a student by working the immediate following: Get-CsOnlineUser -Identity userUPN | ft DisplayName, TeamsMessagingPolicy

We could discover my personal test college student Al doesn’t have anything indexed for Messaging Policy because they are designated the Global standard:

Quick suggestion: when making large scale adjustment via PowerShell it may possibly be a good idea to break this up into batches. Do not include simple tips to do this in this article but surely something you should start thinking about.

If you’re prepared to replace the texting plan assignment to your people make use of the same PowerShell admin window from prior to operated this command: foreach($representative in $members)

Let us break down that command actual rapid:a€“ we have been running a foreach and creating a temporary adjustable of $affiliate which will be regularly get consumer by individual from our listing of $membersa€“ we are subsequently including the policy (giving) of a€?EDU No exclusive Chata€? that individuals developed previous to each and every representative utilizing their UserPrincipalName from our $people checklist

Deja un comentario