Jump to content

Recommended Posts

Posted

Can only add 20 users at a time to a PolicyPackage using the web interface - which will take ages........

 

So I thought Powershell should be able to do this...... but I am failing!

 

 

When I try the command

New-CsBatchPolicyPackageAssignmentOperation -PackageName Education_Teacher -Identity $name

 

I get an error - New-CsBatchPolicyPackageAssignmentOperation : Not authorized.

 

 

How have people assigned PolicyPackages to staff and students?

 

Cheers

Posted

Anyone struggling to get this to work?

 

I get the following error (even when just trying to run Grant-CsUserPolicyPackage manually):

 

Grant-CsUserPolicyPackage : One or more errors occurred.

At line:1 char:1

+ Grant-CsUserPolicyPackage

+ ~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : NotSpecified: (:) [Grant-CsUserPolicyPackage], AggregateException

+ FullyQualifiedErrorId : System.AggregateException,Microsoft.TeamsCmdlets.PowerShell.Custom.GrantCsUserPolicyPackage

Posted

How have people edited the Policy Package. I can't seem to see anyway to create my own or edit the ones already there.

 

Check your groups as I found at one point it can't handle nested groups.

Posted
How have people edited the Policy Package. I can't seem to see anyway to create my own or edit the ones already there.

 

Check your groups as I found at one point it can't handle nested groups.

 

I've just used the ones they provided, as they seemed to do the job etc.

 

Didn't think about nested groups to be honest as I enabled per year group so I could keep track where I was up to.

  • Thanks 1
Posted
Anyone struggling to get this to work?

 

I get the following error (even when just trying to run Grant-CsUserPolicyPackage manually):

 

Grant-CsUserPolicyPackage : One or more errors occurred.

At line:1 char:1

+ Grant-CsUserPolicyPackage

+ ~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : NotSpecified: (:) [Grant-CsUserPolicyPackage], AggregateException

+ FullyQualifiedErrorId : System.AggregateException,Microsoft.TeamsCmdlets.PowerShell.Custom.GrantCsUserPolicyPackage

 

 

@CyBeRkId2002 Sorry - forgot about that issue I had initally

 

Take a look at this https://answers.microsoft.com/en-us/msoffice/forum/all/connect-microsoftteams-not-working/f3235724-ec03-4a9e-9679-40afa89bf956

  • Thanks 1
Posted

I don't think you can create your own, or amend the existing packages but you can amend the individual policies from the individual policy pages.

 

So you can apply the Education Secondary Student policy package to a user and then amend the Education Secondary Student Meeting Policy for example.

  • Thanks 1
Posted
Sorted it.... using the wrong powershell command!

 

Here is my script for assigning the Policy Package Education (Teacher) to all teaching staff.

 

$cred = Get-Credential "[email protected]"
Connect-AzureAD -Credential $cred
Connect-MicrosoftTeams -Credential $cred

#Change Teaching Staff to your selected AD Group
$group = Get-AzureADGroup -SearchString "Teaching Staff"

$members = Get-AzureADGroupMember -ObjectId $group.ObjectId -All $true | Where-Object {$_.ObjectType -eq "User"}

#Name        : Education_Teacher
#Description : This is an Education_Teacher package
#
#Name        : Education_SecondaryStudent
#Description : This is an Education_SecondaryStudent package

#Change the PackageName to your chosen package
$members | ForEach-Object { Grant-CsUserPolicyPackage -PackageName Education_Teacher -Identity $_.UserPrincipalName}

 

Nothing fancy but hope it helps others. :)

 

Why can you not apply this per group Microsoft instead of individually.

Posted
How have people edited the Policy Package. I can't seem to see anyway to create my own or edit the ones already there.

 

Check your groups as I found at one point it can't handle nested groups.

 

After you apply the package to a user it will then make the individual policies editable. It can take a few hours.

  • Thanks 1
Posted (edited)

I'm confused no-one has any policies applied yet, I've used SDS and teachers WITH classes seem to be able to also create new classes and my test teacher and admin staff seem to have a locked down do nothing policy.

 

All users I've checked have global on the left and assigned policy none.. but they have different teams experiences?

 

I'ev manually given myself and my test teacher the "teacher" policy but nothing has changed still can't create a meeting. I did the test teacher before the weekend so it should have taken affect by now?!

 

Help.. I'll apply that script up there in a bit :) (but as things are mostly working fine, I'm reluctant)

 

EDIT: test Teacher seems all good now? Whilst looking around the left side options suddenly populated and all options seem correct. My personal account not so much.

Edited by chazzy2501
Posted
I don't think you can create your own, or amend the existing packages but you can amend the individual policies from the individual policy pages.

 

So you can apply the Education Secondary Student policy package to a user and then amend the Education Secondary Student Meeting Policy for example.

 

You can only edit once the Package has been applied. Which is helpful!

Many thanks

Posted
You can only edit once the Package has been applied. Which is helpful!

Many thanks

 

Yes, that's true - forgot to mention that! Apply the package (you can do this individually to a user) then it will let you edit.

  • 3 weeks later...
Posted

Just what im after, but were getting the error that Grant-CSUserPolicy wasn't a recognized command....even though Teams was an imported module.

 

Uninstalled the module, then tried to add again and now get this error?

 

WARNING: Source Location 'https://www.powershellgallery.com/api/v2/package/MicrosoftTeams/1.0.5' is not valid.

  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...