Write-Dfsr Health Report

Generates a DFS Replication health report.

Syntax

Write-DfsrHealthReport
     [-GroupName] <String[]>
     [[-ReferenceComputerName] <String>]
     [[-MemberComputerName] <String[]>]
     [[-Path] <String>]
     [-CountFiles]
     [[-DomainName] <String>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]

Description

The Write-DfsrHealthReport cmdlet generates a Distributed File System (DFS) Replication health, or diagnostic, report for two or more servers. A health reports contains administrative information about replication state, efficiency, and any potential replication issues.

The cmdlet creates the reports as an HTML file, with an associated XML file.

Examples

Example 1: Generate a health report with a file count

PS C:\> Write-DfsrHealthReport -GroupName "RG01" -ReferenceComputerName "SRV01" -MemberComputerName "SRV02" -Path "C:\reports" -CountFiles

This command generates a report for the replication group RG01 and the reference computer SRV01.

Example 2: Generate a health report

PS C:\> Write-DfsrHealthReport -GroupName "RG01" -ReferenceComputerName "SRV01" -Verbose
VERBOSE: Performing operation "Write-DfsrHealthReport" on Target "RG01".
VERBOSE: Successfully saved the health report for the replication group named "RG01". The XML file is located here: "C:\Health-RG01-04Apr2013-2022.xml". The HTML file is located here: "C:\Health-RG01-04Apr2013-2022.html".

This command generates a health report for the RG01 replication group with a baseline computer of SRV01 and all other servers in the replication group. The command writes the report to the C:\ folder.

Required Parameters

-GroupName

Specifies an array of names of replication groups. If you do not specify this parameter, the cmdlet queries for all participating replication groups. You can use a comma separated list and the wildcard character (*).

Type: String[]
Aliases: RG, RgName
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

Indicates that the cmdlet counts the number of files present in the replicated content folders. By default, the cmdlet does not count files, in order to save time while generating a report.

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

Specifies the NetBIOS name or fully qualified domain name (FQDN) for the Active Directory Domain Service (AD DS) domain that contains a replication group. If you do not specify this parameter, the cmdlet uses the current domain of the user.

Type: String
Position: 100
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-MemberComputerName

Specifies an array of DFS Replication members to analyze in comparison to a server specified by the ReferenceComputerName parameter. If you do not specify this parameter, the cmdlet includes all members of the replication group. You can specify multiple computer names, separated by commas, as well as wildcard characters (*).

Type: String[]
Aliases: MemberList, MemList
Position: 2
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Path

Specifies the folder path for the report file. If you do not specify this parameter, the cmdlet uses the current working directory.

The cmdlet names each report in the format Health-<Replication Group Name>-<Date>-<Time> with HTML and XML extensions.

Type: String
Aliases: FilePath
Position: 3
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-ReferenceComputerName

Specifies the name of a reference computer in the replication group. The replication backlog from this server is compared to all other members specified in the MemberComputerName parameter. If you do not specify this parameter, the cmdlet uses the local computer.

Type: String
Aliases: ReferenceMember, RefMem
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

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

Inputs

Microsoft.DistributedFileSystemReplication.DfsReplicationGroup

Outputs

None