Skip to main content

Get-DCDiagReport

Summary

This is an automated wrapper for the agnostic Get-DCDiagReport.ps1. The script will create a ticket if the PowerShell script fails on the computer for any reason or if the diagnostic report returns any failure.

Sample Run

Run the script without setting the Excluded_TestNames parameter to perform all available tests during the diagnostic.
Sample Run 1

A set of specific test names can be passed to the Excluded_TestNames parameter to exclude from the diagnostic.
Sample Run 2

Dependencies

Variables

Document the various variables in the script. Delete any section that is not relevant to your script.

NameDescription
PsExecuteCommandThe command to send to PowerShell to execute the agnostic script.
PowerShellResultThe result of the DCDiag report.
TicketFinishBodyThe body of a finished ticket.
TicketBodyThe body of a created ticket or comment.
TickIDThe ID of any currently open ticket for this issue.

Global Parameters

NameExampleRequiredDescription
ProjectNameGet-DCDiagReportTrueThe name of the agnostic solution
ExpectedSuccessReturnTestNameTrueValidates the results of the PowerShell execution.
TicketCreateSubjectDC Diag Results for %ComputerName%TrueThe subject of any ticket created from this script.
TicketCreationCategory1FalseThe ticket creation category for any created ticket from this script.
DoNotCommentOpenTicket0FalseToggles commenting on open tickets for subsequent runs.

User Parameters

NameExampleRequiredDescription
Excluded_TestNamesDNS,Advertising,FrsEvent,VerifyReplicas,ServicesFalseNames of the tests to exclude from the diagnostic. Names should be separated by a comma (do not use spaces). Allowed test names are as follows: 'Advertising', 'CutoffServers', 'FrsEvent', 'DFSREvent', 'SysVolCheck', 'FrsSysVol', 'KccEvent', 'MachineAccount', 'NCSecDesc', 'NetLogons', 'ObjectsReplicated', 'Replications', 'RidManager', 'Services', 'SystemLog', 'Topology', 'VerifyReferences', 'VerifyReplicas', 'DNS', 'CheckSDRefDom', 'CrossRefValidation', 'LocatorCheck', 'FsmoCheck', 'Intersite'.

Output

  • Script log
  • Ticket

Ticketing

Ticketing
The script will not close or finish any ticket.