### Example 1: Get all policy instances Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csteamsvirtualappointmentspolicy Fetches all policy instances currently available. The output shows the Identity and EnableSmsNotifications properties for each policy. ```powershell PS C:\> Get-CsTeamsVirtualAppointmentsPolicy ``` ```output Identity EnableSmsNotifications -------- ---------------------- Global True Tag:sms-enabled True Tag:sms-disabled False ``` -------------------------------- ### Example 2: Get settings by InputObject Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-cspersonalattendantsettings Retrieves personal attendant settings using the InputObject parameter with a hashtable containing the UserId. The output is the same as Example 1. ```powershell Get-CsPersonalAttendantSettings -InputObject @{ UserId = "user11@contoso.com"; } ``` ```text IsPersonalAttendantEnabled : True DefaultLanguage : en-US DefaultVoice : Female CalleeName : User1 DefaultTone : Formal IsBookingCalendarEnabled : False IsNonContactCallbackEnabled : False IsCallScreeningEnabled : False AllowInboundInternalCalls : True AllowInboundFederatedCalls : False AllowInboundPSTNCalls : False IsAutomaticTranscriptionEnabled : False IsAutomaticRecordingEnabled : False ``` -------------------------------- ### New-TeamsApp Example 1 Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/new-teamsapp Example 1: Uploads an app to the tenant app store using the organization distribution method. ```powershell PS C:\> New-TeamsApp -DistributionMethod organization -Path c:\Path\SampleApp.zip ``` -------------------------------- ### Example 1: List remote log collection devices Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csTeamsRemoteLogCollectionConfiguration Lists the devices of TeamsRemoteLogCollectionConfiguration. This is the example from the Examples section. ```powershell PS C:\> Get-CsTeamsRemoteLogCollectionConfiguration ``` -------------------------------- ### Example 1 - Get-CsPhoneNumberTag with output Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/Get-CsPhoneNumberTag Example 1 shows how to get a list of existing tags for telephone numbers. The output displays the TagValue column with sample values HR, Redmond HQ, and Executives. ```powershell PS C:\> Get-CsPhoneNumberTag ``` ```text TagValue HR Redmond HQ Executives ``` -------------------------------- ### Example 1: Get-CsTeamsMultiTenantOrganizationConfiguration Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csteamsmultitenantorganizationconfiguration Example command that retrieves the tenant's Multi-tenant Organization Configuration, including the CopilotFromHomeTenant field. ```powershell PS C:\> Get-CsTeamsMultiTenantOrganizationConfiguration ``` -------------------------------- ### Get-CsTeamsEducationConfiguration example output Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csteamseducationconfiguration Example output showing the default configuration when the cmdlet is run without parameters. The output indicates that Email is the preferred contact method for parent communication invites and that educators can edit parent contact information. ```powershell PS C:\> Get-CsTeamsEducationConfiguration Identity : Global ParentGuardianPreferredContactMethod : Email UpdateParentInformation : Enabled ``` -------------------------------- ### Get-CSOnlinePSTNUsage example Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlinepstnusage Example command that returns the list of global PSTN usages available within the tenant. ```powershell PS C:\> Get-CSOnlinePSTNUsage ``` -------------------------------- ### Get-CsOnlinePSTNGateway example - list all SBCs Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlinepstngateway Shows all SBCs paired with the tenant. ```powershell PS C:\> Get-CsOnlinePSTNGateway ``` -------------------------------- ### Get all Teams messaging policies Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csteamsmessagingpolicy Example command that returns all teams messaging policies configured in the organization. ```powershell PS C:\> Get-CsTeamsMessagingPolicy ``` -------------------------------- ### Example 1: Get settings by Identity Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-cspersonalattendantsettings Retrieves personal attendant settings for user1@contoso.com using the Identity parameter. The output shows the settings and the example notes that personal attendant is enabled for inbound Teams calls from the user's domain only. ```powershell Get-CsPersonalAttendantSettings -Identity user1@contoso.com ``` ```text IsPersonalAttendantEnabled : True DefaultLanguage : en-US DefaultVoice : Female CalleeName : User1 DefaultTone : Formal IsBookingCalendarEnabled : False IsNonContactCallbackEnabled : False IsCallScreeningEnabled : False AllowInboundInternalCalls : True AllowInboundFederatedCalls : False AllowInboundPSTNCalls : False IsAutomaticTranscriptionEnabled : False IsAutomaticRecordingEnabled : False ``` -------------------------------- ### Get All Migration Statuses Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-directtogroupassignmentsmigrationstatus Example 1: Retrieves the status of all direct assignments to group policy assignments migrations that are completed or in progress in the tenant. ```powershell PS C:\> Get-DirectToGroupAssignmentsMigrationStatus ``` -------------------------------- ### Get all application instances Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlineapplicationinstance Returns details of all application instances. ```powershell Get-CsOnlineApplicationInstance ``` -------------------------------- ### Get all Teams Notification and Feeds policies Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csteamsnotificationandfeedspolicy Example command that returns information about all Teams NotificationAndFeedsPolicy configured for use in the tenant. ```powershell PS C:\> Get-CsTeamsNotificationAndFeedsPolicy ``` -------------------------------- ### Get-CsCloudCallDataConnection Example Output Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-cscloudcalldataconnection Example output showing the token value returned by Get-CsCloudCallDataConnection. The token is needed when configuring your on-premises environment with Set-CsCloudCallDataConnector. ```powershell PS C:\> Get-CsCloudCallDataConnection Token ----- 00000000-0000-0000-0000-000000000000 ``` -------------------------------- ### Tenant parameter example and Get-CsTenant to find tenant ID Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlinedirectorytenant Shows the format for the -Tenant parameter value (a GUID) and how to find your tenant ID. This is illustrated in the parameter documentation: use the -Tenant parameter with the tenant GUID enclosed in quotes, or run Get-CsTenant and select DisplayName and TenantID to locate the tenant ID. ```powershell Get-CsOnlineDirectoryTenant -Tenant "38aad667-af54-4397-aaa7-e94c79ec2308" ``` ```powershell Get-CsTenant | Select-Object DisplayName, TenantID ``` -------------------------------- ### Example 2: Create a 24-hour time range Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/new-csonlinetimerange Creates a 24-hour time range starting at 00:00 and ending at 1.00:00 (1 day), assigned to $allDayTimeRange. ```powershell $allDayTimeRange = New-CsOnlineTimeRange -Start 00:00 -End 1.00:00 ``` -------------------------------- ### Example 3: Get settings with booking calendar enabled Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-cspersonalattendantsettings Retrieves settings for user1@contoso.com where IsBookingCalendarEnabled is True. The example notes that the personal attendant can access the bookings calendar, fetch availability, and schedule callbacks for all incoming callers, and that the user must specify the bookings link in Teams Personal Attendant settings. ```powershell Get-CsPersonalAttendantSettings -Identity user1@contoso.com ``` ```text IsPersonalAttendantEnabled : True DefaultLanguage : en-US DefaultVoice : Female CalleeName : User1 DefaultTone : Formal IsBookingCalendarEnabled : True IsNonContactCallbackEnabled : False IsCallScreeningEnabled : False AllowInboundInternalCalls : True AllowInboundFederatedCalls : False AllowInboundPSTNCalls : False IsAutomaticTranscriptionEnabled : False IsAutomaticRecordingEnabled : False ``` -------------------------------- ### Example: Clear-TeamsEnvironmentConfig Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/clear-teamsenvironmentconfig Example command that clears environment-specific configurations from the local machine set by Set-TeamsEnvironmentConfig. ```powershell PS C:\> Clear-TeamsEnvironmentConfig ``` -------------------------------- ### Example 4: Get settings with all inbound call types enabled Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-cspersonalattendantsettings Retrieves settings for user1@contoso.com where inbound calls from the user's domain, other domains, and PSTN are all allowed. The example notes that the personal attendant is enabled for all incoming calls. ```powershell Get-CsPersonalAttendantSettings -Identity user1@contoso.com ``` ```text IsPersonalAttendantEnabled : True DefaultLanguage : en-US DefaultVoice : Female CalleeName : User1 DefaultTone : Formal IsBookingCalendarEnabled : True IsNonContactCallbackEnabled : True IsCallScreeningEnabled : False AllowInboundInternalCalls : True AllowInboundFederatedCalls : True AllowInboundPSTNCalls : True IsAutomaticTranscriptionEnabled : False IsAutomaticRecordingEnabled : False ``` -------------------------------- ### Grant-CsTeamsShiftsPolicy example - apply policy to user Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/grant-csteamsshiftspolicy Example command that applies the OffShiftAccessMessage1Always policy to a single user. ```powershell PS C:\> Grant-CsTeamsShiftsPolicy -Identity IsaiahL@mwtdemo.onmicrosoft.com -PolicyName OffShiftAccessMessage1Always ``` -------------------------------- ### Get-CsOnlineUser -Properties examples Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlineuser Two examples of using the -Properties parameter to specify which attributes to include in the output. Identity, UserPrincipalName, Alias, AccountEnabled, and DisplayName are always included. ```powershell Get-CsOnlineUser -Properties DisplayName, UserPrincipalName, FeatureTypes ``` ```powershell Get-CsOnlineUser -Properties DisplayName, Alias, LineURI ``` -------------------------------- ### Enable-CsOnlineSipDomain Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/enable-csonlinesipdomain Documentation for the Enable-CsOnlineSipDomain cmdlet, including its parameters and an example. ```APIDOC ## Enable-CsOnlineSipDomain ### Description Enables a SIP domain for online provisioning in Skype for Business Online. ### Syntax ```powershell Enable-CsOnlineSipDomain [-Domain] [-Confirm] [-Force] [] ``` ### Parameters #### -Domain - Type: String - Mandatory: True - Position: Named - Description: The SIP domain to be enabled for online provisioning in Skype for Business Online. #### -Confirm - Type: SwitchParameter - Mandatory: False - Position: Named - Aliases: cf - Description: Prompts you for confirmation before running the cmdlet. #### -Force - Type: SwitchParameter - Mandatory: False - Position: Named - Description: Suppresses all confirmation prompts that might occur when running the command. #### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters. ### Examples #### Example 1 ```powershell Enable-CsOnlineSipDomain -Domain contoso.com ``` Enables the domain contoso.com for online provisioning in Skype for Business Online. ``` -------------------------------- ### Get-CsTeamsClientConfiguration Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csteamsclientconfiguration Documentation for the Get-CsTeamsClientConfiguration cmdlet, including syntax, parameters, and examples. ```APIDOC ## Get-CsTeamsClientConfiguration ### Description Retrieves the effective Teams client configuration for the organization. This configuration includes settings such as allowed third-party cloud storage, guest user access, and Surface Hub device interactions with Skype for Business meetings. ### Syntax #### Identity (Default) ```powershell Get-CsTeamsClientConfiguration [[-Identity] ] [-Tenant ] [-LocalStore] [] ``` #### Filter ```powershell Get-CsTeamsClientConfiguration [-Tenant ] [-Filter ] [-LocalStore] [] ``` ### Parameters #### -Filter - Type: String - Default value: None - Supports wildcards: False - DontShow: False - Position: Named - Mandatory: False - Value from pipeline: False - Value from pipeline by property name: False - Value from remaining arguments: False - Description: Microsoft internal use only. #### -Identity - Type: XdsIdentity - Default value: None - Supports wildcards: False - DontShow: False - Position: 1 - Mandatory: False - Value from pipeline: False - Value from pipeline by property name: False - Value from remaining arguments: False - Description: The only valid input is Global, as you can have only one effective configuration in your organization. #### -LocalStore - Type: SwitchParameter - Default value: None - Supports wildcards: False - DontShow: False - Position: Named - Mandatory: False - Value from pipeline: False - Value from pipeline by property name: False - Value from remaining arguments: False - Description: Internal Microsoft use only. #### -Tenant - Type: System.Guid - Default value: None - Supports wildcards: False - DontShow: False - Position: Named - Mandatory: False - Value from pipeline: False - Value from pipeline by property name: False - Value from remaining arguments: False - Description: Internal Microsoft use only. ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters. ### Inputs None ### Outputs System.Object ### Examples #### Example 1 ```powershell Get-CsTeamsClientConfiguration ``` Retrieves the effective client configuration in the tenant. ``` -------------------------------- ### New-CsBatchPolicyAssignmentOperation Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/new-csbatchpolicyassignmentoperation Documentation for the New-CsBatchPolicyAssignmentOperation cmdlet, including parameters and examples. ```APIDOC ## New-CsBatchPolicyAssignmentOperation ### Description Assigns a policy to a batch of users in Microsoft Teams. This cmdlet is used to assign or unassign policies to multiple users at once. ### Syntax New-CsBatchPolicyAssignmentOperation -Identity -PolicyName [-AdditionalParameters ] [-Break] [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-OperationName ] [] ### Parameters #### -Identity - **Type:** String[] - **Mandatory:** True - **Description:** An array of users, specified either using object IDs (guid) or SIP addresses. There is a maximum of 5,000 users per batch. #### -PolicyName - **Type:** String - **Mandatory:** True - **Description:** The name of the policy to be assigned to the users. To remove the currently assigned policy, use $null or an empty string "". #### -OperationName - **Type:** String - **Mandatory:** False - **Description:** An optional name for the batch assignment operation. #### -AdditionalParameters - **Type:** Hashtable - **Mandatory:** False - **Description:** Additional parameters. #### -Break - **Type:** SwitchParameter - **Mandatory:** False - **Description:** Wait for .NET debugger to attach. #### -HttpPipelineAppend - **Type:** SendAsyncStep[] - **Mandatory:** False - **Description:** SendAsync Pipeline Steps to be appended to the front of the pipeline. #### -HttpPipelinePrepend - **Type:** SendAsyncStep[] - **Mandatory:** False - **Description:** SendAsync Pipeline Steps to be prepended to the front of the pipeline. ### Examples #### Example 1: Assign a policy to a batch of users by SIP addresses ```powershell $users_ids = @("psmith@contoso.com","tsanchez@contoso.com","bharvest@contoso.com") New-CsBatchPolicyAssignmentOperation -PolicyType TeamsMeetingPolicy -PolicyName Kiosk -Identity $users_ids -OperationName "Batch assign Kiosk" ``` #### Example 2: Unassign a policy from a batch of users ```powershell $users_ids = @("2bdb15a9-2cf1-4b27-b2d5-fcc1d13eebc9", "d928e0fc-c957-4685-991b-c9e55a3534c7", "967cc9e4-4139-4057-9b84-1af80f4856fc") New-CsBatchPolicyAssignmentOperation -PolicyType TeamsMeetingPolicy -PolicyName $null -Identity $users_ids -OperationName "Batch unassign meeting policy" ``` #### Example 3: Assign a policy to a batch of users from a text file ```powershell $users_ids = Get-Content .\users_ids.txt New-CsBatchPolicyAssignmentOperation -PolicyType TeamsMeetingPolicy -PolicyName Kiosk -Identity $users_ids -OperationName "Batch assign Kiosk" ``` #### Example 4: Assign a policy to a batch of users from Microsoft Entra ID ```powershell Connect-AzureAD $users = Get-AzureADUser New-CsBatchPolicyAssignmentOperation -PolicyType TeamsMeetingPolicy -PolicyName Kiosk -Identity $users.SipProxyAddress -OperationName "batch assign kiosk" ``` ``` -------------------------------- ### Grant-CsTeamsFeedbackPolicy example Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/grant-csteamsfeedbackpolicy Grants the specified Teams feedback policy to a user. The example assigns the "New Hire Feedback Policy" to kenmyer@litwareinc.com. ```powershell PS C:\> Grant-CsTeamsFeedbackPolicy -PolicyName "New Hire Feedback Policy" -Identity kenmyer@litwareinc.com ``` -------------------------------- ### Get-CsTeamsGuestMeetingConfiguration - Example 1 Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csteamsguestmeetingconfiguration Returns the TeamsGuestMeetingConfiguration set in your organization. ```powershell Get-CsTeamsGuestMeetingConfiguration ``` -------------------------------- ### Get flows by RelatedConfigurationIds Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csmainlineattendantflow Lists all Mainline Attendant flows associated with the specified configuration ID. The example uses the GUID 0b31bbe5-e2a0-4117-9b6f-956bca6023f8. ```powershell Get-CsMainlineAttendantFlow -RelatedConfigurationIds 0b31bbe5-e2a0-4117-9b6f-956bca6023f8 ``` -------------------------------- ### Get-CsOnlineDirectoryTenant with -Tenant GUID Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlinedirectorytenant Retrieves a tenant and its associated parameters from the Business Voice Directory by specifying the tenant GUID. The example returns the tenant identified by GUID 7a205197-8e59-487d-b9fa-3fc1b108f1e5. ```powershell Get-CsOnlineDirectoryTenant -Tenant 7a205197-8e59-487d-b9fa-3fc1b108f1e5 ``` -------------------------------- ### Get first 10 application instances Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlineapplicationinstance Returns the first 10 application instances. ```powershell Get-CsOnlineApplicationInstance -ResultSize 10 ``` -------------------------------- ### Get-CsAutoAttendantTenantInformation Example Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csautoattendanttenantinformation Gets the default auto attendant information for the logged in tenant. ```powershell Get-CsAutoAttendantTenantInformation ``` -------------------------------- ### Get-CsOnlineUser -Filter examples for various attributes Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlineuser Four example filters for the -Filter parameter of Get-CsOnlineUser. They filter on AssignedPlan, UserPrincipalName with logical operators, OnPremHostingProvider, and WhenChanged. The filter syntax follows the Where-Object cmdlet. ```powershell Get-CsOnlineUser -Filter {AssignedPlan -like "_MCO_ "} ``` ```powershell Get-CsOnlineUser -Filter {UserPrincipalName -like "test*" -and (AssignedPlans -eq "MCOEV" -or AssignedPlans -like "MCOPSTN*")} ``` ```powershell Get-CsOnlineUser -Filter {OnPremHostingProvider -ne $null} ``` ```powershell Get-CsOnlineUser -Filter {WhenChanged -gt "1/25/2022 11:59:59 PM"} ``` -------------------------------- ### Get-CsAutoAttendantSupportedTimeZone - Example 1 Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csautoattendantsupportedtimezone Gets all supported time zones for the Auto Attendant service. ```powershell Get-CsAutoAttendantSupportedTimeZone ``` -------------------------------- ### New-CsEdgeAllowAllKnownDomains - Example 1 Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/new-csedgeallowallknowndomains Configures federation to allow all known domains by creating an AllowAllKnownDomains object and passing it to Set-CsTenantFederationConfiguration with the AllowedDomains parameter. ```powershell $x = New-CsEdgeAllowAllKnownDomains Set-CsTenantFederationConfiguration -AllowedDomains $x ``` -------------------------------- ### Get-CsOnlineLisSubnet Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlinelissubnet Documentation for the Get-CsOnlineLisSubnet cmdlet, including syntax, parameters, and examples. ```APIDOC ## Get-CsOnlineLisSubnet ### Description Retrieves Location Information Server (LIS) subnets. This cmdlet can retrieve all subnets or a specific subnet by IP address. ### Syntax ```powershell Get-CsOnlineLisSubnet [-Subnet ] [-Force] [-IsDebug] [-NCSApiUrl ] [-TargetStore ] [-TenantId ] [] ``` ### Parameters #### -Subnet - Type: String - Position: 1 - Mandatory: False - Description: The IP address of the subnet. This value can be either IPv4 or IPv6 format. #### -Force - Type: SwitchParameter - Position: Named - Mandatory: False - Description: The Force switch specifies whether to suppress warning and confirmation messages. It can be useful in scripting to suppress interactive prompts. If the Force switch isn't provided in the command, you're prompted for administrative input if required. #### -IsDebug - Type: Boolean - Position: Named - Mandatory: False - Description: This parameter is reserved for internal Microsoft use. #### -NCSApiUrl - Type: String - Position: Named - Mandatory: False - Description: This parameter is reserved for internal Microsoft use. #### -TargetStore - Type: String - Position: Named - Mandatory: False - Description: This parameter is reserved for internal Microsoft use. #### -TenantId - Type: Guid - Position: 0 - Mandatory: False - Description: This parameter is reserved for internal Microsoft use. #### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters. ### Examples #### Example 1 ```powershell Get-CsOnlineLisSubnet ``` Retrieves all Location Information Server (LIS) subnets. #### Example 2 ```powershell Get-CsOnlineLisSubnet -Subnet 10.106.89.12 ``` Retrieves the Location Information Server (LIS) subnet for Subnet ID "10.106.89.12". #### Example 3 ```powershell Get-CsOnlineLisSubnet -Subnet 2001:4898:e8:6c:90d2:28d4:76a4:ec5e ``` Retrieves the Location Information Server (LIS) subnet for Subnet ID "2001:4898:e8:6c:90d2:28d4:76a4:ec5e". ``` -------------------------------- ### Example 1: List all remote log collection devices Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csTeamsRemoteLogCollectionDevice Lists all devices of TeamsRemoteLogCollectionDevice. ```powershell PS C:\> Get-CsTeamsRemoteLogCollectionDevice ``` -------------------------------- ### Get All Teams Mobility Policies Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csteamsmobilitypolicy Retrieves all Teams mobility policies available in your organization. This is the example provided in the documentation. ```powershell PS C:\> Get-CsTeamsMobilityPolicy ``` -------------------------------- ### Get flow by Identity Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csmainlineattendantflow Lists the Mainline Attendant flow with the specified identity. The example uses the identity 956bca6-e2a0-4117-9b6f-023f80b31bbe5. ```powershell Get-CsMainlineAttendantFlow -Identity 956bca6-e2a0-4117-9b6f-023f80b31bbe5 ``` -------------------------------- ### Get-CsTenantNetworkConfiguration Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-cstenantnetworkconfiguration Documentation for the Get-CsTenantNetworkConfiguration PowerShell cmdlet, including parameters and examples. ```APIDOC ## Get-CsTenantNetworkConfiguration ### Description Retrieves the network configuration for the current tenant. This cmdlet can return all network configurations or a specific one using the Identity or Filter parameters. ### Syntax ```powershell Get-CsTenantNetworkConfiguration [-Filter ] [-Identity ] [] ``` ### Parameters #### -Filter - **Type:** String - **Default value:** None - **Supports wildcards:** False - **DontShow:** False - **Position:** Named - **Mandatory:** False - **Value from pipeline:** False - **Value from pipeline by property name:** False - **Value from remaining arguments:** False Enables you to use wildcard characters when indicating the network configuration (or network configurations) to be returned. #### -Identity - **Type:** String - **Default value:** None - **Supports wildcards:** False - **DontShow:** False - **Position:** Named - **Mandatory:** False - **Value from pipeline:** False - **Value from pipeline by property name:** False - **Value from remaining arguments:** False The Identity parameter is a unique identifier for the network configuration. #### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters. ### Examples #### Example 1 ```powershell PS C:\> Get-CsTenantNetworkConfiguration ``` Returns the list of network configuration for the current tenant. #### Example 2 ```powershell PS C:\> Get-CsTenantNetworkConfiguration -Identity Global ``` Returns the network configuration within the scope of Global. #### Example 3 ```powershell PS C:\> Get-CsTenantNetworkConfiguration -Filter "global" ``` Returns the network site that matches the specified filter. ``` -------------------------------- ### Example 1: Create a menu with dial by name and directory search method ByExtension Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/new-csautoattendantmenu Creates a new menu that allows the caller to reach a target by name, and also defines the Directory Search Method to Dial By Extension. ```powershell $menuPrompt = New-CsAutoAttendantPrompt -TextToSpeechPrompt "To reach your party by name, enter it now, followed by the pound sign." $menu = New-CsAutoAttendantMenu -Name "Default Menu" -Prompts @($menuPrompt) -EnableDialByName -DirectorySearchMethod ByExtension ``` -------------------------------- ### Get-CsAutoAttendantSupportedTimeZone - Example 2 Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csautoattendantsupportedtimezone Gets the time zone specified by the Identity parameter, e.g., Pacific Standard Time. ```powershell Get-CsAutoAttendantSupportedTimeZone -Identity "Pacific Standard Time" ``` -------------------------------- ### Get emergency call routing policies with filter Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csteamsemergencycallroutingpolicy Retrieves all emergency call routing policies with an identity starting with 'Test'. ```powershell Get-CsTeamsEmergencyCallRoutingPolicy -Filter 'Test*' ``` -------------------------------- ### New-CsBatchTeamsDeployment Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/?view=teams-ps Runs a batch deployment orchestration. ```APIDOC ## New-CsBatchTeamsDeployment ### Description This cmdlet is used to run a batch deployment orchestration. ### Method New-CsBatchTeamsDeployment ### Parameters None documented. ### Request Example None documented. ### Response None documented. ``` -------------------------------- ### Get-CsOnlineApplicationInstance Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlineapplicationinstance Documentation for the Get-CsOnlineApplicationInstance cmdlet, including its parameters and usage. ```APIDOC ## Get-CsOnlineApplicationInstance ### Description Retrieves application instances in the tenant. You can retrieve a specific application instance by UPN or object ID, or retrieve all application instances if no identity is specified. ### Syntax ```powershell Get-CsOnlineApplicationInstance [-Identity ] [-Identities ] [-ResultSize ] [-Skip ] [-Force] [-Confirm] [-WhatIf] [] ``` ### Parameters #### -Identity - **Type:** String - **Mandatory:** False - **Position:** Named - **Description:** The UPN or the object ID of the application instance to retrieve. If neither this parameter nor the Identities parameter is provided, all application instances in the tenant are retrieved. #### -Identities - **Type:** String - **Mandatory:** False - **Position:** Named - **Description:** The UPNs or the object IDs of the application instances to retrieve, separated with comma. If neither this parameter nor the Identity parameter is provided, all application instances in the tenant are retrieved. #### -ResultSize - **Type:** Int32 - **Mandatory:** False - **Position:** Named - **Description:** The result size for bulk get. This parameter is currently not working. #### -Skip - **Type:** Int32 - **Mandatory:** False - **Position:** Named - **Description:** Skips the first specified number of returned results. The default value is 0. This parameter is currently not working. #### -Force - **Type:** SwitchParameter - **Mandatory:** False - **Position:** Named - **Description:** This switch specifies whether to suppress warning and confirmation messages. It can be useful in scripting to suppress interactive prompts. If it isn't provided in the command, you're prompted for administrative input if required. #### -Confirm - **Type:** SwitchParameter - **Mandatory:** False - **Position:** Named - **Aliases:** cf - **Description:** Prompts you for confirmation before running the cmdlet. #### -WhatIf - **Type:** SwitchParameter - **Mandatory:** False - **Position:** Named - **Aliases:** wi - **Description:** Shows what would happen if the cmdlet runs. The cmdlet is not run. #### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters. ### Outputs This cmdlet returns application instance objects. The exact output type is not specified in the source. ### Notes - The ResultSize and Skip parameters are currently not working. - If neither Identity nor Identities is provided, all application instances in the tenant are retrieved. ### Examples No examples are provided in the source documentation. ``` -------------------------------- ### Get-CsApplicationMeetingConfiguration Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csapplicationmeetingconfiguration Documentation for the Get-CsApplicationMeetingConfiguration cmdlet, including syntax, parameters, and examples. ```APIDOC ## Get-CsApplicationMeetingConfiguration ### Description Retrieves information about the application meeting configuration settings configured for the tenant. ### Syntax ```powershell Get-CsApplicationMeetingConfiguration [-Identity ] [] ``` ### Parameters #### -Filter - Type: String - Default value: None - Supports wildcards: False - DontShow: False - Position: Named - Mandatory: False - Value from pipeline: False - Value from pipeline by property name: False - Value from remaining arguments: False - Description: Enables you to use wildcards when specifying the application meeting configuration settings to be returned. Because you can only have a single, global instance of these settings there is little reason to use the Filter parameter. However, if you prefer, you can use syntax similar to this to retrieve the global settings: -Identity "g*". #### -Identity - Type: XdsIdentity - Default value: None - Supports wildcards: False - DontShow: False - Position: 1 - Mandatory: True - Value from pipeline: False - Value from pipeline by property name: False - Value from remaining arguments: False - Description: Unique identifier of the application meeting configuration settings to be returned. Because you can only have a single, global instance of these settings, you do not have to include the Identity when calling the Get-CsApplicationMeetingConfiguration cmdlet. However, you can use the following syntax to retrieve the global settings: -Identity global. #### -LocalStore - Type: SwitchParameter - Default value: None - Supports wildcards: False - DontShow: False - Position: Named - Mandatory: False - Value from pipeline: False - Value from pipeline by property name: False - Value from remaining arguments: False - Description: Retrieves the application meeting configuration data from the local replica of the Central Management store rather than from the Central Management store itself. ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters. ### Inputs None ### Outputs Microsoft.Rtc.Management.WritableConfig.Settings.PlatformApplications.ApplicationMeetingConfiguration ### Examples #### Example 1: Retrieve application meeting configuration settings for the tenant. ```powershell PS C:\> Get-CsApplicationMeetingConfiguration ``` The command shown above returns application meeting configuration settings that have been configured for the tenant. ``` -------------------------------- ### Get Status for a Specific Migration Event Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-directtogroupassignmentsmigrationstatus Example 2: Retrieves the status of a specific migration by providing its event ID (42ed6fb9-65c7-42de-abda-7492bfe2d616). ```powershell PS C:\> Get-DirectToGroupAssignmentsMigrationStatus -MigrationEventId 42ed6fb9-65c7-42de-abda-7492bfe2d616 ``` -------------------------------- ### Get-CsTeamsAppSetupPolicy Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csteamsappsetuppolicy Documentation for the Get-CsTeamsAppSetupPolicy cmdlet, including syntax, parameters, examples, and output properties. ```APIDOC ## Get-CsTeamsAppSetupPolicy ### Description Retrieves the Teams App Setup Policy configuration. This cmdlet can be used to get a specific policy by identity or to list all policies. ### Syntax ```powershell Get-CsTeamsAppSetupPolicy [-Identity ] [] ``` ### Parameters #### Identity - **Type**: String - **Required**: Optional - **Description**: The identity of the policy to retrieve. If not specified, all policies are returned. ### Examples #### Example 1: Get a specific policy ```powershell Get-CsTeamsAppSetupPolicy -Identity Global ``` #### Example 2: Get all policies ```powershell Get-CsTeamsAppSetupPolicy ``` ### Outputs The cmdlet returns policy objects with the following properties: - **Identity** (String) - The policy identity. - **AppPresetList** (List) - List of preset apps. - **PinnedAppBarApps** (List) - List of pinned apps in the app bar. - **PinnedMessageBarApps** (List) - List of pinned apps in the message bar. - **AppPresetMeetingList** (List) - List of preset meeting apps. - **Description** (String) - Description of the policy. - **AllowSideLoading** (Boolean) - Indicates if side loading is allowed. - **AllowUserPinning** (Boolean) - Indicates if user pinning is allowed. ``` -------------------------------- ### Get-CsOnlineApplicationInstance Syntax Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlineapplicationinstance Shows the full parameter set for the Get-CsOnlineApplicationInstance cmdlet. Use this syntax reference to understand all available parameters and their types. ```powershell Get-CsOnlineApplicationInstance [[-Identity] ] [[-Identities] ] [[-ResultSize] ] [[-Skip] ] [-Force] [-WhatIf] [-Confirm] [] ``` -------------------------------- ### Get-AllM365TeamsApps with Select-Object and ExpandProperty InstalledFor Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-allm365teamsapps Returns a complete list of all Teams apps in an organization, their statuses, their availability and their installation information in expanded format. ```powershell PS C:\> Get-AllM365TeamsApps | Select-Object -Property Id, IsBlocked, AvailableTo, InstalledFor -ExpandProperty InstalledFor ``` -------------------------------- ### New-CsTeamsAppSetupPolicy Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/?view=teams-ps Creates a Teams app setup policy to customize app pinning and order. ```APIDOC ## New-CsTeamsAppSetupPolicy ### Description As an admin, you can use app setup policies to customize Microsoft Teams to highlight the apps that are most important for your users. You choose the apps to pin and set the order that they appear. ### Syntax New-CsTeamsAppSetupPolicy ### Parameters No parameters are documented in the source. ### Examples No examples are provided in the source. ``` -------------------------------- ### Example 2: Get policy by identity Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csteamsvirtualappointmentspolicy Fetches an instance of a policy with a known identity. The output shows the policy with Identity Tag:sms-enabled and EnableSmsNotifications set to True. ```powershell PS C:\> Get-CsTeamsVirtualAppointmentsPolicy -Identity sms-enabled ``` ```output Identity EnableSmsNotifications -------- ---------------------- Tag:sms-enabled True ``` -------------------------------- ### Get-AllM365TeamsApps Example 1 Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-allm365teamsapps Returns a complete list of all Teams apps in an organization, their statuses, and their availability information. ```powershell PS C:\> Get-AllM365TeamsApps ``` -------------------------------- ### New-CsOnlineLisLocation Example 1 Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/new-csonlinelislocation Creates a new location named "Office 101, 1st Floor" within the civic address identified by the specified GUID. ```powershell New-CsOnlineLisLocation -CivicAddressId b39ff77d-db51-4ce5-8d50-9e9c778e1617 -Location "Office 101, 1st Floor" ``` -------------------------------- ### Get Caller ID policies filtered by identity prefix Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-cscallinglineidentity Retrieves and displays Caller ID policies whose Identity starts with 'Sales' using the -Filter parameter. ```powershell PS C:\> Get-CsCallingLineIdentity -Filter "tag:Sales*" ``` -------------------------------- ### Get-CsTeamsAppSetupPolicy Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csteamsappsetuppolicy Documentation for the Get-CsTeamsAppSetupPolicy cmdlet, including syntax and parameters. ```APIDOC ## Get-CsTeamsAppSetupPolicy ### Description Retrieves Microsoft Teams app setup policies. This cmdlet is documented for completeness but should not be used; use the Teams admin center for policy management. ### Syntax #### Identity (Default) ``` Get-CsTeamsAppSetupPolicy [[-Identity] ] [-Tenant ] [-LocalStore] [] ``` #### Filter ``` Get-CsTeamsAppSetupPolicy [-Tenant ] [-Filter ] [-LocalStore] [] ``` ### Parameters #### Identity (Default) - **Identity** (XdsIdentity) - Optional - The unique identifier of the policy to retrieve. - **Tenant** (System.Guid) - Optional - Specifies the tenant ID. - **LocalStore** (SwitchParameter) - Optional - Retrieves the policy from the local store. #### Filter - **Tenant** (System.Guid) - Optional - Specifies the tenant ID. - **Filter** (String) - Optional - A filter string to match policies. - **LocalStore** (SwitchParameter) - Optional - Retrieves the policy from the local store. ### Outputs This cmdlet returns objects representing the app setup policies. ``` -------------------------------- ### Get-CsOnlineTelephoneNumberType -Country CA with Output Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlinetelephonenumbertype Example 2: Get supported NumberTypes for Canada, formatted as a table. The output lists eight number types including UserSubscriber, ConferenceToll, and CallQueueToll. ```powershell PS C:\> Get-CsOnlineTelephoneNumberType -Country CA | ft NumberType ``` ```powershell NumberType ---------- UserSubscriber UserSubscriberVoiceAndSms ConferenceToll ConferenceTollFree CallQueueToll CallQueueTollFree AutoAttendantToll AutoAttendantTollFree ``` -------------------------------- ### Get-CsOnlineTelephoneNumberType -Country US with Output Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlinetelephonenumbertype Example 1: Get supported number offerings for the United States. The output shows two offerings with NumberType UserSubscriber and UserSubscriberVoiceAndSms, both requiring a civic address. ```powershell PS C:\> Get-CsOnlineTelephoneNumberType -Country US ``` ```powershell AllowedSearchType : {CivicAddress, Prefix} AreaCode : AvailabilityInfo : Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.AvailabilityInfo Id : 470316bd-815e-459d-80e7-d7332f00fcb9 NumberType : UserSubscriber OfferModel : DirectStock PrefixSearchOption : Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.PrefixSearchOptions RequiresCivicAddress : True AllowedSearchType : {CivicAddress, Prefix} AreaCode : AvailabilityInfo : Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.AvailabilityInfo Id : 25444938-a335-4a85-b64d-d445b45f04e3 NumberType : UserSubscriberVoiceAndSms OfferModel : DirectStock PrefixSearchOption : Microsoft.Teams.ConfigAPI.Cmdlets.Generated.Models.PrefixSearchOptions RequiresCivicAddress : True ``` -------------------------------- ### Add-TeamUser example Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/add-teamuser Adds the user dmx@example.com to the team with the specified GroupId. The command returns immediately, but the change can take between 24 and 48 hours to appear within the Teams client. ```powershell Add-TeamUser -GroupId 31f1ff6c-d48c-4f8a-b2e1-abca7fd399df -User dmx@example.com ``` -------------------------------- ### Get-CsAutoAttendant by Identity - Example 2 Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csautoattendant Retrieves a specific auto attendant by its Identity GUID. The output shows the properties of the returned object, including Id, TenantId, Name, LanguageId, VoiceId, and other settings. ```powershell Get-CsAutoAttendant -Identity "f7a821dc-2d69-5ae8-8525-bcb4a4556093" # Id : f7a821dc-2d69-5ae8-8525-bcb4a4556093 # TenantId : 977c9d5b-2dae-5d82-aada-628bc1c14213 # Name : Main Auto Attendant # LanguageId : en-US # VoiceId : Female # DefaultCallFlow : Default Call Flow # Operator : # TimeZoneId : Pacific Standard Time # VoiceResponseEnabled : False # CallFlows : # Schedules : # CallHandlingAssociations : # Status : # DialByNameResourceId : # DirectoryLookupScope : # ApplicationInstances : {fa2f17ec-ebd5-43f8-81ac-959c245620fa, 56421bbe-5649-4208-a60c-24dbeded6f18, c7af9c3c-ae40-455d-a37c-aeec771e623d} ``` -------------------------------- ### Generate full number with extension using New-CsTeamsTranslationRule Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/new-csteamstranslationrule Creates a rule that adds the last four digits of a phone number starting with +1206555 as the extension. For example, +12065551234 becomes +12065551234;ext=1234. ```powershell New-CsTeamsTranslationRule -Identity 'GenerateFullNumber' -Pattern '^\+1206555(\d{4})$' -Translation '+1206555$1;ext=$1' ``` -------------------------------- ### Example 2: Create a menu with operator option and directory search method ByName Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/new-csautoattendantmenu Creates a new menu that allows the caller to reach a target by name or the operator by pressing the 0 key, and also defines the Directory Search Method to Dial By Name. ```powershell $menuOptionZero = New-CsAutoAttendantMenuOption -Action TransferCallToOperator -DtmfResponse Tone0 $menuPrompt = New-CsAutoAttendantPrompt -TextToSpeechPrompt "To reach your party by name, enter it now, followed by the pound sign. For operator, press zero." $menu = New-CsAutoAttendantMenu -Name "Default Menu" -Prompts @($menuPrompt) -MenuOptions @($menuOptionZero) -EnableDialByName -DirectorySearchMethod ByName ``` -------------------------------- ### Get-CsOnlineSipDomain - Example 1 Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlinesipdomain Lists all online SIP domains in the tenant and shows their enabled/disabled status. ```powershell PS C:\> Get-CsOnlineSipDomain ``` -------------------------------- ### Example 3: Get policies by filter Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csteamsvirtualappointmentspolicy Uses the Filter parameter to fetch policy instances based on partial matches on Identity. The output shows policies with Identity containing 'sms'. Note: The 'Tag:' prefix can be ignored when specifying the identity. ```powershell PS C:\> Get-CsTeamsVirtualAppointmentsPolicy -Filter *sms* ``` ```output Identity EnableSmsNotifications -------- ---------------------- Tag:sms-enabled True Tag:sms-disabled False ``` -------------------------------- ### Get schedule by Id Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-csonlineschedule Gets the schedule with the specified Id. ```powershell Get-CsOnlineSchedule -Id "f7a821dc-2d69-5ae8-8525-bcb4a4556093" ``` -------------------------------- ### Get-CsPolicyPackage - list all packages Source: https://learn.microsoft.com/en-us/powershell/module/microsoftteams/get-cspolicypackage Returns all policy packages available on the tenant. ```powershell PS C:\> Get-CsPolicyPackage ```