Save-CMDatabaseReplicationDiagnostic

Saves database replication diagnostic information for Configuration Manager in a file.

Syntax

Save-CMDatabaseReplicationDiagnostic
    -ChildSiteCode <String>
    [-FileName <String>]
    [-PassThru]
    [-SiteCode <String>]
    [-DisableWildcardHandling]
    [-ForceWildcardHandling]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Save-CMDatabaseReplicationDiagnostic cmdlet saves diagnostic information for database replication issues for Configuration Manager in a specified file. This cmdlet runs diagnostics for a link between a parent and a child site databases. You can specify sites by either name or site code, but you cannot specify one site by name and the other by site code.

Configuration Manager database replication transfers data and merges changes made in a site database with the information stored in other sites in the Configuration Manager site hierarchy so that all sites share the same information. Configuration Manager configures database replication automatically between a parent and child site. Diagnostics identify problems in database replication.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Save database replication diagnostic

PS XYZ:\> Save-CMDatabaseReplicationDiagnostic -ChildSiteCode "CC2" -FileName "D:\Diagnostics\CCB_CC2_Diagnostics.csv" -ParentSiteCode "CCB"

This command saves database replication diagnostics in a file named CCB_CC2_Diagnostics.csv. The command specifies a parent and child site by using site codes.

Parameters

-ChildSiteCode

Specifies a site code for a Configuration Manager site. This is the child site.

Type:String
Aliases:Site2
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FileName

Specifies a file name. This cmdlet saves database diagnostic information for database replication to this file.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-PassThru

Add this parameter to return an object that represents the item with which you're working. By default, this cmdlet may not generate any output.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SiteCode

Type:String
Aliases:Site1, ParentSiteCode
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

System.String