System command

nslookup set command

Changes configuration settings that affect how lookups function. This guide lists the documented syntax and parameters for nslookup set; check Microsoft Learn for version, role and execution-context requirements.

Availability: Microsoft Learn command reference spanning Windows client and Windows Server releases; some entries are legacy, role-specific, optional-feature or interactive subcommands.中文

Documented syntax

nslookup
> set all [class | d2 | debug | domain | port | querytype | recurse | retry | root | search | srchlist | timeout | type | vc] [options]

The linked Microsoft Learn article is the upstream authority. Availability may depend on Windows release, role, optional feature or interactive tool context.

Examples

Example from the linked Microsoft Learn article. Check its paths, targets and availability before adapting it.

nslookup

Example from the linked Microsoft Learn article. Check its paths, targets and availability before adapting it.

set type=AAAA

Example from the linked Microsoft Learn article. Check its paths, targets and availability before adapting it.

set timeout=5

Parameters, options and clauses

Option / clauseDescription
set allDisplay the current interactive nslookup settings.
set class <value>Set the query class, which selects the protocol group.
set d2 / set debugEnable detailed debugging output or debugging mode.
set domain <name>Set the default DNS domain name.
set port <number>Set the DNS server port used for queries.
set querytype <type> / set type <type>Choose the DNS resource record type to query.
set recurseRequest recursive lookup from the DNS server.
set retry <number>Set how many times nslookup retries a query.
set root <server>Choose the root server used for queries.
set search / set srchlist <domains>Enable search-list suffixes or set the default domain search list.
set timeout <seconds>Set the initial wait time for a DNS response.
set vcUse a virtual circuit (TCP) for requests.
set d2Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
set debugMicrosoft documents this argument or subcommand; check the linked reference for its required format and context.
set root <root-server>Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
set searchMicrosoft documents this argument or subcommand; check the linked reference for its required format and context.
set srchlist <domain-list>Microsoft documents this argument or subcommand; check the linked reference for its required format and context.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory