text
stringlengths
0
4.23k
Parameters
Parameter
Description
<month-day-year>
Sets the date specified, where month is the month (one or two digits, including values 1 through 12), day is the day (one or two digits, including values 1 through 31), and year is the year (two or four digits, including the values 00 through 99 or 1980 through 2099). You must separate values for month, day, and year with periods (.), hyphens (-), or slash marks (/).Note: Be mindful if you use 2 digits to represent the year, the values 80-99 correspond to 1980 through 1999.
/t
Displays the current date without prompting you for a new date.
/?
Displays help at the command prompt.
<month-day-year>
Note: Be mindful if you use 2 digits to represent the year, the values 80-99 correspond to 1980 through 1999.
Examples
If command extensions are enabled, to display the current system date, type:
date /t
To change the current system date to August 3, 2007, you can type any of the following:
date 08.03.2007
date 08-03-07
date 8/3/07
To display the current system date, followed by a prompt to enter a new date, type:
date
To keep the current date and return to the command prompt, press ENTER. To change the current date, type the new date based on your current date configuration, as seen in the second example above, and then press ENTER.
Dcdiag
Applies To: Windows Server 2022, Windows Server 2019, Windows Server 2016
Dcdiag.exe analyzes the state of domain controllers in a forest or enterprise and reports any problems to help in troubleshooting.
Dcdiag.exe
As an end-user reporting program, dcdiag is a command-line tool that encapsulates detailed knowledge of how to identify abnormal behavior in the system. Dcdiag displays command output at the command prompt.
Dcdiag consists of a framework for executing tests and a series of tests to verify different functional areas of the system. This framework selects which domain controllers are tested according to scope directives from the user, such as enterprise, site, or single server.
To use dcdiag, you must run dcdiag from an elevated command prompt or PowerShell with administrative rights.
Dcdiag syntax
dcdiag [/s:<DomainController>] [/n:<NamingContext>] [/u:<Domain>\<UserName> /p:{* | <Password> | ""}] [{/a | /e}] [{/q | /v}] [/i] [/f:<LogFile>] [/c [/skip:<Test>]] [/test:<Test>] [/fix] [{/h | /?}] [/ReplSource:<SourceDomainController>]
dcdiag [/s:<DomainController>] [/n:<NamingContext>] [/u:<Domain>\<UserName> /p:{* | <Password> | ""}] [{/a | /e}] [{/q | /v}] [/i] [/f:<LogFile>] [/c [/skip:<Test>]] [/test:<Test>] [/fix] [{/h | /?}] [/ReplSource:<SourceDomainController>]
Dcdiag uses the following parameters:
Parameter
Description
/s:<DomainController>
Specifies the name of the server to run the command against. If this parameter isn't specified, the tests are run against the local domain controller.This parameter is ignored for DcPromo and RegisterInDns tests, which can only be run locally.
/n:<NamingContext>
Uses NamingContext as the naming context to test. You can specify domains in NetBIOS, Domain Name System (DNS), or distinguished name format.
/u:<Domain>\<UserName> /p:{<Password> | ""}
Uses Domain\UserName. Dcdiag uses the current credentials of the user (or process) that is logged on. If alternate credentials are needed, use the following options to provide those credentials for binding with Password as the password: Use quotation marks ("") for an empty or null password. Use the wildcard character (*) to prompt for the password.
/a
Tests all the servers on this AD DS site.
/e
Tests all the servers in the enterprise. This overrides /a.
/q
Quiet. Prints only error messages.
/v
Verbose. Prints extended information.
/fix
Affects the MachineAccount test only. This parameter causes the test to fix the Service Principal Names (SPNs) on the Machine Account object of the domain controller.
/f:<LogFile>
Redirects all output to a log file.
/c
Comprehensive. Runs all tests except DCPromo and RegisterInDNS, including non-default tests. Optionally, you can use this parameter with the /skip parameter to skip specified tests.The following tests aren't run by default:Topology CutoffServersOutboundSecureChannels.
/h or /?
Displays help at the command prompt.
/test:<Test>
Runs this test only. The connectivity test, which you can't skip, is also run. This can't be used with /skip parameter.
/ReplSource:<SourceDomainController>
Tests the connection between the domain controller on which you run the command and the source domain controller. (This parameter is used for the CheckSecurityError test.)SourceDomainController is the DNS name, NetBIOS name, or distinguished name of a real or potential server that will be the source domain controller for replication, as represented by a real or potential connection object.