[This is preliminary documentation and is subject to change. Blank topics are included as placeholders.]

Removes one or more of the diagnostic header configuration setting collections currently in use in your organization. Diagnostic header configuration settings determine whether SIP messages are accompanied by header information that can be useful in troubleshooting and error reporting.


Remove-CsDiagnosticHeaderConfiguration -Identity <XdsIdentity> [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-WhatIf [<SwitchParameter>]]


Parameter Required Type Description



Xds Identity

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

Remove-CsDiagnosticHeaderConfiguration can also be run against the global configuration settings. In that case, you use the syntax –Identity global. Note, however, that the global settings will not actually be removed; instead, the properties found in the global settings will be reset to their default values. That means that both SendToOutsideUnauthenticatedUsers and SendToExternalNetworks will be set to False.



Switch Parameter

Suppresses the display of any non-fatal error message that might arise when running the command.



Switch Parameter

Describes what would happen if you executed the command without actually executing the command.



Switch Parameter

Prompts you for confirmation before executing the command.

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 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 unauthenticated users (for example, anonymous users participating in an online conference). 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.

Any new collections you create (at either the site or the service scope) can later be removed by using the Remove-CsDiagnosticsHeaderConfiguration cmdlet. You can also run this cmdlet against the global collection. In that case, however, the global collection will not be removed because you can’t remove the global collection. Instead, the two properties contained in the global collection--SendToExternalNetworks and SendToOutsideUnauthenticatedUsers--will be reset to their default values (which, in each case, is False).

Return Types

Remove-CsDiagnosticHeaderConfiguration deletes existing instances of the Microsoft.Rtc.Management.WritableConfig.Settings.Diagnostics.DiagnosticHeaderSettings object.


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

Copy Code
Remove-CsDiagnosticHeaderConfiguration -Identity site:Redmond

In Example 1, the diagnostic header configuration settings that have the Identity site:Redmond are removed. Because Identities are unique, this command will only remove one collection of settings.

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

Copy Code
Get-CsDiagnosticHeaderConfiguration -Filter service:* | Remove-CsDiagnosticHeaderConfiguration

The command shown in Example 2 deletes all the diagnostic header configuration settings that have been applied at the service scope. To do this, the command first calls Get-CsDiagnosticHeaderConfiguration and the Filter parameter. The filter value "service:*" limits the returned data to those settings where the Identity begins with the characters "service:". This filtered collection is then piped to Remove-CsDiagnosticHeaderConfiguration, which deletes each item in the collection.

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

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

The preceding command deletes all the diagnostic header configuration settings that allow sending to external networks. 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 piped to the Where-Object cmdlet, which picks out only those settings where the SendToExternalNetworks property is equal to (-eq) True ($True). These settings are then piped to Remove-CsDiagnosticHeaderConfiguration, which deletes each setting that allows sending to external networks.