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.

Disable-CsTeamsShiftsConnectionErrorReport

Note: This cmdlet is currently in public preview.

This cmdlet disables an error report.

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

Limited Preview: Functionality described in this document is currently in limited preview and only authorized organizations have access. This preview version is provided without a service-level agreement, and is not recommended for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.

This cmdlet is used to retrieve the federation configuration between Teams and Azure Communication Services. For more information, refer to Azure Communication Services and Teams Interoperability.

Get-CsTeamsEnhancedEncryptionPolicy

Returns information about the teams enhanced encryption policies configured for use in your organization.

Get-CsTeamsShiftsConnectionConnector

Note: This cmdlet is currently in public preview.

This cmdlet supports retrieving the available Shifts Connectors.

Get-CsTeamsShiftsConnectionErrorReport

Note: This cmdlet is currently in public preview.

This cmdlet returns the list of all the team mapping error reports. It also can return the configuration details of one mapping error report with it ID provided or other filter parameters.

Get-CsTeamsShiftsConnectionInstance

Note: This cmdlet is currently in public preview.

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

Get-CsTeamsShiftsConnectionOperation

Note: This cmdlet is currently in public preview.

This cmdlet gets the requested batch mapping operation. The batch mapping operation can be submitted by running New-CsTeamsShiftsConnectionBatchTeamMap.

Get-CsTeamsShiftsConnectionSyncResult

Note: This cmdlet is currently in public preview.

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

Get-CsTeamsShiftsConnectionTeamMap

Note: This cmdlet is currently in public preview.

This cmdlet supports retrieving the list of team mappings.

Get-CsTeamsShiftsConnectionWfmTeam

Note: This cmdlet is currently in public preview.

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

Get-CsTeamsShiftsConnectionWfmUser

Note: This cmdlet is currently in public preview.

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

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

Displays a specific or all treatments for how calls to an unassigned number range should be routed.

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

This cmdlet will show the call forwarding, simultaneous ringing, call group and delegation settings for a user.

Note

Preview The use of this cmdlet is in Public Preview.

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

Cmdlet to assign a specific Teams enhanced encryption Policy to a user.

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

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

Use this cmdlet to create a new Teams enhanced encryption policy.

New-CsTeamsShiftsConnectionBatchTeamMap

Note: This cmdlet is currently in public preview.

This cmdlet submits an operation connecting multiple Microsoft Teams teams and Workforce management (WFM) teams.

New-CsTeamsShiftsConnectionInstance

Note: This cmdlet is currently in public preview.

This cmdlet creates a Shifts connection instance.

New-CsTeamsShiftsConnectionTeamMap

Note: This cmdlet is currently in public 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-CsTeamsUnassignedNumberTreatment

Creates a new treatment for how calls to an unassigned number range should be routed. The call can be routed to a user, an application or to an announcement service where a custom message will be played to the caller.

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

This cmdlet will add a new delegate for calling in Microsoft Teams.

Note

Preview The use of this cmdlet is in Public Preview.

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

This cmdlet deletes a custom policy package.

Remove-CsGroupPolicyAssignment

This cmdlet is used to remove a group policy assignment.

Remove-CsPhoneNumberAssignment

This cmdlet will remove/unassign a phone number from a user or a resource account (online application instance).

Note

Preview The use of this cmdlet is in Public Preview.

Remove-CsTeamsEnhancedEncryptionPolicy

Use this cmdlet to remove an existing Teams enhanced encryption policy.

Remove-CsTeamsShiftsConnectionInstance

Note: This cmdlet is currently in public preview.

This cmdlet deletes a Shifts connection instance.

Remove-CsTeamsShiftsConnectionTeamMap

Note: This cmdlet is currently in public 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-CsTeamsShiftsScheduleRecord

Note: This cmdlet is currently in public preview.

This cmdlet enqueues the clear schedule message.

Remove-CsTeamsUnassignedNumberTreatment

Removes a treatment for how calls to an unassigned number range should be routed.

Remove-CsTeamTemplate

This cmdlet deletes a specified Team Template from Microsoft Teams.

Remove-CsUserCallingDelegate

This cmdlet will remove a delegate for calling in Microsoft Teams.

Note

Preview The use of this cmdlet is in Public Preview.

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

This cmdlet will assign a phone number to a user or a resource account (online application instance).

Note

Preview The use of this cmdlet is in Public Preview.

Set-CsTeamsAcsFederationConfiguration

Limited Preview: Functionality described in this document is currently in limited preview and only authorized organizations have access. This preview version is provided without a service-level agreement, and is not recommended for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.

This cmdlet is used to manage the federation configuration between Teams and Azure Communication Services. For more information, please see Azure Communication Services and Teams Interoperability.

Set-CsTeamsEnhancedEncryptionPolicy

Use this cmdlet to update values in existing Teams enhanced encryption policy.

Set-CsTeamsShiftsConnectionInstance

Note: This cmdlet is currently in public 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-CsTeamsUnassignedNumberTreatment

Changes a treatment for how calls to an unassigned number range should be routed. The call can be routed to a user, an application or to an announcement service where a custom message will be played to the caller.

Set-CsUserCallingDelegate

This cmdlet will change permissions for a delegate for calling in Microsoft Teams.

Note

Preview The use of this cmdlet is in Public Preview.

Set-CsUserCallingSettings

This cmdlet will set the call forwarding, simultaneous ringing and call group settings for the specified user.

Note

Preview The use of this cmdlet is in Public Preview.

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 public 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.