Topic Last Modified: 2010-10-01

Returns information about the diagnostic header configuration settings currently in use in your organization. Diagnostic header configuration settings determine whether SIP messages are accompanied by header information. This information can be useful in troubleshooting and error reporting.

Syntax

Get-CsDiagnosticHeaderConfiguration [-Identity <XdsIdentity>] [-LocalStore <SwitchParameter>]
Get-CsDiagnosticHeaderConfiguration [-Filter <String>] [-LocalStore <SwitchParameter>]

Parameters

Parameter Required Type Description

Identity

Optional

Xds Identity

Unique identifier for the diagnostic header configuration settings to be returned. To return settings configured at the site scope, use syntax similar to this: -Identity "site:Redmond". To return settings configured at the service scope, use syntax like this: -Identity "service:EdgeServer:atl-edge-001.litwareinc.com". To return the global settings, use this syntax: -Identity global.

If this parameter is not specified, then all the diagnostic header configuration settings currently in use will be returned.

Filter

Optional

String

Enables you to use wildcard characters when specifying the settings collection (or collections) to be returned. For example, this syntax returns all the settings configured at the site scope: -Filter "site:*". This syntax returns all the settings configured at the service scope: -Filter "service:*".

Note that you cannot use both the Filter and the Identity parameters in the same command.

LocalStore

Optional

Switch Parameter

Retrieves the diagnostic header configuration data from the local replica of the Central Management store rather than from the Central Management store itself.

Detailed Description

When you send SIP (Session Initiation Protocol) messages, you have the option of attaching an ms-diagnostics header to each message. This message (which is not visible to end users) contains information that might be useful in troubleshooting connection problems or in reporting errors. For example, the diagnostic header might contain error codes that enable the client application (for example, Microsoft Lync 2010) to take a predetermined course of action should a specific situation arise.

For SIP messages sent within your internal network, there’s little reason not to include these diagnostic headers: they have a minimal impact on message size and can be an invaluable tool for administrators trying to troubleshoot connectivity problems. However, diagnostic headers also contain information, such as the fully qualified domain names (FQDNs) of your SIP servers, that you might not want to make available to people outside the internal network. Because of this, the diagnostic header configuration settings enable you to decide whether you want diagnostic headers sent to users on external networks (such as users in a federated domain) and/or to outside users. (Outside users are users who have connected from outside the internal network and have not yet been authenticated.)

By default, headers are not included in messages sent either to external networks or to unauthenticated users. However, you can modify the global diagnostic header settings to include headers to external networks and/or unauthenticated users. Alternatively, you can create custom settings at the site scope or at the service scope (for the Edge Server or Registrar service). That way, you can choose to include diagnostic headers on messages sent from one site, or through one Edge Server, while disallowing headers on messages sent from other sites or through other Edge Servers.

The Get-CsDiagnosticHeaderConfiguration cmdlet provides a way for you to retrieve information about the diagnostic header configuration settings currently in use in your organization.

Who can run this cmdlet: By default, members of the following groups are authorized to run the Get-CsDiagnosticHeaderConfiguration cmdlet locally: RTCUniversalUserAdmins, RTCUniversalServerAdmins. To return a list of all the role-based access control (RBAC) roles this cmdlet has been assigned to (including any custom RBAC roles you have created yourself), run the following command from the Windows PowerShell prompt:

Get-CsAdminRole | Where-Object {$_.Cmdlets –match "Get-CsDiagnosticHeaderConfiguration"}

Input Types

None. Get-CsDiagnosticHeaderConfiguration does not accept pipelined input.

Return Types

Get-CsDiagnosticHeaderConfiguration returns instances of the Microsoft.Rtc.Management.WritableConfig.Settings.Diagnostics.DiagnosticHeaderSettings object.

Example

-------------------------- Example 1 ------------------------

Copy Code
Get-CsDiagnosticHeaderConfiguration

The preceding command returns information about all the diagnostic header configuration settings currently in use in the organization. This is done by calling Get-CsDiagnosticHeaderConfiguration without any parameters.

-------------------------- Example 2 ------------------------

Copy Code
Get-CsDiagnosticHeaderConfiguration -Identity site:Redmond

In Example 2, a single collection of diagnostic header configuration settings is returned: the collection that has the Identity site:Redmond.

-------------------------- Example 3 ------------------------

Copy Code
Get-CsDiagnosticHeaderConfiguration -Filter "service:*"

The command shown in Example 3 returns all the diagnostic header settings that have been configured at the service scope. This is done by calling Get-CsDiagnosticHeaderConfiguration and the Filter parameter; the filter value "service:*" ensures that the only settings that are returned are those that have an Identity that begins with the characters "service:".

-------------------------- Example 4 ------------------------

Copy Code
Get-CsDiagnosticHeaderConfiguration | Where-Object {$_.SendToExternalNetworks -eq $True}

Example 4 returns all the diagnostic header configuration settings that allow sending to external networks. To perform this task, the command first calls Get-CsDiagnosticHeaderConfiguration without any parameters; this returns a collection of all the diagnostic header settings currently in use. This collection is then piped to the Where-Object cmdlet, which selects only those settings where the SendToExternalNetworks property is equal to True.

-------------------------- Example 5 ------------------------

Copy Code
Get-CsDiagnosticHeaderConfiguration | Where-Object {$_.SendToExternalNetworks -eq $True -or $_.SendToOutsideUnauthenticatedUsers -eq $True}

The command shown in Example 5 returns information about the diagnostic header configuration settings that meet at least one of the following criteria: 1) the SendToExternalNetworks property is equal to True; and/or 2) the SendToOutsideUnauthenticatedUsers is equal to True. To do this, the command first uses Get-CsDiagnosticHeaderConfiguration to return a collection of all the diagnostic header settings currently in use. This collection is then piped to Where-Object, which picks out those settings where the SendToExternalNetworks property and/or the SendToOutsideUnauthenticatedUsers property is equal to True.

The -or operator specifies that, to be returned, settings only have to meet one of the specified criteria. To require that settings meet both of the specified criteria, use the -and operator instead:

Where-Object {$_.SendToExternalNetworks -eq $True -and $_.SendToOutsideUnauthenticatedUsers -eq $True}

See Also