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.

Clear-CsOnlineTelephoneNumberOrder

Use the Clear-CsOnlineTelephoneNumberOrder cmdlet to cancel a specific telephone number search order and release the telephone numbers. The telephone numbers can then be available for search and acquire.

Complete-CsOnlineTelephoneNumberOrder

Use the Complete-CsOnlineTelephoneNumberOrder cmdlet to complete a specific telephone number search order and confirm the purchase of the new telephone numbers. The telephone numbers can then be used to set up calling features for users and services in your organization.

Connect-MicrosoftTeams

The Connect-MicrosoftTeams cmdlet connects an authenticated account for use with cmdlets from the MicrosoftTeams module.

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-CsOnlineTelephoneNumberCountry

Use the Get-CsOnlineTelephoneNumberCountry cmdlet to get the list of supported countries to search and acquire new telephone numbers. The telephone numbers can then be used to set up calling features for users and services in your organization.

Get-CsOnlineTelephoneNumberOrder

Use the Get-CsOnlineTelephoneNumberOrder cmdlet to get the order report of a specific telephone number search order. The telephone numbers can then be used to set up calling features for users and services in your organization.

Get-CsOnlineTelephoneNumberType

Use the Get-CsOnlineTelephoneNumberType cmdlet to get the list of supported telephone number offerings in a given country. The telephone numbers can then be used to set up calling features for users and services in your organization.

Get-CsPolicyPackage

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

Get-CsTeamsShiftsConnectionConnector

Note: This cmdlet is currently in private preview.

This cmdlet supports retrieving the available Shifts Connectors.

Get-CsTeamsShiftsConnectionInstance

Note: This cmdlet is currently in private preview.

This cmdlet returns the list of existing connection instances. It can also return the configuration details for a given connection instance.

Get-CsTeamsShiftsConnectionSyncResult

Note: This cmdlet is currently in private preview.

This cmdlet supports retrieving the list of user details in the mapped teams.

Get-CsTeamsShiftsConnectionTeamMap

Note: This cmdlet is currently in private preview.

This cmdlet supports retrieving the list of team mappings.

Get-CsTeamsShiftsConnectionUser

Note: This cmdlet is currently in private preview.

This cmdlet shows the list of Workforce management (WFM) users in a specified WFM team.

Get-CsTeamsShiftsConnectionWfmTeam

Note: This cmdlet is currently in private preview.

This cmdlet supports retrieving the list of available Workforce management (WFM) teams in the connection instance.

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-CsTeamTemplate

This cmdlet supports retrieving details of a team template available to your tenant given the team template uri.

NOTE: The returned template definition is a PowerShell object formatted as a JSON for readability. Please refer to the examples for suggested interaction flows for template management.

Get-CsTeamTemplateList

This cmdlet supports retrieving information of all team templates available to your tenant, including both first party Microsoft team templates as well as custom templates. The templates information retrieved includes includes OData Id, template name, short description, count of channels and count of applications.
Note: All custom templates will be retrieved, regardless of the locale specification. If you have hidden templates in the admin center, you will still be able to see the hidden templates here.

Get-CsUserPolicyAssignment

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-LicenseReportForChangeNotificationSubscription

This cmdlet tells whether a user has the required license to export their messages via change notification subscription.

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-TeamTargetingHierarchyStatus

Get the status of a hierarchy upload (see Set-TeamTargetingHierarchy)

Get-TeamUser

Returns users of a team.

Grant-CsGroupPolicyPackageAssignment

This cmdlet assigns a policy package to a group in a tenant.

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

Note: This cmdlet is currently in private preview.

This cmdlet creates a custom policy package.

New-CsGroupPolicyAssignment

Note: Group policy assignment is currently not available in Microsoft 365 Government GCC High or DoD deployments.

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

New-CsOnlineTelephoneNumberOrder

Use the New-CsOnlineTelephoneNumberOrder cmdlet to create a telephone number search order. The telephone numbers can then be used to set up calling features for users and services in your organization.

New-CsTeamsShiftsConnectionInstance

Note: This cmdlet is currently in private preview.

This cmdlet creates a Shifts connection instance.

New-CsTeamsShiftsConnectionTeamMap

Note: This cmdlet is currently in private preview.

This cmdlet connects a Microsoft Teams team and a Workforce management (WFM) team.

New-CsTeamsShiftsPolicy

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

New-CsTeamTemplate

This cmdlet lets you provision a new team template for use in Microsoft Teams. To learn more about team templates, see Get started with Teams templates in the admin center.

NOTE: The response is a PowerShell object formatted as a JSON for readability. Please refer to the examples for suggested interaction flows for template management.

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.

New-TeamChannel

Add a new channel to a team.

New-TeamsApp

Creates a new app in the Teams tenant app store.

Remove-CsCustomPolicyPackage

Note: This cmdlet is currently in private preview.

This cmdlet deletes a custom policy package.

Remove-CsGroupPolicyAssignment

This cmdlet is used to remove a group policy assignment.

Remove-CsTeamsShiftsConnectionInstance

Note: This cmdlet is currently in private preview.

This cmdlet deletes a Shifts connection instance.

Remove-CsTeamsShiftsConnectionTeamMap

Note: This cmdlet is currently in private preview.

This cmdlet removes the mapping between the Microsoft Teams team and workforce management (WFM) team.

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-CsTeamTemplate

This cmdlet deletes a specified Team Template from Microsoft Teams.

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-TeamTargetingHierarchy

Removes the tenant's hierarchy.

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 is not yet available. 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.

Set-CsTeamsShiftsConnectionInstance

Note: This cmdlet is currently in private preview.

This cmdlet updates a Shifts connection instance.

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.

Set-TeamTargetingHierarchy

Upload a hierarchy to the tenant. A tenant may only have 1 active hierarchy. Each Set-TeamTargetingHierarchy cmdlet call will overwrite the previous one.

Test-CsTeamsShiftsConnectionValidate

Note: This cmdlet is currently in private preview.

This cmdlet validates workforce management (WFM) connection settings.

Update-CsCustomPolicyPackage

Note: This cmdlet is currently in private preview.

This cmdlet updates a custom policy package.

Update-CsTeamTemplate

This cmdlet submits an operation that updates a custom team template with new team template settings.

NOTE: The response is a PowerShell object formatted as a JSON for readability. Please refer to the examples for suggested interaction flows for template management.

Update-TeamsAppInstallation

Update a Teams App in Microsoft Teams.