MicrosoftTeamsPowerShell

The following cmdlet references are for Microsoft Teams.

MicrosoftTeamsPowerShell

Add-TeamChannelUser

Adds an owner or member to the private channel.

Note: the command will return immediately, but the Teams application will not reflect the update immediately, please refresh the members page to see the update.

To turn an existing Member into an Owner, first Add-TeamChannelUser -User foo to add them to the members list, then Add-TeamChannelUser -User foo -Role Owner to add them to owner list.

Add-TeamsAppInstallation

Add a Teams App to Microsoft Teams.

Add-TeamUser

The Add-TeamUser adds an owner or member to the team, and to the unified group which backs the team.

Connect-MicrosoftTeams

The Connect-MicrosoftTeams cmdlet connects an authenticated account to use for Microsoft Teams cmdlet requests. You can use this authenticated account only with Microsoft Teams cmdlets.

Disconnect-MicrosoftTeams
Get-CsBatchPolicyAssignmentOperation

This cmdlet is used to retrieve the status of batch policy assignment operations.

Get-CsGroupPolicyAssignment

This cmdlet is used to return group policy assignments.

Get-CsPolicyPackage

This cmdlet supports retrieving all the policy packages available on a tenant.

Get-CsTeamsShiftsPolicy

This cmdlet allows you to get properties of a TeamsShiftPolicy instance, including user's shift based presence and Teams off shift warning message-specific settings.

Get-CsUserPolicyAssignment

Note: This cmdlet is currently in public preview.

This cmdlet is used to return the policy assignments for a user, both directly assigned and inherited from a group.

Get-CsUserPolicyPackage

This cmdlet supports retrieving the policy package that's assigned to a user.

Get-CsUserPolicyPackageRecommendation

This cmdlet supports retrieving recommendations for which policy packages are best suited for a given user.

Get-Team

This cmdlet supports retrieving teams with particular properties/information, including all teams that a specific user belongs to, all teams that have been archived, all teams with a specific display name, or all teams in the organization.

Get-TeamChannel

Get all the channels for a team.

Get-TeamChannelUser

Returns users of a channel.

Get-TeamFunSettings

Note: This cmdlet is deprecated as of our 1.0 PowerShell release, and is not supported in our 1.0 release. To retrieve a Team's fun settings, run Get-Team.

Gets a team's fun settings.

Get-TeamGuestSettings

Note: This cmdlet is deprecated as of our 1.0 PowerShell release, and is not supported in our 1.0 release. To retrieve a Team's guest settings, run Get-Team.

Gets Team guest settings.

Get-TeamMemberSettings

Note: This cmdlet is deprecated as of our 1.0 PowerShell release, and is not supported in our 1.0 release. To retrieve a Team's member settings, run Get-Team.

Gets team member settings.

Get-TeamMessagingSettings

Note: This cmdlet is deprecated as of our 1.0 PowerShell release, and is not supported in our 1.0 release. To retrieve a Team's messaging settings, run Get-Team.

Gets team messaging settings.

Get-TeamsApp

Returns app information from the Teams tenant app store.

Get-TeamsAppInstallation

Get a Teams App installed in Microsoft Teams.

Get-TeamUser

Returns users of a team.

Grant-CsTeamsShiftsPolicy

This commandlet supports applying the TeamsShiftsPolicy to users in a tenant.

Grant-CsUserPolicyPackage

This cmdlet supports applying a policy package to users in a tenant. Note that there is a limit of 20 users you can apply the package to at a time. To apply a policy package to a larger number of users, consider using New-CsBatchPolicyPackageAssignmentOperation.

New-CsBatchPolicyAssignmentOperation

This cmdlet is used to assign or unassign a policy to a batch of users.

New-CsBatchPolicyPackageAssignmentOperation

This cmdlet submits an operation that applies a policy package to a batch of users in a tenant. A batch may contain up to 5000 users.

New-CsCustomPolicyPackage

This cmdlet submits an operation that creates a custom policy package with custom package name, description and a list of policies.

New-CsGroupPolicyAssignment

This cmdlet is used to assign a policy to a security group or distribution list.

New-CsTeamsShiftsPolicy

This cmdlet allows you to create a new TeamsShiftPolicy instance and set it's properties.

New-Team

This cmdlet lets you provision a new Team for use in Microsoft Teams and will create an O365 Unified Group to back the team. Groups created through teams cmdlets, APIs, or clients will not show up in Outlook by default.

If you want these groups to appear in Outlook clients, you can use the Set-UnifiedGroup cmdlet in the Exchange Powershell Module to disable the switch parameter HiddenFromExchangeClientsEnabled (-HiddenFromExchangeClientsEnabled:$false).

Note: The Teams application may need to be open by an Owner for up to two hours before changes are reflected.

IMPORTANT: Using this cmdlet to create a new team using a template is still in preview. You can install and use the preview module from the PowerShell test gallery. For instructions on installing and using the Teams PowerShell preview module, see Install the pre-release version of the Teams PowerShell module.

New-TeamChannel

Add a new channel to a team.

New-TeamsApp

Creates a new app in the Teams tenant app store.

Remove-CsCustomPolicyPackage

This cmdlet submits an operation that deletes a custom policy package with the given package name.

Remove-CsGroupPolicyAssignment

This cmdlet is used to remove a group policy assignment.

Remove-CsTeamsShiftsPolicy

Remove the TeamsShiftPolicy for a user.

Note: the command will return immediately, but the Teams application will not reflect the update immediately. The Teams application may need to be open for up to an hour before changes are reflected.

Remove-Team

This cmdlet deletes a specified Team from Microsoft Teams.

NOTE: The associated Office 365 Unified Group will also be removed.

Remove-TeamChannel

Delete a channel. This will not delete content in associated tabs.

Note: The channel will be "soft deleted", meaning the contents are not permanently deleted for a time. So a subsequent call to Add-TeamChannel using the same channel name will fail if enough time has not passed.

Remove-TeamChannelUser

Note: the command will return immediately, but the Teams application will not reflect the update immediately, please refresh the members page to see the update.

To turn an existing Owner into an Member, specify role parameter as Owner.

Note: last owner cannot be removed from the private channel.

Remove-TeamsApp

Removes an app in the Teams tenant app store.

Remove-TeamsAppInstallation

Removes a Teams App installed in Microsoft Teams.

Remove-TeamUser

Remove an owner or member from a team, and from the unified group which backs the team.

Note: the command will return immediately, but the Teams application will not reflect the update immediately. The Teams application may need to be open for up to an hour before changes are reflected.

Note: last owner cannot be removed from the team.

Set-CsGroupPolicyAssignment

Note: The cmdlet Set-CsGroupPolicyAssignment will be available soon. In the meantime, to change a group policy assignment you can first remove the current policy assignment from the group and then add a new policy assignment.

This cmdlet is used to update a group policy assignment.

Set-CsTeamsShiftsPolicy

This cmdlet allows you to set or update properties of a TeamsShiftPolicy instance, including user's shift based presence and Teams off shift warning message-specific settings.

Set-Team

This cmdlet allows you to update properties of a team, including its displayname, description, and team-specific settings.

Set-TeamArchivedState

This cmdlet is used to freeze all of the team activity, but Teams Administrators and team owners will still be able to add or remove members and update roles. You can unarchive the team anytime.

Set-TeamChannel

Update Team channels settings.

Set-TeamFunSettings

Note: This cmdlet is deprecated as of our 1.0 PowerShell release, and is not supported in our 1.0 release. To set a Team's settings, run Set-Team.

Update Giphy, Stickers and Memes settings.

Set-TeamGuestSettings

Note: This cmdlet is deprecated as of our 1.0 PowerShell release, and is not supported in our 1.0 release. To set a Team's settings, run Set-Team.

Updates team guest settings.

Set-TeamMemberSettings

Note: This cmdlet is deprecated as of our 1.0 PowerShell release, and is not supported in our 1.0 release. To set a Team's settings, run Set-Team.

Updates team member settings.

Set-TeamMessagingSettings

Note: This cmdlet is deprecated as of our 1.0 PowerShell release, and is not supported in our 1.0 release. To set a Team's settings, run Set-Team.

Updates team messaging settings.

Set-TeamPicture

Update the team picture.

Note: the command will return immediately, but the Teams application will not reflect the update immediately. The Teams application may need to be open for up to an hour before changes are reflected.

Note: this cmdlet is not support in special government environments (TeamsGCCH and TeamsDoD) and is currently only supported in our beta release.

Set-TeamsApp

Updates an app in the Teams tenant app store.

Update-CsCustomPolicyPackage

This cmdlet submits an operation that updates a custom policy package with new package settings.

Update-TeamsAppInstallation

Update a Teams App in Microsoft Teams.