pktmon

pktmon

Applies to: Windows Server 2022, Windows Server 2019, Windows 10, Azure Stack HCI, Azure Stack Hub, Azure

Packet Monitor (Pktmon) is an in-box, cross-component network diagnostics tool for Windows. It can be used for advanced packet capture and event collection, drop detection, filtering, and counting. Pktmon is especially helpful in virtualization scenarios such as container networking and SDN, because it provides visibility within the networking stack.

Syntax

pktmon { filter | list | start | stop | status | unload | counters | reset | etl2txt | etl2pcap | hex2pkt | help } [options]

Commands

Command Description
pktmon filter Manage packet filters.
pktmon list List packet processing components.
pktmon start Start packet capture and event collection.
pktmon stop Stop data collection.
pktmon status Query current status.
pktmon unload Unload PktMon driver.
pktmon counters Display current packet counters.
pktmon reset Reset packet counters to zero.
pktmon etl2txt Convert log file to text format.
pktmon etl2pcap Convert log file to pcapng format.
pktmon hex2pkt Decode packet in hexadecimal format.
pktmon help Show help text for specific command.

Additional References



title: pbadmin description: Reference article for the pbadmin command. This command has been deprecated and isn't guaranteed to be supported in future releases of Windows. ms.topic: reference ms.assetid: 4911e640-aa7f-4afb-abc2-5eefc7010204 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

pbadmin

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

[!IMPORTANT] This command has been deprecated.

Administers phone books. Used without parameters, pbadmin starts Phone Book Administrator. For descriptions and usage information, see pbadmin.

Additional References



title: perfmon description: Reference article for the perfmon command, which starts the Windows Reliability and Performance Monitor in a specific standalone mode. ms.topic: reference ms.assetid: 9a8d5eca-8473-463e-a6e0-7bbd590b18e1 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 07/25/2018

perfmon

Start Windows Reliability and Performance Monitor in a specific standalone mode.

Syntax

perfmon </res|report|rel|sys>

Parameters

Parameter Description
/res Starts the Resource View.
/report Starts the System Diagnostics Data Collector Set and displays a report of the results.
/rel Starts the Reliability Monitor.
/sys Starts the Performance Monitor.

Additional References



title: pagefileconfig description: Reference article for the pagefileconfig command. This command has been deprecated and isn't guaranteed to be supported in future releases of Windows. ms.topic: reference ms.assetid: a18c98ce-a0dc-41cc-8d44-dc7eee0131e8 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

pagefileconfig

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

[!IMPORTANT] This command has been deprecated.

Enables an administrator to display and configure a system's paging file Virtual Memory settings. For descriptions and usage information, see pagefileconfig.

Additional References



title: offline volume description: Reference article for the offline volume command, which takes the online volume with focus to the offline state. ms.topic: reference ms.assetid: b8f7192f-ea38-47d0-9d4e-58ef68336ae6 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

offline volume

Takes the online volume with focus to the offline state.

[!NOTE] A volume must be selected for the offline volume command to succeed. Use the select volume command to select a disk and shift the focus to it.

Syntax

offline volume [noerr]

Parameters

Parameter Description
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To take the disk with focus offline, type:

offline volume

Additional References



title: online description: Reference article for the online command, which takes an offline disk or volume to the online state. ms.topic: reference ms.assetid: aacc3f75-bbc8-4ae2-bf92-420a82594da2 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

online

Takes an offline disk or volume to the online state.

Syntax

online disk
online volume

Parameters

Parameter Description
online disk Takes the offline disk with focus to the online state.
online volume Takes the offline volume with focus to the online state.

Additional References



title: ntfrsutl description: Reference article for the ntfrsutl command, which dumps the internal tables, thread, and memory information for the NT File Replication Service (NTFRS). ms.topic: reference ms.assetid: d7721a19-5a87-4ab6-b816-65d2da2c811f ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ntfrsutl

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Dumps the internal tables, thread, and memory information for the NT File Replication Service (NTFRS) from both the local and remote servers. The recovery setting for NTFRS in Service Control Manager (SCM) can be critical to locating and keeping important log events on the computer. This tool provides a convenient method of reviewing those settings.

Syntax

ntfrsutl[idtable|configtable|inlog|outlog][<computer>]
ntfrsutl[memory|threads|stage][<computer>]
ntfrsutl ds[<computer>]
ntfrsutl [sets][<computer>]
ntfrsutl [version][<computer>]
ntfrsutl poll[/quickly[=[<n>]]][/slowly[=[<n>]]][/now][<computer>]

Parameters

Parameter Description
idtable Specifies the ID table.
configtable Specifies the FRS configuration table.
inlog Specifies the inbound log.
outlog Specifies the outbound log.
<computer> Specifies the computer.
memory Specifies the memory usage.
threads Specifies the memory usage.
stage Specifies the memory usage.
ds Lists the NTFRS service's view of the DS.
sets Specifies the active replica sets.
version Specifies the API and NTFRS service versions.
poll Specifies the current polling intervals.
  • /quickly - Polls quickly until it retrieves a stable configuration.
  • /quickly= - Polls quickly every default number of minutes.
  • /quickly=<n> - Polls quickly every n minutes.
  • /slowly - Polls slowly until it retrieves a stable configuration.
  • /slowly= - Polls slowly every default number of minutes.
  • /slowly=<n> - Polls slowly every n minutes.
  • /now - Polls now.
/? Displays help at the command prompt.

Examples

To determine the polling interval for file replication, type:

C:\Program Files\SupportTools>ntfrsutl poll wrkstn-1

To determine the current NTFRS application program interface (API) version, type:

C:\Program Files\SupportTools>ntfrsutl version

Additional References



title: offline description: Reference article for the offline command, which takes an online disk or volume to the offline state. ms.topic: reference ms.assetid: 44b265b2-fb08-4e7a-8939-c004258196b2 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

offline

Takes an online disk or volume to the offline state.

Syntax

offline disk
offline volume

Parameters

Parameter Description
offline disk Takes the online disk with focus to the offline state.
offline volume Takes the online volume with focus to the offline state.

Additional References



title: ntcmdprompt description: Reference article for the ntcmdprompt command, which runs the command interpreter Cmd.exe, rather than Command.com, after running a Terminate and Stay Resident (TSR) or after starting the command prompt from within an MS-DOS application. ms.topic: reference ms.assetid: 0063bdbb-dc2b-41c4-99ee-b011603aaa86 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ntcmdprompt

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Runs the command interpreter Cmd.exe, rather than Command.com, after running a Terminate and Stay Resident (TSR) or after starting the command prompt from within an MS-DOS application.

Syntax

ntcmdprompt

Parameters

Parameter Description
/? Displays help at the command prompt.

Remarks

Additional References



title: nslookup set retry description: Reference article for the nslookup set retry command, which sets the number of tries to get information from a specified server. ms.topic: reference ms.assetid: 615fdfa2-fa29-47a8-8c9e-a6c5b45b3b71 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup set retry

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

If a reply isn't received within a certain amount of time, the time-out period is doubled, and the request is resent. This command sets the number of times a request is resent to a server for information, before giving up.

[!NOTE] To change the length of time before the request times out, use the nslookup set timeout command.

Syntax

set retry=<number>

Parameters

Parameter Description
<number> Specifies the new value for the number of retries. The default number of retries is 4.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: nslookup set recurse description: Reference article for the nslookup set recurse command, which tells the Domain Name System (DNS) name server to query other servers if it can't find the information on the specified server.

ms.topic: reference ms.assetid: d1b7a93f-dfb0-4ccd-b230-e0953057fada ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup set recurse

Tells the Domain Name System (DNS) name server to query other servers if it can't find the information on the specified server.

Syntax

set [no]recurse

Parameters

Parameter Description
norecurse Stops the Domain Name System (DNS) name server from querying other servers if it can't find the information on the specified server.
recurse Tells the Domain Name System (DNS) name server to query other servers if it can't find the information on the specified server. This is the default value.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: nslookup set domain description: Reference article for the nslookup set domain command, which changes the default Domain Name System (DNS) domain name to the specified name. ms.topic: reference ms.assetid: 9d4d28e8-6e88-42cc-801f-94e9d8e051f4 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup set domain

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Changes the default Domain Name System (DNS) domain name to the specified name.

Syntax

set domain=<domainname>

Parameters

Parameter Description
<domainname> Specifies a new name for the default DNS domain name. The default value is the name of the host.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Remarks

Additional References



title: nslookup set class description: Reference article for the nslookup set class command, which changes the query class. ms.topic: reference ms.assetid: ed826400-40da-42b6-b7f0-95db73790723 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup set class

Changes the query class. The class specifies the protocol group of the information.

Syntax

set class=<class>

Parameters

Parameter Description
<class> The valid values include:
  • IN: Specifies the Internet class. This is the default value.
  • CHAOS: Specifies the Chaos class.
  • HESIOD: Specifies the MIT Athena Hesiod class.
  • ANY: Specifies to use any of the previously listed values.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: nslookup set debug description: Reference article for the nslookup set debug command, which turns debugging mode on and off. ms.topic: reference ms.assetid: b51e04e7-5f6f-4183-88bf-5628a506bdab ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup set debug

Turns debugging mode on or off.

Syntax

set [no]debug

Parameters

Parameter Description
nodebug Turns off debugging mode. This is the default value.
debug Turns on debugging mode. By turning debugging mode on, you can view more information about the packet sent to the server and the resulting answer.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: nslookup set d2 description: Reference article for the nslookup set d2 command, which turns the verbose debugging mode on or off. ms.topic: reference ms.assetid: 19e8325c-632f-4287-b4cc-10f5d59e4074 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup set d2

Turns the verbose debugging mode on or off. All fields of every packet are printed.

Syntax

set [no]d2

Parameters

Parameter Description
nod2 Turns off the verbose debugging mode. This is the default value.
d2 Turns on the verbose debugging mode.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: nslookup set all description: Reference article for the nslookup set all command, which outputs the current configuration setting values. ms.topic: reference ms.assetid: 04b695cb-38b2-4adf-aa55-9d1b628eb8ac ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup set all

Outputs the current configuration setting values, including the default server and computer (the host).

Syntax

set all

Parameters

Parameter Description
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: nslookup server description: Reference article for the nslookup server command, which changes the default server to the specified Domain Name System (DNS) domain. ms.topic: reference ms.assetid: 608267f8-f7b4-412a-8dcd-e08b5ffc2085 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup server

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Changes the default server to the specified Domain Name System (DNS) domain.

This command uses the current default server to look up the information about the specified DNS domain. If you want to lookup information using the initial server, use the nslookup lserver command.

Syntax

server <DNSdomain>

Parameters

Parameter Description
<DNSdomain> Specifies the DNS domain for the default server.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: nslookup lserver description: Reference article for the nslookup lserver command, which changes the initial server to the specified Domain Name System (DNS) domain. ms.topic: reference ms.assetid: aee5ea0b-bb17-4c14-bde7-2f7a91f2f22b ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup lserver

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Changes the initial server to the specified Domain Name System (DNS) domain.

This command uses the initial server to look up the information about the specified DSN domain. If you want to lookup information using the current default server, use the nslookup server command.

Syntax

lserver <DNSdomain>

Parameters

Parameter Description
<DNSdomain> Specifies the DNS domain for the initial server.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: nfsstat description: Reference article for the nfsstat command, which displays statistical info about the Network File System (NFS) and Remote Procedure Call (RPC) calls. ms.topic: reference ms.assetid: da7a9768-44bd-404b-97ee-c388d00dc395 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nfsstat

A command-line utility that displays statistical info about the Network File System (NFS) and Remote Procedure Call (RPC) calls. Used without parameters, this command displays all of the statistical data without resetting anything.

Syntax

nfsstat [-c][-s][-n][-r][-z][-m]

Parameters

Parameter Description
-c Displays only the client-side NFS and RPC and NFS calls sent and rejected by the client. To display NFS or RPC information only, combine this flag with the -n or -r parameter.
-s Displays only the server-side NFS and RPC and NFS calls sent and rejected by the server. To display NFS or RPC information only, combine this flag with the -n or -r parameter.
-m Displays information about mount flags set by mount options, mount flags internal to the system, and other mount information.
-n Displays NFS information for both the client and server. To display only the NFS client or server information, combine this flag with the -c or -s parameter.
-r Displays RPC information for both the client and server. To display only the RPC client or server information, combine this flag with the -c or -s parameter.
-z Resets the call statistics. This flag is only available to the root user and can be combined with any of the other parameters to reset particular sets of statistics after displaying them.

Examples

To display information about the number of RPC and NFS calls sent and rejected by the client, type:

nfsstat -c

To display and print the client NFS call-related information, type:

nfsstat -cn

To display RPC call-related information for both the client and server, type:

nfsstat -r

To display information about the number of RPC and NFS calls received and rejected by the server, type:

nfsstat -s

To reset all call-related information to zero on the client and server, type:

nfsstat -z

Additional References



title: winnt description: Reference article for winnt, which is deprecated, and is not guaranteed to be supported in future releases of Windows.

ms.topic: reference ms.assetid: 3bf6e792-befb-435c-8fa3-940a45a98adb ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

winnt

Winnt is deprecated, and is not guaranteed to be supported in future releases of Windows.

This tool is included in Windows Server 2003. For more information, see Winnt.



title: where description: Reference article for where, which displays the location of files that match the given search pattern. ms.topic: reference ms.assetid: 0b3486a5-896b-4d92-84b8-e463a0b76487 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

where

Displays the location of files that match the given search pattern.

Syntax

where [/r <Dir>] [/q] [/f] [/t] [$<ENV>:|<Path>:]<Pattern>[ ...]

Parameters

Parameter Description
/r <Dir> Indicates a recursive search, starting with the specified directory.
/q Returns an exit code (0 for success, 1 for failure) without displaying the list of matched files.
/f Displays the results of the where command in quotation marks.
/t Displays the file size and the last modified date and time of each matched file.
[$<ENV>:|<Path>:]<Pattern>[ ...] Specifies the search pattern for the files to match. At least one pattern is required, and the pattern can include wildcard characters (* and ?). By default, where searches the current directory and the paths that are specified in the PATH environment variable. You can specify a different path to search by using the format $ENV:Pattern (where ENV is an existing environment variable containing one or more paths) or by using the format Path:Pattern (where Path is the directory path you want to search). These optional formats should not be used with the /r command-line option.
/? Displays help at the command prompt.

Remarks

Examples

To find all files named Test in drive C of the current computer and its subdirectories, type:

where /r c:\ test

To list all files in the Public directory, type:

where $public:*.*

To find all files named Notepad in drive C of the remote computer, Computer1, and its subdirectories, type:

where /r \\computer1\c notepad.*

Additional References



title: wdsutil start-namespace description: Reference article for Subcommand start-Namespace, which starts a Scheduled-Cast namespace. ms.topic: reference ms.assetid: 2dd1c11e-6ab7-4129-9e3a-3f80e0ba59c0 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil start-namespace

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Starts a Scheduled-Cast namespace.

Syntax

wdsutil /start-Namespace /Namespace:<Namespace name[/Server:<Server name>]

Parameters

Parameter Description
/Namespace:<Namespace name> Specifies the name of the namespace. Note that this is not the friendly name, and it must be unique.

- Deployment Server: The syntax for namespace name is /Namspace:WDS:<Image group>/<Image name>/<Index>. For example: WDS:ImageGroup1/install.wim/1
- Transport Server: This name must match the name given to the namespace when it was created on the server.

[/Server:<Server name>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.

Examples

To start a namespace, type one of the following:

wdsutil /start-Namespace /Namespace:Custom Auto 1
wdsutil /start-Namespace /Server:MyWDSServer /Namespace:Custom Auto 1

Additional References



title: wdsutil set-imagegroup description: Reference article for Subcommand set-ImageGroup, which changes the attributes of an image group. ms.topic: reference ms.assetid: 4d86946a-e261-4d41-8b0c-1ab0ba2e3430 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil set-imagegroup

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Changes the attributes of an image group.

Syntax

wdsutil [Options] /set-imagegroup:<Image group name> [/Server:<Server name>] [/Name:<New image group name>] [/Security:<SDDL>]

Parameters

Parameter Description
/set-imagegroup:<Image group name> Specifies the name of the image group.
[/Server:<Server name>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If not specified, the local server will be used.
[/Name:<New image group name>] Specifies the new name of the image group.
[/Security:<SDDL>] Specifies the new Security Descriptor of the image group, in security descriptor definition language (SDDL) format.

Examples

To set the name for an image group, type:

wdsutil /Set-ImageGroup:ImageGroup1 /Name:New Image Group Name

To specify various settings for an image group, type:

wdsutil /verbose /Set-ImageGroupGroup:ImageGroup1 /Server:MyWDSServer /Name:New Image Group Name
/Security:O:BAG:S-1-5-21-2176941838-3499754553-4071289181-513 D:AI(A;ID;FA;;;SY)(A;OICIIOID;GA;;;SY)(A;ID;FA;;;BA)(A;OICIIOID;GA;;;BA) (A;ID;0x1200a9;;;AU)(A;OICIIOID;GXGR;;;AU)

Additional References



title: Subcommand set-DriverGroup description: Reference article for Subcommand set-DriverGroup, which sets the properties of an existing driver group on a server. ms.topic: reference ms.assetid: e4ba9b1c-8c52-4fd5-969b-f7905611b364 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

Subcommand: set-DriverGroup

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Sets the properties of an existing driver group on a server.

Syntax

wdsutil /Set-DriverGroup /DriverGroup:<Group Name> [/Server:<Server Name>] [/Name:<New Group Name>] [/Enabled:{Yes | No}] [/Applicability:{Matched | All}]

Parameters

Parameter Description
/DriverGroup:<Group Name> Specifies the name of the driver group.
[/Server:<Server name>] Specifies the name of the server. This can be the NetBIOS name or the FQDN. If a server name is not specified, the local server is used.
[/Name:<New Group Name>] Specifies the new name for the driver group.
[/Enabled:{Yes | No} Enables or disables the driver group.
[/Applicability:{Matched | All}] Specifies which packages to install if the filter criteria is met. Matched means install only the driver packages that match a client s hardware. All means install all packages to clients regardless of their hardware.

Examples

To set the properties for a driver group, type one of the following:

wdsutil /Set-DriverGroup /DriverGroup:printerdrivers /Enabled:Yes
wdsutil /Set-DriverGroup /DriverGroup:printerdrivers /Name:colorprinterdrivers /Applicability:All

Additional References



title: wdsutil remove-imagegroup description: Reference article for wdsutil remove-imagegroup, which removes an image group from a server. ms.topic: reference ms.assetid: 5b2c9813-5df2-4272-8449-26f3bb16f82b ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil remove-imagegroup

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Removes an image group from a server.

Syntax

wdsutil [Options] /remove-ImageGroup Group:<Image group name> [/Server:<Server name>]

Parameters

Parameter Description
imagegroup:<Image group name> Specifies the name of the image group to be removed
[/Server:<Server name>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.

Examples

To remove the image group, type one of the following:

wdsutil /remove-ImageGroumediaGroup:ImageGroup1
wdsutil /verbose /remove-ImageGroumediaGroup:My Image Group /Server:MyWDSServer

Additional References



title: wdsutil remove-namespace description: Reference article for wdsutil remove-namespace, which removes a custom namespace. ms.topic: reference ms.assetid: 4eb758b6-8519-4e26-9fe0-2e19bb0e8702 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil remove-namespace

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Removes a custom namespace.

Syntax

wdsutil /remove-Namespace /Namespace:<Namespace name> [/Server:<Server name>] [/force]

Parameters

Parameter Description
/Namespace:<Namespace name> Specifies the name of the namespace. This is not the friendly name, and it must be unique.

- Deployment Server role service: The syntax for namespace name is /Namespace:WDS:<ImageGroup>/<ImageName>/<Index>. For example: WDS:ImageGroup1/install.wim/1
- Transport Server role service: This value must match the name given to the namespace when it was created on the server.

[/Server:<Server name>] Specifies the name of the server. This can be the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server is used.
[/force] removes the namespace immediately and terminates all clients. Note that unless you specify /force, existing clients can complete the transfer, but new clients are not able to join.

Examples

To stop a namespace (current clients can complete the transfer but new clients are not able to join), type:

wdsutil /remove-Namespace /Namespace:Custom Auto 1

To force termination of all clients, type:

wdsutil /remove-Namespace /Server:MyWDSServer /Namespace:Custom Auto 1 /force

Additional References



title: remove-DriverGroupPackage description: Reference article for remove-DriverGroupPackage, which removes a driver package from a driver group on a server. ms.topic: reference ms.assetid: 2e48616d-d6a4-45f0-a5c6-efe62bf6a0ed ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

remove-DriverGroupPackage

Removes a driver package from a driver group on a server.

Syntax

wdsutil /Remove-DriverGroupPackage /DriverGroup:<Group Name> [/Server:<Server Name>] {/DriverPackage:<Name> | /PackageId:<ID>}

Parameters

Parameter Description
[/Server:<Server name>] Specifies the name of the server. This can be the NetBIOS name or the FQDN. If a server name is not specified, the local server is used.
[/DriverPackage:<Name>] Specifies the name of the driver package to remove.
[/PackageId:<ID>] Specifies the Windows Deployment Services ID of the driver package to remove. You must specify this option if the driver package cannot be uniquely identified by name.

Examples

wdsutil /Remove-DriverGroupPackage /DriverGroup:PrinterDrivers /PackageId:{4D36E972-E325-11CE-BFC1-08002BE10318}
wdsutil /Remove-DriverGroupPackage /DriverGroup:PrinterDrivers /DriverPackage:XYZ

Additional References



title: remove-DriverGroupFilter description: Reference article for remove-DriverGroupFilter, which removes a filter rule from a driver group on a server. ms.topic: reference ms.assetid: 837bd5d4-c79d-4714-942d-9875bd8e61dc ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

remove-DriverGroupFilter

Removes a filter rule from a driver group on a server.

Syntax

wdsutil /Remove-DriverGroupFilter /DriverGroup:<Group Name> [/Server:<Server name>] /FilterType:<Filter Type>

Parameters

Parameter Description
/DriverGroup:<Group Name> Specifies the name of the driver group.
[/Server:<Server name>] Specifies the name of the server. This can be the NetBIOS name or the FQDN. If a server name is not specified, the local server is used.
[/FilterType:<FilterType>] Specifies the type of the filter to remove from the group. <FilterType> can be one of the following:
BiosVendor
BiosVersion
ChassisType
Manufacturer
Uuid
OsVersion
OsEdition
OsLanguage

Examples

To remove a filter, type one of the following:

wdsutil /Remove-DriverGroupFilter /DriverGroup:PrinterDrivers /FilterType:Manufacturer
wdsutil /Remove-DriverGroupFilter /DriverGroup:PrinterDrivers /FilterType:Manufacturer /FilterType:OSLanguage

Additional References



title: wdsutil remove description: Reference article for wdsutil remove, which removes various driver-related information. ms.topic: reference ms.assetid: e3f1644d-6028-4c47-a9fd-227bcdcc6123 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil remove

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Subcommands

Subommand Description
wdsutil remove-image command removes a boot or install image from the server.
wdsutil remove-imagegroup command removes an image group from the server.
wdsutil remove-multicasttransmission command Disables multicast transmission of an image.
wdsutil remove-namespace command removes a namespace from the server.
wdsutil remove-drivergrouppackage command removes a driver package from a driver group on a server.
wdsutil remove-drivergrouppackages command removes driver packages from a driver group on a server.
wdsutil remove-driverpackage command removes a driver package from a server.
wdsutil remove-driverpackages command removes driver packages from a server.
wdsutil remove-drivergroup command removes a driver group from a server.
wdsutil remove-drivergroupfilter command removes a filter rule from a driver group on a server.


title: new-DiscoverImage description: Reference article for new-DiscoverImage, which creates a new discover image from an existing boot image. ms.topic: reference ms.assetid: ede9fbbb-0bba-4309-8c21-3cc13e1dc3cd ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

new-DiscoverImage

Creates a new discover image from an existing boot image. Discover images are boot images that force the Setup.exe program to start in Windows Deployment Services mode and then discover a Windows Deployment Services server. Typically these images are used to deploy images to computers that are not capable of booting to PXE. For more information, see Creating Images (https://go.microsoft.com/fwlink/?LinkId=115311).

Syntax

wdsutil [Options] /New-DiscoverImage [/Server:<Server name>]
     /Image:<Image name>
     /Architecture:{x86 | ia64 | x64}
     [/Filename:<File name>]
     /DestinationImage
         /FilePath:<File path and name>
         [/Name:<Name>]
         [/Description:<Description>]
         [/WDSServer:<Server name>]
         [/Overwrite:{Yes | No | Append}]

Parameters

Parameter Description
[/Server:<Server name>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.
/Image:<Image name> Specifies the name of the source boot image.
/Architecture:{x86 ia64
[/Filename:<File name>] If the image cannot be uniquely identified by name, you must use this option to specify the file name.
/DestinationImage Specifies the settings for the destination image. You can specify the settings using the following options:
- /FilePath:< File path and name> - Sets full file path for the new image.
- [/Name:<Name>] - Sets the display name of the image. If no display name is specified, the display name of the source image will be used.
- [/Description: <Description>] - Sets the description of the image.
- [/WDSServer: <Server name>] - Specifies the name of the server that all clients who boot from the specified image should contact to download the install image. By default, all clients who boot this image will discover a valid Windows Deployment Services server. Using this option bypasses the discovery functionality and forces the booted client to contact the specified server.
- [/Overwrite:{Yes

Examples

To create a discover image out of boot image, and name it WinPEDiscover.wim, type:

wdsutil /New-DiscoverImage /Image:WinPE boot image /Architecture:x86 /DestinationImage /FilePath:C:\Temp\WinPEDiscover.wim

To create a discover image out of boot image, and name it WinPEDiscover.wim with the specified settings, type:

wdsutil /Verbose /Progress /New-DiscoverImage /Server:MyWDSServer
/Image:WinPE boot image /Architecture:x64 /Filename:boot.wim /DestinationImage /FilePath:\\Server\Share\WinPEDiscover.wim
/Name:New WinPE image /Description:WinPE image for WDS Client discovery /Overwrite:No

Additional References



title: wdsutil get-imagegroup description: Reference article for wdsutil get-imagegroup, which retrieves information about an image group and the images in it. ms.topic: reference ms.assetid: 0fc25aca-a529-44ee-bc8e-96bc8affb458 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil get-imagegroup

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Retrieves information about an image group and the images within it.

Syntax

wdsutil [Options] /Get-ImageGroup ImageGroup:<Image group name> [/Server:<Server name>] [/detailed]

Parameters

Parameter Description
/ImageGroup:<Image group name> Specifies the name of the image group.
[/Server:<Server name>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.
[/detailed] Returns the image metadata for each image. If this parameter is not use, the default behavior is to return only the image name, description, and file name.

Examples

To view information about an image group, type:

wdsutil /Get-ImageGroup ImageGroup:ImageGroup1

To view information including metadata, type:

wdsutil /verbose /Get-ImageGroup ImageGroup:ImageGroup1 /Server:MyWDSServer /detailed

Additional References



title: get-ImageFile description: Reference article for get-ImageFile, which retrieves information about the images contained in a Windows Image (.wim) file. ms.topic: reference ms.assetid: e1e296fb-20cf-4a60-9db4-4cbac7d4dab5 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

get-ImageFile

Retrieves information about the images contained in a Windows Image (.wim) file.

Syntax

wdsutil [Options] /Get-ImageFile /ImageFile:<wim file path> [/Detailed]

Parameters

Parameter Description
/ImageFile:<WIM file path> Specifies the full path and file name of the .wim file.
[/Detailed] Returns all image metadata from each image. If this option is not used, the default behavior is to return only the image name, description, and file name.

Examples

To view information about an image, type:

wdsutil /Get-ImageFile /ImageFile:C:\temp\install.wim

To view detailed information, type:

wdsutil /Verbose /Get-ImageFile /ImageFile:\\Server\Share\My Folder \install.wim /Detailed

Additional References



title: wdsutil get-image description: Reference article for wdsutil get-image, which retrieves information about an image. ms.topic: reference ms.assetid: 0ecaa999-72ad-4191-adb5-a418de42a001 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil get-image

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Retrieves information about an image.

Syntax

For boot images:

wdsutil [Options] /Get-Image image:<Image name> [/Server:<Server name> imagetype:Boot /Architecture:{x86 | ia64 | x64} [/Filename:<File name>]

For install images:

wdsutil [Options] /Get-image image:<Image name> [/Server:<Server name> imagetype:Install imagegroup:<Image group name>] [/Filename:<File name>]

Parameters

Parameter Description
\image:<Image name> Specifies the name of the image.
[/Server:<Server name>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.
imagetype:{Boot | Install} Specifies the type of image.
/Architecture:{x86 | ia64 | x64} Specifies the architecture of the image. Because it is possible to have the same image name for boot images in different architectures, specifying the architecture value ensures that the correct image is returned.
[/Filename:<File name>] if the image cannot be uniquely identified by name, you must use this option to specify the file name.
\imagegroup:<Image group name>] Specifies the image group that contains the image. If no image group is specified and only one image group exists on the server, that group will be used. If more than one image group exists on the server, you must use this parameter to specify the image group.

Examples

To retrieve information about a boot image, type one of the following:

wdsutil /Get-Image image:WinPE boot imagetype:Boot /Architecture:x86
wdsutil /verbose /Get-Image image:WinPE boot image /Server:MyWDSServer imagetype:Boot /Architecture:x86 /Filename:boot.wim

To retrieve information about an install image, type one of the following:

wdsutil /Get-Image:Windows Vista with Office imagetype:Install
wdsutil /verbose /Get-Image:Windows Vista with Office /Server:MyWDSServer imagetype:Install imagegroup:ImageGroup1 /Filename:install.wim

Additional References



title: wdsutil add-drivergroup description: Reference article for the wdsutil add-drivergroup command, which adds a driver group to the server. ms.topic: reference ms.assetid: 2a92fe8f-03f9-462a-b99e-f23275259807 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil add-drivergroup

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Adds a driver group to the server.

Syntax

wdsutil /add-DriverGroup /DriverGroup:<Groupname>\n\ [/Server:<Servername>] [/Enabled:{Yes | No}] [/Applicability:{Matched | All}] [/Filtertype:<Filtertype> /Policy:{Include | Exclude} /Value:<Value> [/Value:<Value> ...]]

Parameters

Parameter Description
/DriverGroup:<Groupname> Specifies the name of the new driver group.
/Server:<Servername> Specifies the name of the server. This can be the NetBIOS name or the FQDN. If no server name is specified, the local server is used.
/Enabled:`{Yes No}` Enables or disables the package.
/Applicability:`{Matched All}` Specifies which packages to install if the filter criteria are met. Matched means install only the driver packages that match a client s hardware. All means install all the packages to clients regardless of their hardware.
/Filtertype:<Filtertype> Specifies the type of the filter to add to the group. You can specify multiple filter types in a single command. Each filter type must be followed by /Policy and at least one /Value. Valid values include:
  • BiosVendor
  • Biosversion
  • Chassistype
  • Manufacturer
  • Uuid
  • Osversion
  • Osedition
  • OsLanguage
For information about getting values for all other filter types, see Driver Group Filters.
[/Policy:`{Include Exclude}`] Specifies the policy to be set on the filter. If /Policy is set to Include, client computers that match the filter are allowed to install the drivers in this group. If /Policy is set to Exclude, then client computers that match the filter are not allowed to install the drivers in this group.
[/Value:<Value>] Specifies the client value that corresponds to /Filtertype. You can specify multiple values for a single type. For information about acceptable filter type values, see Driver Group Filters.

Examples

To add a driver group, type either:

wdsutil /add-DriverGroup /DriverGroup:printerdrivers /Enabled:Yes
wdsutil /add-DriverGroup /DriverGroup:printerdrivers /Applicability:All /Filtertype:Manufacturer /Policy:Include /Value:Name1 /Filtertype:Chassistype /Policy:Exclude /Value:Tower /Value:MiniTower

Additional References



title: wdsutil get-drivergroup description: Reference article for wdsutil get-drivergroup, which displays information about the driver groups on a server. ms.topic: reference ms.assetid: 7cfe10c3-a63f-48e7-bef9-f6b474b4ddbe ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil get-drivergroup

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays information about the driver groups on a server.

Syntax

wdsutil /Get-DriverGroup /DriverGroup:<Group Name> [/Server:<Server name>]

Parameters

Parameter Description
/DriverGroup:<Group Name> Specifies the name of the driver group.
[/Server:<Server name>] Specifies the name of the server. This can be the NetBIOS name or the FQDN. if a server name is not specified, the local server is used.
[/Show: {PackageMetaData | Filters | All}] Displays the metadata for all the driver packages in the specified group. PackageMetaData displays information about all the filters for the driver group. Filters displays the metadata for all driver packages and filters for the group.

Examples

To view information about a driver file, type:

wdsutil /Get-DriverGroup /DriverGroup:printerdrivers /Show:PackageMetaData
wdsutil /Get-DriverGroup /DriverGroup:printerdrivers /Server:MyWdsServer /Show:Filters

Additional References



title: get-AllServers description: Reference article for get-AllServers, which retrieves information about all Windows Deployment Services servers. ms.topic: reference ms.assetid: fe2e3c69-8f2e-457d-af55-d249ebf70f53 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

get-AllServers

Retrieves information about all Windows Deployment Services servers.

[!NOTE] This command may take an extended amount of time to complete if there are many Windows Deployment Services servers in your environment or if the network connection linking the servers is slow.

Syntax

wdsutil [Options] /Get-AllServers /Show:{Config | Images | All} [/Detailed] [/Forest:{Yes | No}]

Parameters

Parameter Description
/Show:{Config Images
[/Detailed] When used in conjunction with the /Show:Images or /Show:All, returns all image metadata from each image. If the /Detailed option is not specified, the default behavior is to return the image name, description, and file name.
[/Forest:{Yes No}]

Examples

To view information about all servers, type:

wdsutil /Get-AllServers /Show:Config

To view detailed information about all servers, type:

wdsutil /Verbose /Get-AllServers /Show:All /Detailed /Forest:Yes

Additional References



title: manage-bde tpm description: Reference article for the manage-bde tpm command, which configures the computer's Trusted Platform Module (TPM). ms.topic: reference ms.assetid: 11a8530d-edd7-4fe3-ae81-b943766760fe ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

manage-bde tpm

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Configures the computer's Trusted Platform Module (TPM).

Syntax

manage-bde -tpm [-turnon] [-takeownership <ownerpassword>] [-computername <name>] [{-?|/?}] [{-help|-h}]

Parameters

Parameter Description
-turnon Enables and activates the TPM, allowing the TPM owner password to be set. You can also use -t as an abbreviated version of this command.
-takeownership Takes ownership of the TPM by setting an owner password. You can also use -o as an abbreviated version of this command.
<ownerpassword> Represents the owner password that you specify for the TPM.
-computername Specifies that manage-bde.exe will be used to modify BitLocker protection on a different computer. You can also use -cn as an abbreviated version of this command.
<name> Represents the name of the computer on which to modify BitLocker protection. Accepted values include the computer's NetBIOS name and the computer's IP address.
-? or /? Displays brief Help at the command prompt.
-help or -h Displays complete Help at the command prompt.

Examples

To turn on the TPM, type:

manage-bde  tpm -turnon

To take ownership of the TPM and set the owner password to 0wnerP@ss, type:

manage-bde  tpm  takeownership 0wnerP@ss

Additional References



title: manage-bde resume description: Reference article for the manage-bde resume command, which resumes BitLocker encryption or decryption after it has been paused. ms.topic: reference ms.assetid: ca3cd1ca-6f2c-4190-b68f-27816635facb ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

manage-bde resume

Resumes BitLocker encryption or decryption after it has been paused.

Syntax

manage-bde -resume [<drive>] [-computername <name>] [{-?|/?}] [{-help|-h}]

Parameters

Parameter Description
<drive> Represents a drive letter followed by a colon.
-computername Specifies that manage-bde.exe will be used to modify BitLocker protection on a different computer. You can also use -cn as an abbreviated version of this command.
<name> Represents the name of the computer on which to modify BitLocker protection. Accepted values include the computer's NetBIOS name and the computer's IP address.
-? or /? Displays brief Help at the command prompt.
-help or -h Displays complete Help at the command prompt.

Examples

To resume BitLocker encryption on drive C, type:

manage-bde –resume C:

Additional References



title: manage-bde -pause description: Reference article for the manage-bde -pause command, which pauses BitLocker encryption or decryption. ms.topic: reference ms.assetid: efda0e08-b9ff-4e71-83d8-bb666b3032bd ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

manage-bde -pause

Pauses BitLocker encryption or decryption.

Syntax

manage-bde -pause [<volume>] [-computername <name>] [{-?|/?}] [{-help|-h}]

Parameters

Parameter Description
<volume> Specifies a drive letter followed by a colon, a volume GUID path, or a mounted volume.
-computername Specifies that manage-bde.exe will be used to modify BitLocker protection on a different computer. You can also use -cn as an abbreviated version of this command.
<name> Represents the name of the computer on which to modify BitLocker protection. Accepted values include the computer's NetBIOS name and the computer's IP address.
-? or /? Displays brief Help at the command prompt.
-help or -h Displays complete Help at the command prompt.

Examples

To pause BitLocker encryption on drive C, type:

manage-bde -pause C:

Additional References



title: netsh description: Reference article for the netsh command, which is a command-line scripting utility that allows you to, either locally or remotely, display or modify the network configuration of a currently running computer. ms.topic: reference ms.assetid: 96fc069d-53c0-4d0a-9f7f-f9f3d49a02bd carmonmills ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

netsh

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016

The Network Shell command-line scripting utility that allows you to, either locally or remotely, display or modify the network configuration of a currently running computer. You can start this utility at the command prompt or in Windows PowerShell.

Syntax

netsh [-a <Aliasfile>][-c <Context>][-r <Remotecomputer>][-u [<domainname>\<username>][-p <Password> | [{<NetshCommand> | -f <scriptfile>}]

Parameters

Parameter Description
-a <Aliasfile> Specifies that you are returned to the netsh prompt after running Aliasfile and the name of the text file that contains one or more netsh commands.
-c <Context> Specifies that netsh enters the specified netsh context and the netsh context to enter.
-r <Remotecomputer> Specifies the remote computer to configure.

Important: If you use this parameter, you must make sure the Remote Registry service is running on the remote computer. If it isn't running, Windows displays a “Network Path Not Found” error message.

-u <domainname>\<username> Specifies the domain and user account name to use while running the netsh command under a user account. If you omit the domain, the local domain is used by default.
-p <Password> Specifies the password for the user account specified by the -u <username> parameter.
<NetshCommand> Specifies the netsh command to run.
-f <scriptfile> Exits the netsh command after running the specified script file.
/? Displays help at the command prompt.

Remarks

Additional References



title: wdsutil disable description: Reference article for the wdsutil disable commands, which disables all services for Windows Deployment Services. ms.topic: reference ms.assetid: 08d1b9ea-1e25-486a-b7df-ad26c53b4e77 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil disable commands

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Disables all services for Windows Deployment Services.

Parameters

Parameter Description
wdsutil disable-server command Disables all Windows Deployment Services services on a specified server (Deployment Server).
wdsutil disable-transportserver command Disables all Windows Deployment Services services on a specified Transport Server.

Additional References



title: manage-bde wipefreespace description: Reference article for the manage-bde wipefreespace command, which wipes the free space on the volume removing any data fragments that may have existed in the space. ms.topic: reference ms.assetid: b8d83a2a-c5c8-4019-9041-23d1d6abf282 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

manage-bde wipefreespace

Wipes the free space on the volume, removing any data fragments that may have existed in the space. Running this command on a volume encrypted using the Used Space Only encryption method provides the same level of protection as the Full Volume Encryption encryption method.

Syntax

manage-bde -wipefreespace|-w [<drive>] [-cancel] [-computername <name>] [{-?|/?}] [{-help|-h}]

Parameters

Parameter Description
<drive> Represents a drive letter followed by a colon.
-cancel Cancels a wipe of free space that is in process.
-computername Specifies that manage-bde.exe will be used to modify BitLocker protection on a different computer. You can also use -cn as an abbreviated version of this command.
<name> Represents the name of the computer on which to modify BitLocker protection. Accepted values include the computer's NetBIOS name and the computer's IP address.
-? or /? Displays brief Help at the command prompt.
-help or -h Displays complete Help at the command prompt.

Examples

To wipe the free space on drive C, type either:

manage-bde -w C:
manage-bde -wipefreespace C:

To cancel the wipe of tje free space on drive C, type either:

manage-bde -w -cancel C:
manage-bde -wipefreespace -cancel C:

Additional References



title: wdsutil disable-server description: Reference article for the wdsutil disable-server command, which disables all services for a Windows Deployment Services server. ms.topic: reference ms.assetid: b69fcfe0-b744-4794-bc75-2c9218c0ba66 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil disable-server

Disables all services for a Windows Deployment Services server.

Syntax

wdsutil [Options] /Disable-Server [/Server:<Server name>]

Parameters

Parameter Description
[/Server:<Servername>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.

Examples

To disable the server, type either:

wdsutil /Disable-Server
wdsutil /Verbose /Disable-Server /Server:MyWDSServer

Additional References



title: wdsutil disable-transportserver description: Reference article for the wdsutil disable-transportserver command, which disables all services for a Transport Server. ms.topic: reference ms.assetid: a009706b-8e89-486b-8e3d-512cd9f4de74 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil disable-transportserver

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Disables all services for a Transport Server.

Syntax

wdsutil [Options] /Disable-TransportServer [/Server:<Servername>]

Parameters

Parameter Description
[/Server:<Servername>] Specifies the name of the Transport Server to be disabled. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no Transport Server name is specified, the local server will be used.

Examples

To disable the server, type either:

wdsutil /Disable-TransportServer
wdsutil /verbose /Disable-TransportServer /Server:MyWDSServer

Additional References



title: wdsutil delete-autoadddevices description: Reference article for the wdsutil delete-autoadddevices command, which deletes computers that are pending, rejected, or approved from the Auto-add database. ms.topic: reference ms.assetid: 8dcaca6a-212e-4c36-98e3-00938eef6b9c ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil delete-autoadddevices

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Deletes computers that are pending, rejected, or approved from the auto-add database. This database stores information about these computers on the server.

Syntax

wdsutil /delete-AutoaddDevices [/Server:<Servername>] /Devicetype:{PendingDevices | RejectedDevices |ApprovedDevices}

Parameters

Parameter Description
[/Server:<Servername>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.
/Devicetype:`{PendingDevices RejectedDevices ApprovedDevices}` Specifies the type of computer to delete from the database. This type can be PendingDevices, which returns all computers in the database that have a status of pending, RejectedDevices, which returns all computers in the database that have a status of rejected, or ApprovedDevices, which returns all computers that have a status of approved.

Examples

To delete all rejected computers, type:

wdsutil /delete-AutoaddDevices /Devicetype:RejectedDevices

To delete all approved computers, type:

wdsutil /verbose /delete-AutoaddDevices /Server:MyWDSServer /Devicetype:ApprovedDevices

Additional References



title: wbadmin stop job description: Reference article for the wbadmin stop job command, which cancels the backup or recovery operation that is currently running. ms.topic: reference ms.assetid: 3b83b398-39c7-4410-bf17-5c1fb1a4f46d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wbadmin stop job

Cancels the backup or recovery operation that is currently running.

[!IMPORTANT] Canceled operations can't be restarted. You must run a canceled backup or a recovery operation from the beginning again.

To stop a backup or recovery operation using this command, you must be a member of the Backup Operators group or the Administrators group, or you must have been delegated the appropriate permissions. In addition, you must run wbadmin from an elevated command prompt, by right-clicking Command Prompt, and then selecting Run as administrator.

Syntax

wbadmin stop job [-quiet]

Parameters

Parameter Description
-quiet Runs the command without prompts to the user.

Additional References



title: macfile description: Reference article for the macfile command, which manages File Server for Macintosh servers, volumes, directories, and files. ms.topic: reference ms.assetid: e2ce586c-b316-41d3-90f8-4be0d074cc0e ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

macfile

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Manages File Server for Macintosh servers, volumes, directories, and files. You can automate administrative tasks by including a series of commands in batch files and starting them manually or at predetermined times.

Modify directories in Macintosh-accessible volumes

To change the directory name, location, owner, group, and permissions for Macintosh-accessible volumes.

Syntax

macfile directory[/server:\\<computername>] /path:<directory> [/owner:<ownername>] [/group:<groupname>] [/permissions:<permissions>]

Parameters

Parameter Description
/server:\\<computername> Specifies the server on which to change a directory. If omitted, the operation is performed on the local computer.
/path:<directory> Specifies the path to the directory that you want to change. This parameter is required. Note: The directory must exist, using macfile directory won't create directories.
/owner:<ownername> Changes the owner of the directory. If omitted, the owner name won't change.
/group:<groupname> Specifies or changes the Macintosh primary group that is associated with the directory. If omitted, the primary group remains unchanged.
/permissions:<permissions> Sets permissions on the directory for the owner, primary group, and world (everyone). This must be an 11-digit number, where the number 1 grants permission and 0 revokes permission (for example, 11111011000). If this parameter is omitted, permissions remain unchanged.
/? Displays help at the command prompt.
Position of permissions digit

The position of the permissions digit determines which permission is set, including:

Position Sets Permission
First OwnerSeeFiles
Second OwnerSeeFolders
Third OwnerMakechanges
Fourth GroupSeeFiles
Fifth GroupSeeFolders
Sixth GroupMakechanges
Seventh WorldSeeFiles
Eighth WorldSeeFolders
Ninth WorldMakechanges
Tenth The directory can't be renamed, moved, or deleted.
Eleventh The changes apply to the current directory and all subdirectories.
Remarks

Examples

To assign See Files, See Folders, and Make changes permissions to the owner, to set See Folder permissions to all other users, and to prevent the directory from being renamed, moved, or deleted, type:

macfile directory /path:e:\statistics\may sales /permissions:11111011000

Where the subdirectory is May sales, located in the Macintosh-accessible volume Statistics, on the E: drive of the local server.

Join a Macintosh file's data and resource forks

To specify the server on which to join files, who created the file, the type of file, where the data fork is located, where the resource fork is located, and where the output file should be located.

Syntax

macfile forkize[/server:\\<computername>] [/creator:<creatorname>] [/type:<typename>]  [/datafork:<filepath>] [/resourcefork:<filepath>] /targetfile:<filepath>

Parameters

Parameter Description
/server:\\<computername> Specifies the server on which to join files. If omitted, the operation is performed on the local computer.
/creator:<creatorname> Specifies the creator of the file. The Macintosh finder uses the /creator command-line option to determine the application that created the file.
/type:<typename> Specifies the type of file. The Macintosh finder uses the /type command-line option to determine the file type within the application that created the file.
/datafork:<filepath> Specifies the location of the data fork that is to be joined. You can specify a remote path.
/resourcefork:<filepath> Specifies the location of the resource fork that is to be joined. You can specify a remote path.
/targetfile:<filepath> Specifies the location of the file that's created by joining a data fork and a resource fork, or specifies the location of the file whose type or creator you are changing. The file must be on the specified server. This parameter is required.
/? Displays help at the command prompt.
Remarks

Examples

To create the file tree_app on the Macintosh-accessible volume D:\Release, using the resource fork C:\Cross\Mac\Appcode, and to make this new file appear to Macintosh clients as an application (Macintosh applications use the type APPL) with the creator (signature) set to MAGNOLIA, type:

macfile forkize /resourcefork:c:\cross\mac\appcode /type:APPL /creator:MAGNOLIA /targetfile:D:\Release\tree_app

To change the file creator to Microsoft Word 5.1, for the file Word.txt in the directory D:\Word documents\Group files, on the server \ServerA, type:

macfile forkize /server:\\ServerA /creator:MSWD /type:TEXT /targetfile:d:\Word documents\Group files\Word.txt

Change the sign-in message and limit sessions

To change the sign on message that appears when a user signs in to the File Server for Macintosh server and to limit the number of users who can simultaneously use File and print Servers for Macintosh.

Syntax

macfile server [/server:\\<computername>] [/maxsessions:{number | unlimited}] [/loginmessage:<message>]

Parameters

Parameter Description
/server:\\<computername> Specifies the server on which to change parameters. If omitted, the operation is performed on the local computer.
/maxsessions:`{number unlimited}` Specifies the maximum number of users who can simultaneously use File and print Servers for Macintosh. If omitted, the maxsessions setting for the server remains unchanged.
/loginmessage:<message> Changes the message Macintosh users see when signing in to the File Server for Macintosh server. The maximum number of characters for the sign-in message is 199. If omitted, the loginmessage message for the server remains unchanged. To remove an existing sign-in message, include the /loginmessage parameter, but leave the message variable blank.
/? Displays help at the command prompt.
Remarks

Examples

To change the number of permitted File and print Server for Macintosh sessions on the local server to five sessions, and to add the sign-in message "Sign off from Server for Macintosh when you are finished", type:

macfile server /maxsessions:5 /loginmessage:Sign off from Server for Macintosh when you are finished

Add, change, or remove Macintosh-accessible volumes

To add, change, or remove a Macintosh-accessible volume.

Syntax

macfile volume {/add|/set} [/server:\\<computername>] /name:<volumename>/path:<directory>[/readonly:{true | false}] [/guestsallowed:{true | false}] [/password:<password>] [/maxusers:{<number>>|unlimited}]
macfile volume /remove[/server:\\<computername>] /name:<volumename>

Parameters

Parameter Description
`{/add /set}` Required when adding or changing a Macintosh-accessible volume. Adds or changes the specified volume.
/server:\\<computername> Specifies the server on which to add, change, or remove a volume. If omitted, the operation is performed on the local computer.
/name:<volumename> Required. Specifies the volume name to be added, changed, or removed.
/path:<directory> Required and valid only when you are adding a volume. Specifies the path to the root directory of the volume to be added.
/readonly:`{true false}` Specifies whether users can change files in the volume. Use True to specify that users can't change files in the volume. Use False to specify that users can change files in the volume. If omitted when adding a volume, changes to files are allowed. If omitted when changing a volume, the readonly setting for the volume remains unchanged.
/guestsallowed:`{true false}` Specifies whether users who log on as guests can use the volume. Use True to specify that guests can use the volume. Use False to specify that guests can't use the volume. If omitted when adding a volume, guests can use the volume. If omitted when changing a volume, the guestsallowed setting for the volume remains unchanged.
/password:<password> Specifies a password that will be required to access the volume. If omitted when adding a volume, no password is created. If omitted when changing a volume, the password remains unchanged.
/maxusers:`{> unlimited}` Specifies the maximum number of users who can simultaneously use the files on the volume. If omitted when adding a volume, an unlimited number of users can use the volume. If omitted when changing a volume, the maxusers value remains unchanged.
/remove Required when you are removing a Macintosh-accessible volume. removes the specified volume.
/? Displays help at the command prompt.
Remarks

Examples

To create a volume called US Marketing Statistics on the local server, using the Stats directory in the E drive, and to specify that the volume cannot be accessed by guests, type:

macfile volume /add /name:US Marketing Statistics /guestsallowed:false /path:e:\Stats

To change the volume created above to be read-only, to require a password, and to set the number of maximum users to five, type:

macfile volume /set /name:US Marketing Statistics /readonly:true /password:saturn /maxusers:5

To add a volume called Landscape Design, on the server \Magnolia, using the trees directory in the E drive, and to specify that the volume can be accessed by guests, type:

macfile volume /add /server:\\Magnolia /name:Landscape Design /path:e:\trees

To remove the volume called Sales Reports on the local server, type:

macfile volume /remove /name:Sales Reports

Additional References



title: mqsvc description: Reference article for the mqsvc command, which enables apps running at different times to communicate across heterogeneous networks and systems that may be temporarily offline. ms.topic: reference ms.assetid: 8bfd7874-ccb4-453f-b908-3a5b9aee0ad6 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

mqsvc

Message Queuing technology enables apps running at different times to communicate across heterogeneous networks and systems that may be temporarily offline. Message Queuing provides guaranteed message delivery, efficient routing, security, and priority-based messaging. It can be used to implement solutions for both asynchronous and synchronous messaging scenarios. For more information about Message Queuing, see Message Queuing (MSMQ).

Syntax

mqsvc.exe

Additional References



title: logman update description: Reference article for the logman update command, which updates an existing data collector. ms.topic: reference ms.assetid: c98af84f-64ba-40c3-826d-75b80dfb9b34 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

logman update

Updates an existing data collector.

Syntax

logman update <counter | trace | alert | cfg | api> <[-n] <name>> [options]

Parameters

Parameter Description
logman update counter Updates a counter data collector.
logman update alert Updates an alert data collector.
logman update cfg Updates a configuration data collector.
logman update api Updates an API tracing data collector.

Additional References



title: lpq description: Reference article for the lpq command, which displays the status of a print queue on a computer running Line printer Daemon (LPD). ms.topic: reference ms.assetid: bb6abcc4-310a-4fa4-927b-4084b62ca02e ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

lpq

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays the status of a print queue on a computer running Line printer Daemon (LPD).

Syntax

lpq -S <servername> -P <printername> [-l]

Parameters

Parameter Description
-S <servername> Specifies (by name or IP address) the computer or printer sharing device that hosts the LPD print queue with a status that you want to display. This parameter is required and must be capitalized.
-P <Printername> Specifies (by name) the printer for the print queue with a status that you want to display. This parameter is required and must be capitalized.
-l Specifies that you want to display details about the status of the print queue.
/? Displays help at the command prompt.

Examples

To display the status of the Laserprinter1 printer queue on an LPD host at 10.0.0.45, type:

lpq -S 10.0.0.45 -P Laserprinter1

Additional References



title: logman delete description: Reference article for the logman delete command, which deletes an existing data collector. ms.topic: reference ms.assetid: 8f3b2422-3dce-4fb4-adbb-8536b1d7da2b ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

logman delete

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Deletes an existing data collector.

Syntax

logman delete <[-n] <name>> [options]

Parameters

Parameter Description
-s <computer name> Performs the command on the specified remote computer.
-config <value> Specifies the settings file containing command options.
[-n] <name> Name of the target object.
-ets Sends commands to Event Trace Sessions directly without saving or scheduling.
-[-]u <user [password]> Specifies the user to Run As. Entering a * for the password produces a prompt for the password. The password is not displayed when you type it at the password prompt.
/? Displays context-sensitive help.

Examples

To delete the data collector perf_log, type:

logman delete perf_log

Additional References



title: wdsutil approve-autoadddevices description: Reference article for the wdsutil approve-autoadddevices command, which approves computers that are pending administrative approval. ms.topic: reference ms.assetid: 8d76e8d3-ab35-429c-be7b-904f95d0782d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil approve-autoadddevices

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Approves computers that are pending administrative approval. When the Auto-add policy is enabled, administrative approval is required before unknown computers (those that are not pre-staged) can install an image. You can enable this policy using the PXE Response tab of the server s properties page.

Syntax

wdsutil [Options] /Approve-AutoaddDevices [/Server:<Server name>] /RequestId:{<Request ID>| ALL} [/MachineName:<Device name>] [/OU:<DN of OU>] [/User:<Domain\User | User@Domain>] [/JoinRights:{JoinOnly | Full}] [/JoinDomain:{Yes | No}] [/ReferralServer:<Server name>] [/BootProgram:<Relative path>] [/WdsClientUnattend:<Relative path>] [/BootImagepath:<Relative path>]

Parameters

Parameter Description
/Server:<Servername> Specifies the name of the server. This can be the NetBIOS name or the FQDN. If no server name is specified, the local server is used.
/RequestId:`{Request ID ALL}` Specifies the request ID assigned to the pending computer. Specify ALL to approve all pending computers.
/Machinename:<Devicename> Specifies the name of the device to be added. You can't use this option when approving all computers.
[/OU:<DN of OU>] The distinguished name of the organizational unit where the computer account object should be created. For example: OU=MyOU,CN=Test, DC=Domain,DC=com. The default location is the default computer's container.
[/User:`<Domain\User User@Domain>`] Sets permissions on the computer account object to give the specified user the necessary rights to join the computer to the domain.
[/JoinRights:`{JoinOnly Full}`] Specifies the type of rights to be assigned to the user.
  • JoinOnly - Requires the administrator to reset the computer account before the user can join the computer to the domain.
  • Full - Gives full access to the user, which includes the right to join the computer to the domain.
[/JoinDomain:`{Yes No}`] Specifies whether the computer should be joined to the domain as this computer account during operating system installation. The default value is Yes.
[/ReferralServer:<Servername>] Specifies the name of the server to contact to download the network boot program and boot image by using Trivial File Transfer Protocol (tftp).
[/BootProgram:<Relativepath>] Specifies the relative path from the remoteInstall folder to the network boot program that this computer should receive. For example: boot\x86\pxeboot.com.
[/WdsClientUnattend:<Relativepath>] Specifies the relative path from the remoteInstall folder to the unattend file that automates the Windows Deployment Services client.
[/BootImagepath:<Relativepath>] Specifies the relative path from the remoteInstall folder to the boot image that this computer should receive.

Examples

To approve the computer with a RequestId of 12, type:

wdsutil /Approve-AutoaddDevices /RequestId:12

To approve the computer with a RequestID of 20 and to deploy the image with the specified settings, type:

wdsutil /Approve-AutoaddDevices /RequestId:20 /MachineName:computer1 /OU:OU=Test,CN=company,DC=Domain,DC=Com /User:Domain\User1
/JoinRights:Full /ReferralServer:MyWDSServer /BootProgram:boot\x86\pxeboot.n12 /WdsClientUnattend:WDSClientUnattend\Unattend.xml /BootImagepath:boot\x86\images\boot.wim

To approve all pending computers, type:

wdsutil /verbose /Approve-AutoaddDevices /RequestId:ALL

Additional References



title: manage-bde unlock description: Reference article for the manage-bde unlock command, which unlocks a BitLocker-protected drive by using a recovery password or a recovery key. ms.topic: reference ms.assetid: 7852bf7d-9102-40be-adcb-71e8f4dfde72 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

manage-bde unlock

Unlocks a BitLocker-protected drive by using a recovery password or a recovery key.

Syntax

manage-bde -unlock {-recoverypassword <password>|-recoverykey <pathtoexternalkeyfile>} <drive> [-certificate {-cf pathtocertificatefile | -ct certificatethumbprint} {-pin}] [-password] [-computername <name>] [{-?|/?}] [{-help|-h}]

Parameters

Parameter Description
-recoverypassword Specifies that a recovery password will be used to unlock the drive. You can also use -rp as an abbreviated version of this command.
<password> Represents the recovery password that can be used to unlock the drive.
-recoverykey Specifies that an external recovery key file will be used to unlock the drive. You can also use -rk as an abbreviated version of this command.
<pathtoexternalkeyfile> Represents the external recovery key file that can be used to unlock the drive.
<drive> Represents a drive letter followed by a colon.
-certificate The local user certificate for a BitLocker certificate to unlock the volume is located in the local user certificate store. You can also use -cert as an abbreviated version of this command.
-cf <pathtocertificatefile> Path to the certificate file.
-ct <certificatethumbprint> Certificate thumbprint which may optionally include the PIN (-pin).
-password Presents a prompt for the password to unlock the volume. You can also use -pw as an abbreviated version of this command.
-computername Specifies that manage-bde.exe will be used to modify BitLocker protection on a different computer. You can also use -cn as an abbreviated version of this command.
<name> Represents the name of the computer on which to modify BitLocker protection. Accepted values include the computer's NetBIOS name and the computer's IP address.
-? or /? Displays brief Help at the command prompt.
-help or -h Displays complete Help at the command prompt.

Examples

To unlock drive E with a recovery key file that's been saved to a backup folder on another drive, type:

manage-bde –unlock E: -recoverykey F:\Backupkeys\recoverykey.bek

Additional References



title: logoff description: Reference article for the logoff command, which logs off a user from a session on a Remote Desktop Session Host server and deletes the session. ms.topic: reference ms.assetid: 939f09cc-de8c-436c-a05d-aca5f2a06371 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

logoff

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Logs off a user from a session on a Remote Desktop Session Host server and deletes the session.

Syntax

logoff [<sessionname> | <sessionID>] [/server:<servername>] [/v]

Parameters

Parameter Description
<sessionname> Specifies the name of the session. This must be an active session.
<sessionID> Specifies the numeric ID which identifies the session to the server.
/server:<servername> Specifies the Remote Desktop Session Host server that contains the session whose user you want to log off. If unspecified, the server on which you are currently active is used.
/v Displays information about the actions being performed.
/? Displays help at the command prompt.

Remarks

Examples

To log off a user from the current session, type:

logoff

To log off a user from a session by using the session's ID, for example session 12, type:

logoff 12

To log off a user from a session by using the name of the session and server, for example session TERM04 on Server1, type:

logoff TERM04 /server:Server1

Additional References



title: msiexec description: Reference article for the msiexec command, which provides the means to install, modify, and perform operations on Windows Installer from the command line. ms.topic: reference ms.assetid: 122eb0ce-ecbc-4909-a52a-15c3413619af ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

msiexec

Provides the means to install, modify, and perform operations on Windows Installer from the command line.

Install options

Set the install type for launching an installation package.

Syntax

msiexec.exe [/i][/a][/j{u|m|/g|/t}][/x] <path_to_package>

Parameters

Parameter Description
/i Specifies normal installation.
/a Specifies administrative installation.
/ju Advertise the product to the current user.
/jm Advertise the product to all users.
/j/g Specifies the language identifier used by the advertised package.
/j/t Applies transform to the advertised package.
/x Uninstalls the package.
<path_to_package> Specifies the location and name of the installation package file.

Examples

To install a package named example.msi from the C: drive, using a normal installation process, type:

msiexec.exe /i "C:\example.msi"

Display options

You can configure what a user sees during the installation process, based on your target environment. For example, if you're distributing a package to all clients for manual installation, there should be a full UI. However, if you're deploying a package using Group Policy, which requires no user interaction, there should be no UI involved.

Syntax

msiexec.exe /i <path_to_package> [/quiet][/passive][/q{n|b|r|f}]

Parameters

Parameter Description
<path_to_package> Specifies the location and name of the installation package file.
/quiet Specifies quiet mode, which means there's no user interaction required.
/passive Specifies unattended mode, which means the installation only shows a progress bar.
/qn Specifies there's no UI during the installation process.
/qn+ Specifies there's no UI during the installation process, except for a final dialog box at the end.
/qb Specifies there's a basic UI during the installation process.
/qb+ Specifies there's a basic UI during the installation process, including a final dialog box at the end.
/qr Specifies a reduced UI experience during the installation process.
/qf Specifies a full UI experience during the installation process.
Remarks

Examples

To install package C:\example.msi, using a normal installation process and no UI, type:

msiexec.exe /i "C:\example.msi" /qn

Restart options

If your installation package overwrites files or attempts to change files that are in use, a reboot might be required before the installation completes.

Syntax

msiexec.exe /i <path_to_package> [/norestart][/promptrestart][/forcerestart]

Parameters

Parameter Description
<path_to_package> Specifies the location and name of the installation package file.
/norestart Stops the device from restarting after the installation completes.
/promptrestart Prompts the user if a reboot is required.
/forcerestart Restarts the device after the installation completes.

Examples

To install package C:\example.msi, using a normal installation process with no reboot at the end, type:

msiexec.exe /i "C:\example.msi" /norestart

Logging options

If you need to debug your installation package, you can set the parameters to create a log file with specific information.

Syntax

msiexec.exe [/i][/x] <path_to_package> [/L{i|w|e|a|r|u|c|m|o|p|v|x+|!|*}] <path_to_log>

Parameters

Parameter Description
/i Specifies normal installation.
/x Uninstalls the package.
<path_to_package> Specifies the location and name of the installation package file.
/li Turns on logging and includes status messages in the output log file.
/lw Turns on logging and includes non-fatal warnings in the output log file.
/le Turns on logging and includes all error messages in the output log file.
/la Turns on logging and includes information about when an action started in the output log file.
/lr Turns on logging and includes action-specific records in the output log file.
/lu Turns on logging and includes user request information in the output log file.
/lc Turns on logging and includes the initial UI parameters in the output log file.
/lm Turns on logging and includes out-of-memory or fatal exit information in the output log file.
/lo Turns on logging and includes out-of-disk-space messages in the output log file.
/lp Turns on logging and includes terminal properties in the output log file.
/lp Turns on logging and includes terminal properties in the output log file.
/lv Turns on logging and includes verbose output in the output log file.
/lp Turns on logging and includes terminal properties in the output log file.
/lx Turns on logging and includes extra debugging information in the output log file.
/l+ Turns on logging and appends the information to an existing log file.
/l! Turns on logging and flushes each line to the log file.
/l* Turns on logging and logs all information, except verbose information (/lv) or extra debugging information (/lx).
<path_to_logfile> Specifies the location and name for the output log file.

Examples

To install package C:\example.msi, using a normal installation process with all logging information provided, including verbose output, and storing the output log file at C:\package.log, type:

msiexec.exe /i "C:\example.msi" /L*V "C:\package.log"

Update options

You can apply or remove updates using an installation package.

Syntax

msiexec.exe [/p][/update][/uninstall[/package<product_code_of_package>]] <path_to_package>

Parameters

Parameter Description
/p Installs a patch. If you're installing silently, you must also set the REINSTALLMODE property to ecmus and REINSTALL to ALL. Otherwise, the patch only updates the MSI cached on the target device.
/update Install patches option. If you're applying multiple updates, you must separate them using a semi-colon (;).
/package Installs or configures a product.

Examples

msiexec.exe /p "C:\MyPatch.msp"
msiexec.exe /p "C:\MyPatch.msp" /qb REINSTALLMODE="ecmus" REINSTALL="ALL"
msiexec.exe /update "C:\MyPatch.msp"
msiexec.exe /uninstall {1BCBF52C-CD1B-454D-AEF7-852F73967318} /package {AAD3D77A-7476-469F-ADF4-04424124E91D}

Where the first GUID is the patch GUID, and the second one is the MSI product code to which the patch was applied.

Repair options

You can use this command to repair an installed package.

Syntax

msiexec.exe [/f{p|o|e|d|c|a|u|m|s|v}] <product_code>

Parameters

Parameter Description
/fp Repairs the package if a file is missing.
/fo Repairs the package if a file is missing, or if an older version is installed.
/fe Repairs the package if file is missing, or if an equal or older version is installed.
/fd Repairs the package if file is missing, or if a different version is installed.
/fc Repairs the package if file is missing, or if checksum does not match the calculated value.
/fa Forces all files to be reinstalled.
/fu Repairs all the required user-specific registry entries.
/fm Repairs all the required computer-specific registry entries.
/fs Repairs all existing shortcuts.
/fv Runs from source and re-caches the local package.

Examples

To force all files to be reinstalled based on the MSI product code to be repaired, {AAD3D77A-7476-469F-ADF4-04424124E91D}, type:

msiexec.exe /fa {AAD3D77A-7476-469F-ADF4-04424124E91D}

Set public properties

You can set public properties through this command. For information about the available properties and how to set them, see Public Properties.

Additional References



title: add-DriverGroupFilter description: Reference article for the add-DriverGroupFilter command, which adds a filter to a driver group on a server. ms.topic: reference ms.assetid: a66c5e68-99ea-4e47-b68d-8109633ae336 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

add-DriverGroupFilter

Adds a filter to a driver group on a server.

Syntax

wdsutil /Add-DriverGroupFilter /DriverGroup:<Group Name> [/Server:<Server name>] /FilterType:<Filter Type> /Policy:{Include | Exclude} /Value:<Value> [/Value:<Value> ...]

Parameters

Parameter Description
/DriverGroup:<Groupname> Specifies the name of the new driver group.
/Server:<Servername> Specifies the name of the server. This can be the NetBIOS name or the FQDN. If no server name is specified, the local server is used.
/Filtertype:<Filtertype> Specifies the type of the filter to add to the group. You can specify multiple filter types in a single command. Each filter type must be followed by /Policy and at least one /Value. Valid values include:
  • BiosVendor
  • Biosversion
  • Chassistype
  • Manufacturer
  • Uuid
  • Osversion
  • Osedition
  • OsLanguage
For information about getting values for all other filter types, see Driver Group Filters.
[/Policy:`{Include Exclude}`] Specifies the policy to be set on the filter. If /Policy is set to Include, client computers that match the filter are allowed to install the drivers in this group. If /Policy is set to Exclude, then client computers that match the filter are not allowed to install the drivers in this group.
[/Value:<Value>] Specifies the client value that corresponds to /Filtertype. You can specify multiple values for a single type. For information about acceptable filter type values, see Driver Group Filters.

Examples

To add a filter to a driver group, type either:

wdsutil /Add-DriverGroupFilter /DriverGroup:PrinterDrivers /FilterType:Manufacturer /Policy:Include /Value:Name1 /Value:Name2
wdsutil /Add-DriverGroupFilter /DriverGroup:PrinterDrivers /FilterType:Manufacturer /Policy:Include /Value:Name1 /FilterType:ChassisType /Policy:Exclude /Value:Tower /Value:MiniTower

Additional References



title: manage-bde changepin description: Reference article for the manage-bde changepin command, which modifies the PIN for an operating system drive. ms.topic: reference ms.assetid: c85aa1c7-3485-4839-a292-99dfcd6db252 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

manage-bde changepin

Modifies the PIN for an operating system drive. The user is prompted to enter a new PIN.

Syntax

manage-bde -changepin [<drive>] [-computername <name>] [{-?|/?}] [{-help|-h}]

Parameters

Parameter Description
<drive> Represents a drive letter followed by a colon.
-computername Specifies that manage-bde.exe will be used to modify BitLocker protection on a different computer. You can also use -cn as an abbreviated version of this command.
<name> Represents the name of the computer on which to modify BitLocker protection. Accepted values include the computer's NetBIOS name and the computer's IP address.
-? or /? Displays brief Help at the command prompt.
-help or -h Displays complete Help at the command prompt.

Examples

To change the PIN used with BitLocker on drive C, type:

manage-bde –changepin C:

Additional References



title: md description: Reference article for the md command, which creates a directory or subdirectory. ms.topic: reference ms.assetid: 82162d00-cc34-4776-9e55-4b4836dbd6a9 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

md

Creates a directory or subdirectory. Command extensions, which are enabled by default, allow you to use a single md command to create intermediate directories in a specified path.

[!NOTE] This command is the same as the mkdir command.

Syntax

md [<drive>:]<path>

Parameters

Parameter Description
<drive>: Specifies the drive on which you want to create the new directory.
<path> Specifies the name and location of the new directory. The maximum length of any single path is determined by the file system. This is a required parameter.
/? Displays help at the command prompt.

Examples

To create a directory named Directory1 within the current directory, type:

md Directory1

To create the directory tree Taxes\Property\Current within the root directory, with command extensions enabled, type:

md \Taxes\Property\Current

To create the directory tree Taxes\Property\Current within the root directory as in the previous example, but with command extensions disabled, type the following sequence of commands:

md \Taxes
md \Taxes\Property
md \Taxes\Property\Current

Additional References



title: manage-bde upgrade description: Reference article for the manage-bde upgrade command, which upgrades the BitLocker version. ms.topic: reference ms.assetid: 23bfa824-6ff0-44cc-9b8b-b199a769fb8d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

manage-bde upgrade

Upgrades the BitLocker version.

Syntax

manage-bde -upgrade [<drive>] [-computername <name>] [{-?|/?}] [{-help|-h}]

Parameters

Parameter Description
<drive> Represents a drive letter followed by a colon.
-computername Specifies that manage-bde.exe will be used to modify BitLocker protection on a different computer. You can also use -cn as an abbreviated version of this command.
<name> Represents the name of the computer on which to modify BitLocker protection. Accepted values include the computer's NetBIOS name and the computer's IP address.
-? or /? Displays brief Help at the command prompt.
-help or -h Displays complete Help at the command prompt.

Examples

To upgrade BitLocker encryption on drive C, type:

manage-bde –upgrade C:

Additional References



title: manage-bde setidentifier description: Reference article for the manage-bde setidentifier command, which sets the drive identifier field on the drive to the value specified in the Provide the unique identifiers for your organization Group Policy setting. ms.topic: reference ms.assetid: 7092d18f-4ac9-4c73-a20f-1246ca60e75e ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

manage-bde setidentifier

Sets the drive identifier field on the drive to the value specified in the Provide the unique identifiers for your organization Group Policy setting.

Syntax

manage-bde –setidentifier <drive> [-computername <name>] [{-?|/?}] [{-help|-h}]

Parameters

Parameter Description
<drive> Represents a drive letter followed by a colon.
-computername Specifies that manage-bde.exe will be used to modify BitLocker protection on a different computer. You can also use -cn as an abbreviated version of this command.
<name> Represents the name of the computer on which to modify BitLocker protection. Accepted values include the computer's NetBIOS name and the computer's IP address.
-? or /? Displays brief Help at the command prompt.
-help or -h Displays complete Help at the command prompt.

Examples

To set BitLocker drive identifier field for C, type:

manage-bde –setidentifier C:

Additional References



title: merge vdisk description: Reference article for the merge vdisk command, which merges a differencing virtual hard disk (VHD) with its corresponding parent VHD. ms.topic: reference ms.assetid: 5865bb08-89a3-406c-8328-0ef8868d03e8 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

merge vdisk

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Merges a differencing virtual hard disk (VHD) with its corresponding parent VHD. The parent VHD will be modified to include the modifications from the differencing VHD. This command modifies the parent VHD. As a result, other differencing VHDs that are dependent on the parent will no longer be valid.

[!IMPORTANT] You must choose and detach a VHD for this operation to succeed. Use the select vdisk command to select a VHD and shift the focus to it.

Syntax

merge vdisk depth=<n>

Parameters

Parameter Description
depth=<n> Indicates the number of parent VHD files to merge together. For example, depth=1 indicates that the differencing VHD will be merged with one level of the differencing chain.

Examples

To merge a differencing VHD with its parent VHD, type:

merge vdisk depth=1

Additional References



title: makecab description: Reference article for the makecab command, which packages existing files into a cabinet (.cab) file. ms.topic: reference ms.assetid: 4da95297-c593-427b-9f76-2f389c46cbf4 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

makecab

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Package existing files into a cabinet (.cab) file.

[!NOTE] This command is the same as the diantz command.

Syntax

makecab [/v[n]] [/d var=<value> ...] [/l <dir>] <source> [<destination>]
makecab [/v[<n>]] [/d var=<value> ...] /f <directives_file> [...]

Parameters

Parameter Description
<source> File to compress.
<destination> File name to give compressed file. If omitted, the last character of the source file name is replaced with an underscore (_) and used as the destination.
/f <directives_file> A file with makecab directives (may be repeated).
/d var=<value> Defines variable with specified value.
/l <dir> Location to place destination (default is current directory).
/v[<n>] Set debugging verbosity level (0=none,...,3=full).
/? Displays help at the command prompt.

Additional References



title: manage-bde forcerecovery description: Reference article for the manage-bde forcerecovery command, which forces a BitLocker-protected drive into recovery mode on restart. ms.topic: reference ms.assetid: eecae37c-c9a3-46c5-b615-a0ace1f1d778 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

manage-bde forcerecovery

Forces a BitLocker-protected drive into recovery mode on restart. This command deletes all Trusted Platform Module (TPM)-related key protectors from the drive. When the computer restarts, only a recovery password or recovery key can be used to unlock the drive.

Syntax

manage-bde –forcerecovery <drive> [-computername <name>] [{-?|/?}] [{-help|-h}]

Parameters

Parameter Description
<drive> Represents a drive letter followed by a colon.
-computername Specifies that manage-bde.exe will be used to modify BitLocker protection on a different computer. You can also use -cn as an abbreviated version of this command.
<name> Represents the name of the computer on which to modify BitLocker protection. Accepted values include the computer's NetBIOS name and the computer's IP address.
-? or /? Displays brief Help at the command prompt.
-help or -h Displays complete Help at the command prompt.

Examples

To cause BitLocker to start in recovery mode on drive C, type:

manage-bde –forcerecovery C:

Additional References



title: mask description: Reference article for the mask command, which removes hardware shadow copies that were imported by using the import command. ms.topic: reference ms.assetid: bf301474-d74a-44e7-9fad-c8a11e7ca3bd ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

mask

Removes hardware shadow copies that were imported by using the import command.

Syntax

mask <shadowsetID>

Parameters

Parameter Description
shadowsetID Removes shadow copies that belong to the specified Shadow Copy Set ID.

Remarks

Examples

To remove the imported shadow copy %Import_1%, type:

mask %Import_1%

Additional References



title: mmc description: Reference article for the mmc command, which lets you open a specific mmc console, open mmc in author mode, or specify to open the 32-bit or 64-bit version of mmc. ms.topic: reference ms.assetid: 7bfa4030-ce42-40fb-922f-2f5145a80872 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

mmc

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Using mmc command-line options, you can open a specific mmc console, open mmc in author mode, or specify that the 32-bit or 64-bit version of mmc is opened.

Syntax

mmc <path>\<filename>.msc [/a] [/64] [/32]

Parameters

Parameter Description
<path>\<filename>.msc starts mmc and opens a saved console. You need to specify the complete path and file name for the saved console file. If you do not specify a console file, mmc opens a new console.
/a Opens a saved console in author mode. Used to make changes to saved consoles.
/64 Opens the 64-bit version of mmc (mmc64). Use this option only if you are running a Microsoft 64-bit operating system and want to use a 64-bit snap-in.
/32 Opens the 32-bit version of mmc (mmc32). When running a Microsoft 64-bit operating system, you can run 32-bit snap-ins by opening mmc with this command-line option when you have 32-bit only snap-ins.

Remarks

Additional References



title: manage-bde keypackage description: Reference article for the manage-bde keypackage command, which generates a key package for a drive. ms.topic: reference ms.assetid: c631ef10-2a2f-4541-8578-292f2d4e9e80 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

manage-bde keypackage

Generates a key package for a drive. The key package can be used in conjunction with the repair tool to repair corrupted drives.

Syntax

manage-bde -keypackage [<drive>] [-ID <keyprotectoryID>] [-path <pathtoexternalkeydirectory>] [-computername <name>] [{-?|/?}] [{-help|-h}]

Parameters

Parameter Description
<drive> Represents a drive letter followed by a colon.
-ID Creates a key package using the key protector with the identifier specified by this ID value. Tip: Use the manage-bde –protectors –get command, along with the drive letter that you want to create a key package for, to get a list of available GUIDs to use as the ID value.
-path Specifies the location to save the created key package.
-computername Specifies that manage-bde.exe will be used to modify BitLocker protection on a different computer. You can also use -cn as an abbreviated version of this command.
<name> Represents the name of the computer on which to modify BitLocker protection. Accepted values include the computer's NetBIOS name and the computer's IP address.
-? or /? Displays brief Help at the command prompt.
-help or -h Displays complete Help at the command prompt.

Examples

To create a key package for drive C, based on the key protector identified by the GUID, and to save the key package to F:\Folder, type:

manage-bde -keypackage C: -id {84E151C1...7A62067A512} -path f:\Folder

Additional References



title: logman create description: Reference article for the logman create command, which creates a counter, trace, configuration data collector, or API. ms.topic: reference ms.assetid: 972f0126-7bc4-4b14-9265-062864f3ffd4 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

logman create

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates a counter, trace, configuration data collector, or API.

Syntax

logman create <counter | trace | alert | cfg | api> <[-n] <name>> [options]

Parameters

Parameter Description
logman create counter Creates a counter data collector.
logman create trace Creates a trace data collector.
logman create alert Creates an alert data collector.
logman create cfg Creates a configuration data collector.
logman create api Creates an API tracing data collector.

Additional References



title: logman description: Reference article for the logman command, which creates and manages Event Trace Session and Performance logs and supports many functions of Performance Monitor from the command line. ms.topic: reference ms.assetid: 574a5203-5b3b-4759-a678-f26d00dde447 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

logman

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates and manages Event Trace Session and Performance logs and supports many functions of Performance Monitor from the command line.

Syntax

logman [create | query | start | stop | delete| update | import | export | /?] [options]

Parameters

Parameter Description
logman create Creates a counter, trace, configuration data collector, or API.
logman query Queries data collector properties.
logman start | stop Starts or stops data collection.
logman delete Deletes an existing data collector.
logman update Updates the properties of an existing data collector.
logman import | export Imports a data collector set from an XML file or export a data collector set to an XML file.

Additional References



title: list writers description: Reference article for the list writers command, which lists writers that are on the system. ms.topic: reference ms.assetid: 1c30cbc4-f568-4fa7-b564-66c41d3ca82d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

list writers

Lists writers that are on the system. If used without parameters, list displays the output for list metadata by default.

Syntax

list writers [metadata | detailed | status]

Parameters

Parameter Description
metadata Lists the identity and status of writers, and displays metadata such as component details and excluded files. This is the default parameter.
detailed Lists the same information as metadata, but also includes the full file list for all components.
status Lists only the identity and status of registered writers.

Examples

To list only the identity and status of writers, type:

list writers status

Output that is similar to the following displays:

Listing writer status ...
* WRITER System Writer
        - Status: 5 (VSS_WS_WAITING_FOR_BACKUP_COMPLETE)
        - Writer Failure code: 0x00000000 (S_OK)
        - Writer ID: {e8132975-6f93-4464-a53e-1050253ae220}
        - Instance ID: {7e631031-c695-4229-9da1-a7de057e64cb}
* WRITER Shadow Copy Optimization Writer
        - Status: 1 (VSS_WS_STABLE)
        - Writer Failure code: 0x00000000 (S_OK)
        - Writer ID: {4dc3bdd4-ab48-4d07-adb0-3bee2926fd7f}
        - Instance ID: {9e362607-9794-4dd4-a7cd-b3d5de0aad20}
* WRITER Registry Writer
        - Status: 1 (VSS_WS_STABLE)
        - Writer Failure code: 0x00000000 (S_OK)
        - Writer ID: {afbab4a2-367d-4d15-a586-71dbb18f8485}
        - Instance ID: {e87ba7e3-f8d8-42d8-b2ee-c76ae26b98e8}
8 writers listed.

Additional References



title: load metadata description: Reference article for the load metadata command, which loads a metadata .cab file prior to importing a transportable shadow copy or loads the writer metadata in the case of a restore. ms.topic: reference ms.assetid: 2c535487-668b-44fc-babb-ff59cf7d190e ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

Load metadata

Loads a metadata .cab file prior to importing a transportable shadow copy or loads the writer metadata in the case of a restore. If used without parameters, load metadata displays help at the command prompt.

Syntax

load metadata [<drive>:][<path>]<metadata.cab>

Parameters

Parameter Description
[<drive>:][<path>] Specifies the location of the metadata file.
metadata.cab Specifies the metadata .cab file to load.

Remarks

Examples

To load a metadata file called metafile.cab from the default location, type:

load metadata metafile.cab

Additional References



title: list volume description: Reference article for the list volume command, which displays a list of basic and dynamic volumes on all disks. ms.topic: reference ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

list volume

Displays a list of basic and dynamic volumes on all disks.

Syntax

list volume

Examples

To list the detected volumes, type:

list volume

To delete volume 2, type:

delete volume=2

Additional References



title: list providers description: Reference article for the list providers command, which lists shadow copy providers that are currently registered on the system. ms.topic: reference ms.assetid: 844b4036-c0b9-449d-8347-7d58ef9bf16d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

list providers

Lists shadow copy providers that are currently registered on the system.

Syntax

list providers

Examples

To list the currently registered shadow copy providers, type:

list providers

Output that is similar to the following displays:

* ProviderID: {b5946137-7b9f-4925-af80-51abd60b20d5}
        Type: [1] VSS_PROV_SYSTEM
        Name: Microsoft Software Shadow Copy provider 1.0
        Version: 1.0.0.7
        CLSID: {65ee1dba-8ff4-4a58-ac1c-3470ee2f376a}
1 provider registered.

Additional References



title: ksetup setcomputerpassword description: Reference article for the ksetup setcomputerpassword command, which sets the password for the local computer. ms.topic: reference ms.assetid: e307d8f6-3b93-4c24-ac04-f31549f7dc7d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ksetup setcomputerpassword

Sets the password for the local computer. This command affects the computer account only and requires a restart for the password change to take effect.

[!IMPORTANT] The computer account password isn't displayed in the registry or as output from the ksetup command.

Syntax

ksetup /setcomputerpassword <password>

Parameters

Parameter Description
<password> Specifies the supplied password to set the computer account on the local computer. The password can only be set by using an account with administrative privileges, and the password must be from 1 to 156 alphanumeric or special characters.

Examples

To change the computer account password on the local computer from IPops897 to IPop$897!, type:

ksetup /setcomputerpassword IPop$897!

Additional References



title: ksetup listrealmflags description: Reference article for the ksetup listrealmflags command, which lists the available realm flags that can be reported by ksetup. ms.topic: reference ms.assetid: aa96e4da-6b98-4c05-bccf-73cbf33258c2 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ksetup listrealmflags

Lists the available realm flags that can be reported by ksetup.

Syntax

ksetup /listrealmflags

Remarks

Value Realm flag Description
0xF All All realm flags are set.
0x00 None No realm flags are set, and no additional features are enabled.
0x01 sendaddress The IP address will be included within the ticket-granting tickets.
0x02 tcpsupported Both the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP) are supported in this realm.
0x04 delegate Everyone in this realm is trusted for delegation.
0x08 ncsupported This realm supports name canonicalization, which allows for DNS and Realm naming standards.
0x80 rc4 This realm supports RC4 encryption to enable cross-realm trust, which allows for the use of TLS.

Examples

To list the known realm flags on this computer, type:

ksetup /listrealmflags

To set the available realm flags that ksetup doesn't know, type:

ksetup /setrealmflags CORP.CONTOSO.COM sendaddress tcpsupported delete ncsupported

-OR-

ksetup /setrealmflags CORP.CONTOSO.COM 0xF

Additional References



title: ksetup delenctypeattr description: Reference article for the ksetup delenctypeattr, which removes the encryption type attribute for the domain. ms.topic: reference ms.assetid: 4fc25ef3-e271-4229-a712-72c507df55aa ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ksetup delenctypeattr

Removes the encryption type attribute for the domain. A status message is displayed upon successful or failed completion.

You can view the encryption type for the Kerberos ticket-granting ticket (TGT) and the session key, by running the klist command and viewing the output. You can set the domain to connect to and use, by running the ksetup /domain <domainname> command.

Syntax

ksetup /delenctypeattr <domainname>

Parameters

Parameter Description
<domainname> Name of the domain to which you want to establish a connection. You can use either the fully-qualified domain name or a simple form of the name, such as corp.contoso.com or contoso.

Examples

To determine the current encryption types that are set on this computer, type:

klist

To set the domain to mit.contoso.com, type:

ksetup /domain mit.contoso.com

To verify what the encryption type attribute is for the domain, type:

ksetup /getenctypeattr mit.contoso.com

To remove the set encryption type attribute for the domain mit.contoso.com, type:

ksetup /delenctypeattr mit.contoso.com

Additional References



title: ksetup delhosttorealmmap description: Reference article for the ksetup delhosttorealmmap command, which removes a service principal name (SPN) mapping between the stated host and the realm. ms.topic: reference ms.assetid: 3faee482-a96c-4614-86fd-aaa446643ec4 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ksetup delhosttorealmmap

Removes a service principal name (SPN) mapping between the stated host and the realm. This command also removes any mapping between a host to realm (or multiple hosts to realm).

The mapping is stored in the registry, under HKEY_LOCAL_MACHINE\SYSTEM\CurrentContolSet\Control\Lsa\Kerberos\HostToRealm. After running this command, we recommend making sure the mapping appears in the registry.

Syntax

ksetup /delhosttorealmmap <hostname> <realmname>

Parameters

Parameter Description
<hostname> Specifies the fully-qualified domain name of the computer.
<realmname> Specifies the uppercase DNS name, such as CORP.CONTOSO.COM.

Examples

To change the configuration of the realm CONTOSO, and to delete the mapping of the host computer IPops897 to the realm, type:

ksetup /delhosttorealmmap IPops897 CONTOSO

Additional References



title: ksetup changepassword description: Reference article for the ksetup changepassword command, which uses the Key Distribution Center (KDC) password (kpasswd) value to change the password of the logged-on user. ms.topic: reference ms.assetid: 283078e7-a88f-4875-90e6-f8605e6b7ea7 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ksetup changepassword

Uses the Key Distribution Center (KDC) password (kpasswd) value to change the password of the logged-on user. The output of the command informs you of the success or failure status.

You can check whether the kpasswd is set, by running the ksetup /dumpstate command and viewing the output.

Syntax

ksetup /changepassword <oldpassword> <newpassword>

Parameters

Parameter Description
<oldpassword> Specifies the logged-on user's existing password.
<newpassword> Specifies the logged on user's new password. This password must meet all the password requirements set on this computer.

Remarks

-

Examples

To change the password of a user who is currently logged on to this computer in this domain, type:

ksetup /changepassword Pas$w0rd Pa$$w0rd

To change the password of a user who is currently logged on in the Contoso domain, type:

ksetup /domain CONTOSO /changepassword Pas$w0rd Pa$$w0rd

To force the currently logged on user to change the password at the next logon, type:

ksetup /changepassword Pas$w0rd *

Additional References



title: ksetup addkdc description: Reference article for the ksetup addkdc command, which ads a Key Distribution Center (KDC) address for the given Kerberos realm. ms.topic: reference ms.assetid: 98bfc23a-14c4-401c-bcb3-9903c5cdde64 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ksetup addkdc

Adds a Key Distribution Center (KDC) address for the given Kerberos realm

The mapping is stored in the registry, under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\LSA\Kerberos\Domains and the computer must be restarted before the new realm setting will be used.

[!NOTE] To deploy Kerberos realm configuration data to multiple computers, you must use the Security Configuration Template snap-in and policy distribution, explicitly on individual computers. You can't use this command.

Syntax

ksetup /addkdc <realmname> [<KDCname>]

Parameters

Parameter Description
<realmname> Specifies the uppercase DNS name, such as CORP.CONTOSO.COM. This value also appears as the default realm when ksetup is run, and is the realm to which you want to add the other KDC.
<KDCname> Specifies the case-insensitive, fully-qualified domain name, such as mitkdc.contoso.com. If the KDC name is omitted, DNS will locate KDCs.

Examples

To configure a non-Windows KDC server and the realm that the workstation should use, type:

ksetup /addkdc CORP.CONTOSO.COM mitkdc.contoso.com

To set the local computer account password to p@sswrd1% on the same computer as in the previous example, and then to restart the computer, type:

ksetup /setcomputerpassword p@sswrd1%

To verify the default realm name for the computer or to verify that this command worked as intended, type:

ksetup

Check the registry to make sure the mapping occurred as intended.

Additional References



title: ksetup description: Reference article for the ksetup command, which performs tasks related to setting up and maintaining Kerberos protocol and the Key Distribution Center (KDC) to support Kerberos realms. ms.topic: reference ms.assetid: 4e046f8a-811b-48dc-9a69-18d8e097f353 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ksetup

Performs tasks related to setting up and maintaining Kerberos protocol and the Key Distribution Center (KDC) to support Kerberos realms. Specifically, this command is used to:

Syntax

ksetup
[/setrealm <DNSdomainname>]
[/mapuser <principal> <account>]
[/addkdc <realmname> <KDCname>]
[/delkdc <realmname> <KDCname>]
[/addkpasswd <realmname> <KDCPasswordName>]
[/delkpasswd <realmname> <KDCPasswordName>]
[/server <servername>]
[/setcomputerpassword <password>]
[/removerealm <realmname>]
[/domain <domainname>]
[/changepassword <oldpassword> <newpassword>]
[/listrealmflags]
[/setrealmflags <realmname> [sendaddress] [tcpsupported] [delegate] [ncsupported] [rc4]]
[/addrealmflags <realmname> [sendaddress] [tcpsupported] [delegate] [ncsupported] [rc4]]
[/delrealmflags [sendaddress] [tcpsupported] [delegate] [ncsupported] [rc4]]
[/dumpstate]
[/addhosttorealmmap] <hostname> <realmname>]
[/delhosttorealmmap] <hostname> <realmname>]
[/setenctypeattr] <domainname> {DES-CBC-CRC | DES-CBC-MD5 | RC4-HMAC-MD5 | AES128-CTS-HMAC-SHA1-96 | AES256-CTS-HMAC-SHA1-96}
[/getenctypeattr] <domainname>
[/addenctypeattr] <domainname> {DES-CBC-CRC | DES-CBC-MD5 | RC4-HMAC-MD5 | AES128-CTS-HMAC-SHA1-96 | AES256-CTS-HMAC-SHA1-96}
[/delenctypeattr] <domainname>

Parameters

Parameter Description
ksetup setrealm Makes this computer a member of a Kerberos realm.
ksetup addkdc Defines a KDC entry for the given realm.
ksetup delkdc Deletes a KDC entry for the realm.
ksetup addkpasswd Adds a kpasswd server address for a realm.
ksetup delkpasswd Deletes a kpasswd server address for a realm.
ksetup server Allows you to specify the name of a Windows computer on which to apply the changes.
ksetup setcomputerpassword Sets the password for the computer's domain account (or host principal).
ksetup removerealm Deletes all information for the specified realm from the registry.
ksetup domain Allows you to specify a domain (if the <domainname> hasn't already been set by the /domain parameter).
ksetup changepassword Allows you to use the kpasswd to change the logged on user's password.
ksetup listrealmflags Lists the available realm flags that ksetup can detect.
ksetup setrealmflags Sets realm flags for a specific realm.
ksetup addrealmflags Adds additional realm flags to a realm.
ksetup delrealmflags Deletes realm flags from a realm.
ksetup dumpstate Analyzes the Kerberos configuration on the given computer. Adds a host to realm mapping to the registry.
ksetup addhosttorealmmap Adds a registry value to map the host to the Kerberos realm.
ksetup delhosttorealmmap Deletes the registry value that mapped the host computer to the Kerberos realm.
ksetup setenctypeattr Sets one or more encryption types trust attributes for the domain.
ksetup getenctypeattr Gets the encryption types trust attribute for the domain.
ksetup addenctypeattr Adds encryption types to the encryption types trust attribute for the domain.
ksetup delenctypeattr Deletes the encryption types trust attribute for the domain.
/? Displays Help at the command prompt.

Additional References



title: ksetup addenctypeattr description: Reference article for the ksetup addenctypeattr command, which adds the encryption type attribute to the list of possible types for the domain. ms.topic: reference ms.assetid: 32cc87d7-b9e1-4d14-9eb7-3b439c55aa3a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ksetup addenctypeattr

Adds the encryption type attribute to the list of possible types for the domain. A status message is displayed upon successful or failed completion.

Syntax

ksetup /addenctypeattr <domainname> {DES-CBC-CRC | DES-CBC-MD5 | RC4-HMAC-MD5 | AES128-CTS-HMAC-SHA1-96 | AES256-CTS-HMAC-SHA1-96}

Parameters

Parameter Description
<domainname> Name of the domain to which you want to establish a connection. Use the fully qualified domain name or a simple form of the name, such as corp.contoso.com or contoso.
encryption type Must be one of the following supported encryption types:
  • DES-CBC-CRC
  • DES-CBC-MD5
  • RC4-HMAC-MD5
  • AES128-CTS-HMAC-SHA1-96
  • AES256-CTS-HMAC-SHA1-96

Remarks

Examples

To view the encryption type for the Kerberos ticket-granting ticket (TGT) and the session key, type:

klist

To set the domain to corp.contoso.com, type:

ksetup /domain corp.contoso.com

To add the encryption type AES-256-CTS-HMAC-SHA1-96 to the list of possible types for the domain corp.contoso.com, type:

ksetup /addenctypeattr corp.contoso.com AES-256-CTS-HMAC-SHA1-96

To set the encryption type attribute to AES-256-CTS-HMAC-SHA1-96 for the domain corp.contoso.com, type:

ksetup /setenctypeattr corp.contoso.com AES-256-CTS-HMAC-SHA1-96

To verify that the encryption type attribute was set as intended for the domain, type:

ksetup /getenctypeattr corp.contoso.com

Additional References



title: getmac description: Reference article for the getmac command, which returns the media access control (MAC) address and the list of network protocols associated with each, locally or across a network. ms.topic: reference ms.assetid: a749a348-7cd1-4336-9f33-bb42dd0e31e1 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

getmac

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Returns the media access control (MAC) address and list of network protocols associated with each address for all network cards in each computer, either locally or across a network. This command is particularly useful either when you want to enter the MAC address into a network analyzer, or when you need to know what protocols are currently in use on each network adapter on a computer.

Syntax

getmac[.exe][/s <computer> [/u <domain\<user> [/p <password>]]][/fo {table | list | csv}][/nh][/v]

Parameters

Parameter Description
/s <computer> Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer.
/u <domain>\<user> Runs the command with the account permissions of the user specified by user or domain\user. The default is the permissions of the current logged on user on the computer issuing the command.
/p <password> Specifies the password of the user account that is specified in the /u parameter.
/fo {table | list | csv} Specifies the format to use for the query output. Valid values are table, list, and csv. The default format for output is table.
/nh Suppresses column header in output. Valid when the /fo parameter is set to table or csv.
/v Specifies that the output display verbose information.
/? Displays help at the command prompt.

Examples

The following examples show how you can use the getmac command:

getmac /fo table /nh /v
getmac /s srvmain
getmac /s srvmain /u maindom\hiropln
getmac /s srvmain /u maindom\hiropln /p p@ssW23
getmac /s srvmain /u maindom\hiropln /p p@ssW23 /fo list /v
getmac /s srvmain /u maindom\hiropln /p p@ssW23 /fo table /nh

Additional References



title: ftp mdir description: Reference article for the ftp mdir command, which displays a directory list of files and subdirectories in a remote directory. ms.topic: reference ms.assetid: 90eec45b-558b-4b8d-bbe4-b56d98e1ca70 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp mdir

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays a directory list of files and subdirectories in a remote directory.

Syntax

mdir <remotefile>[...] <localfile>

Parameters

Parameter Description
<remotefile> Specifies the directory or file for which you want to see a listing. You can specify multiple remotefiles. Type a hyphen (-) to use the current working directory on the remote computer.
<localfile> Specifies a local file to store the listing. This parameter is required. Type a hyphen (-) to display the listing on the screen.

Examples

To display a directory listing of dir1 and dir2 on the screen, type:

mdir dir1 dir2 -

To save the combined directory listing of dir1 and dir2 in a local file called dirlist.txt, type:

mdir dir1 dir2 dirlist.txt

Additional References



title: ftp put description: Reference article for the ftp put command, which copies a local file to the remote computer using the current file transfer type. ms.topic: reference ms.assetid: 95cc1e3f-523d-4374-98b8-16e6c276b2ca ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 03/30/2020

ftp put

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Copies a local file to the remote computer using the current file transfer type.

[!NOTE] This command is the same as the ftp send command.

Syntax

put <localfile> [<remotefile>]

Parameters

Parameter Description
<localfile> Specifies the local file to copy.
[<remotefile>] Specifies the name to use on the remote computer. If you don't specify a remotefile, the file is give the localfile name.

Examples

To copy the local file test.txt and name it test1.txt on the remote computer, type:

put test.txt test1.txt

To copy the local file program.exe to the remote computer, type:

put program.exe

Additional References



title: ftp dir description: Reference article for the ftp dir command, which displays a list of directory files and subdirectories on a remote computer. ms.topic: reference ms.assetid: a29a92a5-7b79-4e6e-95cf-2ccb38bb6fb2 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp dir

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays a list of directory files and subdirectories on a remote computer.

Syntax

dir [<remotedirectory>] [<localfile>]

Parameters

Parameter Description
[<remotedirectory>] Specifies the directory for which you want to see a listing. If no directory is specified, the current working directory on the remote computer is used.
[<localfile>] Specifies a local file in which to store the directory listing. If a local file is not specified, results are displayed on the screen.

Examples

To display a directory listing for dir1 on the remote computer, type:

dir dir1

To save a list of the current directory on the remote computer in the local file dirlist.txt, type:

dir . dirlist.txt

Additional References



title: ftp bye description: Reference article for the ftp bye command, which ends the ftp session on the remote computer, and then exits. ms.topic: reference ms.assetid: f20e2bf2-7d12-4606-942a-8ed555eb8e90 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp bye

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Ends the ftp session on the remote computer, and then exits.

[!NOTE] This command is the same as the ftp quit command.

Syntax

bye

Examples

To end the ftp session with the remote computer and exit, type:

bye

Additional References



title: fsutil wim description: Reference article for the fsutil wim command, which provides functions to discover and manage Windows Image (WIM)-backed files. manager: dmoss ms.author: toklima author: toklima ms.assetid: 6c6ff819-f349-4aea-b0be-1f637f631736 ms.topic: reference ms.date: 10/16/2017

fsutil wim

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows 10

Provides functions to discover and manage Windows Image (WIM)-backed files.

Syntax

fsutil wim [enumfiles] <drive name> <data source>
fsutil wim [enumwims] <drive name>
fsutil wim [queryfile] <filename>
fsutil wim [removewim] <drive name> <data source>

Parameters

Parameter Description
enumfiles Enumerates WIM backed files.
<drive name> Specifies the drive name.
<data source> Specifies the data source.
enumwims Enumerates backing WIM files.
queryfile Queries if the file is backed by WIM, and if so, displays details about the WIM file.
<filename> Specifies the filename.
removewim Removes a WIM from backing files.

Examples

To enumerate the files for drive C: from data source 0, type:

fsutil wim enumfiles C: 0

To enumerate backing WIM files for drive C:, type:

fsutil wim enumwims C:

To see if a file is backed by WIM, type:

fsutil wim queryFile C:\Windows\Notepad.exe

To remove the WIM from backing files for volume C: and data source 2, type:

fsutil wim removewims C: 2

Additional References



title: ftp append description: Reference article for the ftp append command, which appends a local file to a file on the remote computer using the current file type setting. ms.topic: reference ms.assetid: 7c1a133c-31dc-41a4-9eb9-258efd79804d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp append

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Appends a local file to a file on the remote computer using the current file type setting.

Syntax

append <localfile> [remotefile]

Parameters

Parameter Description
<localfile> Specifies the local file to add.
[remotefile] Specifies the file on the remote computer to which <localfile> is added. If you don't use this parameter, the <localfile> name is used in place of the remote file name.

Examples

To append file1.txt to file2.txt on the remote computer, type:

append file1.txt file2.txt

To append the local file1.txt to a file named file1.txt on the remote computer.

append file1.txt

Additional References



title: fsutil volume description: Reference article for the fsutil volume command, which dismounts a volume, or queries the hard disk drive to determine how much free space is currently available on the hard disk drive or which file is using a particular cluster. manager: dmoss ms.author: toklima author: toklima ms.assetid: 0397c204-b3f8-4fd8-b71d-b7efb117766d ms.topic: reference ms.date: 10/16/2017

fsutil volume

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8

Dismounts a volume, or queries the hard disk drive to determine how much free space is currently available on the hard disk drive or which file is using a particular cluster.

Syntax

fsutil volume [allocationreport] <volumepath>
fsutil volume [diskfree] <volumepath>
fsutil volume [dismount] <volumepath>
fsutil volume [filelayout] <volumepath> <fileID>
fsutil volume [list]
fsutil volume [querycluster] <volumepath> <cluster> [<cluster>] … …

Parameters

Parameter Description
allocationreport Displays information about how storage is used on a given volume.
<volumepath> Specifies the drive letter (followed by a colon).
diskfree Queries the hard disk drive to determine the amount of free space on it.
dismount Dismounts a volume.
filelayout Displays NTFS metadata for the given file.
<fileID> Specifies the file id.
list Lists all of the volumes on the system.
querycluster Finds which file is using a specified cluster. You can specify multiple clusters with the querycluster parameter.
<cluster> Specifies the logical cluster number (LCN).

Examples

To display an allocated clusters report, type:

fsutil volume allocationreport C:

To dismount a volume on drive C, type:

fsutil volume dismount c:

To query the amount of free space of a volume on drive C, type:

fsutil volume diskfree c:

To display all the information about a specified file(s), type:

fsutil volume C: *
fsutil volume C:\Windows
fsutil volume C: 0x00040000000001bf

To list the volumes on disk, type:

fsutil volume list

To find the file(s) that are using the clusters, specified by the logical cluster numbers 50 and 0x2000, on drive C, type:

fsutil volume querycluster C: 50 0x2000

Additional References



title: fsutil tiering description: Reference article for the fsutil tiering command, which enables management of storage tier functions, such as setting and disabling flags and listing of tiers. manager: dmoss ms.author: toklima author: toklima ms.assetid: e5f55f3e-8d2a-4526-8d67-36a539126c22 ms.topic: reference ms.date: 10/16/2017

fsutil tiering

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows 10

Enables management of storage tier functions, such as setting and disabling flags and listing of tiers.

Syntax

fsutil tiering [clearflags] <volume> <flags>
fsutil tiering [queryflags] <volume>
fsutil tiering [regionlist] <volume>
fsutil tiering [setflags] <volume> <flags>
fsutil tiering [tierlist] <volume>

Parameters

Parameter Description
clearflags Disables the tiering behavior flags of a volume.
<volume> Specifies the volume.
/trnh For volumes with tiered storage, causes Heat gathering to be disabled.

Applies to NTFS and ReFS only.

queryflags Queries the tiering behavior flags of a volume.
regionlist Lists the tiered regions of a volume and their respective storage tiers.
setflags Enables the tiering behavior flags of a volume.
tierlist Lists the storage tiers associated with a volume.

Examples

To query the flags on volume C, type:

fsutil tiering queryflags C:

To set the flags on volume C, type:

fsutil tiering setflags C: /trnh

To clear the flags on volume C, type:

fsutil tiering clearflags C: /trnh

To list the regions of volume C and their respective storage tiers, type:

fsutil tiering regionlist C:

To list the tiers of volume C, type:

fsutil tiering tierlist C:

Additional References



title: fsutil reparsepoint description: Reference article for the fsutil reparsepoint command, which queries or deletes reparse points. manager: dmoss ms.author: toklima author: toklima ms.assetid: fb95c8ee-a418-4520-a12a-7754ae947c3c ms.topic: reference ms.date: 10/16/2017

fsutil reparsepoint

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8

Queries or deletes reparse points. The fsutil reparsepoint command is typically used by support professionals.

Reparse points are NTFS file system objects that have a definable attribute, which contains user-defined data. They're used to:

Syntax

fsutil reparsepoint [query] <filename>
fsutil reparsepoint [delete] <filename>

Parameters

Parameter Description
query Retrieves the reparse point data that is associated with the file or directory identified by the specified handle.
delete Deletes a reparse point from the file or directory that is identified by the specified handle, but does not delete the file or directory.
<filename> Specifies the full path to the file including the file name and extension, for example C:\documents\filename.txt.

Remarks

Examples

To retrieve reparse point data associated with c:\server, type:

fsutil reparsepoint query c:\server

To delete a reparse point from a specified file or directory, use the following format:

fsutil reparsepoint delete c:\server

Additional References



title: fsutil sparse description: Reference article for the fsutil sparse command, which manages sparse files. manager: dmoss ms.author: toklima author: toklima ms.assetid: 77545920-2d13-4f35-a4d1-14dbec8340dc ms.topic: reference ms.date: 10/16/2017

fsutil sparse

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8

Manages sparse files. A sparse file is a file with one or more regions of unallocated data in it.

A program sees these unallocated regions as containing bytes with a zero value and that there's no disk space representing these zeros. When a sparse file is read, allocated data is returned as stored, and unallocated data is returned, by default, as zeros, in accordance with the C2 security requirement specification. Sparse file support allows data to be deallocated from anywhere in the file.

Syntax

fsutil sparse [queryflag] <filename>
fsutil sparse [queryrange] <filename>
fsutil sparse [setflag] <filename>
fsutil sparse [setrange] <filename> <beginningoffset> <length>

Parameters

Parameter Description
queryflag Queries sparse.
queryrange Scans a file and searches for ranges that may contain nonzero data.
setflag Marks the indicated file as sparse.
setrange Fills a specified range of a file with zeros.
<filename> Specifies the full path to the file including the file name and extension, for example C:\documents\filename.txt.
<beginningoffset> Specifies the offset within the file to mark as sparse.
<length> Specifies the length of the region in the file to be marked as sparse (in bytes).

Remarks

Examples

To mark a file named sample.txt in the c:\temp directory as sparse, type:

fsutil sparse setflag c:\temp\sample.txt

Additional References



title: fsutil hardlink description: Reference article for the fsutil hardlink command, which creates a hard link between an existing file and a new file. manager: dmoss ms.author: toklima author: toklima ms.assetid: 835fc6f1-cc84-4189-b29a-dde90792469e ms.topic: reference ms.date: 10/16/2017

fsutil hardlink

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8

Creates a hard link between an existing file and a new file. A hard link is a directory entry for a file. Every file can be considered to have at least one hard link.

On NTFS volumes, each file can have multiple hard links, so a single file can appear in many directories (or even in the same directory with different names). Because all of the links reference the same file, programs can open any of the links and modify the file. A file is deleted from the file system only after all links to it have been deleted. After you create a hard link, programs can use it like any other file name.

Syntax

fsutil hardlink create <newfilename> <existingfilename>
fsutil hardlink list <filename>

Parameters

Parameter Description
create Establishes an NTFS hard link between an existing file and a new file. (An NTFS hard link is similar to a POSIX hard link.)
<newfilename> Specifies the file that you want to create a hard link to.
<existingfilename> Specifies the file that you want to create a hard link from.
list Lists the hard links to filename.

Additional References



title: fondue description: Reference article for the fondue command, which enables Windows optional features by downloading required files from Windows Update or another source specified by Group Policy. ms.topic: reference ms.assetid: fc4467f6-ddbb-4d6d-b51e-5a50a957b8c0 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

fondue

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Enables Windows optional features by downloading required files from Windows Update or another source specified by Group Policy. The manifest file for the feature must already be installed in your Windows image.

Syntax

fondue.exe /enable-feature:<feature_name> [/caller-name:<program_name>] [/hide-ux:{all | rebootrequest}]

Parameters

Parameter Description
/enable-feature:<feature_name> Specifies the name of the Windows optional feature you want to enable. You can only enable one feature per command line. To enable multiple features, use fondue.exe for each feature.
/caller-name:<program_name> Specifies the program or process name when you call fondue.exe from a script or batch file. You can use this option to add the program name to the SQM report if there is an error.
/hide-ux:`{all rebootrequest}` Use all to hide all messages to the user including progress and permission requests to access Windows Update. If permission is required, the operation will fail.

Use rebootrequest to only hide user messages asking for permission to reboot the computer. Use this option if you have a script that controls reboot requests.

Examples

To enable Microsoft .NET Framework 4.8, type:

fondue.exe /enable-feature:NETFX4

To enable Microsoft .NET Framework 4.8, add the program name to the SQM report, and not display messages to the user, type:

fondue.exe /enable-feature:NETFX4 /caller-name:Admin.bat /hide-ux:all

Additional References



title: extend description: Reference article for the extend command, which extends the volume or partition with focus and its file system into free (unallocated) space on a disk. ms.topic: reference ms.assetid: 2414e21d-fc0b-40e8-9e33-3e072f8ad76b ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

extend

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Extends the volume or partition with focus and its file system into free (unallocated) space on a disk.

Syntax

extend [size=<n>] [disk=<n>] [noerr]
extend filesystem [noerr]

Parameters

Parameter Description
size=<n> Specifies the amount of space in megabytes (MB) to add to the current volume or partition. If no size is given, all of the contiguous free space that is available on the disk is used.
disk=<n> Specifies the disk on which the volume or partition is extended. If no disk is specified, the volume or partition is extended on the current disk.
filesystem Extends the file system of the volume with focus. For use only on disks where the file system was not extended with the volume.
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Remarks

Examples

To extend the volume or partition with focus by 500 megabytes, on disk 3, type:

extend size=500 disk=3

To extend the file system of a volume after it was extended, type:

extend filesystem

Additional References



title: exec description: Reference article for the exec command, which runs a script file on the local computer. ms.topic: reference ms.assetid: 364e8baf-576f-401b-a431-7d3c06621614 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

exec

Runs a script file on the local computer. This command also duplicates or restores data as part of a backup or restore sequence. If the script fails, an error is returned and DiskShadow quits.

The file can be a cmd script.

Syntax

exec <scriptfile.cmd>

Parameters

Parameter Description
<scriptfile.cmd> Specifies the script file to run.

Additional References



title: eventtriggers description: Reference article for the eventtriggers command. This command has been deprecated and isn't guaranteed to be supported in future releases of Windows. ms.topic: reference ms.assetid: 8f78050b-24b2-4f67-a58a-77eeb66f7755 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

eventtriggers

The eventtriggers command has been deprecated and isn't guaranteed to be supported in future releases of Windows.



title: endlocal description: Reference article for the endlocal command, which ends localization of environment changes in a batch file, and restores environment variables to their values before the corresponding setlocal command was run. ms.topic: reference ms.assetid: 765fae3c-0c0a-4639-99a4-cf613489b949 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

endlocal

Ends localization of environment changes in a batch file, and restores environment variables to their values before the corresponding setlocal command was run.

Syntax

endlocal

Parameters

Parameter Description
/? Displays help at the command prompt.

Remarks

[!NOTE] For more information about enabling and disabling command extensions, see the Cmd command.

Examples

You can localize environment variables in a batch file. For example, the following program starts the superapp batch program on the network, directs the output to a file, and displays the file in Notepad:

@echo off
setlocal
path=g:\programs\superapp;%path%
call superapp>c:\superapp.out
endlocal
start notepad c:\superapp.out

Additional References



title: edit description: Reference article for the edit command, which starts the MS-DOS Editor, so you can create and change ASCII text files. ms.topic: reference ms.assetid: 4e0ff2e8-3518-47c1-8c69-5e93f895fa0e ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

edit

Starts the MS-DOS Editor, which creates and changes ASCII text files.

Syntax

edit [/b] [/h] [/r] [/s] [/<nnn>] [[<drive>:][<path>]<filename> [<filename2> [...]]

Parameters

Parameter Description
[<drive>:][<path>]<filename> [<filename2> [...]] Specifies the location and name of one or more ASCII text files. If the file doens't exist, MS-DOS Editor creates it. If the file exists, MS-DOS Editor opens it and displays its contents on the screen. The filename option can contain wildcard characters (* and ?). Separate multiple file names with spaces.
/b Forces monochrome mode, so that MS-DOS Editor displays in black and white.
/h Displays the maximum number of lines possible for the current monitor.
/r Loads file(s) in read-only mode.
/s Forces the use of short filenames.
<nnn> Loads binary file(s), wrapping lines to nnn characters wide.
/? Displays help at the command prompt.

Remarks

Examples

To open MS-DOS Editor, type:

edit

To create and edit a file named newtextfile.txt in the current directory, type:

edit newtextfile.txt

Additional References



title: driverquery description: Reference article for the driverquery command, which enables an administrator to display a list of installed device drivers and their properties. ms.topic: reference ms.assetid: 92ca4b84-e4e2-405b-9f31-bf6db9f66839 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

driverquery

Enables an administrator to display a list of installed device drivers and their properties. If used without parameters, driverquery runs on the local computer.

Syntax

driverquery [/s <system> [/u [<domain>\]<username> [/p <password>]]] [/fo {table | list | csv}] [/nh] [/v | /si]

Parameters

Parameter Description
/s <system> Specifies the name or IP address of a remote computer. Do not use backslashes. The default is the local computer.
/u [<domain>]<username> Runs the command with the credentials of the user account as specified by user or domain\user. By default, /s uses the credentials of the user who is currently logged on to the computer that is issuing the command. /u can't be used unless /s is specified.
/p <password> Specifies the password of the user account that is specified in the /u parameter. /p cannot be used unless /u is specified.
/fo table Formats the output as a table. This is the default.
/fo list Formats the output as a list.
/fo csv Formats the output with comma-separated values.
/nh Omits the header row from the displayed driver information. Not valid if the /fo parameter is set to list.
/v Displays verbose output. /v is not valid for signed drivers.
/si Provides information about signed drivers.
/? Displays help at the command prompt.

Examples

To display a list of installed device drivers on the local computer, type:

driverquery

To display the output in a comma-separated values (CSV) format, type:

driverquery /fo csv

To hide the header row in the output, type:

driverquery /nh

To use the driverquery command on a remote server named server1 using your current credentials on the local computer, type:

driverquery /s server1

To use the driverquery command on a remote server named server1 using the credentials for user1 on the domain maindom, type:

driverquery /s server1 /u maindom\user1 /p p@ssw3d

Additional References



title: dfsdiag testreferral description: Reference article for the dfsdiag testreferral command, which checks Distributed File System (DFS) referrals. ms.topic: reference ms.assetid: 877c60dc-e993-4bd5-87dd-e892e3f98a1a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

dfsdiag testreferral

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Checks Distributed File System (DFS) referrals by performing the following tests:

Syntax

dfsdiag /testreferral /DFSpath:<DFS path to get referrals> [/full]

Parameters

Parameter Description
/DFSpath:<path to get referrals> Can be one of the following:
  • Blank: Tests only trusted domains.
  • \\Domain: Tests only domain controller referrals.
  • \\Domain\SYSvol: Tests only SYSvol referrals.
  • \\Domain\NETLOGON: Tests only NETLOGON referrals.
  • \\<domain or server>\<namespace root>: Tests only namespace root referrals.
  • \\<domain or server>\<namespace root>\<DFS folder>: Tests only the DFS folder (link) referrals.
/full Applies only to Domain and Root referrals. Verifies the consistency of site association information between the registry and active directory Domain Services (AD DS).

Examples

To check the Distributed File System (DFS) referrals in contoso.com\MyNamespace, type:

dfsdiag /testreferral /DFSpath:\\contoso.com\MyNamespace

To check the Distributed File System (DFS) referrals in all trusted domains, type:

dfsdiag /testreferral /DFSpath:

Additional References



title: dfsdiag testsites description: Reference article for dfsdiag testsites, which checks the configuration of active directory Domain Services (AD DS) sites by verifying that servers that act as namespace servers or folder (link) targets have the same site associations on all domain controllers. ms.topic: reference ms.assetid: 39a0d415-7eb7-4a26-861b-7ff00c45dcda ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

dfsdiag testsites

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Checks the configuration of active directory Domain Services (AD DS) sites by verifying that servers that act as namespace servers or folder (link) targets have the same site associations on all domain controllers.

Syntax

dfsdiag /testsites </machine:<server name>| /DFSpath:<namespace root or DFS folder> [/recurse]> [/full]

Parameters

Parameter Description
/machine:<server name> The name of the server on which to verify the site association.
/DFSpath:<namespace root or DFS folder> The namespace root or Distributed File System (DFS) folder (link) with targets for which to verify the site association.
/recurse Enumerates and verifies the site associations for all folder targets under the specified namespace root.
/full Verifies that AD DS and the registry of the server contain the same site association information.

Examples

To check the site associations on machine\MyServer, type:

dfsdiag /testsites /machine:MyServer

To check a Distributed File System (DFS) folder to verify the site association, along with verifying that AD DS and the registry of the server contain the same site association information, type:

dfsdiag /TestSites /DFSpath:\\contoso.com\namespace1\folder1 /full

To check a namespace root to verify the site association, along with enumerating and verifying the site associations for all folder targets under the specified namespace root, and verifying that AD DS and the registry of the server contain the same site association information, type:

dfsdiag /testsites /DFSpath:\\contoso.com\namespace2 /recurse /full

Additional References



title: dfsdiag testdfsintegrity description: Reference article for the dfsdiag testdfsintegrity command, which checks the integrity of the Distributed File System (DFS) namespace. ms.topic: reference ms.assetid: 173ee832-26e1-4ec8-a23a-38a7d6229ac3 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

dfsdiag testdfsintegrity

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Checks the integrity of the Distributed File System (DFS) namespace by performing the following tests:

Syntax

dfsdiag /testdfsintegrity /DFSroot: <DFS root path> [/recurse] [/full]

Parameters

Parameter Description
/DFSroot: <DFS root path> The DFS namespace to diagnose.
/recurse Performs the testing, including any namespace interlinks.
/full Verifies the consistency of the share and NTFS ACLs, along with the client side configuration on all folder targets. It also verifies that the online property is set.

Examples

To verify the integrity and consistency of the Distributed File System (DFS) namespaces in contoso.com\MyNamespace, including any interlinks, type:

dfsdiag /testdfsintegrity /DFSRoot:\contoso.com\MyNamespace /recurse /full

Additional References



title: dfsdiag description: Reference article for the dfsdiag command, which provides diagnostic information for DFS Namespaces. ms.topic: reference ms.assetid: c0891e67-0187-4f18-923d-5623e6127f90 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

dfsdiag

Provides diagnostic information for DFS Namespaces.

Syntax

dfsdiag /testdcs [/domain:<domain name>]
dfsdiag /testsites </machine:<server name>| /DFSPath:<namespace root or DFS folder> [/recurse]> [/full]
dfsdiag /testdfsconfig /DFSRoot:<namespace>
dfsdiag /testdfsintegrity /DFSRoot:<DFS root path> [/recurse] [/full]
dfsdiag /testreferral /DFSpath:<DFS path to get referrals> [/full]

Parameters

Parameter Description
dfsdiag testdcs Checks domain controller configuration.
dfsdiag testsites Checks site associations.
dfsdiag testdfsconfig Checks DFS Namespace configuration.
dfsdiag testdfsintegrity Checks DFS Namespace integrity.
dfsdiag testreferral Checks referral responses.
/? Displays help at the command prompt.

Additional References



title: detail volume description: Reference article for detail volume, which displays the disks on which the current volume resides. ms.topic: reference ms.assetid: 38f2bc75-2ed6-4e80-aa74-ab83133db1cd ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

detail volume

Displays the disks on which the current volume resides. Before you begin, you must select a volume for this operation to succeed. Use the select volume command to select a volume and shift the focus to it. The volume details aren't applicable to read-only volumes, such as a DVD-ROM or CD-ROM drive.

Syntax

detail volume

Examples

To see all the disks in which the current volume resides, type:

detail volume

Additional References



title: detail disk description: Reference article for the detail disk command, which displays the properties of the selected disk and the volumes on that disk. ms.topic: reference ms.assetid: 6b09cf40-8d93-452b-b449-5242e62a4102 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

detail disk

Displays the properties of the selected disk and the volumes on that disk. Before you begin, you must select a disk for this operation to succeed. Use the select disk command to select a disk and shift the focus to it. If you select a virtual hard disk (VHD), this command will show the disk's bus type as Virtual.

Syntax

detail disk

Examples

To see the properties of the selected disk, and information about the volumes in the disk, type:

detail disk

Additional References



title: detach vdisk description: Reference article for the detach vdisk command, which stops the selected virtual hard disk (VHD) from appearing as a local hard disk drive on the host computer. ms.topic: reference ms.assetid: 5f01dcb8-9237-4564-ad94-8a8dd0fd0cca ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

detach vdisk

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Stops the selected virtual hard disk (VHD) from appearing as a local hard disk drive on the host computer. When a VHD is detached, you can copy it to other locations. Before you begin, you must select a VHD for this operation to succeed. Use the select vdisk command to select a VHD and shift the focus to it.

Syntax

detach vdisk [noerr]

Parameters

Parameter Description
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To detach the selected VHD, type:

detach vdisk

Additional References



title: delete partition description: Reference article for the delete partition command, which deletes the partition with focus. ms.topic: reference ms.assetid: 65752312-cb16-46f6-870f-1b95c507b101 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

delete partition

Deletes the partition with focus. Before you begin, you must select a partition for this operation to succeed. Use the select partition command to select a partition and shift the focus to it.

[!WARNING] Deleting a partition on a dynamic disk can delete all dynamic volumes on the disk, destroying any data and leaving the disk in a corrupt state.

You can't delete the system partition, boot partition, or any partition that contains the active paging file or crash dump information.

Syntax

delete partition [noerr] [override]

Parameters

Parameter Description
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.
override Enables DiskPart to delete any partition regardless of type. Typically, DiskPart only permits you to delete known data partitions.

Remarks

Examples

To delete the partition with focus, type:

delete partition

Additional References



title: delete description: Reference article for the delete command, which deletes a partition or a volume. ms.topic: reference ms.assetid: 021799a3-11a2-4e7f-8fdc-fba24ca2ba21 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

delete

Deletes a partition or a volume. It also deletes a dynamic disk from the list of disks.

Syntax

delete disk
delete partition
delete shadows
delete volume

Parameters

Parameter Description
Delete disk Deletes a missing dynamic disk from the list of disks.
Delete partition Deletes a partition.
Delete shadows Deletes shadow copies.
Delete volume Deletes a volume.

Additional References



title: create volume raid description: Reference article for the create volume raid command, which creates a RAID-5 volume using three or more specified dynamic disks. ms.topic: reference ms.assetid: 9f257950-9240-4d5f-9537-8ad653d48ebf ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

create volume raid

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates a RAID-5 volume using three or more specified dynamic disks. After you create the volume, the focus automatically shifts to the new volume.

Syntax

create volume raid [size=<n>] disk=<n>,<n>,<n>[,<n>,...] [align=<n>] [noerr]

Parameters

Parameter Description
size=<n> The amount of disk space, in megabytes (MB), that the volume will occupy on each disk. If no size is given, the largest possible RAID-5 volume will be created. The disk with the smallest available contiguous free space determines the size for the RAID-5 volume and the same amount of space is allocated from each disk. The actual amount of usable disk space in the RAID-5 volume is less than the combined amount of disk space because some of the disk space is required for parity.
disk=<n>,<n>,<n>[,<n>,...] The dynamic disks on which to create the RAID-5 volume. You need at least three dynamic disks in order to create a RAID-5 volume. An amount of space equal to size=<n> is allocated on each disk.
align=<n> Aligns all volume extents to the closest alignment boundary. Typically used with hardware RAID Logical Unit Number (LUN) arrays to improve performance. <n> is the number of kilobytes (KB) from the beginning of the disk to the closest alignment boundary.
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To create a RAID-5 volume of 1000 megabytes in size, using disks 1, 2 and 3, type:

create volume raid size=1000 disk=1,2,3

Additional References



title: create volume mirror description: Reference article for the create volume mirror command, which creates a volume mirror by using the two specified dynamic disks. ms.topic: reference ms.assetid: 48776917-783a-47ff-8da4-1cab77cea34b ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

create volume mirror

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates a volume mirror by using the two specified dynamic disks. After the volume has been created, the focus automatically shifts to the new volume.

Syntax

create volume mirror [size=<n>] disk=<n>,<n>[,<n>,...] [align=<n>] [noerr]

Parameters

Parameter Description
size=<n> Specifies the amount of disk space, in megabytes (MB), that the volume will occupy on each disk. If no size is given, the new volume takes up the remaining free space on the smallest disk and an equal amount of space on each subsequent disk.
disk=<n>,<n>[,<n>,...] Specifies the dynamic disks on which the mirror volume is created. You need two dynamic disks to create a mirror volume. An amount of space that is equal to the size specified with the size parameter is allocated on each disk.
align=<n> Aligns all volume extents to the closest alignment boundary. This parameter is typically used with hardware RAID logical unit number (LUN) arrays to improve performance. <n> is the number of kilobytes (KB) from the beginning of the disk to the closest alignment boundary.
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error.

Examples

To create a mirrored volume of 1000 megabytes in size, on disks 1 and 2, type:

create volume mirror size=1000 disk=1,2

Additional References



title: create partition extended description: Reference article for the create partition extended command, which creates an extended partition on the disk with focus. ms.topic: reference ms.assetid: 4ad7cb66-9c66-4153-b94e-1030a7225070 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

create partition extended

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates an extended partition on the disk with focus. After the partition has been created, the focus automatically shifts to the new partition.

[!IMPORTANT] You can use this command only on Master Boot Record (MBR) disks. You must use the select disk command to select a basic MBR disk and shift the focus to it.

You must create an extended partition before you can create logical drives. Only one extended partition can be created per disk. This command fails if you attempt to create an extended partition within another extended partition.

Syntax

create partition extended [size=<n>] [offset=<n>] [align=<n>] [noerr]

Parameters

Parameter Description
size=<n> Specifies the size of the partition in megabytes (MB). If no size is given, the partition continues until there is no more free space in the extended partition.
offset=<n> Specifies the offset in kilobytes (KB), at which the partition is created. If no offset is given, the partition will start at the beginning of the free space on the disk that is large enough to hold the new partition.
align=<n> Aligns all partition extents to the closest alignment boundary. Typically used with hardware RAID Logical Unit Number (LUN) arrays to improve performance. <n> is the number of kilobytes (KB) from the beginning of the disk to the closest alignment boundary.
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To create an extended partition of 1000 megabytes in size, type:

create partition extended size=1000

Additional References



title: create partition logical description: Reference article for the create partition logical command, which creates a logical partition in an existing extended partition. ms.topic: reference ms.assetid: 1f59b79a-d690-4d0e-ad38-40df5a0ce38e ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

create partition logical

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates a logical partition on an existing extended partition. After the partition has been created, the focus automatically shifts to the new partition.

[!IMPORTANT] You can use this command only on Master Boot Record (MBR) disks. You must use the select disk command to select a basic MBR disk and shift the focus to it.

You must create an extended partition before you can create logical drives.

Syntax

create partition logical [size=<n>] [offset=<n>] [align=<n>] [noerr]

Parameters

Parameter Description
size=<n> Specifies the size of the logical partition in megabytes (MB), which must be smaller than the extended partition. If no size is given, the partition continues until there is no more free space in the extended partition.
offset=<n> Specifies the offset in kilobytes (KB), at which the partition is created. The offset rounds up to completely fill whatever cylinder size is used. If no offset is given, then the partition is placed in the first disk extent that is large enough to hold it. The partition is at least as long in bytes as the number specified by size=<n>. If you specify a size for the logical partition, it must be smaller than the extended partition.
align=<n> Aligns all volume or partition extents to the closest alignment boundary. Typically used with hardware RAID Logical Unit Number (LUN) arrays to improve performance. <n> is the number of kilobytes (KB) from the beginning of the disk to the closest alignment boundary.
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Remarks

Examples

To create a logical partition of 1000 megabytes in size, in the extended partition of the selected disk, type:

create partition logical size=1000

Additional References



title: create description: Reference article for the create command, which creates a partition or shadow partition on a disk, a volume on one or more disks, or a virtual hard disk (VHD). ms.topic: reference ms.assetid: b45acde1-8f4f-4ec3-b905-d8188f884af8 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

create

Creates a partition or shadow on a disk, a volume on one or more disks, or a virtual hard disk (VHD). If you're using this command to create a volume on the shadow disk, you must already have at least one volume in the shadow copy set.

Syntax

create partition
create volume

Parameters

Parameter Description
create partition primary command Creates a primary partition on the basic disk with focus.
create partition efi command Creates an Extensible Firmware Interface (EFI) system partition on a GUID Partition Table (gpt) disk on Itanium-based computers.
create partition extended command Creates an extended partition on the disk with focus.
create partition logical command Creates a logical partition in an existing extended partition.
create partition msr command Creates a Microsoft Reserved (MSR) partition on a GUID partition table (gpt) disk.
create volume simple command Creates a simple volume on the specified dynamic disk.
create volume mirror command Creates a volume mirror by using the two specified dynamic disks.
create volume raid command Creates a RAID-5 volume using three or more specified dynamic disks.
create volume stripe command Creates a striped volume using two or more specified dynamic disks.

Additional References



title: create partition efi description: Reference article for the create partition efi command, which creates an Extensible Firmware Interface (EFI) system partition on a GUID Partition Table (gpt) disk on Itanium-based computers. ms.topic: reference ms.assetid: 3cfc1fca-6515-4a4d-bfae-615fa8045ea9 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

create partition efi

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates an Extensible Firmware Interface (EFI) system partition on a GUID Partition Table (gpt) disk on Itanium-based computers. After the partition is created, the focus is given to the new partition.

[!NOTE] A gpt disk must be selected for this operation to succeed. Use the select disk command to select a disk and shift the focus to it.

Syntax

create partition efi [size=<n>] [offset=<n>] [noerr]

Parameters

Parameter Description
size=<n> The size of the partition in megabytes (MB). If no size is given, the partition continues until there is no more free space in the current region.
offset=<n> The offset in kilobytes (KB), at which the partition is created. If no offset is given, the partition is placed in the first disk extent that is large enough to hold it.
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Remarks

Examples

To create an EFI partition of 1000 megabytes on the selected disk, type:

create partition efi size=1000

Additional References



title: copy description: Reference article for the copy command, which copies one or more files from one location to another. ms.topic: reference ms.assetid: 9624d4a1-349a-4693-ad00-1d1d4e59e9ac ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

copy

Copies one or more files from one location to another.

[!NOTE] You can also use the copy command, with different parameters, from the Recovery Console. For more information about the recovery console, see Windows Recovery Environment (Windows RE).

Syntax

copy [/d] [/v] [/n] [/y | /-y] [/z] [/a | /b] <source> [/a | /b] [+<source> [/a | /b] [+ ...]] [<destination> [/a | /b]]

Parameters

Parameter Description
/d Allows the encrypted files being copied to be saved as decrypted files at the destination.
/v Verifies that new files are written correctly.
/n Uses a short file name, if available, when copying a file with a name longer than eight characters, or with a file name extension longer than three characters.
/y Suppresses prompting to confirm that you want to overwrite an existing destination file.
/-y Prompts you to confirm that you want to overwrite an existing destination file.
/z Copies networked files in restartable mode.
/a Indicates an ASCII text file.
/b Indicates a binary file.
<source> Required. Specifies the location from which you want to copy a file or set of files. Source can consist of a drive letter and colon, a directory name, a file name, or a combination of these.
<destination> Required. Specifies the location to which you want to copy a file or set of files. Destination can consist of a drive letter and colon, a directory name, a file name, or a combination of these.
/? Displays help at the command prompt.

Remarks

Examples

To copy a file called memo.doc to letter.doc in the current drive and ensure that an end-of-file character (CTRL+Z) is at the end of the copied file, type:

copy memo.doc letter.doc /a

To copy a file named robin.typ from the current drive and directory to an existing directory named Birds that is located on drive C, type:

copy robin.typ c:\birds

[!NOTE] If the Birds directory doesn't exist, the file robin.typ is copied into a file named Birds that is located in the root directory on the disk in drive C.

To combine Mar89.rpt, Apr89.rpt, and May89.rpt, which are located in the current directory, and place them in a file named Report (also in the current directory), type:

copy mar89.rpt + apr89.rpt + may89.rpt Report

[!NOTE] If you combine files, the copy command marks the destination file with the current date and time. If you omit destination, the files are combined and stored under the name of the first file in the list.

To combine all files in Report, when a file named Report already exists, type:

copy report + mar89.rpt + apr89.rpt + may89.rpt

To combine all files in the current directory that have the .txt file name extension into a single file named Combined.doc, type:

copy *.txt Combined.doc

To combine several binary files into one file by using wildcard characters, include /b. This prevents Windows from treating CTRL+Z as an end-of-file character. For example, type:

copy /b *.exe Combined.exe

[!CAUTION] If you combine binary files, the resulting file might be unusable due to internal formatting.

copy *.txt + *.ref *.doc

To combine all files with the .txt extension, and then to combine all files with the .ref extension into one file named Combined.doc, type:

copy *.txt + *.ref Combined.doc

Additional References



title: convert gpt description: Reference article for the convert gpt command, which converts an empty basic disk with the master boot record (MBR) partition style into a basic disk with the GUID partition table (GPT) partition style. ms.topic: reference ms.assetid: b3b1b747-0a7a-4be2-8487-2c4be16ee190 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

convert gpt

Converts an empty basic disk with the master boot record (MBR) partition style into a basic disk with the GUID partition table (GPT) partition style. A basic MBR disk must be selected for this operation to succeed. Use the select disk command to select a basic disk and shift the focus to it.

[!IMPORTANT] The disk must be empty to convert it to a basic disk. Back up your data, and then delete all partitions or volumes before converting the disk. The required minimum disk size for conversion to GPT is 128 megabytes.

[!NOTE] For instructions regarding how to use this command, see Change a Master Boot Record Disk into a GUID Partition Table Disk.

Syntax

convert gpt [noerr]

Parameters

Parameter Description
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To convert a basic disc from MBR partition style to GPT partition style, type:

convert gpt

Additional References



title: convert basic description: Reference article for the convert basic command, which converts an empty dynamic disk to a basic disk. ms.topic: reference ms.assetid: 61329896-3b56-4959-8d58-45cbe18ba860 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

convert basic

Converts an empty dynamic disk to a basic disk. A dynamic disk must be selected for this operation to succeed. Use the select disk command to select a dynamic disk and shift the focus to it.

[!IMPORTANT] The disk must be empty to convert it to a basic disk. Back up your data, and then delete all partitions or volumes before converting the disk.

[!NOTE] For instructions regarding how to use this command, see Change a Dynamic Disk Back to a Basic Disk).

Syntax

convert basic [noerr]

Parameters

Parameter Description
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To convert the selected dynamic disk to basic, type:

convert basic

Additional References



title: convert description: Reference article for the convert command, which converts a disk from one disk type to another. ms.topic: reference ms.assetid: ae151297-af21-4701-bd69-21d775518e03 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

convert

Converts a disk from one disk type to another.

Syntax

convert basic
convert dynamic
convert gpt
convert mbr

Parameters

Parameter Description
convert basic command Converts an empty dynamic disk into a basic disk.
convert dynamic command Converts a basic disk into a dynamic disk.
convert gpt command Converts an empty basic disk with the master boot record (MBR) partition style into a basic disk with the GUID partition table (GPT) partition style.
convert mbr command Converts an empty basic disk with the GUID Partition Table (GPT) partition style into a basic disk with the master boot record (MBR) partition style.

Additional References



title: tree description: Reference article for tree, which displays the directory structure of a path, or of the disk in a drive, graphically. ms.topic: reference ms.assetid: 345d3192-401e-4a3b-a8ac-36a85c7be79d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

tree

Displays the directory structure of a path or of the disk in a drive graphically. The structure displayed by this command depends upon the parameters that you specify at the command prompt. If you don't specify a drive or path, this command displays the tree structure beginning with the current directory of the current drive.

Syntax

tree [<drive>:][<path>] [/f] [/a]

Parameters

Parameter Description
<drive>: Specifies the drive that contains the disk for which you want to display the directory structure.
<path> Specifies the directory for which you want to display the directory structure.
/f Displays the names of the files in each directory.
/a Specifies to use text characters instead of graphic characters to show the lines that link subdirectories.
/? Displays help at the command prompt.

Examples

To display the names of all the subdirectories on the disk in your current drive, type:

tree \

To display, one screen at a time, the files in all the directories on drive C, type:

tree c:\ /f | more

To print a list of all the directories on drive C, type:

tree c:\ /f  prn

Additional References



title: tracerpt description: Reference article for the tracerpt command, which parses Event Trace Logs, log files generated by Performance Monitor, and real-time Event Trace providers. ms.topic: reference ms.assetid: cb9eaf86-0ef6-4197-b6c8-9cca8a1d723c ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

tracerpt

The tracerpt command parses Event Trace Logs, log files generated by Performance Monitor, and real-time Event Trace providers. It also generates dump files, report files, and report schemas.

Syntax

tracerpt <[-l] <value [value [...]]>|-rt <session_name [session_name [...]]>> [options]

Parameters

Parameters Description
-config <filename> Specifies which settings file to load, which includes your command options.
-y Specifies to answer yes to all questions, without prompting.
-f `<XML HTML>` Specifies the report file format.
-of `<CSV EVTX XML>` Specifies the dump file format. The default is **XML*.
-df <filename> Specifies to create a Microsoft-specific counting/reporting schema file.
-int <filename> Specifies to dump the interpreted event structure to the specified file.
-rts Specifies to add the report raw timestamp in the event trace header. Can only be used with -o. It's not supported with -report or -summary.
-tmf <filename> Specifies which Trace Message Format definition file to use.
-tp <value> Specifies the TMF file search path. Multiple paths may be used, separated by a semicolon (;).
-i <value> Specifies the provider image path. The matching PDB will be located in the Symbol Server. Multiple paths can be used, separated by a semicolon (;).
-pdb <value> Specifies the symbol server path. Multiple paths can be used, separated by a semicolon (;).
-gmt Specifies to convert WPP payload timestamps to Greenwich Mean Time.
-rl <value> Specifies the System Report Level from 1 to 5. Default is 1.
-summary [filename] Specifies to create a summary report text file. The filename, if not specified, is summary.txt.
-o [filename] Specifies to create a text output file. The filename, if not specified, is dumpfile.xml.
-report [filename] Specifies to create a text output report file. The filename, if not specified, is workload.xml.
-lr Specifies to be less restrictive. This uses best efforts for events that don't match the events schema.
-export [filename] Specifies to create an Event Schema export file. The filename, if not specified, is schema.man.
[-l] <value [value […]]> Specifies the Event Trace log file to process.
-rt <session_name [session_name […]]> Specifies the Real-time Event Trace Session data sources.
-? Displays help at the command prompt.

Examples

To create a report based on the two event logs logfile1.etl and logfile2.etl, and to create the dump file logdump.xml in XML format, type:

tracerpt logfile1.etl logfile2.etl -o logdump.xml -of XML

To create a report based on the event log logfile.etl, to create the dump file logdmp.xml in XML format, to use best efforts to identify events not in the schema, and to produce a summary report file logdump.txt and a report file, logrpt.xml, type:

tracerpt logfile.etl -o logdmp.xml -of XML -lr -summary logdmp.txt -report logrpt.xml

To use the two event logs logfile1.etl and logfile2.etl to produce a dump file, and to report file with the default filenames, type:

tracerpt logfile1.etl logfile2.etl -o -report

To use the event log logfile.etl and the performance log counterfile.blg to produce the report file logrpt.xml and the Microsoft-specific XML schema file schema.xml, type:

tracerpt logfile.etl counterfile.blg -report logrpt.xml -df schema.xml

To read the real-time Event Trace Session NT Kernel Logger and to produce the dump file logfile.csv in CSV format, type:

tracerpt -rt NT Kernel Logger -o logfile.csv -of CSV

Additional References



title: time description: Reference article for the time command, which displays or sets the system time. ms.topic: reference ms.assetid: 1276a257-7283-41da-ae80-fb4cfb311f9d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

time

Displays or sets the system time. If used without parameters, time displays the current system time and prompts you to enter a new time.

[!NOTE] You must be an administrator to change the current time.

Syntax

time [/t | [<HH>[:<MM>[:<SS>]] [am|pm]]]

Parameters

Parameter Description
`[:[:[.]]] [am pm]` Sets the system time to the new time specified, where HH is in hours (required), MM is in minutes, and SS is in seconds. NN can be used to specify hundredths of a second. You must separate values for HH, MM, and SS with colons (:). SS and NN must be separated with a period (.).

If am or pm isn't specified, time uses the 24-hour format by default.

/t Displays the current time without prompting you for a new time.
/? Displays help at the command prompt.

Remarks

Examples

If command extensions are enabled, to display the current system time, type:

time /t

To change the current system time to 5:30 PM, type either of the following:

time 17:30:00
time 5:30 pm

To display the current system time, followed by a prompt to enter a new time, type:

The current time is: 17:33:31.35
Enter the new time:

To keep the current time and return to the command prompt, press ENTER. To change the current time, type the new time and then press ENTER.

Additional References



title: timeout description: Reference article for the timeout command, which pauses the command processor for the specified number of seconds. ms.topic: reference ms.assetid: e26b4a84-0e30-46e1-aa10-0667b7d3cb4c ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

timeout

Pauses the command processor for the specified number of seconds. This command is typically used in batch files.

Syntax

timeout /t <timeoutinseconds> [/nobreak]

Parameters

Parameter Description
/t <timeoutinseconds> Specifies the decimal number of seconds (between -1 and 99999) to wait before the command processor continues processing. The value -1 causes the computer to wait indefinitely for a keystroke.
/nobreak Specifies to ignore user key strokes.
/? Displays help at the command prompt.

Remarks

Examples

To pause the command processor for ten seconds, type:

timeout /t 10

To pause the command processor for 100 seconds and ignore any keystroke, type:

timeout /t 100 /nobreak

To pause the command processor indefinitely until a key is pressed, type:

timeout /t -1

Additional References



title: telnet quit description: Reference article for the telnet quit command, which exits telnet. ms.topic: reference ms.assetid: a6e033f2-f0c2-404c-9cb4-abd1d7af0eea ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

telnet: quit

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Exits telnet.

Syntax

q[uit]

Examples

To exit telnet, type:

q

Additional References



title: telnet send description: Reference article for the telnet send command, which sends telnet commands to the telnet server. ms.topic: reference ms.assetid: 7c217abc-1182-466e-914c-1ff16755021b ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

telnet: send

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Sends telnet commands to the telnet server.

Syntax

sen {ao | ayt | brk | esc | ip | synch | <string>} [?]

Parameters

Parameter Description
ao Sends the telnet command Abort Output.
ayt Sends the telnet command Are You There?
brk Sends the telnet command brk.
esc Sends the current telnet escape character.
ip Sends the telnet command Interrupt Process.
synch Sends the telnet command synch.
<string> Sends whatever string you type to the telnet server.
? Displays help associated with this command.

Example

To send the Are you there? command to the telnet server, type:

sen ayt

Additional References



title: telnet display description: Reference article for the telnet display command, which displays operating parameters. ms.topic: reference ms.assetid: 9272086c-3aaa-405d-ac71-652f25e2eb34 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

telnet: display

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays operating parameters.

Syntax

d[isplay]

Examples

To display operating parameters, type:

d

Additional References



title: telnet description: Reference article for the telnet command, which communicates with a computer running the telnet server service. ms.topic: reference ms.assetid: b70a6156-9413-4300-84ce-a34c467e2b4e ms.author: jgerend author: JasonGerend ms.date: 6/21/2022

telnet

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Communicates with a computer running the telnet server service. Running this command without any parameters, lets you enter the telnet context, as indicated by the telnet prompt (Microsoft telnet>). From the telnet prompt, you can use telnet commands to manage the computer running the telnet client.

[!IMPORTANT] You must install the telnet client software before you can run this command. For more information, see Installing telnet.

Syntax

telnet [/a] [/e <escapechar>] [/f <filename>] [/l <username>] [/t {vt100 | vt52 | ansi | vtnt}] [<host> [<port>]] [/?]

Parameters

Parameter Description
/a Attempts automatic logon. Same as /l option, except that it uses the currently logged on user's name.
/e <escapechar> Specifies the escape character used to enter the telnet client prompt.
/f <filename> Specifies the file name used for client side logging.
/l <username> Specifies the user name to log on with on the remote computer.
/t `{vt100 vt52 ansi vtnt}` Specifies the terminal type. Supported terminal types are vt100, vt52, ansi, and vtnt.
<host> [<port>] Specifies the hostname or IP address of the remote computer to connect to, and optionally the TCP port to use (default is TCP port 23).
/? Displays help at the command prompt.

Examples

To use telnet to connect to the computer running the telnet Server Service at telnet.microsoft.com, type:

telnet telnet.microsoft.com

To use telnet to connect to the computer running the telnet Server Service at telnet.microsoft.com on TCP port 44 and to log the session activity in a local file called telnetlog.txt, type:

telnet /f telnetlog.txt telnet.microsoft.com 44

Additional References



title: tcmsetup description: Reference article for the tcmsetup command, which sets up and disables the TAPI client. ms.topic: reference ms.assetid: 15e0c10f-996f-4301-92e5-943f7ee8212d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

tcmsetup

Sets up or disables the TAPI client. For TAPI to function correctly, you must run this command to specify the remote servers that will be used by TAPI clients.

[!IMPORTANT] To use this command, you must be a member of the Administrators group on the local computer, or you must have been delegated the appropriate authority. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using Run as to perform this procedure.

Syntax

tcmsetup [/q] [/x] /c <server1> [<server2> …]
tcmsetup  [/q] /c /d

Parameters

Parameter Description
/q Prevents the display of message boxes.
/x Specifies that connection-oriented callbacks will be used for heavy traffic networks where packet loss is high. When this parameter is omitted, connectionless callbacks will be used.
/c Required. Specifies client setup.
<server1> Required. Specifies the name of the remote server that has the TAPI service providers that the client will use. The client will use the service providers' lines and phones. The client must be in the same domain as the server or in a domain that has a two-way trust relationship with the domain that contains the server.
<server2>… Specifies any additional server or servers that will be available to this client. If you specify a list of servers is, use a space to separate the server names.
/d Clears the list of remote servers. Disables the TAPI client by preventing it from using the TAPI service providers that are on the remote servers.
/? Displays help at the command prompt.

Remarks

Additional References



title: taskkill description: Reference article for the taskkill command, which ends one or more tasks or processes. ms.topic: reference ms.assetid: 2b71e792-08b6-46d4-95a5-cb6336a79524 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

taskkill

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Ends one or more tasks or processes. Processes can be ended by process ID or image name. You can use the tasklist command command to determine the process ID (PID) for the process to be ended.

[!NOTE] This command replaces the kill tool.

Syntax

taskkill [/s <computer> [/u [<domain>\]<username> [/p [<password>]]]] {[/fi <filter>] [...] [/pid <processID> | /im <imagename>]} [/f] [/t]

Parameters

Parameter Description
/s <computer> Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer.
/u <domain>\<username> Runs the command with the account permissions of the user who is specified by <username> or by <domain>\<username>. The /u parameter can be specified only if /s is also specified. The default is the permissions of the user who is currently logged on to the computer that is issuing the command.
/p <password> Specifies the password of the user account that is specified in the /u parameter.
/fi <filter> Applies a filter to select a set of tasks. You can use more than one filter or use the wildcard character (*) to specify all tasks or image names. The valid filters are listed in the Filter names, operators, and values section of this article.
/pid <processID> Specifies the process ID of the process to be terminated.
/im <imagename> Specifies the image name of the process to be terminated. Use the wildcard character (*) to specify all image names.
/f Specifies that processes be forcefully ended. This parameter is ignored for remote processes; all remote processes are forcefully ended.
/t Ends the specified process and any child processes started by it.

Filter names, operators, and values

Filter Name Valid Operators Valid Value(s)
STATUS eq, ne `RUNNING NOT RESPONDING UNKNOWN`
IMAGENAME eq, ne Image name
PID eq, ne, gt, lt, ge, le PID value
SESSION eq, ne, gt, lt, ge, le Session number
CPUtime eq, ne, gt, lt, ge, le CPU time in the format HH:MM:SS, where MM and SS are between 0 and 59 and HH is any unsigned number
MEMUSAGE eq, ne, gt, lt, ge, le Memory usage in KB
USERNAME eq, ne Any valid user name (<user> or <domain\user>)
SERVICES eq, ne Service name
WINDOWTITLE eq, ne Window title
MODULES eq, ne DLL name

Remarks

Examples

To end the processes with process IDs 1230, 1241, and 1253, type:

taskkill /pid 1230 /pid 1241 /pid 1253

To forcefully end the process Notepad.exe if it was started by the system, type:

taskkill /f /fi "USERNAME eq NT AUTHORITY\SYSTEM" /im notepad.exe

To end all processes on the remote computer Srvmain with an image name beginning with note, while using the credentials for the user account Hiropln, type:

taskkill /s srvmain /u maindom\hiropln /p p@ssW23 /fi "IMAGENAME eq note*" /im *

To end the process with the process ID 2134 and any child processes that it started, but only if those processes were started by the Administrator account, type:

taskkill /pid 2134 /t /fi "username eq administrator"

To end all processes that have a process ID greater than or equal to 1000, regardless of their image names, type:

taskkill /f /fi "PID ge 1000" /im *

Additional References



title: tapicfg removescp description: Reference article for the tapicfg removescp command, which removes a service connection point for a TAPI application directory partition. ms.topic: reference ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 09/29/2020

tapicfg removescp

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Removes a service connection point for a TAPI application directory partition.

Syntax

tapicfg removescp /directory:<partitionname> [/domain:<domainname>]

Parameters

Parameter Description
removescp /directory:<partitionname> Required. Specifies the DNS name of the TAPI application directory partition for which a service connection point is removed.
/domain: <domainname> Specifies the DNS name of the domain from which the service connection point is removed. If the domain name isn't specified, the name of the local domain is used.
/? Displays help at the command prompt.

Remarks

Additional References



title: tapicfg makedefault description: Reference article for the tapicfg makedefault command, which sets the default TAPI application directory partition for the domain. ms.topic: reference ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 09/29/2020

tapicfg makedefault

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Sets the default TAPI application directory partition for the domain.

Syntax

tapicfg makedefault /directory:<partitionname> [/domain:<domainname>]

Parameters

Parameter Description
makedefault /directory:<partitionname> Required. Specifies the DNS name of the TAPI application directory partition set as the default partition for the domain. This name must be a fully-qualified domain name.
/domain: <domainname> Specifies the DNS name of the domain for which the TAPI application directory partition is set as the default. If the domain name is not specified, the name of the local domain is used.
/? Displays help at the command prompt.

Remarks

Additional References



title: tapicfg publishscp description: Reference article for the tapicfg publishscp command, which creates a service connection point to publish a TAPI application directory partition. ms.topic: reference ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 09/29/2020

tapicfg publishscp

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates a service connection point to publish a TAPI application directory partition.

Syntax

tapicfg publishscp /directory:<partitionname> [/domain:<domainname>] [/forcedefault]

Parameters

Parameter Description
publishscp /directory:<partitionname> Required. Specifies the DNS name of the TAPI application directory partition that the service connection point will publish.
/domain: <domainname> Specifies the DNS name of the domain in which the service connection point is created. If the domain name is not specified, the name of the local domain is used.
/forcedefault Specifies that this directory is the default TAPI application directory partition for the domain. There can be multiple TAPI application directory partitions in a domain.
/? Displays help at the command prompt.

Remarks

Additional References



title: tapicfg install description: Reference article for the tapicfg install command, which creates a TAPI application directory partition. ms.topic: reference ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 09/29/2020

tapicfg install

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates a TAPI application directory partition.

[!IMPORTANT] You must be a member of the Enterprise Admins group in active directory to run this command.

Syntax

tapicfg install /directory:<partitionname> [/server:<DCname>] [/forcedefault]

Parameters

Parameter Description
install /directory:<partitionname> Required. Specifies the DNS name of the TAPI application directory partition to be created. This name must be a fully-qualified domain name.
/server: <DCname> Specifies the DNS name of the domain controller on which the TAPI application directory partition is created. If the domain controller name isn't specified, the name of the local computer is used.
/forcedefault Specifies that this directory is the default TAPI application directory partition for the domain. There can be multiple TAPI application directory partitions in a domain.

if this directory is the first TAPI application directory partition created on the domain, it's automatically set as the default, regardless of whether you use the /forcedefault option.

/? Displays help at the command prompt.

Remarks

Examples

To create a TAPI application directory partition named tapifiction.testdom.microsoft.com on a server named testdc.testdom.microsoft.com, and then set it as the default TAPI application directory partition for the new domain, type:

tapicfg install /directory:tapifiction.testdom.microsoft.com /server:testdc.testdom.microsoft.com /forcedefault

Additional References



title: sysocmgr description: Reference article for the sysocmgr command. This command has been deprecated and is not guaranteed to be supported in future releases of Windows. ms.topic: reference ms.assetid: 9ab50021-7433-4fac-92be-f164b2c7453a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

sysocmgr

The sysocmger command has been deprecated and isn't guaranteed to be supported in future releases of Windows.



title: systeminfo description: Reference article for the systeminfo command, which displays detailed configuration information about a computer and its operating system, including operating system configuration, security information, product ID, and hardware properties (such as RAM, disk space, and network cards). ms.topic: reference ms.assetid: 39954968-3c2e-4d3e-9d89-c9c43347461e ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

systeminfo

Displays detailed configuration information about a computer and its operating system, including operating system configuration, security information, product ID, and hardware properties (such as RAM, disk space, and network cards).

Syntax

systeminfo [/s <computer> [/u <domain>\<username> [/p <password>]]] [/fo {TABLE | LIST | CSV}] [/nh]

Parameters

Parameter Description
/s <computer> Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer.
/u <domain>\<username> Runs the command with the account permissions of the specified user account. If /u is not specified, this command uses the permissions of the user who is currently logged on to the computer that is issuing the command.
/p <password> Specifies the password of the user account that is specified in the /u parameter.
/fo <format> Specifies the output format with one of the following values:
  • TABLE - Displays output in a table.
  • LIST - Displays output in a list.
  • CSV - Displays output in comma-separated values (.csv) format.
/nh Suppresses column headers in the output. Valid when the /fo parameter is set to TABLE or CSV.
/? Displays help at the command prompt.

Examples

To view configuration information for a computer named Srvmain, type:

systeminfo /s srvmain

To remotely view configuration information for a computer named Srvmain2 that is located on the Maindom domain, type:

systeminfo /s srvmain2 /u maindom\hiropln

To remotely view configuration information (in list format) for a computer named Srvmain2 that is located on the Maindom domain, type:

systeminfo /s srvmain2 /u maindom\hiropln /p p@ssW23 /fo list

Additional References



title: sort description: Reference article for the sort command, which reads input, sorts data, and writes the results to the screen, to a file, or to another device. ms.topic: reference ms.assetid: 77116469-4790-4442-8a21-9fa73b65ef9f ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 01/07/2022

sort

Reads input, sorts data, and writes the results to the screen, to a file, or to another device.

Syntax

sort [/r] [/+<N>] [/m <kilobytes>] [/l <locale>] [/rec <characters>] [[<drive1>:][<path1>]<filename1>] [/t [<drive2>:][<path2>]] [/o [<drive3>:][<path3>]<filename3>]

Parameters

Parameter Description
/r Reverses the sort order (that is, sorts from Z to A and from 9 to 0).
/+<N> Specifies the character position number where sort will begin each comparison. N can be any valid integer.
/m <kilobytes> Specifies the amount of main memory to use for the sort in kilobytes (KB).
/l <locale> Overrides the sort order of characters that are defined by the system default locale (that is, the language and Country/Region selected during installation).
/rec <characters> Specifies the maximum number of characters in a record or a line of the input file (the default value is 4,096 and the maximum is 65,535).
[<drive1>:][<path1>]<filename1> Specifies the file to be sorted. If no file name is specified, the standard input is sorted. Specifying the input file is faster than redirecting the same file as standard input.
/t [<drive2>:][<path2>] Specifies the path of the directory to hold the sort command's working storage if the data does not fit in the main memory. By default, the system temporary directory is used.
/o [<drive3>:][<path3>]<filename3> Specifies the file where the sorted input is to be stored. If not specified, the data is written to the standard output. Specifying the output file is faster than redirecting standard output to the same file.
/unique Only returns unique results.
/? Displays help at the command prompt.

Remarks

Examples

Additional References



title: set option description: Reference article for the set option command, which sets the options for shadow copy creation. ms.topic: reference ms.assetid: 4d8d4921-9fdd-4a3c-bb0f-9df5458c4b84 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

set option

Sets the options for shadow copy creation. If used without parameters, set option displays help at the command prompt.

Syntax

set option {[differential | plex] [transportable] [[rollbackrecover] [txfrecover] | [noautorecover]]}

Parameters

Parameter Description
[differential] Specifies to create a point-in-time snapshot of specified volumes.
[plex] Specifies to create a point-in-time clone copy of the data on a specified volume.
[transportable] Specifies that the shadow copy is not to be imported yet. The metadata .cab file can later be used to import the shadow copy to the same or a different computer.
[rollbackrecover] Signals writers to use autorecover during the PostSnapshot event. This is useful if the shadow copy will be used for rollback (for example, with data mining).
[txfrecover] Requests VSS to make the shadow copy transactionally consistent during creation.
[noautorecover] Stops writers and the file system from performing any recovery changes to the shadow copy to a transactionally consistent state. Noautorecover can't be used with txfrecover or rollbackrecover.

Additional References



title: set description: Reference article for set, which displays, sets, or removes cmd.exe environment variables. ms.topic: reference ms.assetid: 5fdd60d6-addf-4574-8c92-8aa53fa73d76 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

set (environment variable)

Displays, sets, or removes cmd.exe environment variables. If used without parameters, set displays the current environment variable settings.

[!NOTE] This command requires command extensions, which are enabled by default.

The set command can also run from the Windows Recovery Console, using different parameters. For more information, see Windows Recovery Environment (WinRE).

Syntax

set [<variable>=[<string>]]
set [/p] <variable>=[<promptString>]
set /a <variable>=<expression>

Parameters

Parameter Description
<variable> Specifies the environment variable to set or modify.
<string> Specifies the string to associate with the specified environment variable.
/p Sets the value of <variable> to a line of input entered by the user.
<promptstring> Specifies a message to prompt the user for input. This parameter must be used with the /p parameter.
/a Sets <string> to a numerical expression that is evaluated.
<expression> Specifies a numerical expression.
/? Displays help at the command prompt.

Remarks

| Operator | Operation performed | |--|--| | ( ) | Grouping | | ! ~ - | Unary | | * / % | Arithmetic | | + - | Arithmetic | | << >> | Logical shift | | & | Bitwise AND | | ^ | Bitwise exclusive OR | | = *= /= %= += -= &= ^= | = <<= >>= | | , | Expression separator |

Examples

To set the value TEST1 for the environment variable named testVar, type:

set testVar=test^^1

The set command assigns everything that follows the equal sign (=) to the value of the variable. Therefore, if you type set testVar=test^1, you'll get the following result, testVar=test1.

To set the value TEST&1 for the environment variable testVar, type:

set testVar=test^&1

To set an environment variable named INCLUDE so the string c:\directory is associated with it, type:

set include=c:\directory

You can then use the string c:\directory in batch files by enclosing the name INCLUDE with percent signs (%). For example, you can use dir %include% in a batch file to display the contents of the directory associated with the INCLUDE environment variable. After this command is processed, the string c:\directory replaces %include%.

To use the set command in a batch program to add a new directory to the PATH environment variable, type:

@echo off
rem ADDPATH.BAT adds a new directory
rem to the path environment variable.
set path=%1;%path%
set

To display a list of all of the environment variables that begin with the letter P, type:

set p

Additional References



title: Set context description: Reference article for the set context command, which sets the context for shadow copy creation. ms.topic: reference ms.assetid: fc16c7dd-e8f0-4c2a-8742-0bddb2848bfd ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

Set context

Sets the context for shadow copy creation. If used without parameters, set context displays help at the command prompt.

Syntax

set context {clientaccessible | persistent [nowriters] | volatile [nowriters]}

Parameters

Parameter Description
clientaccessible Specifies that the shadow copy is usable by client versions of Windows. This context is persistent by default.
persistent Specifies that the shadow copy persists across program exit, reset, or restart.
volatile Deletes the shadow copy on exit or reset.
nowriters Specifies that all writers are excluded.

Examples

To prevent shadow copies from being deleted when you exit DiskShadow, type:

set context persistent

Additional References



title: Services for Network File System (NFS) command-line tools description: Reference article about Services for Network File System (NFS) command-line tools ms.topic: reference ms.assetid: 06c81f88-a672-4405-9b73-085f8933114c ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

Services for Network File System command-line tools

Services for Network File System (NFS) provides a file sharing solution that lets you transfer files between computers running Windows Server and UNIX operating systems using the NFS protocol.

Information and links to each of the associated NFS command-line tools:

Command Description
mapadmin Manage User Name Mapping for Microsoft Services for Network File System.
mount Mount Network File System (NFS) network shares.
nfsadmin Manage Server for NFS and Client for NFS.
nfsshare Control Network File System (NFS) shares.
nfsstat Display or reset counts of calls made to Server for NFS.
rpcinfo List programs on remote computers.
showmount Display mounted directories.

Additional References



title: serverweroptin description: Reference article for the serverweroptin command, which allows you to turn on error reporting. ms.topic: reference ms.assetid: f3c0b0af-cafb-4f09-8b36-5a357ddf392d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

serverweroptin

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Allows you to turn on error reporting.

Syntax

serverweroptin [/query] [/detailed] [/summary]

Parameters

Parameter Description
/query Verifies your current setting.
/detailed Specifies to send detailed reports automatically.
/summary Specifies to send summary reports automatically.
/? Displays help at the command prompt.

Examples

To verify the current setting, type:

serverweroptin /query

To automatically send detailed reports, type:

serverweroptin /detailed

To automatically send summary reports, type:

serverweroptin /summary

Additional References



title: select vdisk description: Reference article for the select vdisk command, which selects the specified virtual hard disk (VHD) and shifts the focus to it. ms.topic: reference ms.assetid: 8808872a-3523-4205-a6c6-83fa738ee37a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

select vdisk

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Selects the specified virtual hard disk (VHD) and shifts the focus to it.

Syntax

select vdisk file=<full path> [noerr]

Parameters

Parameter Description
file=<full path> Specifies the full path and file name of an existing VHD file.
noerr Used for scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To shift the focus to the VHD named c:\test\test.vhd, type:

select vdisk file=c:\test\test.vhd

Additional References



title: select volume description: Reference article for the select volume command, which selects the specified volume and shifts the focus to it. ms.topic: reference ms.assetid: 5d70d776-80ad-4f20-8288-a7997fb1df28 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

select volume

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Selects the specified volume and shifts the focus to it. This command can also be used to display the volume that currently has the focus in the selected disk.

Syntax

select volume={<n>|<d>}

Parameters

Parameter Description
<n> The number of the volume to receive the focus. You can view the numbers for all volumes on the disk currently selected by using the list volume command in DiskPart.
<d> The drive letter or mount point path of the volume to receive the focus.

Remarks

Examples

To shift the focus to volume 2, type:

select volume=2

To shift the focus to Drive C, type:

select volume=c

To shift the focus to the volume mounted on a folder named c:\mountpath, type:

select volume=c:\mountpath

To display the volume that currently has the focus in the selected disk, type:

select volume

Additional References



title: select disk description: Reference article for the select disk command, which selects the specified disk and then shifts focus to it. ms.topic: reference ms.assetid: a0da614b-09d9-433b-b4eb-9127f84431cb ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

select disk

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Selects the specified disk and shifts the focus to it.

Syntax

select disk={<n>|<disk path>|system|next}

Parameters

Parameter Description
<n> Specifies the number of the disk to receive focus. You can view the numbers for all the disks on the computer by using the list disk command in DiskPart.

NOTE
When configuring systems with multiple disks, don't use select disk=0 to specify the system disk. The computer may reassign disk numbers when you reboot, and different computers with the same disk configuration can have different disk numbers.

<disk path> Specifies the location of the disk to receive focus, for example, PCIROOT(0)#PCI(0F02)#atA(C00T00L00). To view the location path of a disk, select it and then type detail disk.
system On BIOS computers, this option specifies that disk 0 receives focus. On EFI computers, the disk containing the EFI system partition (ESP), used for the current boot, receives focus. On EFI computers, the command will fail if there's no ESP, if there's more than one ESP, or if the computer is booted from Windows Preinstallation Environment (Windows PE).
next After a disk is selected, this option iterates over all disks in the disk list. When you run this option, the next disk in the list receives focus.

Examples

To shift the focus to disk 1, type:

select disk=1

To select a disk by using its location path, type:

select disk=PCIROOT(0)#PCI(0100)#atA(C00T00L01)

To shift the focus to the system disk, type:

select disk=system

To shift the focus to the next disk on the computer, type:

select disk=next

Additional References



title: scwcmd transform description: Reference article for the scwcmd transform command, which transforms a security policy file generated by using the Security Configuration Wizard (SCW) into a new Group Policy Object (GPO) in Active Directory Domain Services. ms.topic: reference ms.assetid: 640dd892-0bb9-416d-8318-60a26605bcf4 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

scwcmd transform

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2012 R2 and Windows Server 2012

Transforms a security policy file generated by using the Security Configuration Wizard (SCW) into a new Group Policy Object (GPO) in Active Directory Domain Services. The transform operation does not change any settings on the server where it is performed. After the transform operation has completed, an administrator must link the GPO to the desired OUs to deploy the policy to servers.

[!IMPORTANT] Domain administrator credentials are needed to complete the transform operation.

Internet Information Services (IIS) security policy settings can't be deployed by using Group Policy.

Firewall policies that list approved apps shouldn't be deployed to servers unless the Windows Firewall service started automatically when the server was last started.

Syntax

scwcmd transform /p:<policyfile.xml> /g:<GPOdisplayname>

Parameters

Parameter Description
/p:<policyfile.xml> Specifies the path and file name of the .xml policy file that should be applied. This parameter must be specified.
/g:<GPOdisplayname> Specifies the display name of the GPO. This parameter must be specified.
/? Displays help at the command prompt.

Examples

To create a GPO named FileServerSecurity from a file named FileServerPolicy.xml, type:

scwcmd transform /p:FileServerPolicy.xml /g:FileServerSecurity

Additional References



title: sc.exe create description: Reference article for the sc.exe create command, which creates a subkey and entries for a service in the registry and in the Service Control Manager database. ms.topic: reference ms.assetid: 59416460-0661-4fef-85cc-73e9d8f4beb4 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

sc.exe create

Creates a subkey and entries for a service in the registry and in the Service Control Manager database.

Syntax

sc.exe [<servername>] create [<servicename>] [type= {own | share | kernel | filesys | rec | interact type= {own | share}}] [start= {boot | system | auto | demand | disabled | delayed-auto}] [error= {normal | severe | critical | ignore}] [binpath= <binarypathname>] [group= <loadordergroup>] [tag= {yes | no}] [depend= <dependencies>] [obj= {<accountname> | <objectname>}] [displayname= <displayname>] [password= <password>]

Parameters

Parameter Description
<servername> Specifies the name of the remote server on which the service is located. The name must use the Universal Naming Convention (UNC) format (for example, \myserver). To run SC.exe locally, don't use this parameter.
<servicename> Specifies the service name returned by the getkeyname operation.
`type= {own share kernel filesys rec interact type= {own share}}` Specifies the service type. The options include:
  • own - Specifies a service that runs in its own process. It doesn't share an executable file with other services. This is the default value.
  • share - Specifies a service that runs as a shared process. It shares an executable file with other services.
  • kernel - Specifies a driver.
  • filesys - Specifies a file system driver.
  • rec - Specifies a file system-recognized driver that identifies file systems used on the computer.
  • interact - Specifies a service that can interact with the desktop, receiving input from users. Interactive services must be run under the LocalSystem account. This type must be used in conjunction with type= own or type= shared (for example, type= interact type= own). Using type= interact by itself will generate an error.
`start= {boot system auto demand disabled delayed-auto}` Specifies the start type for the service. The options include:
  • boot - Specifies a device driver that is loaded by the boot loader.
  • system - Specifies a device driver that is started during kernel initialization.
  • auto - Specifies a service that automatically starts each time the computer is restarted and runs even if no one logs on to the computer.
  • demand - Specifies a service that must be started manually. This is the default value if start= is not specified.
  • disabled - Specifies a service that cannot be started. To start a disabled service, change the start type to some other value.
  • delayed-auto - Specifies a service that starts automatically a short time after other auto services are started.
`error= {normal severe critical ignore}` Specifies the severity of the error if the service fails to start when the computer is started. The options include:
  • normal - Specifies that the error is logged and a message box is displayed, informing the user that a service has failed to start. Startup will continue. This is the default setting.
  • severe - Specifies that the error is logged (if possible). The computer attempts to restart with the last-known good configuration. This could result in the computer being able to restart, but the service may still be unable to run.
  • critical - Specifies that the error is logged (if possible). The computer attempts to restart with the last-known good configuration. If the last-known good configuration fails, startup also fails, and the boot process halts with a Stop error.
  • ignore - Specifies that the error is logged and startup continues. No notification is given to the user beyond recording the error in the Event Log.
binpath= <binarypathname> Specifies a path to the service binary file. There is no default for binpath=, and this string must be supplied.
group= <loadordergroup> Specifies the name of the group of which this service is a member. The list of groups is stored in the registry, in the HKLM\System\CurrentControlSet\Control\ServiceGroupOrder subkey. The default value is null.
`tag= {yes no}` Specifies whether or not to obtain a TagID from the CreateService call. Tags are used only for boot-start and system-start drivers.
depend= <dependencies> Specifies the names of services or groups that must start before this service. The names are separated by forward slashes (/).
`obj= { }` Specifies a name of an account in which a service will run, or specifies a name of the Windows driver object in which the driver will run. The default setting is LocalSystem.
displayname= <displayname> Specifies a friendly name for identifying the service in user interface programs. For example, the subkey name of one particular service is wuauserv, which has a more friendly display name of Automatic Updates.
password= <password> Specifies a password. This is required if an account other than the LocalSystem account is used.
/? Displays help at the command prompt.

Remarks

Examples

To create and register a new binary path for the NewService service, type:

sc.exe \\myserver create NewService binpath= c:\windows\system32\NewServ.exe
sc.exe create NewService binpath= c:\windows\system32\NewServ.exe type= share start= auto depend= +TDI NetBIOS

Additional References



title: reset description: Reference article for the reset command, which resets DiskShadow.exe to the default state. ms.topic: reference ms.assetid: afbdab44-199c-4e11-884f-e96804965c21 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

reset

Resets DiskShadow.exe to the default state. This command is especially useful in separating compound DiskShadow operations, such as create, import, backup, or restore.

[!IMPORTANT After you run this command, you will lose state information from commands, such as add, set, load, or writer. This command also releases IVssBackupComponent interfaces and loses non-persistent shadow copies.

Syntax

reset

Additional References



title: remove description: Reference article for the remove command, which removes a drive letter or mount point from a volume. ms.topic: reference ms.assetid: b0886140-da8b-4231-8cb2-f280874d99c0 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

remove

Removes a drive letter or mount point from the volume with focus. If the all parameter is used, all current drive letters and mount points are removed. If no drive letter or mount point is specified, then DiskPart removes the first drive letter or mount point it encounters.

The remove command can also be used to change the drive letter associated with a removable drive. You can't remove the drive letters on system, boot, or paging volumes. In addition, you can't remove the drive letter for an OEM partition, any GPT partition with an unrecognized GUID, or any of the special, non-data, GPT partitions such as the EFI system partition.

[!NOTE] A volume must be selected for the remove command to succeed. Use the select volume command to select a disk and shift the focus to it.

Syntax

remove [{letter=<drive> | mount=<path> [all]}] [noerr]

Parameters

Parameter Description
letter=<drive> The drive letter to remove.
mount=<path> The mount point path to remove.
all Removes all current drive letters and mount points.
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To remove the d: drive, type:

remove letter=d

Additional References



title: telnet status description: Reference article for the telnet status command, which displays status information. ms.topic: reference ms.assetid: 4e819f11-3dc4-44d1-957b-1bcecf9fc1fc ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

telnet: status

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays status information.

Syntax

st[atus]

Example

To display status information, type:

st

Additional References



title: compact vdisk description: Reference article for the compact vdisk command, which reduces the physical size of a dynamically expanding virtual hard disk (VHD) file. ms.topic: reference ms.assetid: 40ca0820-67de-4160-b62a-e9bf63fe2790 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

compact vdisk

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Reduces the physical size of a dynamically expanding virtual hard disk (VHD) file. This parameter is useful because dynamically expanding VHDs increase in size as you add files, but they do not automatically reduce in size when you delete files.

Syntax

compact vdisk

Remarks

Additional References



title: cmstp description: Reference article for cmstp, which installs or removes a Connection Manager service profile. ms.topic: reference ms.assetid: 34aad544-11c3-4e85-8bbf-5bc5a971da93 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

cmstp

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Installs or removes a Connection Manager service profile. Used without optional parameters, cmstp installs a service profile with default settings appropriate to the operating system and to the user's permissions.

Syntax

Syntax 1 - This is the typical syntax used in a custom installation application. To use this syntax, you must run cmstp from the directory that contains the <serviceprofilefilename>.exe file.

<serviceprofilefilename>.exe /q:a /c:cmstp.exe <serviceprofilefilename>.inf [/nf] [/s] [/u]

Syntax 2

cmstp.exe [/nf] [/s] [/u] [drive:][path]serviceprofilefilename.inf

Parameters

Parameter Description
<serviceprofilefilename>.exe Specifies, by name, the installation package that contains the profile that you want to install.

Required for Syntax 1, but not valid for Syntax 2.

/q:a Specifies that the profile should be installed without prompting the user. The verification message that the installation has succeeded will still appear.

Required for Syntax 1, but not valid for Syntax 2.

[drive:][path] <serviceprofilefilename>.inf Required. Specifies, by name, the configuration file that determines how the profile should be installed.

The [drive:][path] parameter isn't valid for Syntax 1.

/nf Specifies that the support files should not be installed.
/s Specifies that the service profile should be installed or uninstalled silently (without prompting for user response or displaying verification message). This is the only parameter that you can use in combination with /u.
/u Specifies that the service profile should be uninstalled.
/? Displays help at the command prompt.

Examples

To install the fiction service profile without any support files, type:

fiction.exe /c:cmstp.exe fiction.inf /nf

To silently install the fiction service profile for a single user, type:

fiction.exe /c:cmstp.exe fiction.inf /s /su

To silently uninstall the fiction service profile, type:

fiction.exe /c:cmstp.exe fiction.inf /s /u

Additional References



title: cls description: Reference article for the cls command, which clears the Command Prompt window. ms.topic: reference ms.assetid: ce9bf55c-bed4-47fb-8f79-a134202c4ed3 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

cls

Clears the Command Prompt window.

Syntax

cls

Parameters

Parameter Description
/? Displays help at the command prompt.

Examples

To clear all information that appears in the Command Prompt window and return to a blank window, type:

cls

Additional References



title: chgusr description: Reference article for the chgusr command, which changes the install mode for the Remote Desktop Session Host server. ms.topic: reference ms.assetid: f119d9d3-ed8b-42da-81f7-77591d908c83 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

chgusr

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Changes the install mode for the Remote Desktop Session Host server.

[!NOTE] This command has been replaced by the change user command. For more information, including the syntax and parameter details, see change user command.

Additional References



title: chkdsk description: Reference article for the chkdsk command, which checks the file system and file system metadata of a volume for logical and physical errors. ms.topic: reference ms.assetid: 62912a3c-d2cc-4ef6-9679-43709a286035 author: jasongerend ms.author: alalve ms.date: 10/04/2022

chkdsk

Checks the file system and file system metadata of a volume for logical and physical errors. If used without parameters, chkdsk displays only the status of the volume and does not fix any errors. If used with the /f, /r, /x, or /b parameters, it fixes errors on the volume.

[!IMPORTANT] Membership in the local Administrators group, or equivalent, is the minimum required to run chkdsk. To open a command prompt window as an administrator, right-click Command prompt in the Start menu, and then click Run as administrator.

[!IMPORTANT] Interrupting chkdsk is not recommended. However, canceling or interrupting chkdsk should not leave the volume any more corrupt than it was before chkdsk was run. Running chkdsk again checks and should repair any remaining corruption on the volume.

[!NOTE] Chkdsk can be used only for local disks. The command cannot be used with a local drive letter that has been redirected over the network.

Syntax

chkdsk [<volume>[[<path>]<filename>]] [/f] [/v] [/r] [/x] [/i] [/c] [/l[:<size>]] [/b]

Parameters

Parameter Description
<volume> Specifies the drive letter (followed by a colon), mount point, or volume name.
[ [<path>]<filename> Use with file allocation table (FAT) and FAT32 only. Specifies the location and name of a file or set of files that you want chkdsk to check for fragmentation. You can use the ? and * wildcard characters to specify multiple files.
/f Fixes errors on the disk. The disk must be locked. If chkdsk cannot lock the drive, a message appears that asks you if you want to check the drive the next time you restart the computer.
/v Displays the name of each file in every directory as the disk is checked.
/r Locates bad sectors and recovers readable information. The disk must be locked. /r includes the functionality of /f, with the additional analysis of physical disk errors.
/x Forces the volume to dismount first, if necessary. All open handles to the drive are invalidated. /x also includes the functionality of /f.
/i Use with NTFS only. Performs a less vigorous check of index entries, which reduces the amount of time required to run chkdsk.
/c Use with NTFS only. Does not check cycles within the folder structure, which reduces the amount of time required to run chkdsk.
/l[:<size>] Use with NTFS only. Changes the log file size to the size you type. If you omit the size parameter, /l displays the current size.
/b Use with NTFS only. Clears the list of bad clusters on the volume and rescans all allocated and free clusters for errors. /b includes the functionality of /r. Use this parameter after imaging a volume to a new hard disk drive.
/scan Use with NTFS only. Runs an online scan on the volume.
/forceofflinefix Use with NTFS only (must be used with /scan). Bypass all online repair; all defects found are queued for offline repair (for example, chkdsk /spotfix).
/perf Use with NTFS only (must be used with /scan). Uses more system resources to complete a scan as fast as possible. This may have a negative performance impact on other tasks running on the system.
/spotfix Use with NTFS only. Runs spot fixing on the volume.
/sdcleanup Use with NTFS only. Garbage collect unneeded security descriptor data (implies /f).
/offlinescanandfix Runs an offline scan and fix on the volume.
/freeorphanedchains Use with FAT/FAT32/exFAT only. Frees any orphaned cluster chains instead of recovering their contents.
/markclean Use with FAT/FAT32/exFAT only. Marks the volume clean if no corruption was detected, even if /f was not specified.
/? Displays help at the command prompt.

Remarks

  Chkdsk cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts? (Y/N)

Because repairs on FAT file systems usually change a disk's file allocation table and sometimes cause a loss of data, chkdsk might display a confirmation message similar to the following:

  10 lost allocation units found in 3 chains.
  Convert lost chains to files?

Understanding exit codes

The following table lists the exit codes that chkdsk reports after it has finished.

| Exit code | Description | | --------- | ----------- | | 0 | No errors were found. | | 1 | Errors were found and fixed. | | 2 | Performed disk cleanup (such as garbage collection) or did not perform cleanup because /f was not specified. | | 3 | Could not check the disk, errors could not be fixed, or errors were not fixed because /f was not specified. |

Examples

To check the disk in drive D and have Windows fix errors, type:

chkdsk d: /f

If it encounters errors, chkdsk pauses and displays messages. Chkdsk finishes by displaying a report that lists the status of the disk. You cannot open any files on the specified drive until chkdsk finishes.

To check all files on a FAT disk in the current directory for noncontiguous blocks, type:

chkdsk *.*

Chkdsk displays a status report, and then lists the files that match the file specifications that have noncontiguous blocks.

Viewing chkdsk logs

There are two methods that can be used to retrieve chkdsk log file(s) in Windows. View the methods described below:

Event Viewer

To view logs with Event Viewer, navigate to the following:

  1. Start > Control Panel > Administrative Tools > Event Viewer.

Alternatively, press Win + R keys to bring up the run dialog box, type eventvwr.msc, and select OK.

  1. Expand Windows Logs > right-click on Application > select Filter Current Log.
  2. Within the Filter Current Log window, navigate to Event sources drop-down menu, select Chkdsk and Winnit.
  3. Click OK to finish filtering for these two sources.

PowerShell

There are two source types when retrieving logs in PowerShell, chkdsk and winnit. Run one of the two commands in PowerShell to view the most current chkdsk log:

get-winevent -FilterHashTable @{logname="Application"} | ?{$_.providername -match "chkdsk"} | fl timecreated, message
get-winevent -FilterHashTable @{logname="Application"} | ?{$_.providername -match "winnit"} | fl timecreated, message

To export the log to a specific location, the following can be added to the end of the command | out-file "$env:userprofile\location\filename.txt". Example:

get-winevent -FilterHashTable @{logname="Application"} | ?{$_.providername -match "chkdsk"} | fl timecreated, message | out-file "C:\Users\Administrator\Desktop\Chkdsk_Log.txt"
get-winevent -FilterHashTable @{logname="Application"} | ?{$_.providername -match "winnit"} | fl timecreated, message | out-file "C:\Users\Administrator\Desktop\Chkdsk_Log.txt"

Additional References



title: chgport description: Reference article for the chgport command, which lists or changes the COM port mappings to be compatible with MS-DOS applications. ms.topic: reference ms.assetid: 8adb145f-6c53-4549-9253-9a966794a4f3 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

chgport

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Lists or changes the COM port mappings to be compatible with MS-DOS applications.

[!NOTE] This command has been replaced by the change port command. For more information, including the syntax and parameter details, see change port command.

Additional References



title: change logon description: Reference article for the change logon command, which enables or disables logons from client sessions, or displays current logon status. ms.topic: reference ms.assetid: 41466260-aee9-4333-bcb6-178112c22afd ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

change logon

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Enables or disables logons from client sessions, or displays current logon status. This utility is useful for system maintenance. You must be an administrator to run this command.

[!NOTE] To find out what's new in the latest version, see What's New in Remote Desktop Services in Windows Server.

Syntax

change logon {/query | /enable | /disable | /drain | /drainuntilrestart}

Parameters

Parameter Description
/query Displays the current logon status, whether enabled or disabled.
/enable Enables logons from client sessions, but not from the console.
/disable Disables subsequent logons from client sessions, but not from the console. Does not affect currently logged on users.
/drain Disables logons from new client sessions, but allows reconnections to existing sessions.
/drainuntilrestart Disables logons from new client sessions until the computer is restarted, but allows reconnections to existing sessions.
/? Displays help at the command prompt.

Remarks

Examples

  change logon /query

  change logon /enable

  change logon /disable

Additional References



title: change port description: Reference article for the change port command, which lists or changes the COM port mappings to be compatible with MS-DOS applications. ms.topic: article ms.assetid: 3d772c90-e849-4e74-b9ec-b6cae1159336 Lizap ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

change port

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Lists or changes the COM port mappings to be compatible with MS-DOS applications.

[!NOTE] To find out what's new in the latest version, see What's New in Remote Desktop Services in Windows Server.

Syntax

change port [<portX>=<portY>| /d <portX> | /query]

Parameters

Parameter Description
<portX>=<portY> Maps COM <portX> to <portY>
/d <portX> Deletes the mapping for COM <portX>
/query Displays the current port mappings.
/? Displays help at the command prompt.

Remarks

Examples

  change port com12=com1

  change port /query

Additional References



title: cacls description: Reference article for the cacls command. This command has been deprecated and isn't guaranteed to be supported in future releases of Windows. ms.topic: reference ms.assetid: b5bdbaaa-4557-48b8-80df-e75ee0d2f27d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

cacls

[!IMPORTANT] This command has been deprecated. Please use icacls instead.

Displays or modifies discretionary access control lists (DACL) on specified files.

Syntax

cacls <filename> [/t] [/m] [/l] [/s[:sddl]] [/e] [/c] [/g user:<perm>] [/r user [...]] [/p user:<perm> [...]] [/d user [...]]

Parameters

Parameter Description
<filename> Required. Displays ACLs of specified files.
/t Changes ACLs of specified files in the current directory and all subdirectories.
/m Changes ACLs of volumes mounted to a directory.
/l Works on the Symbolic Link itself instead of the target.
/s:sddl Replaces the ACLs with those specified in the SDDL string. This parameter is not valid for use with the /e, /g, /r, /p, or /d parameters.
/e Edit an ACL instead of replacing it.
/c Continue after access denied errors.
/g user:<perm> Grants specified user access rights, including these valid values for permission:
  • n - None
  • r - Read
  • w - Write
  • c - Change (write)
  • f - Full control
/r user [...] Revoke specified user's access rights. Only valid when used with the /e parameter.
[/p user:<perm> [...] Replace specified user's access rights, including these valid values for permission:
  • n - None
  • r - Read
  • w - Write
  • c - Change (write)
  • f - Full control
[/d user [...] Deny specified user access.
/? Displays help at the command prompt.

Sample output

Output Access control entry (ACE) applies to
OI Object inherit. This folder and files.
CI Container inherit. This folder and subfolders.
IO Inherit only. The ACE does not apply to the current file/directory.
No output message This folder only.
(OI)(CI) This folder, subfolders, and files.
(OI)(CI)(IO) Subfolders and files only.
(CI)(IO) Subfolders only.
(OI)(IO) Files only.

Remarks

Additional References



title: bootcfg rmsw description: Reference article for the bootcfg rmsw command, which removes operating system load options for a specified operating system entry. ms.topic: reference ms.assetid: fd7e4248-880e-4e2b-929e-87f8d44b9a63 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bootcfg rmsw

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Removes operating system load options for a specified operating system entry.

Syntax

bootcfg /rmsw [/s <computer> [/u <domain>\<user> /p <password>]] [/mm] [/bv] [/so] [/ng] /id <osentrylinenum>

Parameters

Parameter Description
/s <computer> Specifies the name or IP address of a remote computer (don't use backslashes). The default is the local computer.
/u <domain>\<user> Runs the command with the account permissions of the user specified by <user> or <domain>\<user>. The default is the permissions of the current logged on user on the computer issuing the command.
/p <password> Specifies the password of the user account that is specified in the /u parameter.
/mm Removes the /maxmem option and its associated maximum memory value from the specified <osentrylinenum>. The /maxmem option specifies the maximum amount of RAM that the operating system can use.
/bv Removes the /basevideo option from the specified <osentrylinenum>. The /basevideo option directs the operating system to use standard VGA mode for the installed video driver.
/so Removes the /sos option from the specified <osentrylinenum>. The /sos option directs the operating system to display device driver names while they are being loaded.
/ng Removes the /noguiboot option from the specified <osentrylinenum>. The /noguiboot option disables the progress bar that appears before the CTRL+ALT+DEL logon prompt.
/id <osentrylinenum> Specifies the operating system entry line number in the [operating systems] section of the Boot.ini file to which the operating system load options are added. The first line after the [operating systems] section header is 1.
/? Displays help at the command prompt.

Examples

To use the bootcfg /rmsw command:

bootcfg /rmsw /mm 64 /id 2
bootcfg /rmsw /so /id 3
bootcfg /rmsw /so /ng /s srvmain /u hiropln /id 2
bootcfg /rmsw /ng /id 2
bootcfg /rmsw /mm 96 /ng /s srvmain /u maindom\hiropln /p p@ssW23 /id 2

Additional References



title: bootcfg timeout description: Reference article for the bootcfg timeout command, which changes the operating system time-out value. ms.topic: reference ms.assetid: aa858eac-2bb7-4a27-a9bc-3e4a6eb8b2c6 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bootcfg timeout

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Changes the operating system time-out value.

Syntax

bootcfg /timeout <timeoutvalue> [/s <computer> [/u <domain>\<user> /p <password>]]

Parameters

Parameter Description
/timeout <timeoutvalue> Specifies the timeout value in the [boot loader] section. The <timeoutvalue> is the number of seconds the user has to select an operating system from the boot loader screen before NTLDR loads the default. The valid range for <timeoutvalue> is 0-999. If the value is 0, NTLDR immediately starts the default operating system without displaying the boot loader screen.
/s <computer> Specifies the name or IP address of a remote computer (don't use backslashes). The default is the local computer.
/u <domain>\<user> Runs the command with the account permissions of the user specified by <user> or <domain>\<user>. The default is the permissions of the current logged on user on the computer issuing the command.
/p <password> Specifies the password of the user account that is specified in the /u parameter.
/? Displays help at the command prompt.

Examples

To use the bootcfg /timeout command:

bootcfg /timeout 30
bootcfg /s srvmain /u maindom\hiropln /p p@ssW23 /timeout 50

Additional References



title: bootcfg raw description: Reference article for the bootcfg raw command, which adds operating system load options, specified as a string, to an operating system entry in the operating system section of the Boot.ini file. ms.topic: reference ms.assetid: e3458749-b0a0-460f-a022-3ff199a71f27 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bootcfg raw

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Adds operating system load options specified as a string to an operating system entry in the [operating systems] section of the Boot.ini file. This command overwrites any existing operating system entry options.

Syntax

bootcfg /raw [/s <computer> [/u <domain>\<user> /p <password>]] <osloadoptionsstring> [/id <osentrylinenum>] [/a]

Parameters

Parameter Description
/s <computer> Specifies the name or IP address of a remote computer (don't use backslashes). The default is the local computer.
/u <domain>\<user> Runs the command with the account permissions of the user specified by <user> or <domain>\<user>. The default is the permissions of the current logged on user on the computer issuing the command.
/p <password> Specifies the password of the user account that is specified in the /u parameter.
<osloadoptionsstring> Specifies the operating system load options to add to the operating system entry. These load options replace any existing load options associated with the operating system entry. There is no validation against the <osloadoptions> parameter.
/id <osentrylinenum> Specifies the operating system entry line number in the [operating systems] section of the Boot.ini file to which the operating system load options are added. The first line after the [operating systems] section header is 1.
/a Specifies which operating system options should be appended to any existing operating system options.
/? Displays help at the command prompt.

Examples

This text should contain valid OS Load Options such as /debug, /fastdetect, /nodebug, /baudrate, /crashdebug, and /sos.

To add /debug /fastdetect to the end of the first operating system entry, replacing any previous operating system entry options:

bootcfg /raw /debug /fastdetect /id 1

To use the bootcfg /raw command:

bootcfg /raw /debug /sos /id 2
bootcfg /raw /s srvmain /u maindom\hiropln /p p@ssW23 /crashdebug  /id 2

Additional References



title: bootcfg debug description: Reference article for the bootcfg debug command, which adds or changes the debug settings for a specified operating system entry. ms.topic: reference ms.assetid: 28afa5fb-a236-46e2-b1a4-a3c43a49c437 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bootcfg debug

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Adds or changes the debug settings for a specified operating system entry.

[!NOTE] If you're attempting to debug port 1394, use the bootcfg dbg1394 command instead.

Syntax

bootcfg /debug {on | off | edit}[/s <computer> [/u <domain>\<user> /p <password>]] [/port {COM1 | COM2 | COM3 | COM4}] [/baud {9600 | 19200 | 38400 | 57600 | 115200}] [/id <osentrylinenum>]

Parameters

Parameter Description
`{on off edit}` Specifies the value for port debugging, including:
  • on. Enables remote debugging support by adding the /debug option to the specified <osentrylinenum>.
  • off. Disables remote debugging support by removing the /debug option from the specified <osentrylinenum>.
  • edit. Allows changes to port and baud rate settings by changing the values associated with the /debug option for the specified <osentrylinenum>.
/s <computer> Specifies the name or IP address of a remote computer (don't use backslashes). The default is the local computer.
/u <domain>\<user> Runs the command with the account permissions of the user specified by <user> or <domain>\<user>. The default is the permissions of the current logged on user on the computer issuing the command.
/p <password> Specifies the password of the user account that is specified in the /u parameter.
`/port {COM1 COM2 COM3 COM4}` Specifies the COM port to be used for debugging. Don't use this parameter if debugging is disabled.
`/baud {9600 19200 38400 57600 115200}` Specifies the baud rate to be used for debugging. Don't use this parameter if debugging is disabled.
/id <osentrylinenum> Specifies the operating system entry line number in the [operating systems] section of the Boot.ini file to which the operating system load options are added. The first line after the [operating systems] section header is 1.
/? Displays help at the command prompt.

Examples

To use the bootcfg /debug command:

bootcfg /debug on /port com1 /id 2
bootcfg /debug edit /port com2 /baud 19200 /id 2
bootcfg /s srvmain /u maindom\hiropln /p p@ssW23 /debug off /id 2

Additional References



title: bootcfg addsw description: Reference article for the bootcfg addsw command, which adds operating system load options for a specified operating system entry. ms.topic: reference ms.assetid: d8389293-ecd9-42f0-b84b-b9ead4cf52e6 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bootcfg addsw

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Adds operating system load options for a specified operating system entry.

Syntax

bootcfg /addsw [/s <computer> [/u <domain>\<user> /p <password>]] [/mm <maximumram>] [/bv] [/so] [/ng] /id <osentrylinenum>

Parameters

Term Definition
/s <computer> Specifies the name or IP address of a remote computer (don't use backslashes). The default is the local computer.
/u <domain>\<user> Runs the command with the account permissions of the user specified by <user> or <domain>\<user>. The default is the permissions of the current logged on user on the computer issuing the command.
/p <password> Specifies the password of the user account that is specified in the /u parameter.
/mm <maximumram> Specifies the maximum amount of RAM, in megabytes, that the operating system can use. The value must be equal to or greater than 32 Megabytes.
/bv Adds the /basevideo option to the specified <osentrylinenum>, directing the operating system to use standard VGA mode for the installed video driver.
/so Adds the /sos option to the specified <osentrylinenum>, directing the operating system to display device driver names while they are being loaded.
/ng Adds the /noguiboot option to the specified <osentrylinenum>, disabling the progress bar that appears before the CTRL+ALT+DEL logon prompt.
/id <osentrylinenum> Specifies the operating system entry line number in the [operating systems] section of the Boot.ini file to which the operating system load options are added. The first line after the [operating systems] section header is 1.
/? Displays help at the command prompt.

Examples

To use the bootcfg /addsw command:

bootcfg /addsw /mm 64 /id 2
bootcfg /addsw /so /id 3
bootcfg /addsw /so /ng /s srvmain /u hiropln /id 2
bootcfg /addsw /ng /id 2
bootcfg /addsw /mm 96 /ng /s srvmain /u maindom\hiropln /p p@ssW23 /id 2

Additional References



title: bitsadmin util and repairservice description: Reference article for the bitsadmin util and repairservice command, which fixes known issues in various versions of BITS service. ms.topic: reference ms.assetid: 2ac7baeb-4340-4186-bfcb-66478195378d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin util and repairservice

If BITS fails to start, this switch attempts to resolve errors related to incorrect service configuration and dependencies on Windows services (such as LANManworkstation) and the network directory. This switch also generates output that indicates if the issues that were resolved.

[!NOTE] This command isn't supported by BITS 1.5 and earlier.

Syntax

bitsadmin /util /repairservice [/force]

Parameters

Parameter Description
/force Optional. Deletes and creates the service again.

[!NOTE] If BITS creates the service again, the service description string might be set to English even in a localized system.

Examples

To repair the BITS service configuration:

bitsadmin /util /repairservice

Additional References



title: bitsadmin util and getieproxy description: Reference article for the bitsadmin util and getieproxy command, which retrieves the proxy usage for the given service account. ms.topic: reference ms.assetid: 6d50c7e3-f4eb-4ca5-9f0c-4ed396087db6 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin util and getieproxy

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Retrieves the proxy usage for the given service account. This command shows the value for each proxy usage, not just the proxy usage you specified for the service account. For details about setting the proxy usage for specific service accounts, see the bitsadmin util and setieproxy command.

Syntax

bitsadmin /util /getieproxy <account> [/conn <connectionname>]

Parameters

Parameter Description
account Specifies the service account whose proxy settings you want to retrieve. Possible values include:
  • LOCALSYSTEM
  • NETWORKSERVICE
  • LOCALSERVICE.
connectionname Optional. Used with the /conn parameter to specify which modem connection to use. If you don't specify the /conn parameter, BITS uses the LAN connection.

Examples

To display the proxy usage for the NETWORK SERVICE account:

bitsadmin /util /getieproxy NETWORKSERVICE

Additional References



title: bitsadmin util and help description: Reference article for the bitsadmin util and help command, which displays the command-line usage for the /util switches. ms.topic: reference ms.assetid: 806e377a-3022-4764-b451-0aa4f754f195 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin util and help

Displays the command-line usage for the /util switches.

Syntax

bitsadmin /util /help

Examples

To display the command-line help for the /util switches:

bitsadmin /util /help

Additional References



title: bitsadmin transfer description: Reference article for the bitsadmin transfer command, which transfers one or more files. ms.topic: reference ms.assetid: fe302141-b33a-4a05-835e-dc4fc4db7d5a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin transfer

Transfers one or more files. By default, the BITSAdmin service creates a download job that runs at NORMAL priority and updates the command window with progress information until the transfer is complete or until a critical error occurs,

The service completes the job if it successfully transfers all the files and cancels the job if a critical error occurs. The service does not create the job if it is unable to add files to the job or if you specify an invalid value for type or job_priority. To transfer more than one file, specify multiple <RemoteFileName>-<LocalFileName> pairs. The pairs must be space-delimited.

[!NOTE] The BITSAdmin command continues to run if a transient error occurs. To end the command, press CTRL+C.

Syntax

bitsadmin /transfer <name> [<type>] [/priority <job_priority>] [/ACLflags <flags>] [/DYNAMIC] <remotefilename> <localfilename>

Parameters

Parameter Description
name The name of the job. This command can't be a GUID.
type Optional. Sets the type of job, including:
  • /DOWNLOAD. The default value. Choose this type for download jobs.
  • /UPLOAD. Choose this type for upload jobs.
priority Optional. Sets the priority of the job, including:
  • FOREGROUND
  • HIGH
  • NORMAL
  • LOW
ACLflags Optional. Indicates that you want to maintain the owner and ACL information with the file being downloaded. Specify one or more of the values, including:
  • o - Copy owner information with file.
  • g - Copy group information with file.
  • d - Copy discretionary access control list (DACL) information with file.
  • s - Copy system access control list (SACL) information with file.
/DYNAMIC Configures the job using BITS_JOB_PROPERTY_DYNAMIC_CONTENT, which relaxes the server-side requirements.
remotefilename The name of the file after it's transferred to the server.
localfilename The name of the file that resides locally.

Examples

To start a transfer job named myDownloadJob:

bitsadmin /transfer myDownloadJob http://prodserver/audio.wma c:\downloads\audio.wma

Additional References



title: bitsadmin setpriority description: Reference article for the bitsadmin setpriority command, which sets the priority of the specified job. ms.topic: reference ms.assetid: 90788363-01a2-4d7c-a560-a3eba45b5e9e ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin setpriority

Sets the priority of the specified job.

Syntax

bitsadmin /setpriority <job> <priority>

Parameters

Parameter Description
job The job's display name or GUID.
priority Sets the priority of the job, including:
  • FOREGROUND
  • HIGH
  • NORMAL
  • LOW

Examples

To set the priority for the job named myDownloadJob to normal:

bitsadmin /setpriority myDownloadJob NORMAL

Additional References



title: bitsadmin setnotifyflags description: Reference article for the bitsadmin setnotifyflags command, which sets the event notification flags for the specified job. ms.topic: reference ms.assetid: d5763d95-94a6-45ca-9e03-891c20047e06 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin setnotifyflags

Sets the event notification flags for the specified job.

Syntax

bitsadmin /setnotifyflags <job> <notifyflags>

Parameters

Parameter Description
job The job's display name or GUID.
notifyflags Can include one or more of the following notification flags, including:
  • 1. Generates an event when all files in the job have been transferred.
  • 2. Generates an event when an error occurs.
  • 3. Generates an event when all files have completed transfer or when an error occurs.
  • 4. Disables notifications.

Examples

To set the notification flags to generate an event when an error occurs, for a job named myDownloadJob:

bitsadmin /setnotifyflags myDownloadJob 2

Additional References



title: bitsadmin setnotifycmdline description: Reference article for the bitsadmin setnotifycmdline command, which sets the command-line command that will run when the job finishes transferring data, or when a job enters a state. ms.topic: reference ms.assetid: 415ae6ef-8549-48b2-9693-2368a6e24075 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin setnotifycmdline

Sets the command-line command that runs after the job finishes transferring data or after a job enters a specified state.

[!NOTE] This command isn't supported by BITS 1.2 and earlier.

Syntax

bitsadmin /setnotifycmdline <job> <program_name> [program_parameters]

Parameters

Parameter Description
job The job's display name or GUID.
program_name Name of the command to run when the job completes. You can set this value as NULL, but if you do, program_parameters must also be set to NULL.
program_parameters Parameters that you want to pass to program_name. You can set this value as NULL. If program_parameters isn't set to NULL, then the first parameter in program_parameters must match the program_name.

Examples

To run Notepad.exe at the completion of the job named myDownloadJob:

bitsadmin /setnotifycmdline myDownloadJob c:\winnt\system32\notepad.exe NULL

To show the EULA text in Notepad.exe, at the completion of the job named myDownloadJob:

bitsadmin /setnotifycmdline myDownloadJob c:\winnt\system32\notepad.exe notepad c:\eula.txt

Additional References



title: bitsadmin setmaxdownloadtime description: Reference article for the bitsadmin setmaxdownloadtime command, which sets the download timeout in seconds. ms.topic: reference ms.assetid: 16b96cf1-5738-415c-9b9d-c4ea8d5e4fec ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin setmaxdownloadtime

Sets the download timeout in seconds.

Syntax

bitsadmin /setmaxdownloadtime <job> <timeout>

Parameters

Parameter Description
job The job's display name or GUID.
timeout The length for the download timeout, in seconds.

Examples

To set the timeout for the job named myDownloadJob to 10 seconds.

bitsadmin /setmaxdownloadtime myDownloadJob 10

Additional References



title: bitsadmin setminretrydelay description: Reference article for the bitsadmin setminretrydelay command, which sets the minimum length of time, in seconds, that BITS waits after encountering a transient error before trying to transfer the file. ms.topic: reference ms.assetid: ce8674ca-6cc5-4bb2-8dda-7dfbb1cd6830 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin setminretrydelay

Sets the minimum length of time, in seconds, that BITS waits after encountering a transient error before trying to transfer the file.

Syntax

bitsadmin /setminretrydelay <job> <retrydelay>

Parameters

Parameter Description
job The job's display name or GUID.
retrydelay Minimum length of time for BITS to wait after an error during transfer, in seconds.

Examples

To set the minimum retry delay to 35 seconds for the job named myDownloadJob:

bitsadmin /setminretrydelay myDownloadJob 35

Additional References



title: bitsadmin sethelpertokenflags description: Reference article for the bitsadmin sethelpertokenflags command, which sets the usage flags for a helper token that is associated with a BITS transfer job. ms.topic: reference ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 03/01/2019

bitsadmin sethelpertokenflags

Sets the usage flags for a helper token that is associated with a BITS transfer job.

[!NOTE] This command isn't supported by BITS 3.0 and earlier.

Syntax

bitsadmin /sethelpertokenflags <job> <flags>

Parameters

Parameter Description
job The job's display name or GUID.
flags Possible helper token values, including:
  • 0x0001. Used to open the local file of an upload job, to create or rename the temporary file of a download job, or to create or rename the reply file of an upload-reply job.
  • 0x0002. Used to open the remote file of a Server Message Block (SMB) upload or download job, or in response to an HTTP server or proxy challenge for implicit NTLM or Kerberos credentials.
You must call /setcredentialsjob targetscheme null null to send the credentials over HTTP.

Additional References



title: bitsadmin sethelpertoken description: Reference article for the bitsadmin sethelpertoken command, which sets the current command prompt's primary token (or an arbitrary local user account's token, if specified) as a BITS transfer job's helper token. ms.topic: reference ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 03/01/2019

bitsadmin sethelpertoken

Sets the current command prompt's primary token (or an arbitrary local user account's token, if specified) as a BITS transfer job's helper token.

[!NOTE] This command isn't supported by BITS 3.0 and earlier.

Syntax

bitsadmin /sethelpertoken <job> [<user_name@domain> <password>]

Parameters

Parameter Description
job The job's display name or GUID.
<username@domain> <password> Optional. The local user account credentials for which token to use.

Additional References



title: bitsadmin setcustomheaders description: Reference article for the bitsadmin setcustomheaders command, which adds a custom HTTP header to a GET request. ms.topic: reference ms.assetid: ed926410-80d0-46ed-9a90-f752c164bb9a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin setcustomheaders

Add a custom HTTP header to a GET request sent to an HTTP server. For more information about GET requests, see Method Definitions and Header Field Definitions.

Syntax

bitsadmin /setcustomheaders <job> <header1> <header2> <...>

Parameters

Parameter Description
job The job's display name or GUID.
<header1> <header2> and so on The custom headers for the job.

Examples

To add a custom HTTP header for the job named myDownloadJob:

bitsadmin /setcustomheaders myDownloadJob accept-encoding:deflate/gzip

Additional References



title: bitsadmin setclientcertificatebyname description: Reference article for the bitsadmin setclientcertificatebyname command, which specifies the subject name of the client certificate to use for client authentication in an HTTPS (SSL) request. ms.topic: reference ms.assetid: f308a6d9-d0da-48be-ae41-eced14b3cccb ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin setclientcertificatebyname

Specifies the subject name of the client certificate to use for client authentication in an HTTPS (SSL) request.

Syntax

bitsadmin /setclientcertificatebyname <job> <store_location> <store_name> <subject_name>

Parameters

Parameter Description
job The job's display name or GUID.
store_location Identifies the location of a system store to use for looking up the certificate. Possible values include:
  • 1 (CURRENT_USER)
  • 2 (LOCAL_MACHINE)
  • 3 (CURRENT_SERVICE)
  • 4 (SERVICES)
  • 5 (USERS)
  • 6 (CURRENT_USER_GROUP_POLICY)
  • 7 (LOCAL_MACHINE_GROUP_POLICY)
  • 8 (LOCAL_MACHINE_ENTERPRISE)
store_name The name of the certificate store. Possible values include:
  • CA (Certification Authority certificates)
  • MY (Personal certificates)
  • ROOT (Root certificates)
  • SPC (Software Publisher Certificate)
subject_name Name of the certificate.

Examples

To specify the name of the client certificate myCertificate to use for client authentication in an HTTPS (SSL) request for the job named myDownloadJob:

bitsadmin /setclientcertificatebyname myDownloadJob 1 MY myCertificate

Additional References



title: bitsadmin reset description: Reference article for the bitsadmin reset command, which cancels all jobs in the transfer queue owned by the current user. ms.topic: reference ms.assetid: 0e4f9d1d-072c-493f-8d7a-f6d713c3ef29 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin reset

Cancels all jobs in the transfer queue owned by the current user. You can't reset jobs created by Local System. Instead, you must be an administrator and use the task scheduler to schedule this command as a task using the Local System credentials.

[!NOTE] If you have administrator privileges in BITSAdmin 1.5 and earlier, the /reset switch will cancel all the jobs in the queue. Additionally, the /allusers option isn't supported.

Syntax

bitsadmin /reset [/allusers]

Parameters

Parameter Description
/allusers Optional. Cancels all jobs in the queue owned by the current user. You must have administrator privileges to use this parameter.

Examples

To cancel all the jobs in the transfer queue for the current user.

bitsadmin /reset

Additional References



title: bitsadmin removecredentials description: Reference article for the bitsadmin removecredentials command, which removes credentials from a job. ms.topic: reference ms.assetid: 4a78ce9a-1feb-4811-a000-cce81287b22b ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin removecredentials

Removes credentials from a job.

[!NOTE] This command isn't supported by BITS 1.2 and earlier.

Syntax

bitsadmin /removecredentials <job> <target> <scheme>

Parameters

Parameter Description
job The job's display name or GUID.
target Use either SERVER or PROXY.
scheme Use one of the following:
  • BASIC. Authentication scheme where the user name and password are sent in clear-text to the server or proxy.
  • DIGEST. A challenge-response authentication scheme that uses a server-specified data string for the challenge.
  • NTLM. A challenge-response authentication scheme that uses the credentials of the user for authentication in a Windows network environment.
  • NEGOTIATE (also known as the Simple and Protected Negotiation protocol). A challenge-response authentication scheme that negotiates with the server or proxy to determine which scheme to use for authentication. Examples are the Kerberos protocol and NTLM.
  • PASSPORT. A centralized authentication service provided by Microsoft that offers a single logon for member sites.

Examples

To remove credentials from the job named myDownloadJob:

bitsadmin /removecredentials myDownloadJob SERVER BASIC

Additional References



title: bitsadmin replaceremoteprefix description: Reference article for the bitsadmin replaceremoteprefix command, which changes the remote URL for all files in the job from oldprefix to newprefix, as necessary. ms.topic: reference ms.assetid: d0e0abb1-bdb4-4c74-abbc-16c809f5fd81 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin replaceremoteprefix

Changes the remote URL for all files in the job from oldprefix to newprefix, as necessary.

Syntax

bitsadmin /replaceremoteprefix <job> <oldprefix> <newprefix>

Parameters

Parameter Description
job The job's display name or GUID.
oldprefix Existing URL prefix.
newprefix New URL prefix.

Examples

To change the remote URL for all files in job named myDownloadJob, from http://stageserver to http://prodserver.

bitsadmin /replaceremoteprefix myDownloadJob http://stageserver http://prodserver

Additional information



title: bitsadmin peers and discover description: Reference article for the bitsadmin peers and discover command, which discovers peers again. ms.topic: reference ms.assetid: 254fa0a3-4501-4272-a020-6ccdb3fcb29b ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin peers and discover

Discovers peers again.

Syntax

bitsadmin /peers /discover

Examples

To discover peers again:

bitsadmin /peers /discover

Additional References



title: bitsadmin peercaching and setconfigurationflags description: Reference article for the bitsadmin peercaching and setconfigurationflags command, which sets the configuration flags that determine if the computer can serve content to peers and if it can download content from peers. ms.topic: reference ms.assetid: ff0a2b49-66e3-4d40-824c-6a3816055d2e ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin peercaching and setconfigurationflags

Sets the configuration flags that determine if the computer can serve content to peers and if it can download content from peers.

Syntax

bitsadmin /peercaching /setconfigurationflags <job> <value>

Parameters

Parameter Description
job The job's display name or GUID.
value An unsigned integer with the following interpretation for the bits in the binary representation:
  • To allow the job's data to be downloaded from a peer, set the least significant bit.
  • To allow the job's data to be served to peers, set the second bit from the right.

Examples

To specify the job's data to be downloaded from peers for the job named myDownloadJob:

bitsadmin /peercaching /setconfigurationflags myDownloadJob 1

Additional References



title: bitsadmin peers description: Reference article for the bitsadmin peers command, which lists the /peers switches. ms.topic: reference ms.assetid: 5effbd52-993a-4657-b331-596c64deb8fb ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin peers

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Lists the available /peers switches.

Lists the available /peers switches.

bitsadmin /peers /help
bitsadmin /peers /discover
bitsadmin /peers /clear
bitsadmin /peers /list

Parameters

Parameter Description
bitsadmin peers and help Displays the command-line usage for the /peers switches.
bitsadmin peers and discover Discovers peers again.
bitsadmin peers and clear Clears the peers list.
bitsadmin peers and list Lists all peers.

Additional References



title: bitsadmin peercaching and help description: Reference article for bitsadmin peercaching and help, which displays the command-line usage for the /peercaching switches. ms.topic: reference ms.assetid: 2cb0fcc0-5464-47c9-b44d-dd32a4f0d907 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin peercaching and help

Displays the command-line usage for the /peercaching switches.

Syntax

bitsadmin /peercaching /help

Examples

To display the command-line help for the /peercaching switches:

bitsadmin /peercaching /help

Additional References



title: bitsadmin monitor description: Reference article for the bitsadmin monitor command, which monitors jobs in the transfer queue that are owned by the current user. ms.topic: reference ms.assetid: 2c424d27-e011-49c2-b579-a2c235467c39 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin monitor

Monitors jobs in the transfer queue that are owned by the current user.

Syntax

bitsadmin /monitor [/allusers] [/refresh <seconds>]

Parameters

Parameter Description
/allusers Optional. Monitors jobs for all users. You must have administrator privileges to use this parameter.
/refresh Optional. Refreshes the data at an interval specified by <seconds>. The default refresh interval is five seconds. To stop the refresh, press CTRL+C.

Examples

To monitor the transfer queue for jobs owned by the current user and refreshes the information every 60 seconds.

bitsadmin /monitor /refresh 60

Additional References



title: bitsadmin list description: Reference article for the bitsadmin list command, which lists the transfer jobs owned by the current user. ms.topic: reference ms.assetid: 1416965e-e0e6-49cf-b1d4-b286d3cf8716 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin list

Lists the transfer jobs owned by the current user.

Syntax

bitsadmin /list [/allusers][/verbose]

Parameters

Parameter Description
/allusers Optional. Lists jobs for all users. You must have administrator privileges to use this parameter.
/verbose Optional. Provides detailed information about each job.

Examples

To retrieve information about jobs owned by the current user.

bitsadmin /list

Additional References



title: bitsadmin getstate description: Reference article for the bitsadmin getstate command, which retrieves the state of the specified job. ms.topic: reference ms.assetid: 1252d6cf-14ca-44df-beb2-930ff011f297 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin getstate

Retrieves the state of the specified job.

Syntax

bitsadmin /getstate <job>

Parameters

Parameter Description
job The job's display name or GUID.

Output

The returned output values can be:

State Description
Queued The job is waiting to run.
Connecting BITS is contacting the server.
Transferring BITS is transferring data.
Transferred BITS has successfully transferred all files in the job.
Suspended The job is paused.
Error A non-recoverable error occurred; the transfer will not be retried.
Transient_Error A recoverable error occurred; the transfer retries when the minimum retry delay expires.
Acknowledged The job completed.
Canceled The job was canceled.

Examples

To retrieve the state for the job named myDownloadJob:

bitsadmin /getstate myDownloadJob

Additional References



title: bitsadmin gettemporaryname description: Reference article for the bitsadmin gettemporaryname command, which reports the temporary filename of the given file within the job. ms.topic: reference ms.assetid: 68925edc-a801-4292-a812-7471c4f60fdd ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin gettemporaryname

Reports the temporary filename of the given file within the job.

Syntax

bitsadmin /gettemporaryname <job> <file_index>

Parameters

Parameter Description
job The job's display name or GUID.
file_index Starts from 0.

Examples

To report the temporary filename of file 2 for the job named myDownloadJob:

bitsadmin /gettemporaryname myDownloadJob 1

Additional References



title: bitsadmin getreplyfilename description: Reference article for the bitsadmin getreplyfilename command, which gets the path of the file that contains the server upload-reply for the job. ms.topic: reference ms.assetid: 85447184-1732-4816-a365-2e3599551bf8 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin getreplyfilename

Gets the path of the file that contains the server upload-reply for the job.

[!NOTE] This command isn't supported by BITS 1.2 and earlier.

Syntax

bitsadmin /getreplyfilename <job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To retrieve the upload-reply filename for the job named myDownloadJob:

bitsadmin /getreplyfilename myDownloadJob

Additional References



title: bitsadmin getproxyusage description: Reference article for the bitsadmin getproxyusage command, which retrieves the proxy usage setting for the specified job. ms.topic: reference ms.assetid: f940a70e-3b02-497e-a47f-b37b905c299e ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin getproxyusage

Retrieves the proxy usage setting for the specified job.

Syntax

bitsadmin /getproxyusage <job>

Parameters

Parameter Description
job The job's display name or GUID.

Output

The returned proxy usage values can be:

Examples

To retrieve the proxy usage for the job named myDownloadJob:

bitsadmin /getproxyusage myDownloadJob

Additional References



title: bitsadmin getpriority description: Reference article for the bitsadmin getpriority command, which retrieves the priority of the specified job. ms.topic: reference ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 03/01/2019

bitsadmin getpriority

Retrieves the priority of the specified job.

Syntax

bitsadmin /getpriority <job>

Parameters

Parameter Description
job The job's display name or GUID.

Output

The returned priority for this command can be:

Examples

To retrieve the priority for the job named myDownloadJob:

bitsadmin /getpriority myDownloadJob

Additional References



title: bitsadmin getproxybypasslist description: Reference article for the bitsadmin getproxybypasslist command, which retrieves the proxy bypass list for the specified job. ms.topic: reference ms.assetid: 50959be3-7014-4bc9-9a7b-68f1ff94a94a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin getproxybypasslist

Retrieves the proxy bypass list for the specified job.

Syntax

bitsadmin /getproxybypasslist <job>

Parameters

Parameter Description
job The job's display name or GUID.

Remarks

The bypass list contains the host names or IP addresses, or both, that are not to be routed through a proxy. The list can contain <local> to refer to all servers on the same LAN. The list can be semicolon (;) or space-delimited.

Examples

To retrieve the proxy bypass list for the job named myDownloadJob:

bitsadmin /getproxybypasslist myDownloadJob

Additional References



title: bitsadmin getnotifyflags description: Reference article for the bitsadmin getnotifyflags command, which retrieves the notification flags for the specified job. ms.topic: reference ms.assetid: d4657e6c-8959-4db7-a4af-e73d3f80ecf8 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin getnotifyflags

Retrieves the notification flags for the specified job.

Syntax

bitsadmin /getnotifyflags <job>

Parameters

Parameter Description
job The job's display name or GUID.

Remarks

The job can contain one or more of the following notification flags:

Flag Description
0x001 Generate an event when all files in the job have been transferred.
0x002 Generate an event when an error occurs.
0x004 Disable notifications.
0x008 Generate an event when the job is modified or transfer progress is made.

Examples

To retrieve the notify flags for the job named myDownloadJob:

bitsadmin /getnotifyflags myDownloadJob

Additional References



title: bitsadmin getnoprogresstimeout description: Reference article for the bitsadmin getnoprogresstimeout command, which retrieves the length of time, in seconds, that the service will try to transfer the file after a transient error occurs. ms.topic: reference ms.assetid: 9cd9b19b-cbb4-4352-8419-978080f016b6 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin getnoprogresstimeout

Retrieves the length of time, in seconds, that the service will try to transfer the file after a transient error occurs.

Syntax

bitsadmin /getnoprogresstimeout <job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To retrieve the progress time out value for the job named myDownloadJob:

bitsadmin /getnoprogresstimeout myDownloadJob

Additional References



title: bitsadmin getmodificationtime description: Reference article for the bitsadmin getmodificationtime command, which retrieves the last time the job was modified or data was successfully transferred. ms.topic: reference ms.assetid: e543945e-92c4-491e-8c2d-344f8a3e342d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin getmodificationtime

Retrieves the last time the job was modified or data was successfully transferred.

Syntax

bitsadmin /getmodificationtime <job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To retrieve the last modified time for the job named myDownloadJob:

bitsadmin /getmodificationtime myDownloadJob

Additional References



title: bitsadmin gethttpmethod description: Reference article for the bitsadmin gethttpmethod command, which gets the HTTP verb to use with the job. ms.topic: reference ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 03/01/2019

bitsadmin gethttpmethod

Gets the HTTP verb to use with the job.

Syntax

bitsadmin /gethttpmethod <Job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To retrieve the HTTP verb to use with the job named myDownloadJob:

bitsadmin /gethttpmethod myDownloadJob

Additional References



title: bitsadmin getmaxdownloadtime description: Reference article for the bitsadmin getmaxdownloadtime command, which retrieves the download timeout in seconds. ms.prod: windows-server ms.topic: reference ms.assetid: cdce64f6-7125-489d-be3c-4af1dfc8c46a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin getmaxdownloadtime

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Retrieves the download timeout in seconds.

Syntax

bitsadmin /getmaxdownloadtime <job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To get the maximum download time for the job named myDownloadJob in seconds:

bitsadmin /getmaxdownloadtime myDownloadJob

Additional References



title: bitsadmin gethelpertokensid description: Reference article for the bitsadmin gethelpertokensid command, which returns the SID of a BITS transfer job's helper token, if one is set. ms.topic: reference ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 03/01/2019

bitsadmin gethelpertokensid

Returns the SID of a BITS transfer job's helper token, if one is set.

[!NOTE] This command isn't supported by BITS 3.0 and earlier.

Syntax

bitsadmin /gethelpertokensid <job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To retrieve the SID of a BITS transfer job named myDownloadJob:

bitsadmin /gethelpertokensid myDownloadJob

Additional References



title: bitsadmin getfilestotal description: Reference article for the bitsadmin getfilestotal command, which retrieves the number of files in the specified job. ms.topic: reference ms.assetid: c5de113e-f29c-4cd3-9392-0e300018d516 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin getfilestotal

Retrieves the number of files in the specified job.

Syntax

bitsadmin /getfilestotal <job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To retrieve the number of files included in the job named myDownloadJob:

bitsadmin /getfilestotal myDownloadJob

See Also



title: bitsadmin cache description: Reference article for the bitsadmin cache command, which contains a list of the bitsadmin cache switches. ms.topic: reference ms.assetid: 9ae4a283-a187-4fe3-b05c-4b53732c27cb ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin cache

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Contains a list of the bitsadmin /cache switches.

Contains a list of the bitsadmin /cache switches.

Syntax

bitsadmin /cache /help
bitsadmin /cache /clear
bitsadmin /cache /delete
bitsadmin /cache /deleteURL
bitsadmin /cache /list
bitsadmin /cache /info
bitsadmin /cache /getlimit
bitsadmin /cache /setlimit
bitsadmin /cache /getexpirationtime
bitsadmin /cache /setexpirationtime

Parameters

Parameter Description
bitsadmin cache and help Displays the command-line usage for the /cache switches.
bitsadmin cache and clear Purges the local cache.
bitsadmin cache and delete Deletes a cache entry.
bitsadmin cache and deleteURL Deletes all cache entries for the given URL.
bitsadmin cache and list Lists all cache entries.
bitsadmin cache and info Dumps a specific cache entry.
bitsadmin cache and getlimit Retrieves the cache limit.
bitsadmin cache and setlimit Sets the cache limit.
bitsadmin cache and getexpirationtime Retrieves the cache expiration time.
bitsadmin cache and setexpirationtime Sets the cache expiration time.

Additional References



title: auditpol clear description: Reference article for the auditpol clear command, which deletes the per-user audit policy for all users, resets (disables) the system audit policy for all subcategories, and sets all the auditing options to disabled. ms.topic: reference ms.assetid: 05bfa218-2434-4ad1-b33c-e6fcfb2b4f67 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

auditpol clear

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Deletes the per-user audit policy for all users, resets (disables) the system audit policy for all subcategories, and sets all the auditing options to disabled.

To perform clear operations on the per-user and system policies, you must have Write or Full Control permission for that object set in the security descriptor. You can also perform clear operations if you have the Manage auditing and security log (SeSecurityPrivilege) user right. However, this right allows additional access that is not necessary to perform the overall clear operations.

Syntax

auditpol /clear [/y]

Parameters

Parameter Description
/y Suppresses the prompt to confirm if all audit policy settings should be cleared.
/? Displays help at the command prompt.

Examples

To delete the per-user audit policy for all users, reset (disable) the system audit policy for all subcategories, and set all the audit policy settings to disabled, at a confirmation prompt, type:

auditpol /clear

To delete the per-user audit policy for all users, reset the system audit policy settings for all subcategories, and set all the audit policy settings to disabled, without a confirmation prompt, type:

auditpol /clear /y

[!NOTE] The preceding example is useful when using a script to perform this operation.

Additional References



title: auditpol description: Reference article for the auditpol command, which displays information about and performs functions to manipulate audit policies. ms.topic: reference ms.assetid: a02cfb9d-732f-4e77-aeba-f18265daa3af ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

auditpol

Displays information about and performs functions to manipulate audit policies, including:

Syntax

auditpol command [<sub-command><options>]

Parameters

Sub-command Description
/get Displays the current audit policy. For more information, see auditpol get for syntax and options.
/set Sets the audit policy. For more information, see auditpol set for syntax and options.
/list Displays selectable policy elements. For more information, see auditpol list for syntax and options.
/backup Saves the audit policy to a file. For more information, see auditpol backup for syntax and options.
/restore Restores the audit policy from a file that was previously created by using auditpol /backup. For more information, see auditpol restore for syntax and options.
/clear Clears the audit policy. For more information, see auditpol clear for syntax and options.
/remove Removes all per-user audit policy settings and disables all system audit policy settings. For more information, see auditpol remove for syntax and options.
/resourceSACL Configures global resource system access control lists (SACLs). Note: Applies only to Windows 7 and Windows Server 2008 R2. For more information, see auditpol resourceSACL.
/? Displays help at the command prompt.

Additional References



title: attributes volume description: Reference article for the attributes volume command, which displays, sets, or clears the attributes of a volume. ms.topic: reference ms.assetid: e40e8284-3d57-4de8-a46c-e4ade34a0d53 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

attributes volume

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays, sets, or clears the attributes of a volume.

Syntax

attributes volume [{set | clear}] [{hidden | readonly | nodefaultdriveletter | shadowcopy}] [noerr]

Parameters

Parameter Description
set Sets the specified attribute of the volume with focus.
clear Clears the specified attribute of the volume with focus.
readonly Specifies that the volume is read-only.
hidden Specifies that the volume is hidden.
nodefaultdriveletter Specifies that the volume does not receive a drive letter by default.
shadowcopy Specifies that the volume is a shadow copy volume.
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Remarks

Examples

To display the current attributes on the selected volume, type:

attributes volume

To set the selected volume as hidden and read-only, type:

attributes volume set hidden readonly

To remove the hidden and read-only attributes on the selected volume, type:

attributes volume clear hidden readonly

Additional References



title: add volume description: Reference article for the add volume command, which adds volumes to the shadow copy Set, which is the set of volumes to be shadow copied. ms.topic: reference ms.assetid: b7d4d35d-8bda-46d2-8df5-eb598cecaaba ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

add volume

Adds volumes to the Shadow Copy Set, which is the set of volumes to be shadow copied. When a shadow copy is created, an environment variable links the alias to the shadow ID, so the alias can then be used for scripting.

Volumes are added one at a time. Each time a volume is added, it's checked to make sure VSS supports shadow copy creation for that volume. This check can be invalidated by later use of the set context command.

This command is necessary to create shadow copies. If used without parameters, add volume displays help at the command prompt.

Syntax

add volume <volume> [provider <providerid>]

Parameters

Parameter Description
<volume> Specifies a volume to add to the Shadow Copy Set. At least one volume is required for shadow copy creation.
[provider \<providerid>] Specifies the Provider ID for a registered provider to use to create the shadow copy. If provider is not specified, the default provider is used.

Examples

To view the current list of registered providers, at the diskshadow> prompt, type:

list providers

The following output displays a single provider, which will be used by default:

* ProviderID: {b5946137-7b9f-4925-af80-51abd60b20d5}
        Type: [1] VSS_PROV_SYSTEM
        Name: Microsoft Software Shadow Copy provider 1.0
        Version: 1.0.0.7
        CLSID: {65ee1dba-8ff4-4a58-ac1c-3470ee2f376a}
1 provider registered.

To add drive C: to the Shadow Copy Set and assign an alias named System1, type:

add volume c: alias System1

Additional References



title: wbadmin get items description: Reference article for the wbadmin get items command, which lists the items included in a specific backup. ms.topic: reference ms.assetid: 27d08ce3-6e06-4260-b264-fc1bde132d09 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wbadmin get items

Lists the items included in a specific backup.

To list the items included in a specific backup using this command, you must be a member of the Backup Operators group or the Administrators group, or you must have been delegated the appropriate permissions. In addition, you must run wbadmin from an elevated command prompt, by right-clicking Command Prompt, and then selecting Run as administrator.

Syntax

wbadmin get items -version:<VersionIdentifier> [-backupTarget:{<BackupDestinationVolume> | <NetworkSharePath>}] [-machine:<BackupMachineName>]

Parameters

Parameter Description
-version Specifies the version of the backup in MM/DD/YYYY-HH:MM format. If you don't know the version information, run the wbadmin get versions command.
-backupTarget Specifies the storage location that contains the backups for which you want the details. Use for listing backups stored at that target location. Backup target locations can be a locally attached disk drive or a remote shared folder. If this command is run on the same computer where the backup was created, this parameter isn't needed. However, this parameter is required to get information about a backup created from another computer.
-machine Specifies the name of the computer that you want the backup details for. Useful when multiple computers have been backed up to the same location. Should be used when -backupTarget is specified.

Examples

To list items from the backup that was run on March 31, 2013 at 9:00 A.M., type:

wbadmin get items -version:03/31/2013-09:00

To list items from the backup of server01 that was run on April 30, 2013 at 9:00 A.M. and stored on \\<servername>\<share>, type:

wbadmin get items -version:04/30/2013-09:00 -backupTarget:\\servername\share -machine:server01

Additional References



title: wbadmin delete catalog description: Reference article for the wbadmin delete catalog command, which deletes the backup catalog that is stored on the local computer. ms.topic: reference ms.assetid: d3041407-4577-4716-a39f-2c8ab48818d1 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wbadmin delete catalog

Deletes the backup catalog that is stored on the local computer. Use this command when the backup catalog has been corrupted and you can't restore it using the wbadmin restore catalog command.

To delete a backup catalog using this command, you must be a member of the Backup Operators group or the Administrators group, or you must have been delegated the appropriate permissions. In addition, you must run wbadmin from an elevated command prompt, by right-clicking Command Prompt, and then selecting Run as administrator.

Syntax

wbadmin delete catalog [-quiet]

Parameters

Parameter Description
-quiet Runs the command without prompts to the user.

Remarks

Additional References



title: vssadmin delete shadows description: A description of the vssadmin delete shadows command, which deletes a specified volume's shadow copies. ms.topic: reference author: JasonGerend ms.author: jgerend ms.date: 05/18/2018

vssadmin delete shadows

Applies to: Windows Server 2022, Windows Server 2019, Windows 10, Windows 8.1, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2, Windows Server 2008

Deletes a specified volume's shadow copies. You can only delete shadow copies with the client-accessible type.

Syntax

vssadmin delete shadows /for=<ForVolumeSpec> [/oldest | /all | /shadow=<ShadowID>] [/quiet]

Parameters

Parameter Description
/for=<ForVolumeSpec> Specifies which volume's shadow copy will be deleted.
/oldest Deletes only the oldest shadow copy.
/all Deletes all of the specified volume's shadow copies.
/shadow=<ShadowID> Deletes the shadow copy specified by ShadowID. To get the shadow copy ID, use the vssadmin list shadows command. When you enter a shadow copy ID, use the following format, where each X represents a hexadecimal character:

XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

/quiet Specifies that the command won't display messages while running.

Examples

To delete the oldest shadow copy of volume C, type:

vssadmin delete shadows /for=c: /oldest

Additional References



title: type description: Reference article for the type command, which displays the contents of a text file. ms.topic: reference ms.assetid: c44fe905-a865-4c97-8cc5-fb95fec7d4d5 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2020

type

In the Windows Command shell, type is a built in command which displays the contents of a text file. Use the type command to view a text file without modifying it.

In PowerShell, type is a built-in alias to the Get-Content cmdlet, which also displays the contents of a file, but using a different syntax.

Syntax

type [<drive>:][<path>]<filename>

Parameters

Parameter Description
[<drive>:][<path>]<filename> Specifies the location and name of the file or files that you want to view. If your <filename> contains spaces, you must enclose it in quotation marks (for example, "Filename Containing Spaces.txt"). You can also add multiple filenames by adding spaces between them.
/? Displays help at the command prompt.

Remarks

Examples

To display the contents of a file named holiday.mar, type:

type holiday.mar

To display the contents of a lengthy file named holiday.mar one screen at a time, type:

type holiday.mar | more

Additional References



title: tscon description: Reference article for tscon, which connects to another session on a Remote Desktop Session Host server. ms.topic: reference ms.assetid: 315a9793-cd10-4987-bb68-89a9d13f7fce ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

tscon

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Connects to another session on a Remote Desktop Session Host server.

[!IMPORTANT] You must have Full Control access permission or Connect special access permission to connect to another session.

[!NOTE] To find out what's new in the latest version, see What's New in Remote Desktop Services in Windows Server.

Syntax

tscon {<sessionID> | <sessionname>} [/dest:<sessionname>] [/password:<pw> | /password:*] [/v]

Parameters

Parameter Description
<sessionID> Specifies the ID of the session to which you want to connect. If you use the optional /dest:<sessionname> parameter, you can also specify the name of the current session.
<sessionname> Specifies the name of the session to which you want to connect.
/dest:<sessionname> Specifies the name of the current session. This session will disconnect when you connect to the new session. You can also use this parameter to connect the session of another user to a different session.
/password:<pw> Specifies the password of the user who owns the session to which you want to connect. This password is required when the connecting user does not own the session.
/password:* Prompts for the password of the user who owns the session to which you want to connect.
/v Displays information about the actions being performed.
/? Displays help at the command prompt.

Remarks

Examples

To connect to Session 12 on the current Remote Desktop Services Session Host server, and to disconnect the current session, type:

tscon 12

To connect to Session 23 on the current Remote Desktop Services Session Host server using the password mypass, and to disconnect the current session, type:

tscon 23 /password:mypass

To connect the session named TERM03 to the session named TERM05, and then to disconnect session TERM05, type:

tscon TERM03 /v /dest:TERM05

Additional References



title: irftp description: Reference article for the irftp command, which sends files over an infrared link. ms.topic: reference ms.assetid: e15c60a7-546d-4e9f-9871-43aaa1b569d6 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

irftp

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Sends files over an infrared link.

[!IMPORTANT] Make sure the devices intended to communicate over an infrared link have infrared functionality enabled and are working correctly. Also make sure an infrared link is established between the devices.

Syntax

irftp [<drive>:\] [[<path>] <filename>] [/h][/s]

Parameters

Parameter Description
`:` Specifies the drive that contains the files that you want to send over an infrared link.
[path]<filename> Specifies the location and name of the file or set of files that you want to send over an infrared link. If you specify a set of files, you must specify the full path for each file.
/h Specifies hidden mode. When hidden mode is used, the files are sent without displaying the Wireless Link dialog box.
/s Opens the Wireless Link dialog box, so that you can select the file or set of files that you want to send without using the command line to specify the drive, path, and file names. The Wireless Link dialog box also opens if you use this command without any parameters.

Examples

To send c:\example.txt over the infrared link, type:

irftp c:\example.txt

Additional References



title: schtasks change description: Reference article for the schtasks change command, which schedules commands and programs to run periodically or at a specific time, adds and removes tasks from the schedule, starts and stops tasks on demand, and displays and changes scheduled tasks. ms.topic: reference ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 06/30/2022

schtasks change

Changes one or more of the following properties of a task:

Required permissions

Syntax

schtasks /change /tn <Taskname> [/s <computer> [/u [<domain>\]<user> [/p <password>]]] [/ru <username>] [/rp <password>] [/tr <Taskrun>] [/st <Starttime>] [/ri <interval>] [/rl <level>] [{/et <Endtime> | /du <duration>} [/k]] [/sd <Startdate>] [/ed <Enddate>] [/{ENABLE | DISABLE}] [/it] [/z]

Parameters

Parameter Description
/tn <Taskname> Identifies the task to be changed. Enter the task name (Note: Task names that have a space in its name are required to be wrapped in double quotes).
/s <computer> Specifies the name or IP address of a remote computer (with or without backslashes). The default is the local computer.
/u [<domain>] Runs this command with the permissions of the specified user account. By default, the command runs with the permissions of the current user of the local computer. The specified user account must be a member of the Administrators group on the remote computer. The /u and /p parameters are valid only when you use /s.
/p <password> Specifies the password of the user account specified in the /u parameter. If you use the /u parameter without the /p parameter or the password argument, schtasks will prompt you for a password. The /u and /p parameters are valid only when you use /s.
/ru <username> Changes the user name under which the scheduled task has to run. For the system account, valid values are "", "NT AUTHORITY\SYSTEM", or "SYSTEM".
/rp <password> Specifies a new password for the existing user account, or the user account specified by the /ru parameter. This parameter is ignored with used with the local System account.
/tr <Taskrun> Changes the program that the task runs. Enter the fully qualified path and file name of an executable file, script file, or batch file. If you don't add the path, schtasks assumes that the file is in the <systemroot>\System32 directory. The specified program replaces the original program run by the task.
/st <Starttime> Specifies the start time for the task, using the 24-hour time format, HH:mm. For example, a value of 14:30 is equivalent to the 12-hour time of 2:30 PM.
/ri <interval> Specifies the repetition interval for the scheduled task, in minutes. Valid range is 1 - 599940 (599940 minutes = 9999 hours). If either the /et or /du parameters are specified, the default is 10 minutes.
/rl <level> Specifies the Run Level for the job. Acceptable values are LIMITED (scheduled tasks will be ran with the least level of privileges, such as Standard User accounts) and HIGHEST (scheduled tasks will be ran with the highest level of privileges, such as Superuser accounts). (Note: LIMITED is the default value).
/et <Endtime> Specifies the end time for the task, using the 24-hour time format, HH:mm. For example, a value of 14:30 is equivalent to the 12-hour time of 2:30 PM.
/du <duration> A value that specifies the duration to run the task. The time format is HH:mm (24-hour time). For example, a value of 14:30 is equivalent to the 12-hour time of 2:30 PM.
/k Stops the program that the task runs at the time specified by /et or /du. Without /k, schtasks doesn't start the program again after it reaches the time specified by /et or /du nor does it stop the program if it's still running. This parameter is optional and valid only with a MINUTE or HOURLY schedule.
/sd <Startdate> Specifies the first date on which the task should be run. The date format is MM/DD/YYYY.
/ed <Enddate> Specifies the last date on which the task should be run. The format is MM/DD/YYYY.
/ENABLE Specifies to enable the scheduled task.
/DISABLE Specifies to disable the scheduled task.
/it Specifies to run the scheduled task only when the run as user (the user account under which the task runs) is logged on to the computer. This parameter has no effect on tasks that run with system permissions or tasks that already have the interactive-only property set. You can't use a change command to remove the interactive-only property from a task. By default, run as user is the current user of the local computer when the task is scheduled or the account specified by the /u parameter, if one is used. However, if the command includes the /ru parameter, then the run as user is the account specified by the /ru parameter.
/z Specifies to delete the task upon the completion of its schedule.
/? Displays help at the command prompt.

Remarks

Examples

To change the program that the Virus Check task runs from VirusCheck.exe to VirusCheck2.exe, type:

schtasks /change /tn Virus Check /tr C:\VirusCheck2.exe

This command uses the /tn parameter to identify the task and the /tr parameter to specify the new program for the task. (You can't change the task name.)

To change the password of the user account for the RemindMe task on the remote computer, Svr01, type:

schtasks /change /tn RemindMe /s Svr01 /rp p@ssWord3

This procedure is required whenever the password for a user account expires or changes. If the password saved in a task is no longer valid, then the task doesn't run. The command uses the /tn parameter to identify the task and the /s parameter to specify the remote computer. It uses the /rp parameter to specify the new password, p@ssWord3.

To change the ChkNews task, which starts Notepad.exe every morning at 9:00 A.M., to start Internet Explorer instead, type:

schtasks /change /tn ChkNews /tr c:\program files\Internet Explorer\iexplore.exe /ru DomainX\Admin01

The command uses the /tn parameter to identify the task. It uses the /tr parameter to change the program that the task runs and the /ru parameter to change the user account under which the task runs. The /ru and /rp parameters, which provide the password for the user account, is not used. You must provide a password for the account, but you can use the /ru and /rp parameter and type the password in clear text, or wait for SchTasks.exe to prompt you for a password, and then enter the password in obscured text.

To change the SecurityScript task so that it runs with permissions of the System account, type:

schtasks /change /tn SecurityScript /ru

The command uses the /ru parameter to indicate the System account. Because tasks run with System account permissions do not require a password, SchTasks.exe does not prompt for one.

To add the interactive-only property to MyApp, an existing task, type:

schtasks /change /tn MyApp /it

This property assures that the task runs only when the run as user, that is, the user account under which the task runs, is logged on to the computer. The command uses the /tn parameter to identify the task and the /it parameter to add the interactive-only property to the task. Because the task already runs with the permissions of my user account, you don't need to change the /ru parameter for the task.

Additional References



title: import diskpart description: Reference article for the import command, which imports a foreign disk group into the disk group of the local computer. ms.topic: reference ms.assetid: 4b9d2751-7637-4738-83b0-8c578eb28f27 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

import (diskpart)

Imports a foreign disk group into the disk group of the local computer. This command imports every disk that is in the same group as the disk with focus.

[IMPORTANT] Before you can use this command, you must use the select disk command to select a dynamic disk in a foreign disk group and shift the focus to it.

Syntax

import [noerr]

Parameters

Parameter Description
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To import every disk that is in the same disk group as the disk with focus into the disk group of the local computer, type:

import

Additional References



title: sc.exe delete description: Reference article for the sc.exe delete command, which deletes a service subkey from the registry. ms.topic: reference ms.assetid: 2fe94fb3-e4d1-47b5-b999-39995ecbb644 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

sc.exe delete

Deletes a service subkey from the registry. If the service is running or if another process has an open handle to the service, the service is marked for deletion.

[!NOTE] We don't recommend you to use this command to delete built-in operating system services such as DHCP, DNS, or Internet Information Services. To install, remove, or reconfigure operating system roles, services and components, see Install or Uninstall Roles, Role Services, or Features

Syntax

sc.exe [<servername>] delete [<servicename>]

Parameters

Parameter Description
<servername> Specifies the name of the remote server on which the service is located. The name must use the Universal Naming Convention (UNC) format (for example, \myserver). To run SC.exe locally, don't use this parameter.
<servicename> Specifies the service name returned by the getkeyname operation.
/? Displays help at the command prompt.

Examples

To delete the service subkey NewServ from the registry on the local computer, type:

sc.exe delete NewServ

Additional References



title: import diskshadow description: Reference article for the import command, which imports a transportable shadow copy from a loaded metadata file into the system. ms.topic: reference ms.assetid: 7bd78d76-0560-4d47-944c-fe960be2c10b ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

import (diskshadow)

Imports a transportable shadow copy from a loaded metadata file into the system.

[IMPORTANT] Before you can use this command, you must use the load metadata command to load a DiskShadow metadata file.

Syntax

import

Remarks

Examples

The following is a sample DiskShadow script that demonstrates the use of the import command:

#Sample DiskShadow script demonstrating IMPORT
SET CONTEXT PERSISTENT
SET CONTEXT TRANSPORTABLE
SET METADATA transHWshadow_p.cab
#P: is the volume supported by the Hardware Shadow Copy provider
ADD VOLUME P:
CREATE
END BACKUP
#The (transportable) shadow copy is not in the system yet.
#You can reset or exit now if you wish.

LOAD METADATA transHWshadow_p.cab
IMPORT
#The shadow copy will now be loaded into the system.

Additional References



title: san description: Reference article for the san command, which displays or sets the storage area network (san) policy for the operating system. ms.topic: reference ms.assetid: d57c2df1-eb82-4b81-b8cd-e30564c6a929 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

san

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays or sets the storage area network (san) policy for the operating system. If used without parameters, the current san policy is displayed.

Syntax

san [policy={onlineAll | offlineAll | offlineShared}] [noerr]

Parameters

Parameter Description
policy={onlineAll|offlineAll|offlineShared}] Sets the san policy for the currently booted operating system. The san policy determines whether a newly discovered disk is brought online or remains offline, and whether it becomes read/write or remains read-only. When a disk is offline, the disk layout can be read, but no volume devices are surfaced through Plug and Play. This means that no file system can be mounted on the disk. When a disk is online, one or more volume devices are installed for the disk. The following is an explanation of each parameter:
  • onlineAll. Specifies that all newly discovered disks will be brought online and made read/write. IMPORTANT: Specifying onlineAll on a server that shares disks could lead to data corruption. Therefore, you should not set this policy if disks are shared among servers unless the server is part of a cluster.
  • offlineAll. Specifies that all newly discovered disks except the startup disk will be offline and read-only by default.
  • offlineShared. Specifies that all newly discovered disks that do not reside on a shared bus (such as SCSI and iSCSI) are brought online and made read-write. Disks that are left offline will be read-only by default.
For more information, see VDS_san_POLICY Enumeration.
noerr Used for scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To view the current policy, type:

san

To make all newly discovered disks, except the startup disk, offline and read-only by default, type:

san policy=offlineAll

Additional References



title: rmdir description: Reference article for the rmdir command, which deletes a directory. ms.topic: reference ms.assetid: e4d7162b-7132-413c-a416-6eb3dc032a26 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

rmdir

Deletes a directory.

The rmdir command can also run from the Windows Recovery Console, using different parameters. For more information, see Windows Recovery Environment (WinRE).

[!NOTE] This command is the same as the rd command.

Syntax

rmdir [<drive>:]<path> [/s [/q]]

Parameters

Parameter Description
[<drive>:]<path> Specifies the location and the name of the directory that you want to delete. Path is required. If you include a backslash () at the beginning of the specified path, then the path starts at the root directory (regardless of the current directory).
/s Deletes a directory tree (the specified directory and all its subdirectories, including all files).
/q Specifies quiet mode. Does not prompt for confirmation when deleting a directory tree. The /q parameter works only if /s is also specified.

CAUTION: When you run in quiet mode, the entire directory tree is deleted without confirmation. Make sure that important files are moved or backed up before using the /q command-line option.

/? Displays help at the command prompt.

Remarks

Examples

To change to the parent directory so you can safely remove the desired directory, type:

cd ..

To remove a directory named test (and all its subdirectories and files) from the current directory, type:

rmdir /s test

To run the previous example in quiet mode, type:

rmdir /s /q test

Additional References



title: rundll32 description: Reference article for the rundll32 command, which loads and runs 32-bit dynamic-link libraries (DLLs). ms.topic: reference ms.assetid: 46d9cd64-8186-4cd4-a500-44700340fe81 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

rundll32

Loads and runs 32-bit dynamic-link libraries (DLLs). There are no configurable settings for Rundll32. Help information is provided for a specific DLL you run with the rundll32 command.

You must run the rundll32 command from an elevated command prompt. To open an elevated command prompt, click Start, right-click Command Prompt, and then click Run as administrator.

Syntax

rundll32 <DLLname>

Parameters

Parameter Description
Rundll32 printui.dll,PrintUIEntry Displays the printer user interface.

Remarks

Rundll32 can only call functions from a DLL explicitly written to be called by Rundll32.

Additional References



title: graftabl description: Reference article for the graftabl command, which enables Windows operating systems to display an extended character set in graphics mode. ms.topic: reference ms.assetid: b08351d4-3d24-490c-86f6-1252da11d923 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

graftabl

Enables Windows operating systems to display an extended character set in graphics mode. If used without parameters, graftabl displays the previous and the current code page.

[!IMPORTANT] The graftabl command is a legacy command, and therefore outdated. It is normally not installed in modern Windows versions. Please see the chcp page for codepage handling.

Syntax

graftabl <codepage>
graftabl /status

Parameters

Parameter Description
<codepage> Specifies a code page to define the appearance of extended characters in graphics mode. Valid code page identification numbers are:
  • 437 - United States
  • 850 - Multilingual (Latin I)
  • 852 - Slavic (Latin II)
  • 855 - Cyrillic (Russian)
  • 857 - Turkish
  • 860 - Portuguese
  • 861 - Icelandic
  • 863 - Canadian-French
  • 865 - Nordic
  • 866 - Russian
  • 869 - Modern Greek
/status Displays the current code page being used by this command.
/? Displays help at the command prompt.

Remarks

Examples

To view the current code page used by graftabl, type:

graftabl /status

To load the graphics character set for code page 437 (United States) into memory, type:

graftabl 437

To load the graphics character set for code page 850 (multilingual) into memory, type:

graftabl 850

Additional References



title: goto description: Reference article for the goto command, which directs cmd.exe to a labeled line in a batch program. ms.topic: reference ms.assetid: e0de1458-1f78-48ff-a746-c285a945a510 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

goto

Directs cmd.exe to a labeled line in a batch program. Within a batch program, this command directs command processing to a line that is identified by a label. When the label is found, processing continues starting with the commands that begin on the next line.

Syntax

goto <label>

Parameters

Parameter Description
<label> Specifies a text string that is used as a label in the batch program.
/? Displays help at the command prompt.

Remarks

Examples

The following batch program formats a disk in drive A as a system disk. If the operation is successful, the goto command directs processing to the :end label:

echo off
format a: /s
if not errorlevel 1 goto end
echo An error occurred during formatting.
:end
echo End of batch program.

Additional References



title: rexec description: Reference article for the rexec command, which runs a specified command on a remote host. This command has been deprecated and isn't guaranteed to be supported in future releases of Windows. ms.topic: reference ms.assetid: 7c637fb3-c92f-40bf-ad06-6330daaa3b5f ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

rexec

Runs a specified command on a remote host. The remote host must be running a rexecd service (or daemon) for rexec to connect to.

[!IMPORTANT] The rexec command has been deprecated, and isn't guaranteed to be supported in Windows.



title: end backup description: Reference article for the end backup command, which ends a full backup session and issues a BackupComplete event with the appropriate writer state, if needed. ms.topic: reference ms.assetid: 8ac1f283-6ecf-4523-8e96-95d435dd4f7f ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

end backup

Ends a full backup session and issues a BackupComplete event with the appropriate writer state, if needed.

Syntax

end backup

Additional References



title: nslookup set root description: Reference article for the nslookup set root command, which changes the name of the root server that's used for queries. ms.topic: reference ms.assetid: 8ad5393c-d4fd-4594-8187-576b1dcde60a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup set root

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Changes the name of the root server used for queries.

[!NOTE] This command supports the nslookup root command.

Syntax

set root=<rootserver>

Parameters

Parameter Description
<rootserver> Specifies the new name for the root server. The default value is ns.nic.ddn.mil.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: ftype description: Reference article for the ftype command, which displays or modifies file type used in file name extension associations. ms.topic: reference ms.assetid: 6fb53cee-9bed-44dd-af5d-bc7cec1dd114 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftype

Displays or modifies file types that are used in file name extension associations. If used without an assignment operator (=), this command displays the current open command string for the specified file type. If used without parameters, this command displays the file types that have open command strings defined.

[!NOTE] This command is only supported within cmd.exe and is not available from PowerShell. Though you can use cmd /c ftype as a workaround.

Syntax

ftype [<filetype>[=[<opencommandstring>]]]

Parameters

Parameter Description
<filetype> Specifies the file type to display or change.
<opencommandstring> Specifies the open command string to use when opening files of the specified file type.
/? Displays help at the command prompt.

Remarks

The following table describes how ftype substitutes variables within an open command string:

Variable Replacement value
%0 or %1 Gets substituted with the file name being launched through the association.
%* Gets all of the parameters.
%2, %3, ... Gets the first parameter (%2), the second parameter (%3), and so on.
%~<n> Gets all of the remaining parameters starting with the nth parameter, where n can be any number from 2 to 9.

Examples

To display the current file types that have open command strings defined, type:

ftype

To display the current open command string for the txtfile file type, type:

ftype txtfile

This command produces output similar to the following:

txtfile=%SystemRoot%\system32\NOTEPAD.EXE %1

To delete the open command string for a file type called example, type:

ftype example=

To associate the .pl file name extension with the PerlScript file type and enable the PerlScript file type to run PERL.EXE, type the following commands:

assoc .pl=PerlScript
ftype PerlScript=perl.exe %1 %*

To eliminate the need to type the .pl file name extension when invoking a Perl script, type:

set PATHEXT=.pl;%PATHEXT%

Additional References



title: fveupdate description: Reference article for the fveupdate tool, which is an internal tool used by the setup program when a computer is upgraded. ms.topic: reference ms.assetid: f2603607-9421-4e8d-b9bf-c5519814b39f ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

fveupdate

FveUpdate is an internal tool, used by the setup program when a computer is upgraded. It updates the metadata associated with BitLocker to the latest version. This tool cannot be run independently.

Additional References



title: nslookup set querytype description: Reference article for the nslookup set querytype command, which changes the resource record type for the query. ms.topic: reference ms.assetid: 5af54ac5-fc1a-4af6-977b-f8e97c8eba90 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup set querytype

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Changes the resource record type for the query. For information about resource record types, see Request for Comment (Rfc) 1035.

[!NOTE] This command is the same as the nslookup set type command.

Syntax

set querytype=<resourcerecordtype>

Parameters

Parameter Description
<resourcerecordtype> Specifies a DNS resource record type. The default resource record type is A, but you can use any of the following values:
  • A: Specifies a computer's IP address.
  • ANY: Specifies a computer's IP address.
  • CNAME: Specifies a canonical name for an alias.
  • GID Specifies a group identifier of a group name.
  • HINFO: Specifies a computer's CPU and type of operating system.
  • MB: Specifies a mailbox domain name.
  • MG: Specifies a mail group member.
  • MINFO: Specifies mailbox or mail list information.
  • MR: Specifies the mail rename domain name.
  • MX: Specifies the mail exchanger.
  • NS: Specifies a DNS name server for the named zone.
  • PTR: Specifies a computer name if the query is an IP address; otherwise, specifies the pointer to other information.
  • SOA: Specifies the start-of-authority for a DNS zone.
  • TXT: Specifies the text information.
  • UID: Specifies the user identifier.
  • UINFO: Specifies the user information.
  • WKS: Describes a well-known service.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: tapicfg show description: Reference article for the tapicfg show command, which displays the names and locations of the TAPI application directory partitions in the domain. ms.topic: reference ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 09/29/2020

tapicfg show

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays the names and locations of the TAPI application directory partitions in the domain.

Syntax

tapicfg show [/defaultonly] [/domain:<domainname>]

Parameters

Parameter Description
/default only Displays the names and locations of only the default TAPI application directory partition in the domain.
/domain: <domainname> Specifies the DNS name of the domain for which the TAPI application directory partitions are displayed. If the domain name isn't specified, the name of the local domain is used.
/? Displays help at the command prompt.

Remarks

Example

To display the name of the default TAPI application directory partition for the new domain, type:

tapicfg show /defaultonly

Additional References



title: repair description: Reference article for the repair command, which repairs RAID-5 volumes by replacing the failed disk region with a specified dynamic disk. ms.topic: reference ms.assetid: 9f84f661-f3cd-48c8-bf08-87819cf626fe ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

repair

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Repairs the RAID-5 volume with focus by replacing the failed disk region with the specified dynamic disk.

A volume in a RAID-5 array must be selected for this operation to succeed. Use the select volume command to select a volume and shift the focus to it.

Syntax

repair disk=<n> [align=<n>] [noerr]

Parameters

Parameter Description
disk=<n> Specifies the dynamic disk that will replace the failed disk region. Where n must have free space greater than or equal to the total size of the failed disk region in the RAID-5 volume.
align=<n> Aligns all volume or partition extents to the closest alignment boundary. Where n is the number of kilobytes (KB) from the beginning of the disk to the closest alignment boundary.
noerr for scripting only. When an error is encountered, DiskPart continues to process commands as if the error didn't occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To replace the volume with focus by replacing it with dynamic disk 4, type:

repair disk=4

Additional References



title: ren description: Reference article for the ren command, which renames a file or directory. ms.topic: reference ms.assetid: 60398e12-a05d-4524-a73a-0a925943e21d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 07/11/2018

ren

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Renames files or directories.

[!NOTE] This command is the same as the rename command.

Syntax

ren [<drive>:][<path>]<filename1> <filename2>

Parameters

Parameter Description
[<drive>:][<path>]<filename1> Specifies the location and name of the file or set of files you want to rename. Filename1 can include wildcard characters (* and ?).
<filename2> Specifies the new name for the file. You can use wildcard characters to specify new names for multiple files.
/? Displays help at the command prompt.

Remarks

Examples

To change all the .txt file name extensions in the current directory to .doc extensions, type:

ren *.txt *.doc

To change the name of a directory from Chap10 to Part10, type:

ren chap10 part10

Additional References



title: diantz description: Reference article for the diantz command, which packages existing files into a cabinet (.cab) file. ms.topic: reference ms.assetid: 218ed5d7-1203-4d68-ad9b-65cdd022d54f ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

diantz

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Package existing files into a cabinet (.cab) file. This command performs the same actions as the updated makecab command.

Syntax

diantz [/v[n]] [/d var=<value> ...] [/l <dir>] <source> [<destination>]
diantz [/v[<n>]] [/d var=<value> ...] /f <directives_file> [...]

Parameters

Parameter Description
<source> File to compress.
<destination> File name to give compressed file. If omitted, the last character of the source file name is replaced with an underscore (_) and used as the destination.
/f <directives_file> A file with diantz directives (may be repeated).
/d var=<value> Defines variable with specified value.
/l <dir> Location to place destination (default is current directory).
/v[<n>] Set debugging verbosity level (0=none,...,3=full).
/? Displays help at the command prompt.

Additional References



title: ftp verbose description: Reference article for the ftp verbose command, which toggles verbose mode. ms.topic: reference ms.assetid: 59febc81-0b14-487e-8aa3-642f59d0b34f ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp verbose

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Toggles Verbose mode. By default, Verbose mode is turned on. When Verbose mode is on, all ftp command responses are displayed. When a file transfer is completed, statistics regarding the efficiency of the transfer are also displayed.

Syntax

verbose

Examples

To toggle Verbose mode on and off, type:

verbose

Additional References



title: sxstrace description: Reference article for the systrace command, which helps to diagnose side-by-side problems. ms.topic: reference ms.assetid: fcd26eeb-fbd9-4a86-b6a9-dfa5e9c6e4fc ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

sxstrace

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Diagnoses side-by-side problems.

Syntax

sxstrace [{[trace -logfile:<filename> [-nostop]|[parse -logfile:<filename> -outfile:<parsedfile>  [-filter:<appname>]}]

Parameters

Parameter Description
trace Enables tracing for side-by-side.
-logfile Specifies the raw log file.
<filename> Saves tracing log to <filename.
-nostop Specifies that you shouldn't receive a prompt to stop tracing.
parse Translates the raw trace file.
-outfile Specifies the output filename.
<parsedfile> Specifies the filename of the parsed file.
-filter Allows the output to be filtered.
<appname> Specifies the name of the application.
stoptrace Stops the trace, if it wasn't stopped before.
-? Displays help at the command prompt.

Examples

To enable tracing and to save the trace file to sxstrace.etl, type:

sxstrace trace -logfile:sxstrace.etl

To translate the raw trace file into a human readable format and to save the result to sxstrace.txt, type:

sxstrace parse -logfile:sxstrace.etl -outfile:sxstrace.txt

Additional References



title: wmic description: Reference article for wmic, which displays WMI information inside an interactive command shell. ms.topic: reference ms.assetid: 76397c72-d06f-4cea-88cf-c7603315a983 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wmic

Displays WMI information inside an interactive command shell.

Syntax

wmic </parameter>

Sub-commands

The following sub-commands are available at all times:

Sub-command Description
class Escapes from the default alias mode of WMIC to access classes in the WMI schema directly.
path Escapes from the default alias mode of WMIC to access instances in the WMI schema directly.
context Displays the current values of all global switches.
[quit | exit] Exits the WMIC command shell.

Examples

To display the current values of all global switches, type:

wmic context

Output similar to the following displays:

NAMESPACE    : root\cimv2
ROLE         : root\cli
NODE(S)      : BOBENTERPRISE
IMPLEVEL     : IMPERSONATE
[AUTHORITY   : N/A]
AUTHLEVEL    : PKTPRIVACY
LOCALE       : ms_409
PRIVILEGES   : ENABLE
TRACE        : OFF
RECORD       : N/A
INTERACTIVE  : OFF
FAILFAST     : OFF
OUTPUT       : STDOUT
APPEND       : STDOUT
USER         : N/A
AGGREGATE    : ON

To change the language ID used by the command line to English (locale ID 409), type:

wmic /locale:ms_409

Additional References



title: ftp status description: Reference article for the ftp status command, which displays the current status of your ftp connections. ms.topic: reference ms.assetid: d78c5629-6f73-4587-af0b-bd3cc3af5225 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp status

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays the current status of ftp connections.

Syntax

status

Examples

To display the current status of ftp connections, type:

status

Additional References



title: ftp rmdir description: Reference article for the ftp rmdir command, which deletes a root directory. ms.topic: reference ms.assetid: cf4778a4-9534-49c7-a061-850dc3504a67 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp rmdir

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Deletes a remote directory.

Syntax

rmdir <directory>

Parameters

Parameter Description
<directory> Specifies the name of the remote directory to delete.

Examples

To delete the pictures remote directory, type:

rmdir pictures

Additional References



title: wdsutil remove-image description: Reference article for wdsutil remove-image, which deletes an image from a server. ms.topic: reference ms.assetid: ce5e2384-2264-4b22-92af-74eec8c10ae0 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil remove-image

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Deletes an image from a server.

Syntax

for boot images:

wdsutil [Options] /remove-Image:<Image name> [/Server:<Server name> type:Boot /Architecture:{x86 | ia64 | x64} [/Filename:<Filename>]

for install images:

wdsutil [Options] /remove-image:<Image name> [/Server:<Server name> type:Install ImageGroup:<Image group name>] [/Filename:<Filename>]

Parameters

Parameter Description
/remove-image:<Image name> Specifies the name of the image.
[/Server:<Server name>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.
mediatype:{Boot | Install} Specifies the type of image.
/Architecture:{x86 | ia64 | x64} Specifies the architecture of the image. Because it is possible to have the same image name for different boot images in different architectures, specifying the architecture value ensures that the correct image will be removed.
\ImageGroup:<Image group name>] Specifies the image group that contains the image. If no image group name is specified and only one image group exists on the server, that image group will be used. If more than one image group exists, you must use this option to specify the image group.
[/Filename:<File name>] if the image cannot be uniquely identified by name, you must use this option to specify the file name.

Examples

To remove a boot image, type:

wdsutil /remove-Imagmedia:WinPE Boot Imagemediatype:Boot /Architecture:x86
wdsutil /verbose /remove-Image:WinPE Boot Image /Server:MyWDSServer type:Boot /Architecture:x64 /Filename:boot.wim

To remove an install image, type:

wdsutil /remove-Image:Windows Vista with Officemediatype:Install
wdsutil /verbose /remove-Image:Windows Vista with Office /Server:MyWDSServemediatype:Instal ImageGroup:ImageGroup1 /Filename:install.wim

Additional References



title: ftp recv description: Reference article for the ftp recv command, which copies a remote file to the local computer using the current file transfer type. ms.topic: reference ms.assetid: f249ce61-247d-421b-9b93-48bce5108800 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp recv

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Copies a remote file to the local computer using the current file transfer type.

[!NOTE] This command is the same as the ftp get command.

Syntax

recv <remotefile> [<localfile>]

Parameters

Parameter Description
<remotefile> Specifies the remote file to copy.
[<localfile>] Specifies the name of the file to use on the local computer. If localfile isn't specified, the file is given the name of the remotefile.

Examples

To copy test.txt to the local computer using the current file transfer, type:

recv test.txt

To copy test.txt to the local computer as test1.txt using the current file transfer, type:

recv test.txt test1.txt

Additional References



title: cprofile description: Reference article for the cprofile command. This command has been deprecated and is not guaranteed to be supported in future releases of Windows. ms.topic: reference ms.assetid: d83742c0-9c38-4d24-8f63-2eaad0c3c382 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

cprofile

Cprofile is deprecated and is not guaranteed to be supported in future releases of Windows.

Terminal Services has been updated to Remote Desktop Services. For more information, see Welcome to Remote Desktop Services.



title: ftp mget description: Reference article for the ftp mget command, which copies remote files to the local computer using the current file transfer type. ms.topic: reference ms.assetid: 6c85ae96-ec51-48a9-a227-7f02c7332c69 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp mget

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Copies remote files to the local computer using the current file transfer type.

Syntax

mget <remotefile>[ ]

Parameters

Parameter Description
<remotefile> Specifies the remote files to copy to the local computer.

Examples

To copy remote files a.exe and b.exe to the local computer using the current file transfer type, type:

mget a.exe b.exe

Additional References



title: color description: Reference article for the color command, which changes the foreground and background colors in the Command Prompt window for the current session. ms.topic: reference ms.assetid: f5b67131-d196-45ec-a3f9-b5d9f091fd86 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

color

Changes the foreground and background colors in the Command Prompt window for the current session. If used without parameters, color restores the default Command Prompt window foreground and background colors.

Syntax

color [[<b>]<f>]

Parameters

Parameter Description
<b> Specifies the background color.
<f> Specifies the foreground color.
/? Displays help at the command prompt.

Where:

The following table lists valid hexadecimal digits that you can use as the values for <b> and <f>:

Value Color
0 Black
1 Blue
2 Green
3 Aqua
4 Red
5 Purple
6 Yellow
7 White
8 Gray
9 Light blue
a Light green
b Light aqua
c Light red
d Light purple
e Light yellow
f Bright white

Remarks

Examples

To change the Command Prompt window background color to gray and the foreground color to red, type:

color 84

To change the Command Prompt window foreground color to light yellow, type:

color e

[!NOTE] In this example, the background is set to the default color because only one hexadecimal digit is specified.

Additional References



title: ftp hash description: Reference article for the ftp hash command, which toggles number sign (#) printing for each transferred data block. ms.topic: reference ms.assetid: 76bed9b3-3efd-4a3e-831f-460626d02c44 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp hash

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Toggles number sign (#) printing for each transferred data block. By default, the hash command is turned off. The size of a data block is 2048 bytes.

Syntax

hash

Examples

To toggle number sign (#) printing for each data block that is transferred, type:

hash

Additional References



title: retain description: Reference article for the retain command, which prepares an existing dynamic volume for use as a boot or system volume. ms.topic: reference ms.assetid: eeab0aef-2ba5-441a-a10d-bbef6f0d7e3e ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

retain

Prepares an existing simple dynamic volume for use as a boot or system volume. If you use a master boot record (MBR) dynamic disk, this command creates a partition entry in the master boot record. If you use a GUID partition table (GPT) dynamic disk, this command creates a partition entry in the GUID partition table.

Syntax

retain

Additional References



title: ftp quote description: Reference article for the ftp quote command, which sends verbatim arguments to the remote ftp server. ms.topic: reference ms.assetid: 4500a1d3-c091-42c7-a909-f61df7f2e993 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp quote

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Sends verbatim arguments to the remote ftp server. A single ftp reply code is returned.

[!NOTE] This command is the same as the ftp literal command.

Syntax

quote <argument>[ ]

Parameters

Parameter Description
<argument> Specifies the argument to send to the ftp server.

Examples

To send a quit command to the remote ftp server, type:

quote quit

Additional References



title: ftp lcd description: Reference article for the ftp lcd command, which changes the working directory on the local computer. ms.topic: reference ms.assetid: 60a25808-6abb-408b-8373-0bbdcd0994b4 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp lcd

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Changes the working directory on the local computer. By default, the working directory is the directory in which the ftp command was started.

Syntax

lcd [<directory>]

Parameters

Parameter Description
[<directory>] Specifies the directory on the local computer to which to change. If directory isn't specified, the current working directory is changed to the default directory.

Examples

To change the working directory on the local computer to c:\dir1, type:

lcd c:\dir1

Additional References



title: ftp glob description: Reference article for the ftp glob command, which toggles allowing wildcard expansion for local file names. ms.topic: reference ms.assetid: 111494f9-0083-4f48-9d35-46366debafae ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp glob

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Toggles allowing wildcard expansion for local file names. By default, globbing (wildcard expansion) is turned on. If globbing is turned on, you'll be able to use the asterisk (*) and question mark (?) as wildcard characters in local file or path names.

Syntax

glob

Examples

To toggle whether to allow wildcard expansion of local file names, type:

glob

Additional References



title: manage-bde changepassword description: Reference article for the manage-bde changepassword command, which modifies the password for a data drive. ms.topic: reference ms.assetid: b174e152-8442-4fba-8b33-56a81ff4f547 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

manage-bde changepassword

Modifies the password for a data drive. The user is prompted for a new password.

Syntax

manage-bde -changepassword [<drive>] [-computername <name>] [{-?|/?}] [{-help|-h}]

Parameters

Parameter Description
<drive> Represents a drive letter followed by a colon.
-computername Specifies that manage-bde.exe will be used to modify BitLocker protection on a different computer. You can also use -cn as an abbreviated version of this command.
<name> Represents the name of the computer on which to modify BitLocker protection. Accepted values include the computer's NetBIOS name and the computer's IP address.
-? or /? Displays brief Help at the command prompt.
-help or -h Displays complete Help at the command prompt.

Examples

To change the password used to unlock BitLocker on data drive D, type:

manage-bde –changepassword D:

Additional References



title: query commands description: Reference article for the query commands, which displays information about processes, sessions, and Remote Desktop Session Host servers. ms.topic: reference ms.assetid: 675c5128-f3cf-4e8f-8a3f-b29ab2a8b6de ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

query commands

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays information about processes, sessions, and Remote Desktop Session Host servers. To find out what's new in the latest version, see What's New in Remote Desktop Services in Windows Server.

Syntax

query process
query session
query termserver
query user

Parameters

Parameter Description
query process Displays information about processes running on an Remote Desktop Session Host server.
query session Displays information about sessions on a Remote Desktop Session Host server.
query termserver Displays a list of all Remote Desktop Session Host servers on the network.
query user Displays information about user sessions on a Remote Desktop Session Host server.

Additional References



title: ftp mdelete description: Reference article for the ftp mdelete command, which deletes files on the remote computer. ms.topic: reference ms.assetid: 8a80a8f5-e880-40a8-abc9-29a41836844f ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp mdelete

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Deletes files on the remote computer.

Syntax

mdelete <remotefile>[...]

Parameters

Parameter Description
<remotefile> Specifies the remote file to delete.

Examples

To delete remote files a.exe and b.exe, type:

mdelete a.exe b.exe

Additional References



title: manage-bde changekey description: Reference article for the manage-bde changekey command, which modifies the startup key for an operating system drive. ms.topic: reference ms.assetid: 69463db9-7e03-47ff-b233-a95d5055725f ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

manage-bde changekey

Modifies the startup key for an operating system drive.

Syntax

manage-bde -changekey [<drive>] [<pathtoexternalkeydirectory>] [-computername <name>] [{-?|/?}] [{-help|-h}]

Parameters

Parameter Description
<drive> Represents a drive letter followed by a colon.
-computername Specifies that manage-bde.exe will be used to modify BitLocker protection on a different computer. You can also use -cn as an abbreviated version of this command.
<name> Represents the name of the computer on which to modify BitLocker protection. Accepted values include the computer's NetBIOS name and the computer's IP address.
-? or /? Displays brief Help at the command prompt.
-help or -h Displays complete Help at the command prompt.

Examples

To create a new startup key on drive E, to use with BitLocker encryption on drive C, type:

manage-bde -changekey C: E:\

Additional References



title: bitsadmin setsecurityflags description: Reference article for the bitsadmin setsecurityflags command, which sets security flags for HTTP to determine if BITS should check the certificate revocation list, ignore certain certificate errors, and define the policy to use when a server redirects the HTTP request. ms.topic: reference ms.assetid: 0da5cbf5-5f7f-4833-bbbe-c4e8379a78ab ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin setsecurityflags

Sets security flags for HTTP to determine if BITS should check the certificate revocation list, ignore certain certificate errors, and define the policy to use when a server redirects the HTTP request. The value is an unsigned integer.

Syntax

bitsadmin /setsecurityflags <job> <value>

Parameters

Parameter Description
job The job's display name or GUID.
value Can include one or more of the following notification flags, including:
  • Set the least significant bit to enable CRL Check.
  • Set the 2nd bit from the right to ignore incorrect common names in the server certificate.
  • Set the 3rd bit from the right to ignore incorrect dates in the server certificate.
  • Set the 4th bit from the right to ignore incorrect certification authorities in the server certificate.
  • Set the 5th bit from the right to ignore incorrect usage of the server certificate.
  • Set the 9th through the 11th bits from the right to implement your specified redirection policy, including:
    • 0,0,0. Redirects are automatically allowed.
    • 0,0,1. Remote name in the IBackgroundCopyFile interface is updated if a redirect occurs.
    • 0,1,0. BITS fails the job if a redirect occurs.
  • Set the 12th bit from the right to allow redirection from HTTPS to HTTP.

Examples

To set the security flags to enable a CRL check for the job named myDownloadJob:

bitsadmin /setsecurityflags myDownloadJob 0x0001

Additional References



title: bitsadmin gethelpertokenflags description: Reference article for the bitsadmin gethelpertokenflags command, which returns the usage flags for a helper token that is associated with a BITS transfer job. ms.topic: reference ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 03/01/2019

bitsadmin gethelpertokenflags

Returns the usage flags for a helper token that is associated with a BITS transfer job.

[!NOTE] This command isn't supported by BITS 3.0 and earlier.

Syntax

bitsadmin /gethelpertokenflags <job>

Parameters

Parameter Description
job The job's display name or GUID.

Remarks

Possible return values, including:

Examples

To retrieve the usage flags for a helper token associated with a BITS transfer job named myDownloadJob:

bitsadmin /gethelpertokenflags myDownloadJob

Additional References



title: bitsadmin util description: Reference article for the bitsadmin util command, which lists the Util switches. ms.topic: reference ms.assetid: e8278a28-1ecc-42be-92e2-c93dee59751d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin util

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Lists the /util switches.

Lists the util switches.

Syntax

bitsadmin /util /help
bitsadmin /util /getieproxy
bitsadmin /util /repairservice
bitsadmin /util /setieproxy
bitsadmin /util /version

Parameters

Parameter Description
bitsadmin util and help Displays the command-line usage for the /Util switches. You can also specify /?.
bitsadmin util and getieproxy Retrieves the proxy usage for the given service account.
bitsadmin util and repairservice Repairs known issues with BITS service.
bitsadmin util and setieproxy Specifies proxy settings to use when transferring files using a service account.
bitsadmin util and version Displays the version of the BITS service.

Additional References



title: ftp ascii description: Reference article for the ftp ascii command, which sets the file transfer type to ASCII. ms.topic: reference ms.assetid: 523be48e-eab0-4237-8fb5-ca222824f0b6 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp ascii

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Sets the file transfer type to ASCII. The ftp command supports both ASCII (default) and binary image file transfer types, but we recommend using ASCII when transferring text files. In ASCII mode, character conversions to and from the network standard character set are performed. For example, end-of-line characters are converted as necessary, based on the target operating system.

Syntax

ascii

Examples

To set the file transfer type to ASCII, type:

ascii

Additional References



title: nslookup set timeout description: Reference article for the nslookup set timeout command, which changes the initial number of seconds to wait for a reply to a lookup request. ms.topic: reference ms.assetid: 07afdaf4-ffec-496f-a188-4e91cf1a28f8 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup set timeout

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Changes the initial number of seconds to wait for a reply to a lookup request. If a reply isn't received within the specified amount of time, the time-out period is doubled, and the request is resent. Use the nslookup set retry command to determine the number of times to try to send the request.

Syntax

set timeout=<number>

Parameters

Parameter Description
<number> Specifies the number of seconds to wait for a reply. The default number of seconds to wait is 5.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Examples

To set the timeout for getting a response to 2 seconds:

set timeout=2

Additional References



title: ftp disconnect description: Reference article for the ftp disconnect command, which disconnects from the remote computer and retains the ftp prompt. ms.topic: reference ms.assetid: f91ac304-f126-49df-9ab9-b8fa2ea515fd ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp disconnect

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Disconnects from the remote computer and remains at the ftp> prompt.

Syntax

disconnect

Examples

To disconnect from the remote computer and remains at the ftp> prompt, type:

disconnect

Additional References



title: ftp debug description: Reference article for the ftp debug command, which toggles Debugging mode. ms.topic: reference ms.assetid: 16293dbf-1b7f-4b62-be4d-876179563ad7 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp debug

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Toggles Debugging mode. By default, Debugging mode is turned off. If Debugging mode is turned on, you'll see each command sent to the remote computer, preceeded by the > character.

Syntax

debug

Examples

To toggle debug mode on and off, type:

debug

Additional References



title: ftp delete description: Reference article for the ftp delete command, which deletes files on remote computers. ms.topic: reference ms.assetid: 067c45f3-e4e8-4450-b8b6-836994f6adfe ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp delete

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Deletes files on remote computers.

Syntax

delete <remotefile>

Parameters

Parameter Description
<remotefile> Specifies the file to delete.

Examples

To delete the test.txt file on the remote computer, type:

delete test.txt

Additional References



title: ftp cd description: Reference article for the ftp cd command, which changes the working directory on the remote computer. ms.topic: reference ms.assetid: a574855a-31b4-45c6-bce2-581c7231c99b ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp cd

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Changes the working directory on the remote computer.

Syntax

cd <remotedirectory>

Parameters

Parameter Description
<remotedirectory> Specifies the directory on the remote computer to which you want to change.

Examples

To change the directory on the remote computer to Docs, type:

cd Docs

To change the directory on the remote computer to May Videos, type:

cd  May Videos

Additional References



title: ftp close description: Reference article for the ftp close command, which ends the ftp session with the remote server and remains at the ftp prompt. ms.topic: reference ms.assetid: 1dc344a9-64f7-45bc-9d44-a48afc844e36 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp close

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Ends the ftp session with the remote server and remains at the ftp> prompt.

Syntax

close

Examples

To end the ftp session with the remote server and remain at the ftp> prompt, type:

close

Additional References



title: ftp binary description: Reference article for the ftp binary command, which sets the file transfer type to binary. ms.topic: reference ms.assetid: ee925b4d-85d2-47b1-b7d6-3832b7ec5505 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp binary

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Sets the file transfer type to binary. The ftp command supports both ASCII (default) and binary image file transfer types, but we recommend using binary when transferring executable files. In binary mode, files are transferred in one-byte units.

Syntax

binary

Examples

To set the file transfer type to binary, type:

binary

Additional References



title: eventcreate description: Reference article for the eventcreate command, which enables an administrator to create a custom event in a specified event log. ms.topic: reference ms.assetid: f2b1b26d-a70e-49a6-832b-91eb5a1a159a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

eventcreate

Enables an administrator to create a custom event in a specified event log.

[!IMPORTANT] Custom events can't be written to the security log.

Syntax

eventcreate [/s <computer> [/u <domain\user> [/p <password>]] {[/l {APPLICATION|SYSTEM}]|[/so <srcname>]} /t {ERROR|WARNING|INFORMATION|SUCCESSAUDIT|FAILUREAUDIT} /id <eventID> /d <description>

Parameters

Parameter Description
/s <computer> Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer.
/u <domain\user> Runs the command with the account permissions of the user specified by <user> or <domain\user>. The default is the permissions of the current logged on user on the computer issuing the command.
/p <password> Specifies the password of the user account that is specified in the /u parameter.
/l `{APPLICATION SYSTEM}` Specifies the name of the event log where the event will be created. The valid log names are APPLICATION or SYSTEM.
/so <srcname> Specifies the source to use for the event. A valid source can be any string and should represent the application or component that is generating the event.
/t `{ERROR WARNING INFORMATION SUCCESSAUDIT FAILUREAUDIT}` Specifies the type of event to create. The valid types are ERROR, WARNING, INFORMATION, SUCCESSAUDIT, and FAILUREAUDIT.
/id <eventID> Specifies the event ID for the event. A valid ID is any number from 1 to 1000.
/d <description> Specifies the description to use for the newly created event.
/? Displays help at the command prompt.

Examples

The following examples show how you can use the eventcreate command:

eventcreate /t ERROR /id 100 /l application /d "Create event in application log"
eventcreate /t INFORMATION /id 1000 /d "Create event in WinMgmt source"
eventcreate /t ERROR /id 201 /so winword /l application /d "New src Winword in application log"
eventcreate /s server /t ERROR /id 100 /l application /d "Remote machine without user credentials"
eventcreate /s server /u user /p password /id 100 /t ERROR /l application /d "Remote machine with user credentials"
eventcreate /s server1 /s server2 /u user /p password /id 100 /t ERROR /d "Creating events on Multiple remote machines"
eventcreate /s server /u user /id 100 /t WARNING /d "Remote machine with partial user credentials"

Additional References



title: ftp bell description: Reference article for the ftp bell command, which toggles an audible sound to occur after each file transfer command is completed. ms.topic: reference ms.assetid: bfc00fb6-b3d0-42a1-ac6d-df46f89dc152 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp bell

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Toggles an audible sound to occur after each file transfer command is completed. By default, this command is toggled off.

Syntax

bell

Examples

To toggle an audible sound to occur after each file transfer command is completed, type:

bell

Additional References



title: dfsdiag testdcs description: Reference article for the dfsdiag testdcs command, which checks the configuration of domain controllers in the specified domain. ms.topic: reference ms.assetid: abb915ab-23eb-45d7-9a2e-b6b9a5756a70 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

dfsdiag testdcs

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Checks the configuration of domain controllers by performing the following tests on each domain controller in the specified domain:

Syntax

dfsdiag /testdcs [/domain:<domain_name>]

Parameters

Parameter Description
/domain:<domain_name> Name of the domain to check. This parameter is optional. The default value is the local domain to which the local host is joined.

Examples

To verify the configuration of domain controllers in the contoso.com domain, type:

dfsdiag /testdcs /domain:contoso.com

Additional References



title: dispdiag description: Reference article for the dispdiag command, which logs display information to a file. ms.topic: reference ms.assetid: 5079e1dd-b57c-44ed-970f-e6b409369e03 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

dispdiag

Logs display information to a file.

Syntax

dispdiag [-testacpi] [-d] [-delay <seconds>] [-out <filepath>]

Parameters

Parameter Description
- testacpi Runs hotkey diagnostics test. Displays the key name, code and scan code for any key pressed during the test.
-d Generates a dump file with test results.
-delay <seconds> Delays the collection of data by specified time in seconds.
-out <filepath> Specifies path and filename to save collected data. This must be the last parameter.
-? Displays available command parameters and provides help for using them.

Additional References



title: fsutil usn description: Reference article for the fsutil usn command, which manages the update sequence number (USN) change journal. manager: dmoss ms.author: toklima author: toklima ms.assetid: faad34aa-4ba1-4129-bc1f-08088399e2fa ms.topic: reference ms.date: 10/16/2017

fsutil usn

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8

Manages the update sequence number (USN) change journal. The USN change journal provides a persistent log of all changes made to files on the volume. As files, directories, and other NTFS objects are added, deleted, and modified, NTFS enters records into the USN change journal, one for each volume on the computer. Each record indicates the type of change and the object changed. New records are appended to the end of the stream.

Syntax

fsutil usn [createjournal] m=<maxsize> a=<allocationdelta> <volumepath>
fsutil usn [deletejournal] {/d | /n} <volumepath>
fsutil usn [enablerangetracking] <volumepath> [options]
fsutil usn [enumdata] <fileref> <lowUSN> <highUSN> <volumepath>
fsutil usn [queryjournal] <volumepath>
fsutil usn [readdata] <filename>
fsutil usn [readjournal] [c= <chunk-size> s=<file-size-threshold>] <volumepath>

Parameters

Parameter Description
createjournal Creates a USN change journal.
m=<maxsize> Specifies the maximum size, in bytes, that NTFS allocates for the change journal.
a=<allocationdelta> Specifies the size, in bytes, of memory allocation that is added to the end and removed from the beginning of the change journal.
<volumepath> Specifies the drive letter (followed by a colon).
deletejournal Deletes or disables an active USN change journal.

CAUTION: Deleting the change journal impacts the File Replication Service (FRS) and the Indexing Service, because it requires these services to perform a complete (and time-consuming) scan of the volume. This in turn negatively impacts FRS SYSVOL replication and replication between DFS link alternates while the volume is being rescanned.

/d Disables an active USN change journal, and returns input/output (I/O) control while the change journal is being disabled.
/n Disables an active USN change journal and returns I/O control only after the change journal is disabled.
enablerangetracking Enables USN write range tracking for a volume.
c=<chunk-size> Specifies the chunk size to track on a volume.
s=<file-size-threshold> Specifies the file size threshold for range tracking.
enumdata Enumerates and lists the change journal entries between two specified boundaries.
<fileref> Specifies the ordinal position within the files on the volume at which the enumeration is to begin.
<lowUSN> Specifies the lower boundary of the range of USN values used to filter the records that are returned. Only records whose last change journal USN is between or equal to the lowUSN and highUSN member values are returned.
<highUSN> Specifies the upper boundary of the range of USN values used to filter the files that are returned.
queryjournal Queries a volume's USN data to gather information about the current change journal, its records, and its capacity.
readdata Reads the USN data for a file.
<filename> Specifies the full path to the file, including the file name and extension For example: C:\documents\filename.txt.
readjournal Reads the USN records in the USN journal.
minver=<number> Minimum Major Version of USN_RECORD to return. Default = 2.
maxver=<number> Maximum Major Version of USN_RECORD to return. Default = 4.
startusn=<USN number> USN to start reading the USN journal from. Default = 0.

Remarks

Examples

To create a USN change journal on drive C, type:

fsutil usn createjournal m=1000 a=100 c:

To delete an active USN change journal on drive C, type:

fsutil usn deletejournal /d c:

To enable range tracking with a specified chunk-size and file-size-threshold, type:

fsutil usn enablerangetracking c=16384 s=67108864 C:

To enumerate and list the change journal entries between two specified boundaries on drive C, type:

fsutil usn enumdata 1 0 1 c:

To query USN data for a volume on drive C, type:

fsutil usn queryjournal c:

To read the USN data for a file in the \Temp folder on drive C, type:

fsutil usn readdata c:\temp\sample.txt

To read the USN journal with a specific start USN, type:

fsutil usn readjournal startusn=0xF00

Additional References



title: evntcmd description: Reference article for the evntcmd command, which configures the translation of events to traps, trap destinations, or both based on information in a configuration file. ms.topic: reference ms.assetid: c1aabb74-76e7-4304-95a6-50ad87e92fd9 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

evntcmd

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Configures the translation of events to traps, trap destinations, or both based on information in a configuration file.

Syntax

evntcmd [/s <computername>] [/v <verbositylevel>] [/n] <filename>

Parameters

Parameter Description
/s <computername> Specifies, by name, the computer on which you want to configure the translation of events to traps, trap destinations, or both. If you do not specify a computer, the configuration occurs on the local computer.
/v <verbositylevel> Specifies which types of status messages appear as traps and trap destinations are configured. This parameter must be an integer between 0 and 10. If you specify 10, all types of messages appear, including tracing messages and warnings about whether trap configuration was successful. If you specify 0, no messages appear.
/n Specifies that the SNMP service should not be restarted if this computer receives trap configuration changes.
<filename> Specifies, by name, the configuration file that contains information about the translation of events to traps and trap destinations you want to configure.
/? Displays help at the command prompt.

Remarks

  #pragma add <eventlogfile> <eventsource> <eventID> [<count> [<period>]]

Where the text following is true:

- **#pragma** must appear at the beginning of every entry in the file.

- The parameter **add** specifies that you want to add an event to trap configuration.

- The parameters **eventlogfile**, **eventsource**, and **eventID** are required, and where **eventlogfile** specifies the file in which the event is recorded, **eventsource** specifies the application that generates the event and **eventID** specifies the unique number that identifies each event.

To determine what values correspond to each event, start the Event to Trap Translator by typing **evntwin** at a command prompt. Click **Custom**, and then click **edit**. Under **Event Sources**, browse the folders until you locate the event you want to configure, click it, and then click **add**. Information about the event source, the event log file, and the event ID appear under **Source,  Log**, and **Trap specific ID**, respectively.

- The **count** parameter is optional, and it specifies how many times the event must occur before a trap message is sent. If you don't use this parameter, the trap message is sent after the event occurs once.

- The **period** parameter is optional, but it requires you to use the **count** parameter. The **period** parameter specifies a length of time (in seconds) during which the event must occur the number of times specified with the **count** parameter before a trap message is sent. If you don't use this parameter, a trap message is sent after the event occurs the number of times specified with the ***count*** parameter, no matter how much time elapses between occurrences.
  #pragma delete <eventlogfile> <eventsource> <eventID>

Where the text following is true:

- **#pragma** must appear at the beginning of every entry in the file.

- The parameter **delete** specifies that you want to remove an event to trap configuration.

- The parameters **eventlogfile**, **eventsource**, and **eventID** are required, and where **eventlogfile** specifies the file in which the event is recorded, **eventsource** specifies the application that generates the event and **eventID** specifies the unique number that identifies each event.

To determine what values correspond to each event, start the Event to Trap Translator by typing **evntwin** at a command prompt. Click **Custom**, and then click **edit**. Under **Event Sources**, browse the folders until you locate the event you want to configure, click it, and then click **add**. Information about the event source, the event log file, and the event ID appear under **Source,  Log**, and **Trap specific ID**, respectively.
  #pragma add_TRAP_DEST <communityname> <hostID>

Where the text following is true:

- **#pragma** must appear at the beginning of every entry in the file.

- The parameter **add_TRAP_DEST** specifies that you want trap messages to be sent to a specified host within a community.

- The parameter **communityname** specifies, by name, the community in which trap messages are sent.

- The parameter **hostID** specifies, by name or IP address, the host to which you want trap messages to be sent.
  #pragma delete_TRAP_DEST <communityname> <hostID>

Where the text following is true:

- **#pragma** must appear at the beginning of every entry in the file.

- The parameter **delete_TRAP_DEST** specifies that you do not want trap messages to be sent to a specified host within a community.

- The parameter **communityname** specifies, by name, the community to which trap messages shouldn't be sent.

- The parameter **hostID** specifies, by name or IP address, the host to which you don't want trap messages to be sent.

Examples

The following examples illustrate entries in the configuration file for the evntcmd command. They are not designed to be typed at a command prompt.

To send a trap message if the Event Log service is restarted, type:

#pragma add System Eventlog 2147489653

To send a trap message if the Event Log service is restarted twice in three minutes, type:

#pragma add System Eventlog 2147489653 2 180

To stop sending a trap message whenever the Event Log service is restarted, type:

#pragma delete System Eventlog 2147489653

To send trap messages within the community named Public to the host with the IP address 192.168.100.100, type:

#pragma add_TRAP_DEST public 192.168.100.100

To send trap messages within the community named Private to the host named Host1, type:

#pragma add_TRAP_DEST private Host1

To stop sending trap messages within the community named Private to the same computer on which you are configuring trap destinations, type:

#pragma delete_TRAP_DEST private localhost

Additional References



title: bootcfg query description: Reference article for the bootcfg query command, which queries and displays the boot loader and operating system section entries from Boot.ini. ms.topic: reference ms.assetid: a4cacfd1-10a6-4a11-b0c5-f8abde72bfc8 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bootcfg query

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Queries and displays the [boot loader] and [operating systems] section entries from Boot.ini.

Syntax

bootcfg /query [/s <computer> [/u <domain>\<user> /p <password>]]

Parameters

Parameter Description
/s <computer> Specifies the name or IP address of a remote computer (don't use backslashes). The default is the local computer.
/u <domain>\<user> Runs the command with the account permissions of the user specified by <user> or <domain>\<user>. The default is the permissions of the current logged on user on the computer issuing the command.
/p <password> Specifies the password of the user account that is specified in the /u parameter.
/? Displays help at the command prompt.

Sample output

Sample output for the bootcfg /query command:

Boot Loader Settings
----------
timeout: 30
default: multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
Boot Entries
------
Boot entry ID:   1
Friendly Name:
path: multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
OS Load Options: /fastdetect /debug /debugport=com1:

Examples

To use the bootcfg /query command:

bootcfg /query
bootcfg /query /s srvmain /u maindom\hiropln /p p@ssW23
bootcfg /query /u hiropln /p p@ssW23

Additional References



title: fsutil transaction description: Reference article for the fsutil transaction command, which manages NTFS transactions. manager: dmoss ms.author: toklima author: toklima ms.assetid: f2eefaaf-2817-4ac7-abac-d2b65fa971dc ms.topic: reference ms.date: 10/16/2017

fsutil transaction

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8

Manages NTFS transactions.

Syntax

fsutil transaction [commit] <GUID>
fsutil transaction [fileinfo] <filename>
fsutil transaction [list]
fsutil transaction [query] [{files | all}] <GUID>
fsutil transaction [rollback] <GUID>

Parameters

Parameter Description
commit Marks the end of a successful implicit or explicit specified transaction.
<GUID> Specifies the GUID value that represents a transaction.
fileinfo Displays transaction information for the specified file.
<filename> Specifies full path and file name.
list Displays a list of currently running transactions.
query Displays information for the specified transaction.
  • If fsutil transaction query files is specified, the file information is displayed only for the specified transaction.
  • If fsutil transaction query all is specified, all information for the transaction will be displayed.
rollback Rolls back a specified transaction to the beginning.

Examples

To display transaction information for file c:\test.txt, type:

fsutil transaction fileinfo c:\test.txt

Additional References



title: fsutil dirty description: Reference article for the fsutil dirty command, which queries or sets a volume's dirty bit. manager: dmoss ms.author: toklima author: toklima ms.assetid: 385a2a7c-d6bd-4f11-9c18-fca0413f9e97 ms.topic: reference ms.date: 10/16/2017

fsutil dirty

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8

Queries or sets a volume's dirty bit. When a volume's dirty bit is set, autochk automatically checks the volume for errors the next time the computer is restarted.

Syntax

fsutil dirty {query | set} <volumepath>

Parameters

Parameter Description
query Queries the specified volume's dirty bit.
set Sets the specified volume's dirty bit.
<volumepath> Specifies the drive name followed by a colon or GUID in the following format: volume{GUID}.

Remarks

Examples

To query the dirty bit on drive C, type:

fsutil dirty query c:

To set the dirty bit on drive C, type:

fsutil dirty set C:

Additional References



title: freedisk description: Reference article for the freedisk command, which checks to see if the specified amount of disk space is available before continuing with an installation process. ms.topic: reference ms.assetid: 91c15166-5baa-4b80-9e0c-4cd815d00530 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

freedisk

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Checks to see if the specified amount of disk space is available before continuing with an installation process.

Syntax

freedisk [/s <computer> [/u [<domain>\]<user> [/p [<password>]]]] [/d <drive>] [<value>]

Parameters

Parameter Description
/s <computer> Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer. This parameter applies to all files and folders specified in the command.
/u [<domain>\]<user> Runs the script with the permissions of the specified user account. The default is system permissions.
/p [<password>] Specifies the password of the user account that is specified in /u.
/d <drive> Specifies the drive for which you want to find out the availability of free space. You must specify <drive> for a remote computer.
<value> Checks for a specific amount of free disk space. You can specify <value> in bytes, KB, MB, GB, TB, PB, EB, ZB, or YB.

Remarks

Examples

To determine whether there are at least 50 MB of free space available on drive C, type:

freedisk 50mb

Output similar to the following example appears on the screen:

INFO: The specified 52,428,800 byte(s) of free space is available on current drive.

Additional References



title: create volume stripe description: Reference article for the create volume stripe command, which creates a striped volume using two or more specified dynamic disks. ms.topic: reference ms.assetid: 20dce735-5f7c-4f83-a580-d087e2913a00 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

create volume stripe

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates a striped volume using two or more specified dynamic disks. After you create the volume, the focus automatically shifts to the new volume.

Syntax

create volume stripe [size=<n>] disk=<n>,<n>[,<n>,...] [align=<n>] [noerr]

Parameters

Parameter Description
size=<n> The amount of disk space, in megabytes (MB), that the volume will occupy on each disk. If no size is given, the new volume takes up the remaining free space on the smallest disk and an equal amount of space on each subsequent disk.
disk=<n>,<n>[,<n>,...] The dynamic disks on which the striped volume is created. You need at least two dynamic disks to create a striped volume. An amount of space equal to size=<n> is allocated on each disk.
align=<n> Aligns all volume extents to the closest alignment boundary. Typically used with hardware RAID Logical Unit Number (LUN) arrays to improve performance. <n> is the number of kilobytes (KB) from the beginning of the disk to the closest alignment boundary.
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To create a striped volume of 1000 megabytes in size, on disks 1 and 2, type:

create volume stripe size=1000 disk=1,2

Additional References



title: create volume simple description: Reference article for the create volume simple command, which creates a simple volume on the specified dynamic disk. ms.topic: reference ms.assetid: da0f208d-7fda-471a-9db2-5de5ba5207c6 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

create volume simple

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates a simple volume on the specified dynamic disk. After you create the volume, the focus automatically shifts to the new volume.

Syntax

create volume simple [size=<n>] [disk=<n>] [align=<n>] [noerr]

Parameters

Parameter Description
size=<n> The size of the volume in megabytes (MB). If no size is given, the new volume takes up the remaining free space on the disk.
disk=<n> The dynamic disk on which the volume is created. If no disk is specified, the current disk is used.
align=<n> Aligns all volume extents to the closest alignment boundary. Typically used with hardware RAID Logical Unit Number (LUN) arrays to improve performance. <n> is the number of kilobytes (KB) from the beginning of the disk to the closest alignment boundary.
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To create a volume of 1000 megabytes in size, on disk 1, type:

create volume simple size=1000 disk=1

Additional References



title: Fsutil fsinfo description: Reference article for the fsutil fsinfo command, which lists all drives, queries the drive type, queries volume information, queries NTFS-specific volume information, or queries file system statistics. manager: dmoss ms.author: toklima author: toklima ms.assetid: 7787a72e-a26b-415f-b700-a32806803478 ms.topic: reference ms.date: 10/16/2017

fsutil fsinfo

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8

Lists all drives, queries the drive type, queries volume information, queries NTFS-specific volume information, or queries file system statistics.

Syntax

fsutil fsinfo [drives]
fsutil fsinfo [drivetype] <volumepath>
fsutil fsinfo [ntfsinfo] <rootpath>
fsutil fsinfo [statistics] <volumepath>
fsutil fsinfo [volumeinfo] <rootpath>

Parameters

Parameter Description
drives Lists all drives in the computer.
drivetype Queries a drive and lists its type, for example CD-ROM drive.
ntfsinfo Lists NTFS specific volume information for the specified volume, such as the number of sectors, total clusters, free clusters, and the start and end of the MFT Zone.
sectorinfo Lists information about the hardware's sector size and alignment.
statistics Lists file system statistics for the specified volume, such as metadata, log file, and MFT reads and writes.
volumeinfo Lists information for the specified volume, such as the file system, and whether the volume supports case-sensitive file names, unicode in file names, disk quotas, or is a DirectAccess (DAX) volume.
<volumepath>: Specifies the drive letter (followed by a colon).
<rootpath>: Specifies the drive letter (followed by a colon) of the root drive.

Examples

To list all of the drives in the computer, type:

fsutil fsinfo drives

Output similar to the following displays:

Drives: A:\ C:\ D:\ E:\

To query the drive type of drive C, type:

fsutil fsinfo drivetype c:

Possible results of the query include:

Unknown Drive
No such Root Directory
Removable Drive, for example floppy
Fixed Drive
Remote/Network Drive
CD-ROM Drive
Ram Disk

To query the volume information for volume E, type:

fsinfo volumeinfo e:\

Output similar to the following displays:

Volume Name : Volume
Serial Number : 0xd0b634d9
Max Component Length : 255
File System Name : NTFS
Supports Named Streams
Is DAX Volume

To query drive F for NTFS-specific volume information, type:

fsutil fsinfo ntfsinfo f:

Output similar to the following displays:

NTFS Volume Serial Number : 0xe660d46a60d442cb
Number Sectors : 0x00000000010ea04f
Total Clusters : 0x000000000021d409
Mft Zone End : 0x0000000000004700

To query the file system's underlying hardware for sector information, type:

fsinfo sectorinfo d:

Output similar to the following displays:

D:\>fsutil fsinfo sectorinfo d:
LogicalBytesPerSector : 4096
PhysicalBytesPerSectorForAtomicity : 4096
Trim Not Supported
DAX capable

To query the file system statistics for drive E, type:

fsinfo statistics e:

Output similar to the following displays:

File System Type : NTFS
Version : 1
UserFileReads : 75021
UserFileReadBytes : 1305244512
LogFileWriteBytes : 180936704

Additional References



title: detail partition description: Reference article for the detail partition command, which displays the properties of the selected partition. ms.topic: reference ms.assetid: 672a2c7a-1721-4845-9c23-7af50367170e ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

detail partition

Displays the properties of the selected partition. Before you begin, you must select a partition for this operation to succeed. Use the select partition command to select a partition and shift the focus to it.

Syntax

detail partition

Examples

To see the properties of the selected partition, type:

detail partition

Additional References



title: fsutil description: Reference article for the fsutil command, which performs tasks that are related to file allocation table (FAT) and NTFS file systems. manager: dmoss ms.author: toklima author: toklima ms.assetid: 2e748187-6a10-4bb0-aed5-34f886a250d2 ms.topic: reference ms.date: 08/21/2018

fsutil

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7

Performs tasks that are related to file allocation table (FAT) and NTFS file systems, such as managing reparse points, managing sparse files, or dismounting a volume. If it's used without parameters, fsutil displays a list of supported subcommands.

[!NOTE] You must be logged on as an administrator or a member of the Administrators group to use fsutil. This command is quite powerful and should be used only by advanced users who have a thorough knowledge of Windows operating systems.

You must enable Windows Subsystem for Linux before you can run fsutil. Run the following command as Administrator in PowerShell to enable this optional feature:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

You'll be prompted to restart your computer once it's installed. After your computer restarts, you'll be able to run Fsutil as an administrator.

Parameters

Subcommand Description
fsutil 8dot3name Queries or changes the settings for short name behavior on the system, for example, generates 8.3 character-length file names. Removes short names for all files within a directory. Scans a directory and identifies registry keys that might be impacted if short names were stripped from the files in the directory.
fsutil dirty Queries whether the volume's dirty bit is set or sets a volume's dirty bit. When a volume's dirty bit is set, autochk automatically checks the volume for errors the next time the computer is restarted.
fsutil file Finds a file by user name (if Disk Quotas are enabled), queries allocated ranges for a file, sets a file's short name, sets a file's valid data length, sets zero data for a file, creates a new file of a specified size, finds a file ID if given the name, or finds a file link name for a specified file ID.
fsutil fsinfo Lists all drives and queries the drive type, volume information, NTFS-specific volume information, or file system statistics.
fsutil hardlink Lists hard links for a file, or creates a hard link (a directory entry for a file). Every file can be considered to have at least one hard link. On NTFS volumes, each file can have multiple hard links, so a single file can appear in many directories (or even in the same directory, with different names). Because all of the links reference the same file, programs can open any of the links and modify the file. A file is deleted from the file system only after all links to it are deleted. After you create a hard link, programs can use it like any other file name.
fsutil objectid Manages object identifiers, which are used by the Windows operating system to track objects such as files and directories.
fsutil quota Manages disk quotas on NTFS volumes to provide more precise control of network-based storage. Disk quotas are implemented on a per-volume basis and enable both hard- and soft-storage limits to be implemented on a per-user basis.
fsutil repair Queries or sets the self-healing state of the volume. Self-healing NTFS attempts to correct corruptions of the NTFS file system online without requiring Chkdsk.exe to be run. Includes initiating on-disk verification and waiting for repair completion.
fsutil reparsepoint Queries or deletes reparse points (NTFS file system objects that have a definable attribute containing user-controlled data). Reparse points are used to extend functionality in the input/output (I/O) subsystem. They are used for directory junction points and volume mount points. They are also used by file system filter drivers to mark certain files as special to that driver.
fsutil resource Creates a Secondary Transactional Resource Manager, starts or stops a Transactional Resource Manager, displays information about a Transactional Resource Manager or modifies its behavior.
fsutil sparse Manages sparse files. A sparse file is a file with one or more regions of unallocated data in it. A program will see these unallocated regions as containing bytes with the value zero, but no disk space is used to represent these zeros. All meaningful or nonzero data is allocated, whereas all non-meaningful data (large strings of data composed of zeros) is not allocated. When a sparse file is read, allocated data is returned as stored and unallocated data is returned as zeros (by default in accordance with the C2 security requirement specification). Sparse file support allows data to be deallocated from anywhere in the file.
fsutil tiering Enables management of storage tier functions, such as setting and disabling flags and listing of tiers.
fsutil transaction Commits a specified transaction, rolls back a specified transaction, or displays info about the transaction.
fsutil usn Manages the update sequence number (USN) change journal, which provides a persistent log of all changes made to files on the volume.
fsutil volume Manages a volume. Dismounts a volume, queries to see how much free space is available on a disk, or finds a file that is using a specified cluster.
fsutil wim Provides functions to discover and manage WIM-backed files.

Additional References



title: chglogon description: Reference article for the chglogon command, which enables or disables logons from client sessions on an Remote Desktop Session Host server, or displays current logon status. ms.topic: reference ms.assetid: 8280c5b3-ac10-48ae-87ca-678594837f03 ms.date: 10/16/2017 ms.author: jgerend author: JasonGerend manager: mtillman

chglogon

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Enables or disables logons from client sessions on an Remote Desktop Session Host server, or displays current logon status.

[!NOTE] This command has been replaced by the change log command. For more information, including the syntax and parameter details, see change logon command.

Additional References



title: chdir description: Reference article for the chdir command, which performs the same actions as the cd command. ms.topic: reference ms.assetid: 8d78901e-4f6e-4cb6-9ff8-ccf5a9d04fac ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

chdir

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays the name of the current directory or changes the current directory. If used with only a drive letter (for example, chdir C:), chdir displays the names of the current directory in the specified drive. If used without parameters, chdir displays the current drive and directory.

[!NOTE] This command has been replaced by the cd command. For more information, including the syntax and parameter details, see cd command.

Additional References



title: dfsutil description: Reference article for the dfsutil command, which manages DFS Namespaces, servers and clients. ms.topic: reference ms.assetid: ef5093a4-0d24-4b21-9d04-59933ad98e2c ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

dfsutil

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

The dfsutil command manages DFS Namespaces, servers, and clients.

Functionality available in PowerShell

The DFSN PowerShell module provides equivalent functionality to the following dfsutil parameters.

Parameter Description
root Displays, creates, removes, imports, exports namespace roots.
link Displays, creates, removes, or moves folders (links).
target Displays, create, remove folder target or namespace server.
property Displays or modifies a folder target or namespace server.
server Displays or modifies namespace configuration.
domain Displays all domain-based namespaces in a domain.

Functionality available only in dfsutil

The following functionality is available only as dfsutil parameters:

Parameter Description
client Displays or modifies client information or registry keys.
diag Perform diagnostics or view dfsdirs/dfspath.
cache Displays or flushes the client cache.

For more info about each of these commands, open a command prompt on a server with the DFS Namespaces management tools installed, and then type dfsutil client /?, dfsutil diag /?, or dfsutil cache /?.

Additional References



title: cd description: Reference article for the cd command, which displays the name of or changes the current directory. ms.topic: reference ms.assetid: 932d9cc1-3dff-40da-835c-1cb0894874f1 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

cd

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays the name of the current directory or changes the current directory. If used with only a drive letter (for example, cd C:), cd displays the names of the current directory in the specified drive. If used without parameters, cd displays the current drive and directory.

[!NOTE] This command is the same as the chdir command.

Syntax

cd [/d] [<drive>:][<path>]
cd [..]
chdir [/d] [<drive>:][<path>]
chdir [..]

Parameters

Parameter Description
/d Changes the current drive as well as the current directory for a drive.
<drive>: Specifies the drive to display or change (if different from the current drive).
<path> Specifies the path to the directory that you want to display or change.
[..] Specifies that you want to change to the parent folder.
/? Displays help at the command prompt.

Remarks

If command extensions are enabled, the following conditions apply to the cd command:

  cd username\programs\start menu

is the same as:

  cd "username\programs\start menu"

If extensions are disabled, the quotation marks are required.

  cmd /e:off

Examples

To return to the root directory, the top of the directory hierarchy for a drive:

cd\

To change the default directory on a drive that is different from the one you are on:

cd [<drive>:[<directory>]]

To verify the change to the directory, type:

cd [<drive>:]

Additional References



title: finger description: Reference article for the finger command, which displays information about users on a specified remote computer running the finger service or daemon. ms.topic: reference ms.assetid: 907ea637-5c6c-4752-84c2-46bbf2a68a33 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

finger

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays information about users on a specified remote computer (typically a computer running UNIX) that is running the finger service or daemon. The remote computer specifies the format and output of the user information display. Used without parameters, finger displays help.

[!IMPORTANT] This command is available only if the Internet Protocol (TCP/IP) protocol is installed as a component in the properties of a network adapter in Network Connections.

Syntax

finger [-l] [<user>] [@<host>] [...]

Parameters

Parameter Description
-l Displays user information in long list format.
<user> Specifies the user about which you want information. If you omit the user parameter, this command displays information about all users on the specified computer.
@<host> Specifies the remote computer running the finger service where you are looking for user information. You can specify a computer name or IP address.
/? Displays help at the command prompt.

Remarks

Examples

To display information for user1 on the computer users.microsoft.com, type:

finger user1@users.microsoft.com

To display information for all users on the computer users.microsoft.com, type:

finger @users.microsoft.com

Additional References



title: break description: Reference article for the break command, which breaks the mirrored volume with focus into two simple volumes. ms.topic: reference ms.assetid: ffc4901c-457b-46a6-a671-3052355f8a3c ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

break

[!IMPORTANT] This command is no longer in use. It is included only to preserve compatibility with existing MS-DOS files, but it has no effect at the command line because the functionality is automatic.

Sets or clears extended CTRL+C checking on MS-DOS systems. If used without parameters, break displays the existing setting value.

If command extensions are enabled and running on the Windows platform, inserting the break command into a batch file enters a hard-coded breakpoint if being debugged by a debugger.

Syntax

break=[on|off]

[!NOTE] Because the break command has no effect, it is often used to create empty files or delete the content of an existing file. For example:

rem -- cleans the content of the file --
break>log

Additional References



title: extract description: Reference article for the extract command, which extracts files from a source location. ms.topic: reference ms.assetid: 20dab03e-f6e1-4eb8-b8a1-fd6f1d97ee83 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 12/29/2020

extract / extrac32

Extracts files from a cabinet or source.

[!NOTE] On Windows Server 2016 and newer, and on Windows 10, the program file Extract.exe is neither provided nor supported. It is replaced by Extrac32.exe, originally part of Internet Explorer, now part of the operating system.

Syntax

Extract.exe

extract [/y] [/a] [/d | /e] [/l dir] cabinet [filename ...]
extract [/y] source [newname]
extract [/y] /c source destination

Parameters

Parameter Description
cabinet Use if you want to extract two or more files.
filename Name of the file to extract from the cabinet. Wild cards and multiple filenames (separated by blanks) may be used.
source Compressed file (a cabinet with only one file).
newname New filename to give the extracted file. If not supplied, the original name is used.
/a Process ALL cabinets. Follows cabinet chain starting in first cabinet mentioned.
/c Copy source file to destination (to copy from DMF disks).
/d Display cabinet directory (use with filename to avoid extract).
/e Extract (use instead of . to extract all files).
/l dir Location to place extracted files (default is current directory).
/y Don't prompt before overwriting an existing file.

Extrac32.exe

[!NOTE] Extrac32.exe can be used from the command line, but does not display any output on the console. Redirect the help output through the more command, like this: extrac32.exe /? | more

Extrac32 [/Y] [/A] [/D | /E] [/L dir] cabinet [filename ...]
Extrac32 [/Y] source [newname]
Extrac32 [/Y] /C source destination

Parameters

Parameter Description
cabinet Cabinet file (contains two or more files).
filename Name of the file to extract from the cabinet. Wild cards and multiple filenames (separated by blanks) may be used.
source Compressed file (a cabinet with only one file).
newname New filename to give the extracted file. If not supplied, the original name is used.
/A Process ALL cabinets. Follows cabinet chain starting in first cabinet mentioned.
/C Copy source file to destination (to copy from DMF disks).
/D Display cabinet directory (use with filename to avoid extract).
/E Extract (use instead of . to extract all files).
/L dir Location to place extracted files (default is current directory).
/Y Do not prompt before overwriting an existing file.

Additional References



title: convert dynamic description: Reference article for the convert dynamic command, which converts a basic disk into a dynamic disk. ms.topic: reference ms.assetid: 7b8fa4b1-850f-4e48-b05f-871c883ea33c ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

convert dynamic

Converts a basic disk into a dynamic disk. A basic disk must be selected for this operation to succeed. Use the select disk command to select a basic disk and shift the focus to it.

[!NOTE] For instructions regarding how to use this command, see Change a Dynamic Disk Back to a Basic Disk).

Syntax

convert dynamic [noerr]

Parameters

Parameter Description
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Remarks

Examples

To convert a basic disk into a dynamic disk, type:

convert dynamic

Additional References



title: expand description: Reference article for the expand command, which expands one or more compressed files. ms.topic: reference ms.assetid: 66de0488-a0c4-40c2-9b03-e40c107ba343 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

expand

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Expands one or more compressed files. You can also use this command to retrieve compressed files from distribution disks.

The expand command can also run from the Windows Recovery Console, using different parameters. For more information, see Windows Recovery Environment (WinRE).

Syntax

expand [/r] <source> <destination>
expand /r <source> [<destination>]
expand /i <source> [<destination>]
expand /d <source>.cab [/f:<files>]
expand <source>.cab /f:<files> <destination>

Parameters

Parameter Description
/r Renames expanded files.
source Specifies the files to expand. Source can consist of a drive letter and colon, a directory name, a file name, or a combination of these. You can use wildcards (* or ?).
destination Specifies where files are to be expanded.

If source consists of multiple files and you don't specify /r, the destination must be a directory. Destination can consist of a drive letter and colon, a directory name, a file name, or a combination of these. Destination `file

path` specification.
/i Renames expanded files but ignores the directory structure.
/d Displays a list of files in the source location. Doesn't expand or extract the files.
/f:<files> Specifies the files in a cabinet (.cab) file that you want to expand. You can use wildcards (* or ?).
/? Displays help at the command prompt.

Additional References



title: echo description: Reference article for the echo command, which displays messages or turns on or off the command echoing feature. ms.topic: reference ms.assetid: fb9fcd0f-5e73-4504-aa95-78204e1a79d3 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

echo

Displays messages or turns on or off the command echoing feature. If used without parameters, echo displays the current echo setting.

Syntax

echo [<message>]
echo [on | off]

Parameters

Parameter Description
[on | off] Turns on or off the command echoing feature. Command echoing is on by default.
<message> Specifies the text to display on the screen.
/? Displays help at the command prompt.

Remarks

Examples

To display the current echo setting, type:

echo

To echo a blank line on the screen, type:

echo.

[!NOTE] Don't include a space before the period. Otherwise, the period appears instead of a blank line.

To prevent echoing commands at the command prompt, type:

echo off

[!NOTE] When echo is turned off, the command prompt doesn't appear in the Command Prompt window. To display the command prompt again, type echo on.

To prevent all commands in a batch file (including the echo off command) from displaying on the screen, on the first line of the batch file type:

@echo off

You can use the echo command as part of an if statement. For example, to search the current directory for any file with the .rpt file name extension, and to echo a message if such a file is found, type:

if exist *.rpt echo The report has arrived.

The following batch file searches the current directory for files with the .txt file name extension, and displays a message indicating the results of the search:

@echo off
if not exist *.txt (
echo This directory contains no text files.
) else (
   echo This directory contains the following text files:
   echo.
   dir /b *.txt
   )

If no .txt files are found when the batch file is run, the following message displays:

This directory contains no text files.

If .txt files are found when the batch file is run the following output displays (for this example, assume the files File1.txt, File2.txt, and File3.txt exist):

This directory contains the following text files:
File1.txt
File2.txt
File3.txt

Additional References



title: date description: Reference article for the date command, which displays or sets the system date. If used without parameters, ms.topic: reference ms.assetid: ce6700fb-32f9-4350-a1af-5aee61d4448c ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

date

Displays or sets the system date. If used without parameters, date displays the current system date setting and prompts you to enter a new date.

[!IMPORTANT] You must be an administrator to use this command.

Syntax

date [/t | <month-day-year>]

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 aware that 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.

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:

The current date is: Mon 04/02/2007
Enter the new date: (mm-dd-yyyy)

To keep the current date and return to the command prompt, press ENTER. To change the current date, type the new date and then press ENTER.

Additional References



title: eventquery description: Reference article for the eventquery command. This command has been deprecated and isn't guaranteed to be supported in future releases of Windows. ms.topic: reference ms.assetid: f765a564-081f-4cdf-bbf4-cbc5eb9c6fe1 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

eventquery

The eventquery command has been deprecated and isn't guaranteed to be supported in future releases of Windows.



title: dfsdiag testdfsconfig description: Reference article for the dfsdiag testdfsconfig, which checks the configuration of a Distributed File System (DFS) namespace. ms.topic: reference ms.assetid: 106aeeb9-ea79-4e6e-829c-eca06309bab2 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 06/30/2022

dfsdiag testdfsconfig

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Checks the configuration of a Distributed File System (DFS) namespace by performing the following actions:

Syntax

dfsdiag /testdfsconfig /DFSroot:<namespace>

Parameters

Parameter Description
/DFSroot:<namespace> The namespace (DFS root) to diagnose.

Examples

To verify the configuration of Distributed File System (DFS) namespaces in contoso.com\MyNamespace, type:

dfsdiag /testdfsconfig /DFSroot:\\contoso.com\MyNamespace

Additional References



title: detail vdisk description: Reference article for the detail vdisk command, which displays the properties of the selected virtual hard disk (VHD). ms.topic: reference ms.assetid: da0f350c-1ce3-4c3f-988c-15f83402e716 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

detail vdisk

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays the properties of the selected virtual hard disk (VHD). Before you begin, you must select a VHD for this operation to succeed. Use the select vdisk command to select a VHD and shift the focus to it.

Syntax

detail vdisk

Examples

To see details about the selected VHD, type:

detail vdisk

Additional References



title: delete shadows description: Reference article for the delete shadows command, which deletes shadow copies. ms.topic: reference ms.assetid: e29a84d2-04d1-4eb1-910a-5a47bddbc24d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

delete shadows

Deletes shadow copies.

Syntax

delete shadows [all | volume <volume> | oldest <volume> | set <setID> | id <shadowID> | exposed {<drive> | <mountpoint>}]

Parameters

Parameter Description
all Deletes all shadow copies.
volume <volume> Deletes all shadow copies of the given volume.
oldest <volume> Deletes the oldest shadow copy of the given volume.
set <setID> Deletes the shadow copies in the Shadow Copy Set of the given ID. You can specify an alias by using the % symbol if the alias exists in the current environment.
id <shadowID> Deletes a shadow copy of the given ID. You can specify an alias by using the % symbol if the alias exists in the current environment.
exposed {<drive> | <mountpoint>} Deletes shadow copies exposed at the specified drive or mount point.

Additional References



title: delete disk description: Reference article for the delete disk command, which deletes a missing dynamic disk from the list of disks. ms.topic: reference ms.assetid: 44079900-e4ed-49d0-81e4-d652c38cd636 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

delete disk

Deletes a missing dynamic disk from the list of disks.

[!NOTE] For detailed instructions about how to use this command, see Remove a Missing Dynamic Disk.

Syntax

delete disk [noerr] [override]

Parameters

Parameter Description
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.
override Enables DiskPart to delete all simple volumes on the disk. If the disk contains half of a mirrored volume, the half of the mirror on the disk is deleted. The delete disk override command fails if the disk is a member of a RAID-5 volume.

Examples

To delete a missing dynamic disk from the list of disks, type:

delete disk

Additional References



title: chcp description: Reference article for the chcp command, which changes the active console code page. ms.topic: reference ms.assetid: dc7b1c71-7b80-443d-9cf1-9bcf305aa1fd ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

chcp

Changes the active console code page. If used without parameters, chcp displays the number of the active console code page.

Syntax

chcp [<nnn>]

Parameters

Parameter Description
<nnn> Specifies the code page.
/? Displays help at the command prompt.

The following table lists each supported code page and its country/region or language:

Code page Country/region or language
437 United States
850 Multilingual (Latin I)
852 Slavic (Latin II)
855 Cyrillic (Russian)
857 Turkish
860 Portuguese
861 Icelandic
863 Canadian-French
865 Nordic
866 Russian
869 Modern Greek
936 Chinese

Remarks

Examples

To view the active code page setting, type:

chcp

A message similar to the following appears: Active code page: 437

To change the active code page to 850 (Multilingual), type:

chcp 850

If the specified code page is invalid, the following error message appears: Invalid code page

Additional References



title: change description: Reference article for the change command, which changes Remote Desktop Session Host server settings for logons, COM port mappings, and install mode. ms.topic: reference ms.assetid: 90012116-0fb3-4f34-a819-cf4d4b4f8981 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

change

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Changes Remote Desktop Session Host server settings for logons, COM port mappings, and install mode.

[!NOTE] To find out what's new in the latest version, see What's New in Remote Desktop Services in Windows Server.

Syntax

 change logon
 change port
 change user

Parameters

Parameter Description
change logon command Enables or disables logons from client sessions on an Remote Desktop Session Host server, or displays current logon status.
change port command Lists or changes the COM port mappings to be compatible with MS-DOS applications.
change user command Changes the install mode for the Remote Desktop Session Host server.

Additional References



title: break (shadow copy volume) description: Reference article for the break command, which disassociates a shadow copy volume from VSS and makes it accessible as a regular volume. ms.topic: reference ms.assetid: de2b6c95-1c2e-4a43-bec5-341a9014371b ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

break (shadow copy volume)

Disassociates a shadow copy volume from VSS and makes it accessible as a regular volume. The volume can then be accessed using a drive letter (if assigned) or volume name. If used without parameters, break displays help at the command prompt.

[!NOTE] This command is relevant only for hardware shadow copies after import.

Exposed volumes, like the shadow copies they originate from, are read-only by default. Access to the volume is made directly to the hardware provider without record of the volume having been a shadow copy.

Syntax

break [writable] <setid>

Parameters

Parameter Description
[writable] Enables read/write access on the volume.
<setid> Specifies the ID of the shadow copy set. The alias of the shadow copy ID, which is stored as an environment variable by the load metadata command, can be used in the SetID parameter.

Examples

To make a shadow copy using the alias name Alias1 accessible as a writable volume in the operating system:

break writable %Alias1%

Additional References



title: bootcfg delete description: Reference article for the bootcfg delete command, which deletes an operating system entry in the operating systems section of the Boot.ini file. ms.topic: reference ms.assetid: 71382e29-9b39-41c8-9c23-cf0ff829440a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bootcfg delete

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Deletes an operating system entry in the [operating systems] section of the Boot.ini file.

Syntax

bootcfg /delete [/s <computer> [/u <domain>\<user> /p <password>]] [/id <osentrylinenum>]

Parameters

Parameter Description
/s <computer> Specifies the name or IP address of a remote computer (don't use backslashes). The default is the local computer.
/u <domain>\<user> Runs the command with the account permissions of the user specified by <user> or <domain>\<user>. The default is the permissions of the current logged on user on the computer issuing the command.
/p <password> Specifies the password of the user account that is specified in the /u parameter.
/id <osentrylinenum> Specifies the operating system entry line number in the [operating systems] section of the Boot.ini file to which the operating system load options are added. The first line after the [operating systems] section header is 1.
/? Displays help at the command prompt.

Examples

To use the bootcfg /delete command:

bootcfg /delete /id 1
bootcfg /delete /s srvmain /u maindom\hiropln /p p@ssW23 /id 3

Additional References



title: bootcfg dbg1394 description: Reference article for the bootcfg dbg1394 command, which configures 1394 port debugging for a specified operating system entry ms.topic: reference ms.assetid: 35724697-90dd-4dbe-85b0-337fbd369dcc ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bootcfg dbg1394

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Configures 1394 port debugging for a specified operating system entry.

Syntax

bootcfg /dbg1394 {on | off}[/s <computer> [/u <domain>\<user> /p <password>]] [/ch <channel>] /id <osentrylinenum>

Parameters

Parameter Description
`{on off}` Specifies the value for 1394 port debugging, including:
  • on. Enables remote debugging support by adding the /dbg1394 option to the specified <osentrylinenum>.
  • off. Disables remote debugging support by removing the /dbg1394 option from the specified <osentrylinenum>.
/s <computer> Specifies the name or IP address of a remote computer (don't use backslashes). The default is the local computer.
/u <domain>\<user> Runs the command with the account permissions of the user specified by <user> or <domain>\<user>. The default is the permissions of the current logged on user on the computer issuing the command.
/p <password> Specifies the password of the user account that is specified in the /u parameter.
/ch <channel> Specifies the channel to use for debugging. Valid values include integers, between 1 and 64. Don't use this parameter if 1394 port debugging is disabled.
/id <osentrylinenum> Specifies the operating system entry line number in the [operating systems] section of the Boot.ini file to which the operating system load options are added. The first line after the [operating systems] section header is 1.
/? Displays help at the command prompt.

Examples

To use the bootcfg /dbg1394command:

bootcfg /dbg1394 /id 2
bootcfg /dbg1394 on /ch 1 /id 3
bootcfg /dbg1394 edit /ch 8 /id 2
bootcfg /s srvmain /u maindom\hiropln /p p@ssW23 /dbg1394 off /id 2

Additional References



title: bootcfg copy description: Reference article for the bootcfg copy command, which makes a copy of an existing boot entry, to which you can add command-line options. ms.topic: reference ms.assetid: 2a236c2a-8675-444d-b695-9cbc9aff643b ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bootcfg copy

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Makes a copy of an existing boot entry, to which you can add command-line options.

Syntax

bootcfg /copy [/s <computer> [/u <domain>\<user> /p <password>]] [/d <description>] [/id <osentrylinenum>]

Parameters

Parameter Description
/s <computer> Specifies the name or IP address of a remote computer (don't use backslashes). The default is the local computer.
/u <domain>\<user> Runs the command with the account permissions of the user specified by <user> or <domain>\<user>. The default is the permissions of the current logged on user on the computer issuing the command.
/p <password> Specifies the password of the user account that is specified in the /u parameter.
/d <description> Specifies the description for the new operating system entry.
/id <osentrylinenum> Specifies the operating system entry line number in the [operating systems] section of the Boot.ini file to which the operating system load options are added. The first line after the [operating systems] section header is 1.
/? Displays help at the command prompt.

Examples

To copy boot entry 1 and enter \ABC Server as the description:

bootcfg /copy /d \ABC Server\ /id 1

Additional References



title: bootcfg description: Reference article for the bootcfg command, which configures, queries, or changes Boot.ini file settings. ms.topic: reference ms.assetid: 3deb354c-5717-4066-bc79-b9323d559e44 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bootcfg

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Configures, queries, or changes Boot.ini file settings.

Syntax

bootcfg <parameter> [arguments...]

Parameters

Parameter Description
bootcfg addsw Adds operating system load options for a specified operating system entry.
bootcfg copy Makes a copy of an existing boot entry, to which you can add command-line options.
bootcfg dbg1394 Configures 1394 port debugging for a specified operating system entry.
bootcfg debug Adds or changes the debug settings for a specified operating system entry.
bootcfg default Specifies the operating system entry to designate as the default.
bootcfg delete Deletes an operating system entry in the [operating systems] section of the Boot.ini file.
bootcfg ems Enables the user to add or change the settings for redirection of the Emergency Management Services console to a remote computer.
bootcfg query Queries and displays the [boot loader] and [operating systems] section entries from Boot.ini.
bootcfg raw Adds operating system load options specified as a string to an operating system entry in the [operating systems] section of the Boot.ini file.
bootcfg rmsw Removes operating system load options for a specified operating system entry.
bootcfg timeout Changes the operating system time-out value.


title: bitsadmin util and version description: Reference article for the bitsadmin util and version command, which displays the version of BITS service. ms.topic: reference ms.assetid: 98f17328-dfbd-4cbb-93c1-b8d424bc3f0a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin util and version

Displays the version of BITS service (for example, 2.0).

[!NOTE] This command isn't supported by BITS 1.5 and earlier.

Syntax

bitsadmin /util /version [/verbose]

Parameters

Parameter Description
/verbose Use this switch to display the file version for each BITS-related DLL and to verify whether the BITS service can start.

Examples

To display the version of the BITS Service.

bitsadmin /util /version

Additional References



title: bitsadmin setreplyfilename description: Reference article for the bitsadmin setreplyfilename command, which specifies the path of the file that contains the server upload-reply. ms.topic: reference ms.assetid: c26d3342-0533-40b1-a13e-e09678232b25 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin setreplyfilename

Specifies the path of the file that contains the server upload-reply.

[!NOTE] This command isn't supported by BITS 1.2 and earlier.

Syntax

bitsadmin /setreplyfilename <job> <file_path>

Parameters

Parameter Description
job The job's display name or GUID.
file_path Location to put the server upload-reply.

Examples

To set the upload-reply filename file path for the job named myDownloadJob:

bitsadmin /setreplyfilename myDownloadJob c:\upload-reply

Additional References



title: bitsadmin setproxysettings description: Reference article for the bitsadmin setproxysettings command, which sets the proxy settings for the specified job. ms.topic: reference ms.assetid: be8edb1b-614e-4d0b-a8f8-64b4bde3e64b ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin setproxysettings

Sets the proxy settings for the specified job.

Syntax

bitsadmin /setproxysettings <job> <usage> [list] [bypass]

Parameters

Parameter Description
job The job's display name or GUID.
usage Sets the proxy usage, including:
  • PRECONFIG. Use the owner's Internet Explorer defaults.
  • NO_PROXY. Don't use a proxy server.
  • OVERRIDE. Use an explicit proxy list and bypass list. The proxy list and proxy bypass information must follow.
  • AUTODETECT. Automatically detects proxy settings.
list Used when the Usage parameter is set to OVERRIDE. Must contain a comma-delimited list of proxy servers to use.
bypass Used when the Usage parameter is set to OVERRIDE. Must contain a space-delimited list of host names or IP addresses, or both, for which transfers are not to be routed through a proxy. This can be <local> to refer to all servers on the same LAN. Values of NULL may be used for an empty proxy bypass list.

Examples

To set the proxy settings using the various usage options for the job named myDownloadJob:

bitsadmin /setproxysettings myDownloadJob PRECONFIG
bitsadmin /setproxysettings myDownloadJob NO_PROXY
bitsadmin /setproxysettings myDownloadJob OVERRIDE proxy1:80
bitsadmin /setproxysettings myDownloadJob OVERRIDE proxy1,proxy2,proxy3 NULL

Additional References



title: bitsadmin setnoprogresstimeout description: Reference article for the bitsadmin setnoprogresstimeout command, which sets the length of time, in seconds, that the service tries to transfer the file after a transient error occurs. ms.topic: reference ms.assetid: 7fac50d9-cc6b-46a4-a96f-fab751ee1756 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin setnoprogresstimeout

Sets the length of time, in seconds, that BITS tries to transfer the file after the first transient error occurs.

Syntax

bitsadmin /setnoprogresstimeout <job> <timeoutvalue>

Parameters

Parameter Description
job The job's display name or GUID.
timeoutvalue The length of time that BITS waits to transfer a file after the first error, in seconds.

Remarks

Examples

To set the "no progress" timeout value to 20 seconds, for the job named myDownloadJob:

bitsadmin /setnoprogresstimeout myDownloadJob 20

Additional References



title: bitsadmin setaclflag description: Reference article for the bitsadmin setaclflag command, which sets the access control list (ACL) propagations flags. ms.topic: reference ms.assetid: 6e3bcda0-827d-4dfd-8384-d1da018f3e10 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin setaclflag

Sets the access control list (ACL) propagations flags for the job. The flags indicate that you want to maintain the owner and ACL information with the file being downloaded. For example, to maintain the owner and group with the file, set the flags parameter to og.

Syntax

bitsadmin /setaclflag <job> <flags>

Parameters

Parameter Description
job The job's display name or GUID.
flags Specify one or more of the values, including:
  • o - Copy owner information with file.
  • g - Copy group information with file.
  • d - Copy discretionary access control list (DACL) information with file.
  • s - Copy system access control list (SACL) information with file.

Examples

To set the access control list propagation flags for the job named myDownloadJob, so it maintains the owner and group information with the downloaded files.

bitsadmin /setaclflags myDownloadJob og

Additional References



title: bitsadmin setcredentials description: Reference article for the bitsadmin setcredentials command, which adds credentials to a job. ms.topic: reference ms.assetid: 3cd099a4-9e85-46d8-8527-edb6dfab7f97 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin setcredentials

Adds credentials to a job.

[!NOTE] This command isn't supported by BITS 1.2 and earlier.

Syntax

bitsadmin /setcredentials <job> <target> <scheme> <username> <password>

Parameters

Parameter Description
job The job's display name or GUID.
target Use either SERVER or PROXY.
scheme Use one of the following:
  • BASIC. Authentication scheme where the user name and password are sent in clear-text to the server or proxy.
  • DIGEST. A challenge-response authentication scheme that uses a server-specified data string for the challenge.
  • NTLM. A challenge-response authentication scheme that uses the credentials of the user for authentication in a Windows network environment.
  • NEGOTIATE (also known as the Simple and Protected Negotiation protocol). A challenge-response authentication scheme that negotiates with the server or proxy to determine which scheme to use for authentication. Examples are the Kerberos protocol and NTLM.
  • PASSPORT. A centralized authentication service provided by Microsoft that offers a single logon for member sites.
user_name The name of the user.
password The password associated with the provided Username.

Examples

To add credentials to the job named myDownloadJob:

bitsadmin /setcredentials myDownloadJob SERVER BASIC Edward password20

Additional References



title: ping description: Reference article for the ping command, which verifies network connectivity. ms.topic: reference ms.assetid: 49272671-2eec-4fa5-881f-65c24cfbef52 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 07/11/2018

ping

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Verifies IP-level connectivity to another TCP/IP computer by sending Internet Control Message Protocol (ICMP) echo Request messages. The receipt of corresponding echo Reply messages are displayed, along with round-trip times. ping is the primary TCP/IP command used to troubleshoot connectivity, reachability, and name resolution. Used without parameters, this command displays Help content.

You can also use this command to test both the computer name and the IP address of the computer. If pinging the IP address is successful, but pinging the computer name isn't, you might have a name resolution problem. In this case, make sure the computer name you are specifying can be resolved through the local Hosts file, by using Domain Name System (DNS) queries, or through NetBIOS name resolution techniques.

[!NOTE] This command is available only if the Internet Protocol (TCP/IP) is installed as a component in the properties of a network adapter in Network Connections.

Syntax

ping [/t] [/a] [/n <count>] [/l <size>] [/f] [/I <TTL>] [/v <TOS>] [/r <count>] [/s <count>] [{/j <hostlist> | /k <hostlist>}] [/w <timeout>] [/R] [/S <Srcaddr>] [/4] [/6] <targetname>

Parameters

Parameter Description
/t Specifies ping continue sending echo Request messages to the destination until interrupted. To interrupt and display statistics, press CTRL+ENTER. To interrupt and quit this command, press CTRL+C.
/a Specifies reverse name resolution be performed on the destination IP address. If this is successful, ping displays the corresponding host name.
/n <count> Specifies the number of echo Request messages be sent. The default is 4.
/l <size> Specifies the length, in bytes, of the Data field in the echo Request messages. The default is 32. The maximum size is 65,527.
/f Specifies that echo Request messages are sent with the Do not Fragment flag in the IP header set to 1 (available on IPv4 only). The echo Request message can't be fragmented by routers in the path to the destination. This parameter is useful for troubleshooting path Maximum Transmission Unit (PMTU) problems.
/I <TTL> Specifies the value of the Time To Live (TTL) field in the IP header for echo Request messages sent. The default is the default TTL value for the host. The maximum TTL is 255.
/v <TOS> Specifies the value of the Type Of Service (TOS) field in the IP header for echo Request messages sent (available on IPv4 only). The default is 0. TOS is specified as a decimal value from 0 through 255.
/r <count> Specifies the Record Route option in the IP header is used to record the path taken by the echo Request message and corresponding echo Reply message (available on IPv4 only). Each hop in the path uses an entry in the Record Route option. If possible, specify a count equal to or greater than the number of hops between the source and destination. The count must be a minimum of 1 and a maximum of 9.
/s <count> Specifies that the Internet timestamp option in the IP header is used to record the time of arrival for the echo Request message and corresponding echo Reply message for each hop. The count must be a minimum of 1 and a maximum of 4. This is required for link-local destination addresses.
/j <hostlist> Specifies the echo Request messages use the Loose Source Route option in the IP header with the set of intermediate destinations specified in hostlist (available on IPv4 only). With loose source routing, successive intermediate destinations can be separated by one or multiple routers. The maximum number of addresses or names in the host list is 9. The host list is a series of IP addresses (in dotted decimal notation) separated by spaces.
/k <hostlist> Specifies the echo Request messages use the Strict Source Route option in the IP header with the set of intermediate destinations specified in hostlist (available on IPv4 only). With strict source routing, the next intermediate destination must be directly reachable (it must be a neighbor on an interface of the router). The maximum number of addresses or names in the host list is 9. The host list is a series of IP addresses (in dotted decimal notation) separated by spaces.
/w <timeout> Specifies the amount of time, in milliseconds, to wait for the echo Reply message corresponding to a given echo Request message. If the echo Reply message is not received within the time-out, the "Request timed out" error message is displayed. The default time-out is 4000 (4 seconds).
/R Specifies the round-trip path is traced (available on IPv6 only).
/S <Srcaddr> Specifies the source address to use (available on IPv6 only).
/4 Specifies IPv4 used to ping. This parameter is not required to identify the target host with an IPv4 address. It is only required to identify the target host by name.
/6 Specifies IPv6 used to ping. This parameter is not required to identify the target host with an IPv6 address. It is only required to identify the target host by name.
<targetname> Specifies the host name or IP address of the destination.
/? Displays help at the command prompt.

Example of the ping command output

C:\>ping example.microsoft.com
    pinging example.microsoft.com [192.168.239.132] with 32 bytes of data:
    Reply from 192.168.239.132: bytes=32 time=101ms TTL=124
    Reply from 192.168.239.132: bytes=32 time=100ms TTL=124
    Reply from 192.168.239.132: bytes=32 time=120ms TTL=124
    Reply from 192.168.239.132: bytes=32 time=120ms TTL=124

Examples

To ping the destination 10.0.99.221 and resolve 10.0.99.221 to its host name, type:

ping /a 10.0.99.221

To ping the destination 10.0.99.221 with 10 echo Request messages, each of which has a Data field of 1000 bytes, type:

ping /n 10 /l 1000 10.0.99.221

To ping the destination 10.0.99.221 and record the route for 4 hops, type:

ping /r 4 10.0.99.221

To ping the destination 10.0.99.221 and specify the loose source route of 10.12.0.1-10.29.3.1-10.1.44.1, type:

ping /j 10.12.0.1 10.29.3.1 10.1.44.1 10.0.99.221

Additional References



title: bitsadmin setclientcertificatebyid description: Reference article for the bitsadmin setclientcertificatebyid command, which specifies the identifier of the client certificate to use for client authentication in an HTTPS (SSL) request ms.topic: reference ms.assetid: 8585a7a1-7472-437b-b04a-a11925782a3a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin setclientcertificatebyid

Specifies the identifier of the client certificate to use for client authentication in an HTTPS (SSL) request.

Syntax

bitsadmin /setclientcertificatebyid <job> <store_location> <store_name> <hexadecimal_cert_id>

Parameters

Parameter Description
job The job's display name or GUID.
store_location Identifies the location of a system store to use for looking up the certificate, including:
  • CURRENT_USER
  • LOCAL_MACHINE
  • CURRENT_SERVICE
  • SERVICES
  • USERS
  • CURRENT_USER_GROUP_POLICY
  • LOCAL_MACHINE_GROUP_POLICY
  • LOCAL_MACHINE_ENTERPRISE.
store_name The name of the certificate store, including:
  • CA (Certification Authority certificates)
  • MY (Personal certificates)
  • ROOT (Root certificates)
  • SPC (Software Publisher Certificate).
hexadecimal_cert_id A hexadecimal number representing the hash of the certificate.

Examples

To specify the identifier of the client certificate to use for client authentication in an HTTPS (SSL) request for the job named myDownloadJob:

bitsadmin /setclientcertificatebyid myDownloadJob BG_CERT_STORE_LOCATION_CURRENT_USER MY A106B52356D3FBCD1853A41B619358BD

Additional References



title: pentnt description: Reference article for the pentnt command. This command has been deprecated and isn't guaranteed to be supported in future releases of Windows. ms.topic: reference ms.assetid: 4911e640-aa7f-4afb-abc2-5eefc7010204 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

pentnt

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

[!IMPORTANT] This command has been deprecated.

Detects floating point division error (if present) in the Pentium chip, disables floating point hardware, and turns on floating point emulation. For descriptions and usage information, see pentnt.

Additional References



title: openfiles description: Reference article for the openfiles command, which enables an administrator to query, display, or disconnect files and directories that have been opened on a system. ms.topic: reference ms.assetid: c3be561d-a11f-4bf1-9835-8e4e96fe98ec ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

openfiles

Enables an administrator to query, display, or disconnect files and directories that have been opened on a system. This command also enables or disables the system Maintain Objects List global flag.

openfiles /disconnect

Enables an administrator to disconnect files and folders that have been opened remotely through a shared folder.

Syntax

openfiles /disconnect [/s <system> [/u [<domain>\]<username> [/p [<password>]]]] {[/id <openfileID>] | [/a <accessedby>] | [/o {read | write | read/write}]} [/op <openfile>]

Parameters

Parameter Description
/s <system> Specifies the remote system to connect to (by name or IP address). Don't use backslashes. If you don't use the /s option, the command is run on the local computer by default. This parameter applies to all files and folders that are specified in the command.
/u [<domain>\]<username> Runs the command using the permissions of the specified user account. If you don't use the /u option, system permissions are used by default.
/p [<password>] Specifies the password of the user account that is specified in the /u option. If you don't use the /p option, a password prompt appears when the command is run.
/id <openfileID> Disconnects open files by the specified file ID. You can use the wildcard character (*) with this parameter.

Note: You can use the openfiles /query command to find the file ID.

/a <accessedby> Disconnects all open files associated with the user name specified in the accessedby parameter. You can use the wildcard character (*) with this parameter.
/o `{read write read/write}` Disconnects all open files with the specified open mode value. Valid values are Read, Write, or Read/Write. You can use the wildcard character (*) with this parameter.
/op <openfile> Disconnects all open file connections that are created by a specific open file name. You can use the wildcard character (*) with this parameter.
/? Displays help at the command prompt.

Examples

To disconnect all open files with the file ID 26843578, type:

openfiles /disconnect /id 26843578

To disconnect all open files and directories accessed by the user hiropln, type:

openfiles /disconnect /a hiropln

To disconnect all open files and directories with read/write mode, type:

openfiles /disconnect /o read/write

To disconnect the directory with the open file name *C:\testshare*, regardless of who is accessing it, type:

openfiles /disconnect /a * /op c:\testshare\

To disconnect all open files on the remote computer srvmain that are being accessed by the user hiropln, regardless of their ID, type:

openfiles /disconnect /s srvmain /u maindom\hiropln /id *

openfiles /query

Queries and displays all open files.

Syntax

openfiles /query [/s <system> [/u [<domain>\]<username> [/p [<password>]]]] [/fo {TABLE | LIST | CSV}] [/nh] [/v]

Parameters

Parameter Description
/s <system> Specifies the remote system to connect to (by name or IP address). Don't use backslashes. If you don't use the /s option, the command is run on the local computer by default. This parameter applies to all files and folders that are specified in the command.
/u [<domain>\]<username> Runs the command using the permissions of the specified user account. If you don't use the /u option, system permissions are used by default.
/p [<password>] Specifies the password of the user account that is specified in the /u option. If you don't use the /p option, a password prompt appears when the command is run.
[/fo `{TABLE LIST CSV}`] Displays the output in the specified format. Valid values include:
  • TABLE - Displays output in a table.
  • LIST - Displays output in a list.
  • CSV - Displays output in Comma Separated Values (CSV) format.
/nh Suppresses column headers in the output. Valid only when the /fo parameter is set to TABLE or CSV.
/v Specifies that detailed (verbose) information be displayed in the output.
/? Displays help at the command prompt.

Examples

To query and display all open files, type:

openfiles /query

To query and display all open files in table format without headers, type:

openfiles /query /fo table /nh

To query and display all open files in list format with detailed information, type:

openfiles /query /fo list /v

To query and display all open files on the remote system srvmain by using the credentials for the user hiropln on the maindom domain, type:

openfiles /query /s srvmain /u maindom\hiropln /p p@ssW23

[!NOTE] In this example, the password is supplied on the command line. To prevent displaying the password, leave out the /p option. You'll be prompted for the password, which won't be echoed to the screen.

openfiles /local

Enables or disables the system Maintain Objects List global flag. If used without parameters, openfiles /local displays the current status of the Maintain Objects List global flag.

[!NOTE] Changes made by using the on or off option don't take effect until you restart the system. Enabling the Maintain Objects List global flag might slow down your system.

Syntax

openfiles /local [on | off]

Parameters

Parameter Description
`[on off]` Enables or disables the system Maintain Objects List global flag, which tracks local file handles.
/? Displays help at the command prompt.

Examples

To check the current status of the Maintain Objects List global flag, type:

openfiles /local

By default, the Maintain Objects List global flag is disabled, and the following message appears, INFO: The system global flag 'maintain objects list' is currently disabled.

To enable the Maintain Objects List global flag, type:

openfiles /local on

The following message appears when the global flag is enabled, SUCCESS: The system global flag 'maintain objects list' is enabled. This will take effect after the system is restarted.

To disable the Maintain Objects List global flag, type:

openfiles /local off

Additional References



title: bitsadmin rawreturn description: Reference article for the bitsadmin rawreturn command, which returns data suitable for parsing. ms.topic: reference ms.assetid: bbe97130-26f6-4cdd-84f1-baf530ce38b7 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin rawreturn

Returns data suitable for parsing. Typically, you use this command in conjunction with the /create and /get* switches to receive only the value. You must specify this switch before other switches.

[!NOTE] This command strips newline characters and formatting from the output.

Syntax

bitsadmin /rawreturn

Examples

To retrieve the raw data for the state of the job named myDownloadJob:

bitsadmin /rawreturn /getstate myDownloadJob

Additional References



title: path description: Reference article for setting the command path in the PATH environment variable, specifying the set of directories used to search for executable (.exe) files. ms.topic: reference ms.assetid: 1bfa1349-e79a-472b-a9e6-d7a91149ae8f ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

path

Sets the command path in the PATH environment variable, specifying the set of directories used to search for executable (.exe) files. If used without parameters, this command displays the current command path.

Syntax

path [[<drive>:]<path>[;...][;%PATH%]]
path ;

Parameters

Parameter Description
[<drive>:]<path> Specifies the drive and directory to set in the command path. The current directory is always searched before the directories specified in the command path.
; Separates directories in the command path. If used without other parameters, ; clears the existing command paths from the PATH environment variable and directs Cmd.exe to search only in the current directory.
%PATH% Appends the command path to the existing set of directories listed in the PATH environment variable. If you include this parameter, Cmd.exe replaces it with the command path values found in the PATH environment variable, eliminating the need to manually enter these values at the command prompt.
/? Displays help at the command prompt.

Remarks

Examples

To search the paths c:\user\taxes, b:\user\invest, and b:\bin for external commands, type:

path c:\user\taxes;b:\user\invest;b:\bin

Additional References



title: online volume description: Reference article for the online volume command, which takes the offline volume to the online state. ms.topic: reference ms.assetid: 5da073fd-578d-4691-ad0f-605ba66e0c7e ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

online volume

Takes the offline volume to the online state. This command works on volumes that have failed, are failing, or are in failed redundancy state.

[!NOTE] A volume must be selected for the online volume command to succeed. Use the select volume command to select a volume and shift the focus to it.

[!IMPORTANT] This command will fails if it's used on a read-only disk.

Syntax

online volume [noerr]

Parameters

Parameter Description
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To take the volume with focus online, type:

online volume

Additional References



title: online disk description: Reference article for the online disk command, which takes the offline disk to the online state. ms.topic: reference ms.assetid: bc44a783-eaa4-40ca-be01-5703b5bf4eb3 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

online disk

Takes the offline disk to the online state. For basic disks, this command attempts to bring online the selected disk and all volumes on that disk. For dynamic disks, this command attempts to bring online all disks that are not marked as foreign on the local computer. It also attempts to bring online all volumes on the set of dynamic disks.

If a dynamic disk in a disk group is brought online and it's the only disk in the group, then the original group is recreated and the disk is moved to that group. If there are other disks in the group and they're online, then the disk is simply added back into the group. If the group of a selected disk contains mirrored or RAID-5 volumes, this command also resynchronizes these volumes.

[!NOTE] A disk must be selected for the online disk command to succeed. Use the select disk command to select a disk and shift the focus to it.

[!IMPORTANT] This command will fails if it's used on a read-only disk.

Syntax

online disk [noerr]

Parameters

For instructions about using this command, see Reactivate a Missing or Offline Dynamic Disk.

Parameter Description
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To take the disk with focus online, type:

online disk

Additional References



title: bitsadmin peers and list description: Reference article for the bitsadmin peers and list command, which lists all peers. ms.topic: reference ms.assetid: 18ec60c9-34d2-466e-982c-6165478ef224 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin peers and list

Lists all peers.

Syntax

bitsadmin /peers /list

Examples

To list all peers:

bitsadmin /peers /list

Additional References



title: bitsadmin peers and clear description: Reference article for the bitsadmin peers and clear command, which clears the peer list. ms.topic: reference ms.assetid: 71833862-be86-4829-8ce3-11e7869adf29 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin peers and clear

Clears the peer list.

Syntax

bitsadmin /peers /clear

Examples

To clears the peer list.

bitsadmin /peers /clear

Additional References



title: offline disk description: Reference article for the offline disk command, which takes the online disk with focus to the offline state. ms.topic: reference ms.assetid: 8fb9b3c3-0b2c-4192-a2e7-f706292653e3 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

offline disk

Takes the online disk with focus to the offline state. If a dynamic disk in a disk group is taken offline, the status of the disk changes to missing and the group shows a disk that's offline. The missing disk is moved to the invalid group. If the dynamic disk is the last disk in the group, then the status of the disk changes to offline, and the empty group is removed.

[!NOTE] A disk must be selected for the offline disk command to succeed. Use the select disk command to select a disk and shift the focus to it.

This command also works on disks in SAN online mode by changing the SAN mode to offline.

Syntax

offline disk [noerr]

Parameters

Parameter Description
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To take the disk with focus offline, type:

offline disk

Additional References



title: bitsadmin makecustomheaderswriteonly description: Reference article for the bitsadmin makecustomheaderswriteonly command, which make a job's Custom HTTP Headers write-only. ms.topic: reference ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 03/01/2019

bitsadmin makecustomheaderswriteonly

Make a job's Custom HTTP Headers write-only.

[!IMPORTANT] This action can't be undone.

Syntax

bitsadmin /makecustomheaderswriteonly <job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To make Custom HTTP Headers write-only for the job named myDownloadJob:

bitsadmin /makecustomheaderswriteonly myDownloadJob

Additional References



title: ntbackup description: Reference article for the ntbackup command, which has been replaced by the wbadmin command. ms.topic: reference ms.assetid: 6bce6b0d-646b-46b6-b833-0ff1d6f082c2 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ntbackup

Backs up and restores your computer and files from a command prompt. This command has been replaced by the wbadmin command.

[!IMPORTANT] The wbadmin command can't recover backups created using the ntbackup command. However, a version of ntbackup is available as a download from Windows NT Backup - Restore Utility. This downloadable version helps you to perform recoveries of legacy backups, but it can't create new backups.

Additional References



title: bitsadmin nowrap description: Reference article for the bitsadmin nowrap command, which truncates any line of output text extending beyond the rightmost edge of the command window. ms.topic: reference ms.assetid: 85a47b90-783a-41e4-96f2-81f26ae8ca93 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin nowrap

Truncates any line of output text extending beyond the right-most edge of the command window. By default, all switches, except the monitor switch, wrap the output. Specify the nowrap switch before other switches.

Syntax

bitsadmin /nowrap

Examples

To retrieve the state for the job named myDownloadJob while not wrapping the output:

bitsadmin /nowrap /getstate myDownloadJob

Additional References



title: nslookup set vc description: Reference article for the nslookup set vc command, which specifies whether to use a virtual circuit when sending requests to the server. ms.topic: reference ms.assetid: e9232c92-cd8d-4eff-8ae5-0647bd03bdcb ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup set vc

Specifies whether to use a virtual circuit when sending requests to the server.

Syntax

set [no]vc

Parameters

Parameter Description
novc Specifies to never use a virtual circuit when sending requests to the server. This is the default value.
vc Specifies to always use a virtual circuit when sending requests to the server.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: nslookup view description: Reference article for the nslookup view command, which sorts and lists the output of the previous ls commands or subcommands. ms.topic: reference ms.assetid: c1d9fff7-b567-451c-af80-6be8f604e193 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup view

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Sorts and lists the output of the previous ls commands or subcommands.

Syntax

view <filename>

Parameters

Parameter Description
<filename> Specifies the name of the file containing output from the previous ls commands or subcommands.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: nslookup set search description: Reference article for the nslookup set search command, which appends the Domain Name System (DNS) domain names in the DNS domain search list to the request until an answer is received. ms.topic: reference ms.assetid: 064ac660-8b04-4af9-8b2c-e4e0549771b8 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup set search

Appends the Domain Name System (DNS) domain names in the DNS domain search list to the request until an answer is received. This applies when the set and the lookup request contain at least one period, but do not end with a trailing period.

Syntax

set [no]search

Parameters

Parameter Description
nosearch Stops appending the Domain Name System (DNS) domain names in the DNS domain search list for the request.
search Appends the Domain Name System (DNS) domain names in the DNS domain search list for the request until an answer is received. This is the default value.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: bitsadmin listfiles description: Reference article for the bitsadmin listfiles command, which lists the files in the specified job. ms.topic: reference ms.assetid: ad0d1eaa-3bd8-45e5-8f72-4da7366f0d59 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin listfiles

Lists the files in the specified job.

Syntax

bitsadmin /listfiles <job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To retrieve the list of files for the job named myDownloadJob:

bitsadmin /listfiles myDownloadJob

Additional References



title: bitsadmin gettype description: Reference article for the bitsadmin gettype command, which retrieves the job type of the specified job. ms.topic: reference ms.assetid: bec16f04-3e95-4587-889e-3de6ad03c9c8 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin gettype

Retrieves the job type of the specified job.

Syntax

bitsadmin /gettype <job>

Parameters

Parameter Description
job The job's display name or GUID.

Output

The returned output values can be:

Type Description
Download The job is a download.
Upload The job is an upload.
Upload-Reply The job is an upload-reply.
Unknown The job has an unknown type.

Examples

To retrieve the job type for the job named myDownloadJob:

bitsadmin /gettype myDownloadJob

Additional References



title: clean description: Reference article for the Diskpart clean command, which removes all partitions or volume formatting from the disk with focus. ms.topic: reference ms.assetid: 9bbe6fd3-e07e-487b-9035-910957a1d326 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

clean

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Removes all partitions or volume formatting from the disk with focus.

[!NOTE] For a PowerShell version of this command, see clear-disk command.

Syntax

clean [all]

Parameters

Parameter Description
all Specifies that each and every sector on the disk is set to zero, which completely deletes all data contained on the disk.

Remarks

Examples

To remove all formatting from the selected disk, type:

clean

Additional References



title: dir description: Reference article for the dir command, which displays a list of a directory's files and subdirectories. ms.topic: reference ms.assetid: edcbf69b-eaa4-466e-b210-3dd8892f4d93 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

dir

Displays a list of a directory's files and subdirectories. If used without parameters, this command displays the disk's volume label and serial number, followed by a list of directories and files on the disk (including their names and the date and time each was last modified). For files, this command displays the name extension and the size in bytes. This command also displays the total number of files and directories listed, their cumulative size, and the free space (in bytes) remaining on the disk.

The dir command can also run from the Windows Recovery Console, using different parameters. For more information, see Windows Recovery Environment (WinRE).

Syntax

dir [<drive>:][<path>][<filename>] [...] [/p] [/q] [/w] [/d] [/a[[:]<attributes>]][/o[[:]<sortorder>]] [/t[[:]<timefield>]] [/s] [/b] [/l] [/n] [/x] [/c] [/4] [/r]

Parameters

Parameter Description
[<drive>:][<path>] Specifies the drive and directory for which you want to see a listing.
[<filename>] Specifies a particular file or group of files for which you want to see a listing.
/p Displays one screen of the listing at a time. To see the next screen, press any key.
/q Displays file ownership information.
/w Displays the listing in wide format, with as many as five file names or directory names on each line.
/d Displays the listing in the same format as /w, but the files are sorted by column.
/a[[:]<attributes>] Displays only the names of those directories and files with your specified attributes. If you don't use this parameter, the command displays the names of all files except hidden and system files. If you use this parameter without specifying any attributes, the command displays the names of all files, including hidden and system files. The list of possible attributes values are:
  • d - Directories
  • h - Hidden files
  • s - System files
  • l - Reparse points
  • r - Read-only files
  • a - Files ready for archiving
  • i - Not content indexed files
You can use any combination of these values, but don't separate your values using spaces. Optionally you can use a colon (:) separator, or you can use a hyphen (-) as a prefix to mean, "not". For example, using the -s attribute won't show the system files.
/o[[:]<sortorder>] Sorts the output according to sortorder, which can be any combination of the following values:
  • n - Alphabetically by name
  • e - Alphabetically by extension
  • g - Group directories first
  • s - By size, smallest first
  • d - By date/time, oldest first
  • Use the - prefix to reverse the sort order
Multiple values are processed in the order in which you list them. Don't separate multiple values with spaces, but you can optionally use a colon (:).

If sortorder isn't specified, dir /o lists the directories alphabetically, followed by the files, which are also sorted alphabetically.

/t[[:]<timefield>] Specifies which time field to display or to use for sorting. The available timefield values are:
  • c - Creation
  • a - Last accessed
  • w - Last written
/s Lists every occurrence of the specified file name within the specified directory and all subdirectories.
/b Displays a bare list of directories and files, with no additional information. The /b parameter overrides /w.
/l Displays unsorted directory names and file names, using lowercase.
/n Displays a long list format with file names on the far right of the screen.
/x Displays the short names generated for non-8dot3 file names. The display is the same as the display for /n, but the short name is inserted before the long name.
/c Displays the thousand separator in file sizes. This is the default behavior. Use /-c to hide separators.
/4 Displays years in four-digit format.
/r Display alternate data streams of the file.
/? Displays help at the command prompt.

Remarks

The asterisk wildcard always uses short file name mapping, so you might get unexpected results. For example, the following directory contains two files (t.txt2 and t97.txt):

  C:\test>dir /x
  Volume in drive C has no label.
  Volume Serial Number is B86A-EF32

  Directory of C:\test

  11/30/2004  01:40 PM <DIR>  .
  11/30/2004  01:40 PM <DIR> ..
  11/30/2004  11:05 AM 0 T97B4~1.TXT t.txt2
  11/30/2004  01:16 PM 0 t97.txt

You might expect that typing dir t97\* would return the file t97.txt. However, typing dir t97\* returns both files, because the asterisk wildcard matches the file t.txt2 to t97.txt by using its short name map T97B41.TXT. Similarly, typing del t97\* would delete both files.

Examples

To display all directories one after the other, in alphabetical order, in wide format, and pausing after each screen, make sure that the root directory is the current directory, and then type:

dir /s/w/o/p

The output lists the root directory, the subdirectories, and the files in the root directory, including extensions. This command also lists the subdirectory names and the file names in each subdirectory in the tree.

To alter the preceding example so that dir displays the file names and extensions, but omits the directory names, type:

dir /s/w/o/p/a:-d

To print a directory listing, type:

dir > prn

When you specify prn, the directory list is sent to the printer that is attached to the LPT1 port. If your printer is attached to a different port, you must replace prn with the name of the correct port.

You can also redirect output of the dir command to a file by replacing prn with a file name. You can also type a path. For example, to direct dir output to the file dir.doc in the Records directory, type:

dir > \records\dir.doc

If dir.doc does not exist, dir creates it, unless the Records directory does not exist. In that case, the following message appears:

File creation error

To display a list of all the file names with the .txt extension in all directories on drive C, type:

dir c:\*.txt /w/o/s/p

The dir command displays, in wide format, an alphabetized list of the matching file names in each directory, and it pauses each time the screen fills until you press any key to continue.

Additional References



title: create partition msr description: Reference article for create partition msr, which creates a Microsoft Reserved (MSR) partition on a GUID partition table (gpt) disk. ms.topic: reference ms.assetid: 04fba033-23cb-4521-bd5d-db96131f2e73 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

create partition msr

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates a Microsoft Reserved (MSR) partition on a GUID partition table (gpt) disk. A Microsoft Reserved partition is required on every gpt disk. The size of this partition depends on the total size of the gpt disk. The size of the gpt disk must be at least 32 MB to create a Microsoft Reserved partition.

[!IMPORTANT] Be very careful when using this command. Because gpt disks require a specific partition layout, creating Microsoft Reserved partitions can cause the disk to become unreadable.

A basic gpt disk must be selected for this operation to succeed. You must use the select disk command to select a basic gpt disk and shift the focus to it.

Syntax

create partition msr [size=<n>] [offset=<n>] [noerr]

Parameters

Parameter Description
size=<n> The size of the partition in megabytes (MB). The partition is at least as long in bytes as the number specified by <n>. If no size is given, the partition continues until there is no more free space in the current region.
offset=<n> Specifies the offset in kilobytes (KB), at which the partition is created. The offset rounds up to completely fill whatever sector size is used. If no offset is given, the partition is placed in the first disk extent that is large enough to hold it.
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Remarks

Examples

To create a Microsoft Reserved partition of 1000 megabytes in size, type:

create partition msr size=1000

Additional References



title: exit description: Reference article for exit, which exits the command interpreter. ms.topic: reference ms.assetid: d3cee4a2-6210-46f0-b8e4-7381c3c4e530 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

exit

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Exits the command interpreter or the current batch script.

Syntax

exit [/b] [<exitcode>]

Parameters

Parameter Description
/b Exits the current batch script instead of exiting Cmd.exe. If executed from outside a batch script, exits Cmd.exe.
<exitcode> Specifies a numeric number. If /b is specified, the ERRORLEVEL environment variable is set to that number. If you are quitting the command interpreter, the process exit code is set to that number.
/? Displays help at the command prompt.

Examples

To close the command interpreter, type:

exit

Additional References



title: expose description: Reference article for the expose command, which exposes a persistent shadow copy as a drive letter, share, or mount point. ms.topic: reference ms.assetid: 9b0a21cf-3bef-4ade-b8f1-ac42f9203947 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

expose

Exposes a persistent shadow copy as a drive letter, share, or mount point.

Syntax

expose <shadowID> {<drive:> | <share> | <mountpoint>}

Parameters

Parameter Description
shadowID Specifies the shadow ID of the shadow copy you want to expose. You can also use an existing alias or an environment variable in place of shadowID. Use add without parameters to see existing aliases.
<drive:> Exposes the specified shadow copy as a drive letter (for example, p:).
<share> Exposes the specified shadow copy at a share (for example, \\machinename).
<mountpoint> Exposes the specified shadow copy to a mount point (for example, C:\shadowcopy).

Examples

To expose the persistent shadow copy associated with the VSS_SHADOW_1 environment variable as drive X, type:

expose %vss_shadow_1% x:

Additional References



title: fsutil repair description: Reference article for the fsutil repair command, which administers and monitors NTFS self-healing repair operations. manager: dmoss ms.author: toklima author: toklima ms.assetid: 62d77150-1d9e-4069-ab4a-299f33024912 ms.topic: reference ms.date: 10/16/2017

fsutil repair

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8

Administers and monitors NTFS self-healing repair operations. Self-healing NTFS attempts to correct corruptions of the NTFS file system online, without requiring Chkdsk.exe to be run. For more information, see Self-healing NTFS.

Syntax

fsutil repair [enumerate] <volumepath> [<logname>]
fsutil repair [initiate] <volumepath> <filereference>
fsutil repair [query] <volumepath>
fsutil repair [set] <volumepath> <flags>
fsutil repair [wait][<waittype>] <volumepath>

Parameters

Parameter Description
enumerate Enumerates the entires of a volume's corruption log.
<logname> Can be $corrupt, the set of confirmed corruptions in the volume or $verify, a set of potential, unverified corruptions in the volume.
initiate Initiates NTFS self-healing.
<filereference> Specifies the NTFS volume-specific file ID (file reference number). The file reference includes the segment number of the file.
query Queries the self-healing state of the NTFS volume.
set Sets the self-healing state of the volume.
<flags> Specifies the repair method to be used when setting the self-healing state of the volume.

This parameter can be set to three values:

  • 0x01 - Enables general repair.
  • 0x09 - Warns about potential data loss without repair.
  • 0x00 - Disables NTFS self-healing repair operations.
state Queries the corruption state of the system or for a given volume.
wait Waits for repair(s) to complete. If NTFS has detected a problem on a volume on which it is performing repairs, this option allows the system to wait until the repair is complete before it runs any pending scripts.
`[waittype {0 1}]` Indicates whether to wait for the current repair to complete or to wait for all repairs to complete. The waittype parameter can be set to the following values:
  • 0 - Waits for all repairs to complete. (default value)
  • 1 - Waits for the current repair to complete.

Examples

To enumerate the confirmed corruptions of a volume, type:

fsutil repair enumerate C: $Corrupt

To enable self-healing repair on drive C, type:

fsutil repair set c: 1

To disable self-healing repair on drive C, type:

fsutil repair set c: 0

Additional References



title: cmdkey description: Reference article for the cmdkey command, which creates, lists, and deletes stored user names and passwords or credentials. ms.topic: reference ms.assetid: 5fcd68ee-a14a-4b71-9300-c3f5c5d31e8e ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

cmdkey

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates, lists, and deletes stored user names and passwords or credentials.

Syntax

cmdkey [{/add:<targetname>|/generic:<targetname>}] {/smartcard | /user:<username> [/pass:<password>]} [/delete{:<targetname> | /ras}] /list:<targetname>

Parameters

Parameters Description
/add:<targetname> Adds a user name and password to the list.

Requires the parameter of <targetname> which identifies the computer or domain name that this entry will be associated with.

/generic:<targetname> Adds generic credentials to the list.

Requires the parameter of <targetname> which identifies the computer or domain name that this entry will be associated with.

/smartcard Retrieves the credential from a smart card. If more than one smart card is found on the system when this option is used, cmdkey displays information about all available smart cards, and then prompts the user to specify which one to use.
/user:<username> Specifies the user or account name to store with this entry. If <username> isn't supplied, it will be requested.
/pass:<password> Specifies the password to store with this entry. If <password> isn't supplied, it will be requested. Passwords are not displayed after they're stored.
/delete:{<targetname> \| /ras} Deletes a user name and password from the list. If <targetname> is specified, that entry is deleted. If /ras is specified, the stored remote access entry is deleted.
/list:<targetname> Displays the list of stored user names and credentials. If <targetname> isn't specified, all stored user names and credentials are listed.
/? Displays help at the command prompt.

Examples

To display a list of all user names and credentials that are stored, type:

cmdkey /list

To add a user name and password for user Mikedan to access computer Server01 with the password Kleo, type:

cmdkey /add:server01 /user:mikedan /pass:Kleo

To add a user name and password for user Mikedan to access computer Server01 and prompt for the password whenever Server01 is accessed, type:

cmdkey /add:server01 /user:mikedan

To delete a credential stored by remote access, type:

cmdkey /delete /ras

To delete a credential stored for Server01, type:

cmdkey /delete:server01

Additional References



title: diskperf description: Reference article for the diskperf command, which can be used to remotely enable or disable physical or logical disk performance counters on computers running Windows. ms.topic: reference ms.assetid: f06916e8-069b-4ec8-a6eb-59f1d9f77111 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

diskperf

The diskperf command remotely enables or disables physical or logical disk performance counters on computers running Windows.

Syntax

diskperf [-y[d|v] | -n[d|v]] [\\computername]

Options

Option Description
-y Starts all disk performance counters when the computer restarts.
-yd Enables disk performance counters for physical drives when the computer restarts.
-yv Enables disk performance counters for logical drives or storage volumes when the computer restarts.
-n Disables all disk performance counters when the computer restarts.
-nd Disable disk performance counters for physical drives when the computer restarts.
-nv Disable disk performance counters for logical drives or storage volumes when the computer restarts.
\\<computername> Specifies the name of the computer where you want to enable or disable disk performance counters.
-? Displays context sensitive help.

Additional References



title: clip description: Reference article for the clip command, which redirects the command output from the command line to the Windows clipboard. ms.topic: reference ms.assetid: 85322d85-3376-4806-845b-93ac77fe27bf ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

clip

Redirects the command output from the command line to the Windows clipboard. You can use this command to copy data directly into any application that can receive text from the Clipboard. You can also paste this text output into other programs.

Syntax

<command> | clip
clip < <filename>

Parameters

Parameter Description
<command> Specifies a command whose output you want to send to the Windows clipboard.
<filename> Specifies a file whose contents you want to send to the Windows clipboard.
/? Displays help at the command prompt.

Examples

To copy the current directory listing to the Windows clipboard, type:

dir | clip

To copy the output of a program called generic.awk to the Windows clipboard, type:

awk -f generic.awk input.txt | clip

To copy the contents of a file called readme.txt to the Windows clipboard, type:

clip < readme.txt

Additional References



title: expand vdisk description: Reference article for the expand vdisk command, which expands a virtual hard disk (VHD) to a specified size. ms.topic: reference ms.assetid: 3ae547b4-3813-4b86-bacd-bc273c028a2a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

expand vdisk

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Expands a virtual hard disk (VHD) to a specified size.

A VHD must be selected and detached for this operation to succeed. Use the select vdisk command to select a volume and shift the focus to it.

Syntax

expand vdisk maximum=<n>

Parameters

| Parameter | Description | |---------- | ----------- | | maximum=<n> | Specifies the new size for the VHD in megabytes (MB). |

Examples

To expand the selected VHD to 20 GB, type:

expand vdisk maximum=20000

Additional References



title: nslookup set description: Reference article for the nslookup set command, which changes configuration settings affecting how lookups behave. ms.topic: reference ms.assetid: 1fe5b36d-e93e-468b-abca-43b0204b32d1 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup set

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Changes configuration settings that affect how lookups function.

Syntax

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

Parameters

Parameter Description
nslookup set all Lists all current settings.
nslookup set class Changes the query class, which specifies the protocol group of the information.
nslookup set d2 Turns the verbose debugging mode on or off.
nslookup set debug Turns off debugging mode completely.
nslookup set domain Changes the default Domain Name System (DNS) domain name to the specified name.
nslookup set port Changes the default TCP/UDP Domain Name System (DNS) name server port to the specified value.
nslookup set querytype Changes the resource record type for the query.
nslookup set recurse Tells the Domain Name System (DNS) name server to query other servers if it doesn't find any information.
nslookup set retry Sets the number of retries.
nslookup set root Changes the name of the root server used for queries.
nslookup set search Appends the Domain Name System (DNS) domain names in the DNS domain search list to the request until an answer is received.
nslookup set srchlist Changes the default Domain Name System (DNS) domain name and search list.
nslookup set timeout Changes the initial number of seconds to wait for a reply to a lookup request.
nslookup set type Changes the resource record type for the query.
nslookup set vc Specifies whether to use a virtual circuit when sending requests to the server.

Additional References



title: nslookup root description: Reference article for the nslookup root command, which changes the default server to the server for the root of the Domain Name System (DNS) domain name space. ms.topic: reference ms.assetid: 9c29edc3-ec49-43f2-bc49-86bf0612d816 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup root

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Changes the default server to the server for the root of the Domain Name System (DNS) domain name space. Currently, the ns.nic.ddn.mil name server is used. You can change the name of the root server using the nslookup set root command.

[!NOTE] This command is the same as lserver ns.nic.ddn.mil.

Syntax

root

Parameters

Parameter Description
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: bitsadmin getowner description: Reference article for the bitsadmin getowner command, which retrieves the owner of the specified job. ms.topic: reference ms.assetid: 5203f84c-a879-4f31-ae3e-7ea74bd63ca5 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin getowner

Displays the display name or GUID of the owner of the specified job.

Syntax

bitsadmin /getowner <job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To display the owner for the job named myDownloadJob:

bitsadmin /getowner myDownloadJob

Additional References



title: nslookup exit description: Reference article for the nslookup exit command, which exits the nslookup command-line tool. ms.topic: reference ms.assetid: 970ece99-fc5e-4103-9f97-ca080af1f212 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup /exit

Exits the nslookup command-line tool.

Syntax

nslookup /exit

Parameters

Parameter Description
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: nslookup ls description: Reference article for the nslookup ls command, which lists DNS domain information. ms.topic: reference ms.assetid: f15f06fe-67e7-41a9-93b5-192ab14ab380 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup ls

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Lists DNS domain information.

Syntax

ls [<option>] <DNSdomain> [{[>] <filename>|[>>] <filename>}]

Parameters

Parameter Description
<option> The valid options include:
  • -t: Lists all records of the specified type. For more information, see nslookup set querytype.
  • -a: Lists aliases of computers in the DNS domain. This parameter is the same as -t CNAME
  • -d: Lists all records for the DNS domain. This parameter is the same as -t ANY
  • -h: Lists CPU and operating system information for the DNS domain. This parameter is the same as -t HINFO
  • -s: Lists well-known services of computers in the DNS domain. This parameter is the same as -t WKS.
<DNSdomain> Specifies the DNS domain for which you want information.
<filename> Specifies a file name to use for the saved output. You can use the greater than (>) and double greater than (>>) characters to redirect the output in the usual manner.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Remarks

Additional References



title: nslookup help description: Reference article for the nslookup help command, which displays the subcommand help content. ms.topic: reference ms.assetid: 20ffe3e4-4cf3-4bc4-9392-a6be4ccd2c23 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup help

Displays the subcommand help text.

Syntax

help
?

Parameters

Parameter Description
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: nslookup description: Reference article for the nslookup command, which displays information that you can use to diagnose Domain Name System (DNS) infrastructure. ms.topic: reference ms.assetid: 41516932-7833-434a-aa92-b4cf0f9a7ef7 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays information that you can use to diagnose Domain Name System (DNS) infrastructure. Before using this tool, you should be familiar with how DNS works. The nslookup command-line tool is available only if you have installed the TCP/IP protocol.

The nslookup command-line tool has two modes: interactive and noninteractive.

If you need to look up only a single piece of data, we recommend using the non-interactive mode. For the first parameter, type the name or IP address of the computer that you want to look up. For the second parameter, type the name or IP address of a DNS name server. If you omit the second argument, nslookup uses the default DNS name server.

If you need to look up more than one piece of data, you can use interactive mode. Type a hyphen (-) for the first parameter and the name or IP address of a DNS name server for the second parameter. If you omit both parameters, the tool uses the default DNS name server. While using the interactive mode, you can:

Syntax

nslookup [exit | finger | help | ls | lserver | root | server | set | view] [options]

Parameters

Parameter Description
nslookup exit Exits the nslookup command-line tool.
nslookup finger Connects with the finger server on the current computer.
nslookup help Displays a short summary of subcommands.
nslookup ls Lists information for a DNS domain.
nslookup lserver Changes the default server to the specified DNS domain.
nslookup root Changes the default server to the server for the root of the DNS domain name space.
nslookup server Changes the default server to the specified DNS domain.
nslookup set Changes configuration settings that affect how lookups function.
nslookup set all Prints the current values of the configuration settings.
nslookup set class Changes the query class. The class specifies the protocol group of the information.
nslookup set d2 Turns exhaustive Debugging mode on or off. All fields of every packet are printed.
nslookup set debug Turns Debugging mode on or off.
nslookup set domain Changes the default DNS domain name to the name specified.
nslookup set port Changes the default TCP/UDP DNS name server port to the value specified.
nslookup set querytype Changes the resource record type for the query.
nslookup set recurse Tells the DNS name server to query other servers if it doesn't have the information.
nslookup set retry Sets the number of retries.
nslookup set root Changes the name of the root server used for queries.
nslookup set search Appends the DNS domain names in the DNS domain search list to the request until an answer is received. This applies when the set and the lookup request contain at least one period, but do not end with a trailing period.
nslookup set srchlist Changes the default DNS domain name and search list.
nslookup set timeout Changes the initial number of seconds to wait for a reply to a request.
nslookup set type Changes the resource record type for the query.
nslookup set vc Specifies to use or not use a virtual circuit when sending requests to the server.
nslookup view Sorts and lists the output of the previous ls subcommand or commands.

Remarks

| Error message | Description | | ------------- | ----------- | | timed out |The server didn't respond to a request after a certain amount of time and a certain number of retries. You can set the time-out period with the nslookup set timeout command. You can set the number of retries with the nslookup set retry command. | | No response from server | No DNS name server is running on the server computer. | | No records | The DNS name server doesn't have resource records of the current query type for the computer, although the computer name is valid. The query type is specified with the nslookup set querytype command. | | Nonexistent domain | The computer or DNS domain name doesn't exist. | | Connection refused or Network is unreachable | The connection to the DNS name server or finger server could not be made. This error commonly occurs with the ls and finger requests. | | Server failure | The DNS name server found an internal inconsistency in its database and could not return a valid answer. | | Refused | The DNS name server refused to service the request. | | format error | The DNS name server found that the request packet was not in the proper format. It may indicate an error in nslookup. |

Additional References



title: bitsadmin getnotifycmdline description: Reference article for the bitsadmin getnotifycmdline command, which retrieves the command-line command that is run when the job finishes transferring data. ms.topic: reference ms.assetid: 90fa33e6-aca5-4a23-82bd-19a9f13f8416 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin getnotifycmdline

Retrieves the command-line command to run after the specified job finishes transferring data.

[!NOTE] This command isn't supported by BITS 1.2 and earlier.

Syntax

bitsadmin /getnotifycmdline <job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To retrieve the command-line command used by the service when the job named myDownloadJob completes.

bitsadmin /getnotifycmdline myDownloadJob

Additional References



title: bitsadmin getminretrydelay description: Reference article for the bitsadmin getminretrydelay command, which retrieves the length of time, in seconds, that the service waits after encountering a transient error before trying to transfer the file. ms.topic: reference ms.assetid: 54f0abab-c129-40ed-a603-50f464d26011 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin getminretrydelay

Retrieves the length of time, in seconds, that the service will wait after encountering a transient error before trying to transfer the file.

Syntax

bitsadmin /getminretrydelay <job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To retrieve the minimum retry delay for the job named myDownloadJob:

bitsadmin /getminretrydelay myDownloadJob

Additional References



title: winpop description: Reference article for winpop, which is deprecated and not guaranteed to be supported in future releases of Windows. ms.topic: reference ms.assetid: 52d2c6b1-971e-4a0e-9e6d-0713f1a74937 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

winpop

Winpop is deprecated, and is not guaranteed to be supported in future releases of Windows.

This tool is included in Windows Server 2003. For more information, see winpop.



title: winsat mfmedia description: Reference for winsat mfmedia, which measures the performance of video decoding (playback) using the Media Foundation framework. ms.topic: reference ms.assetid: 09a3b3dd-f746-4e6e-b684-76a9bde0c78d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

winsat mfmedia

Measures the performance of video decoding (playback) using the Media Foundation framework.

Syntax

winsat mfmedia <parameters>

Parameters

Parameters Description
-input <file name> Required: Specify the file containing the video clip to be played or encoded. The file can be in any format that can be rendered by Media Foundation.
-dumpgraph Specify that the filter graph should be saved to a GraphEdit-compatible file before the assessment starts.
-ns Specify that the filter graph should run at the normal playback speed of the input file. By default, the filter graph runs as fast as possible, ignoring presentation times.
-play Run the assessment in decode mode and play any supplied audio content in the file specified in -input using the default DirectSound device. By default, audio playback is disabled.
-nopmp Do not make use of the Media Foundation Protected Media Pipeline (MFPMP) process during the assessment.
-pmp Always make use of the MFPMP process during the assessment.
Note: If -pmp or -nopmp is not specified, MFPMP will be used only when necessary.
-v Send verbose output to STDOUT, including status and progress information. Any errors will also be written to the command window.
-xml <file name> Save the output of the assessment as the specified XML file. If the specified file exists, it will be overwritten.
-idiskinfo Save information about physical volumes and logical disks as part of the <SystemConfig> section in the XML output.
-iguid Create a globally unique identifier (GUID) in the XML output file.
-note note text Add the note text to the <note> section in the XML output file.
-icn Include the local computer name in the XML output file.
-eef Enumerate extra system information in the XML output file.

Examples

  winsat mfmedia -input c:\windows\performance\winsat\winsat.wmv -nopmp

Remarks

Additional References



title: Using the verbose command description: Reference article for verbose, which displays verbose output for a specified command. ms.topic: reference ms.assetid: fcf30ae7-818f-4e7e-a083-a1812682032b ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

Using the verbose command

Displays verbose output for a specified command. You can use /verbose with any other wdsutil commands that you run. Note that you must specify /verbose and /progress directly after wdsutil.

Syntax

wdsutil /verbose <commands>

Examples

To delete approved computers from the Auto-Add database and show verbose output, type:

wdsutil /Verbose /progress /Delete-AutoAddDevices /Server:MyWDSServer /DeviceType:ApprovedDevices


title: wdsutil stop-server description: Reference article for Subcommand stop-Server, which stops all services on a Windows Deployment Services server. ms.topic: reference ms.assetid: 09f411c0-099f-4591-95fd-b77b3fd9118a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil stop-server

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Stops all services on a Windows Deployment Services server.

Syntax

wdsutil [Options] /Stop-Server [/Server:<Server name>]

Parameters

Parameter Description
[/Server:<Server name>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.

Examples

To stop the services, type one of the following:

wdsutil /Stop-Server
wdsutil /verbose /Stop-Server /Server:MyWDSServer

Additional References



title: wdsutil uninitialize-server description: Reference article for uninitialize-Server, which reverts changes made to the server during the initial server configuration. ms.topic: reference ms.assetid: 015efb04-fe84-469f-bd81-49d0046296b2 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil uninitialize-server

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Reverts changes made to the server during the initial server configuration. This includes changes made by either the /initialize-server option or the Windows Deployment Services mmc snap-in. Note that this command resets the server to an unconfigured state. This command does not modify the contents of the remoteInstall shared folder. Rather, it resets the server's state so that you can reinitialize the server.

Syntax

wdsutil [Options] /Uninitialize-Server [/Server:<Server name>]

Parameters

Parameter Description
[/Server:<Server name>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.

Examples

To reinitialize the server, type one of the following:

wdsutil /Uninitialize-Server
wdsutil /verbose /Uninitialize-Server /Server:MyWDSServer

Additional References



title: Using the set command description: Reference article for set, which sets properties and attributes for Windows Deployment Services servers, prestaged computers, images, image groups, and Transport Servers. ms.topic: reference ms.assetid: 5def6be0-83b9-4133-bc1b-bbe6d407eca7 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

Using the set command

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Sets properties and attributes for Windows Deployment Services servers, prestaged computers, images, image groups, and Transport Servers.

Subcommands

Subcommand Description
Subcommand: set-Device changes the attributes of a prestaged computer. A prestaged computer is a computer that has been linked to a computer account object in active directory Domain Servers (AD DS). Prestaged clients are also called known computers.
Subcommand: set-Image changes the attributes of an existing image.
Subcommand: set-ImageGroup changes the attributes of an existing image group.
Subcommand: set-Server Configures the settings for a Windows Deployment Services server.
Subcommand: set-TransportServer Configures the settings for a Transport Server.
Subcommand: set-DriverPackage renames and/or enable/disable a driver package on a server.
Subcommand: set-DriverGroup Sets the properties of an existing driver group on a server.
Subcommand: set-DriverGroupFilter adds or removes an existing driver group filter from a driver group.


title: wdsutil remove-driverpackage description: Reference article for wdsutil remove-driverpackage, which removes a driver package from a server. ms.topic: reference ms.assetid: 6b201e91-0d44-4e4a-8252-8b0235df1002 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil remove-driverpackage

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Removes a driver package from a server.

Syntax

wdsutil /remove-DriverPackage [/Server:<Server name>] {/DriverPackage:<Package Name> | /PackageId:<ID>}

Parameters

Parameter Description
[/Server:<Server name>] Specifies the name of the server. This can be the NetBIOS name or the FQDN. If a server name is not specified, the local server is used.
[/DriverPackage:<Name>] Specifies the name of the driver package to remove.
[/PackageId:<ID>] Specifies the Windows Deployment Services ID of the driver package to remove. You must specify the ID if the driver package cannot be uniquely identified by name.

Examples

To view information about the images, type one of the following:

wdsutil /remove-DriverPackage /PackageId:{4D36E972-E325-11CE-Bfc1-08002BE10318}
wdsutil /remove-DriverPackage /Server:MyWdsServer /DriverPackage:MyDriverPackage

Additional References



title: wdsutil reject-autoadddevices description: Reference article for wdsutil reject-autoadddevices, which rejects computers that are pending administrative approval. ms.topic: reference ms.assetid: ea25a4b2-5fad-4360-9c47-c2c9df7ea31f ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil reject-autoadddevices

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Rejects computers that are pending administrative approval. When the Auto-add policy is enabled, administrative approval is required before unknown computers (those that are not prestaged) can install an image. You can enable this policy using the PXE Response tab of the server s properties page.

Syntax

wdsutil [Options] /Reject-AutoaddDevices [/Server:<Server name>] /RequestId:<Request ID or ALL>

Parameters

Parameter Description
[/Server:<Server name>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.
/RequestId:<Request ID | ALL> Specifies the request ID assigned to the pending computer. To reject all pending computers, specify ALL.

Examples

To reject a single computer, type:

wdsutil /Reject-AutoaddDevices /RequestId:12

To reject all computers, type:

wdsutil /verbose /Reject-AutoaddDevices /Server:MyWDSServer /RequestId:ALL

Additional References



title: bitsadmin addfilewithranges description: Reference article for the bitsadmin addfilewithranges command, which adds a file to the specified job. BITS downloads the specified ranges from the remote file. ms.topic: reference ms.assetid: df0ce0bf-dff1-4a48-a16f-fd2f4d5f7189 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin addfilewithranges

Adds a file to the specified job. BITS downloads the specified ranges from the remote file. This switch is valid only for download jobs.

Syntax

bitsadmin /addfilewithranges <job> <remoteURL> <localname> <rangelist>

Parameters

Parameter Description
job The job's display name or GUID.
remoteURL URL of the file on the server.
localname Name of the file on the local computer. Must contain an absolute path to the file.
rangelist Comma-delimited list of offset:length pairs. Use a colon to separate the offset value from the length value. For example, a value of 0:100,2000:100,5000:eof tells BITS to transfer 100 bytes from offset 0, 100 bytes from offset 2000, and the remaining bytes from offset 5000 to the end of the file.

Remarks

Examples

To transfer 100 bytes from offset 0, 100 bytes from offset 2000, and the remaining bytes from offset 5000 to the end of the file:

bitsadmin /addfilewithranges http://downloadsrv/10mb.zip c:\10mb.zip 0:100,2000:100,5000:eof

Additional References



title: wdsutil get-transportserver description: Reference article for wdsutil get-transportserver, which displays information about a specified Transport Server. ms.topic: reference ms.assetid: de634123-0179-41b2-9c6f-726508130ff5 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil get-transportserver

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays information about a specified Transport Server.

Syntax

wdsutil [Options] /Get-TransportServer [/Server:<Server name>] /Show:{Config}

Parameters

Parameter Description
[/Server:<Server name>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.
/Show:{Config} Returns configuration information about the specified Transport Server.

Examples

To view information about the server, type:

wdsutil /Get-TransportServer /Show:Config

To view configuration information, type:

wdsutil /Get-TransportServer /Server:MyWDSServer /Show:Config

Additional References



title: bitsadmin description: Reference article for the bitsadmin command, which is a command-line tool used to create, download, or upload jobs and monitor their progress. ms.topic: reference ms.assetid: 4853036e-1df8-45ad-8be6-cfb097b8dd27 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows 10

Bitsadmin is a command-line tool used to create, download or upload jobs, and to monitor their progress. The bitsadmin tool uses switches to identify the work to perform. You can call bitsadmin /? or bitsadmin /help to get a list of switches.

Most switches require a <job> parameter, which you set to the job's display name, or GUID. A job's display name doesn't have to be unique. The /create and /list switches return a job's GUID.

By default, you can access information about your own jobs. To access information for another user's jobs, you must have administrator privileges. If the job was created in an elevated state, then you must run bitsadmin from an elevated window; otherwise, you'll have read-only access to the job.

Many of the switches correspond to methods in the BITS interfaces. For additional details that may be relevant to using a switch, see the corresponding method.

Use the following switches to create a job, set and retrieve the properties of a job, and monitor the status of a job. For examples that show how to use some of these switches to perform tasks, see bitsadmin examples.

Available switches



title: wdsutil get-allimages description: Reference article for the wdsutil get-allimages command, which retrieves information about all images on a server. ms.topic: reference ms.assetid: 19de3720-4315-415a-8dc6-486caa0b2100 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil get-allimages

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Retrieves information about all images on a server.

Syntax

wdsutil /get-allimages [/server:<servername>] /show:{boot | install | legacyris | all} [/detailed]

Parameters

Parameter Description
[/server:<servername>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server is used.
`/show:{boot install legacyris all}` Where boot returns only boot images, install returns install images as well as information about the image groups that contain them, LegacyRis returns only remote Installation Services (RIS) images, and All returns boot image information, install image information (including information about the image groups), and RIS image information.
[/detailed] Indicates that all image metadata from each image should be returned. If this option is not used, the default behavior is to return only the image name, description, and file name.

Examples

To view information about the images, type either:

wdsutil /get-allimages /show:install
wdsutil /verbose /get-allimages /server:MyWDSServer /show:all /detailed

Additional References



title: bcdedit description: Reference article for the bcdedit command, which creates new stores, modify existing stores, and add boot menu parameters. ms.topic: reference ms.assetid: ab2da47d-3aac-44a0-b7fd-bd9561d61553 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 05/27/2021

bcdedit

Boot Configuration Data (BCD) files provide a store that is used to describe boot applications and boot application settings. The objects and elements in the store effectively replace Boot.ini.

BCDEdit is a command-line tool for managing BCD stores. It can be used for a variety of purposes, including creating new stores, modifying existing stores, adding boot menu parameters, and so on. BCDEdit serves essentially the same purpose as Bootcfg.exe on earlier versions of Windows, but with two major improvements:

[!NOTE] Administrative privileges are required to use BCDEdit to modify BCD.

BCDEdit is the primary tool for editing the boot configuration of Windows Vista and later versions of Windows. It is included with the Windows Vista distribution in the %WINDIR%\System32 folder.

BCDEdit is limited to the standard data types and is designed primarily to perform single common changes to BCD. For more complex operations or nonstandard data types, consider using the BCD Windows Management Instrumentation (WMI) application programming interface (API) to create more powerful and flexible custom tools.

Syntax

bcdedit /command [<argument1>] [<argument2>] ...

Parameters

General BCDEdit Command-Line Options

Option Description
/? Displays a list of BCDEdit commands. Running this command without an argument displays a summary of the available commands. To display detailed help for a particular command, run bcdedit /? <command>, where <command> is the name of the command you are searching for more information about. For example, bcdedit /? createstore displays detailed help for the Createstore command.

Parameters that Operate on a Store

Option Description
/createstore Creates a new empty boot configuration data store. The created store is not a system store.
/export Exports the contents of the system store into a file. This file can be used later to restore the state of the system store. This command is valid only for the system store.
/import Restores the state of the system store by using a backup data file previously generated by using the /export option. This command deletes any existing entries in the system store before the import takes place. This command is valid only for the system store.
/store This option can be used with most BCDedit commands to specify the store to be used. If this option is not specified, then BCDEdit operates on the system store. Running the bcdedit /store command by itself is equivalent to running the bcdedit /enum active command.

Parameters that Operate on Entries in a Store

Parameter Description
/copy Makes a copy of a specified boot entry in the same system store.
/create Creates a new entry in the boot configuration data store. If a well-known identifier is specified, then the /application, /inherit, and /device parameters cannot be specified. If an identifier is not specified or not well known, an /application, /inherit, or /device option must be specified.
/delete Deletes an element from a specified entry.

Parameters that Operate on Entry Options

Parameter Description
/deletevalue Deletes a specified element from a boot entry.
/set Sets an entry option value.

Parameters that Control Output

Parameter Description
/enum Lists entries in a store. The /enum option is the default value for BCEdit, so running the bcdedit command without parameters is equivalent to running the bcdedit /enum active command.
/v Verbose mode. Usually, any well-known entry identifiers are represented by their friendly shorthand form. Specifying /v as a command-line option displays all identifiers in full. Running the bcdedit /v command by itself is equivalent to running the bcdedit /enum active /v command.

Parameters that Control the Boot Manager

Parameter Description
/bootsequence Specifies a one-time display order to be used for the next boot. This command is similar to the /displayorder option, except that it is used only the next time the computer starts. Afterwards, the computer reverts to the original display order.
/default Specifies the default entry that the boot manager selects when the timeout expires.
/displayorder Specifies the display order that the boot manager uses when displaying boot parameters to a user.
/timeout Specifies the time to wait, in seconds, before the boot manager selects the default entry.
/toolsdisplayorder Specifies the display order for the boot manager to use when displaying the Tools menu.

Parameters that Control Emergency Management Services

Parameter Description
/bootems Enables or disables Emergency Management Services (EMS) for the specified entry.
/ems Enables or disables EMS for the specified operating system boot entry.
/emssettings Sets the global EMS settings for the computer. /emssettings does not enable or disable EMS for any particular boot entry.

Parameters that Control Debugging

Parameter Description
/bootdebug Enables or disables the boot debugger for a specified boot entry. Although this command works for any boot entry, it is effective only for boot applications.
/dbgsettings Specifies or displays the global debugger settings for the system. This command does not enable or disable the kernel debugger; use the /debug option for that purpose. To set an individual global debugger setting, use the bcdedit /set <dbgsettings> <type> <value> command.
/debug Enables or disables the kernel debugger for a specified boot entry.

Additional References

For examples of how to use BCDEdit, see the BCDEdit Options Reference article.

To see the notation used to indicate command-line syntax, see Command-Line Syntax Key.



title: wdsutil get-device description: Reference article for wdsutil get-device, which retrieves Windows Deployment Services information about a prestaged computer (that is, a physical computer that has been lined to a computer account in active directory Domain Services. ms.topic: reference ms.assetid: 1da79286-7e1d-45f2-aea2-d446e16a6911 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil get-device

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Retrieves Windows Deployment Services information about a prestaged computer (that is, a physical computer that has been lined to a computer account in active directory Domain Services.

Syntax

wdsutil /Get-Device {/Device:<Device name> | /ID:<MAC or UUID>} [/Domain:<Domain>] [/forest:{Yes | No}]

Parameters

Parameter Description
/Device:<Device name> Specifies the name of the computer (SAMAccountName).
/ID:<MAC or UUID> Specifies either the MAC address or the UUID (GUID) of the computer, as shown in the following examples. Note that a valid GUID must be in one of two formats binary string or GUID string

- Binary string: /ID:ACEFA3E81F20694E953EB2DAA1E8B1B6
- MAC address: 00B056882FDC (no dashes) or 00-B0-56-88-2F-DC (with dashes)
- GUID string: /ID:E8A3EFAC-201F-4E69-953-B2DAA1E8B1B6

[/Domain:<Domain>] Specifies the domain to be searched for the prestaged computer. The default value for this parameter is the local domain.
[/forest:{Yes | No}] Specifies whether Windows Deployment Services should search the entire forest or the local domain. The default value is No, meaning that only the local domain will be searched.

Examples

To get information by using the computer name, type:

wdsutil /Get-Device /Device:computer1

To get information by using the MAC address, type:

wdsutil /verbose /Get-Device /ID:00-B0-56-88-2F-DC /Domain:MyDomain

To get information by using the GUID string, type:

wdsutil /verbose /Get-Device /ID:E8A3EFAC-201F-4E69-953-B2DAA1E8B1B6 /forest:Yes

Additional References



title: automount description: Reference article for the automount command, which enables or disables the automount feature. ms.topic: reference ms.assetid: 4635fc91-a477-4f17-8dcc-aa08854bfe45 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

automount

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

[!IMPORTANT] In storage area network (SAN) configurations, disabling automount prevents Windows from automatically mounting or assigning drive letters to any new basic volumes that are visible to the system.

Syntax

automount [ { enable | disable | scrub } ] [noerr]

Parameters

Parameter Description
enable Enables Windows to automatically mount new basic and dynamic volumes that are added to the system and to assign them drive letters.
disable Prevents Windows from automatically mounting any new basic and dynamic volumes that are added to the system.

Note: Disabling automount can cause failover clusters to fail the storage portion of the Validate a Configuration Wizard.

scrub Removes volume mount point directories and registry settings for volumes that are no longer in the system. This prevents volumes that were previously in the system from being automatically mounted and given their former volume mount point(s) when they are added back to the system.
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To see if the automount feature is enabled, type the following commands from within the diskpart command:

automount

To enable the automount feature, type:

automount enable

To disable the automount feature, type:

automount disable

Additional References



title: wdsutil get-autoadddevices description: Reference article for wdsutil get-autoadddevices, which displays all computers that are in the Auto-add database on a Windows Deployment Services server. ms.topic: reference ms.assetid: 24b4b688-55b0-4bd9-a2f5-7ef4b3dfe2f2 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil get-autoadddevices

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays all computers that are in the Auto-add database on a Windows Deployment Services server.

Syntax

wdsutil [Options] /Get-AutoaddDevices [/Server:<Server name>] /Devicetype:{PendingDevices | RejectedDevices | ApprovedDevices}

Parameters

Parameter Description
[/Server:<Server name>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.
/Devicetype:{PendingDevices | RejectedDevices | ApprovedDevices} Specifies the type of computer to return.

- PendingDevices returns all computers in the database that have a status of pending.
- RejectedDevices returns all computers in the database that have a status of rejected.
- ApprovedDevices returns all computers in the database that have a status of approved.

Examples

To see all of the approved computers, type:

wdsutil /Get-AutoaddDevices /Devicetype:ApprovedDevices

To see all of the rejected computers, type:

wdsutil /verbose /Get-AutoaddDevices /Devicetype:RejectedDevices /Server:MyWDSServer

Additional References



title: wdsutil get-allimagegroups description: Reference article for the wdsutil get-allimagegroups command, which retrieves information about all image groups on a server and all images in those image groups. ms.topic: reference ms.assetid: 2ca06533-bcf5-4590-ac8e-263d6c9874f8 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil get-allimagegroups

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Retrieves information about all image groups on a server and all images in those image groups.

Syntax

wdsutil [options] /get-allimagegroups [/server:<servername>] [/detailed]

Parameters

Parameter Description
[/server:<servername>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server is used.
[/detailed] Returns the image metadata from each image. If this parameter isn't used, the default behavior is to return only the image name, description, and file name for each image.

Examples

To view information about the image groups, type either:

wdsutil /get-allimagegroups
wdsutil /verbose /get-allimagegroups /server:MyWDSServer /detailed

Additional References



title: auditpol set description: Reference article for the auditpol set command, which sets the per-user audit policy, system audit policy, or auditing options. ms.topic: reference ms.assetid: f4947486-87bd-48cb-ba81-7230c8e70895 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

auditpol set

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Sets the per-user audit policy, system audit policy, or auditing options.

To perform set operations on the per-user and system policies, you must have Write or Full Control permission for that object set in the security descriptor. You can also perform set operations if you have the Manage auditing and security log (SeSecurityPrivilege) user right. However, this right allows additional access that is not necessary to perform the overall set operations.

Syntax

auditpol /set
[/user[:<username>|<{sid}>][/include][/exclude]]
[/category:<name>|<{guid}>[,:<name|<{guid}> ]]
[/success:<enable>|<disable>][/failure:<enable>|<disable>]
[/subcategory:<name>|<{guid}>[,:<name|<{guid}> ]]
[/success:<enable>|<disable>][/failure:<enable>|<disable>]
[/option:<option name> /value: <enable>|<disable>]

Parameters

Parameter Description
/user The security principal for whom the per-user audit policy specified by the category or subcategory is set. Either the category or subcategory option must be specified, as a security identifier (SID) or name.
/include Specified with /user; indicates that the user's per-user policy will cause an audit to be generated even if it is not specified by the system audit policy. This setting is the default and is automatically applied if neither the /include nor /exclude parameters are explicitly specified.
/exclude Specified with /user; indicates that the user's per-user policy will cause an audit to be suppressed regardless of the system audit policy. This setting is ignored for users who are members of the local Administrators group.
/category One or more audit categories specified by globally unique identifier (GUID) or name. If no user is specified, the system policy is set.
/subcategory One or more audit subcategories specified by GUID or name. If no user is specified, the system policy is set.
/success Specifies success auditing. This setting is the default and is automatically applied if neither the /success nor /failure parameters are explicitly specified. This setting must be used with a parameter indicating whether to enable or disable the setting.
/failure Specifies failure auditing. This setting must be used with a parameter indicating whether to enable or disable the setting.
/option Sets the audit policy for the CrashOnAuditFail, FullprivilegeAuditing, AuditBaseObjects, or AuditBasedirectories options.
/sd Sets the security descriptor used to delegate access to the audit policy. The security descriptor must be specified by using the Security Descriptor Definition Language (SDDL). The security descriptor must have a discretionary access control list (DACL).
/? Displays help at the command prompt.

Examples

To set the per-user audit policy for all subcategories under the detailed Tracking category for the user mikedan so that all the user's successful attempts will be audited, type:

auditpol /set /user:mikedan /category:detailed Tracking /include /success:enable

To set the per-user audit policy for categories specified by name and GUID, and subcategories specified by GUID to suppress auditing for any successful or failed attempts, type:

auditpol /set /user:mikedan /exclude /category:Object Access,System,{6997984b-797a-11d9-bed3-505054503030}
/subcategory:{0ccee9210-69ae-11d9-bed3-505054503030},:{0ccee9211-69ae-11d9-bed3-505054503030}, /success:enable /failure:enable

To set the per-user audit policy for the specified user for all the categories for the suppression of auditing of all but successful attempts, type:

auditpol /set /user:mikedan /exclude /category:* /success:enable

To set the system audit policy for all subcategories under the detailed Tracking category to include auditing for only successful attempts, type:

auditpol /set /category:detailed Tracking /success:enable

[!NOTE] The failure setting is not altered.

To set the system audit policy for the Object Access and System categories (which is implied because subcategories are listed) and subcategories specified by GUIDs for the suppression of failed attempts and the auditing of successful attempts, type:

auditpol /set /subcategory:{0ccee9210-69ae-11d9-bed3-505054503030},{0ccee9211-69ae-11d9-bed3-505054503030}, /failure:disable /success:enable

To set the auditing options to the enabled state for the CrashOnAuditFail option, type:

auditpol /set /option:CrashOnAuditFail /value:enable

Additional References



title: autochk description: Reference article for the autochk command, which runs when the computer is started and prior to Windows Server starting to verify the logical integrity of a file system. ms.topic: reference ms.assetid: 8787e6a3-f023-4ea5-b2d1-61c6876d8aff ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

autochk

Runs when the computer is started and prior to Windows Server starting to verify the logical integrity of a file system.

Autochk.exe is a version of chkdsk that runs only on NTFS disks and only before Windows Server starts. autochk cannot be run directly from the command-line. Instead, autochk runs in the following situations:

Remarks

[!WARNING] The autochk command-line tool cannot be directly run from the command-line. Instead, use the chkntfs command-line tool to configure the way you want autochk to run at startup.

Additional References



title: wdsutil enable-server description: Reference article for the wdsutil enable-server command, which enables all services for Windows Deployment Services. ms.topic: reference ms.assetid: 939ffbfb-cf3c-4310-9627-6e7e0c0644d6 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil enable-server

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Enables all services for Windows Deployment Services.

Syntax

wdsutil [options] /Enable-Server [/Server:<Servername>]

Parameters

Parameter Description
[/Server:<Servername>] Specifies the name of the server. This can be the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server is used.

Examples

To enable the services on the server, type either:

wdsutil /Enable-Server
wdsutil /verbose /Enable-Server /Server:MyWDSServer

Additional References



title: auditpol restore description: Reference article for the auditpol restore command, which restores system audit policy settings, per-user audit policy settings for all users, and all auditing options from a file that is syntactically consistent with the comma-separated value (CSV) file format used by the /backup option. ms.topic: reference ms.assetid: ad73e520-484f-4cf1-a7f9-ae7488e9edf6 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

auditpol restore

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Restores system audit policy settings, per-user audit policy settings for all users, and all auditing options from a file that is syntactically consistent with the comma-separated value (CSV) file format used by the /backup option.

To perform restore operations on the per-user and system policies, you must have Write or Full Control permission for that object set in the security descriptor. You can also perform restore operations if you have the Manage auditing and security log (SeSecurityPrivilege) user right, which is useful when restoring the security descriptor in the event of an error or malicious attack.

Syntax

auditpol /restore /file:<filename>

Parameters

Parameter Description
/file Specifies the file from which the audit policy should be restored. The file must have been created by using the /backup option or must be syntactically consistent with the CSV file format used by the /backup option.
/? Displays help at the command prompt.

Examples

To restore system audit policy settings, per-user audit policy settings for all users, and all auditing options from a file named auditpolicy.csv that was created by using the /backup command, type:

auditpol /restore /file:c:\auditpolicy.csv

Additional References



title: auditpol list description: Reference article for the auditpol list command, which lists audit policy categories and subcategories, or lists users for whom a per-user audit policy is defined. ms.topic: reference ms.assetid: 45502abe-3d6e-4e13-94f0-8e6fcb6db860 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

auditpol list

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Lists audit policy categories and subcategories, or lists users for whom a per-user audit policy is defined.

To perform list operations on the per-user policy, you must have Read permission for that object set in the security descriptor. You can also perform list operations if you have the Manage auditing and security log (SeSecurityPrivilege) user right. However, this right allows additional access that is not necessary to perform the overall list operations.

Syntax

auditpol /list
[/user|/category|subcategory[:<categoryname>|<{guid}>|*]]
[/v] [/r]

Parameters

Parameter Description
/user Retrieves all users for whom the per-user audit policy has been defined. If used with the /v parameter, the security identifier (SID) of the user is also displayed.
/category Displays the names of categories understood by the system. If used with the /v parameter, the category globally unique identifier (GUID) is also displayed.
/subcategory Displays the names of subcategories and their associated GUID.
/v Displays the GUID with the category or subcategory, or when used with /user, displays the SID of each user.
/r Displays the output as a report in comma-separated value (CSV) format.
/? Displays help at the command prompt.

Examples

To list all users who have a defined audit policy, type:

auditpol /list /user

To list all users who have a defined audit policy and their associated SID, type:

auditpol /list /user /v

To list all categories and subcategories in report format, type:

auditpol /list /subcategory:* /r

To list the subcategories of the detailed Tracking and DS Access categories, type:

auditpol /list /subcategory:detailed Tracking,DS Access

Additional References



title: wdsutil enable description: Reference article for the wdsutil enable commands, which enables all services for Windows Deployment Services. ms.topic: reference ms.assetid: aafebfb2-fff0-41c9-a095-8884acf49f50 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil enable commands

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Enables all services for Windows Deployment Services.

Parameters

Parameter Description
wdsutil enable-server command Enables all services on a specified Windows Deployment Services server (Deployment Server).
wdsutil enable-transportserver command Enables all services on a specified Transport Server.

Additional References



title: wdsutil copy-image description: Reference article for the wdsutil copy-image command, which copies images that are within the same image group. ms.topic: reference ms.assetid: bea41cf4-36e6-4181-afa5-00170ebd4fdc ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil copy-image

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Copies images that are within the same image group. To copy images between image groups, use the wdsutil Export-Image command command and then the wdsutil add-Image command command.

Syntax

wdsutil [Options] /copy-Image image:<Image name> [/Server:<Server name>] imagetype:Install imageGroup:<Image group name>] [/Filename:<File name>] /DestinationImage /Name:<Name> /Filename:<File name> [/Description:<Description>]

Parameters

Parameter Description
image:<Imagename> Specifies the name of the image to be copied.
[/Server:<Servername>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server is used.
imagetype:Install Specifies the type of image to be copied. This option must be set to install.
\imageGroup:<Image groupname>] Specifies the image group that contains the image to be copied. If no image group is specified and only one group exists on the server, that image group is used by default. If more than one image group exists on the server, you must specify the image group.
[/Filename:<Filename>] Specifies the file name of the image to be copied. If the source image cannot be uniquely identified by name, you must specify the file name.
/DestinationImage Specifies the settings for the destination image. The valid values are:
  • /Name:<Name> - Sets the display name of the image to be copied.
  • /Filename:<Filename> - Sets the name of the destination image file that will contain the image copy.
  • [/Description:<Description>] - Sets the description of the image copy.

Examples

To create a copy of the specified image and name it WindowsVista.wim, type:

wdsutil /copy-Image image:Windows Vista with Office imagetype:Install /DestinationImage /Name:copy of Windows Vista with Office / Filename:WindowsVista.wim

To create a copy of the specified image, apply the specified settings, and name the copy WindowsVista.wim, type:

wdsutil /verbose /Progress /copy-Image image:Windows Vista with Office /Server:MyWDSServe imagetype:Install imageGroup:ImageGroup1
/Filename:install.wim /DestinationImage /Name:copy of Windows Vista with Office /Filename:WindowsVista.wim /Description:This is a copy of the original Windows image with Office installed

Additional References



title: wdsutil add description: Reference article for the wdsutil add commands. ms.topic: reference ms.assetid: 6fcdd154-baaf-4288-a355-2a95a3028bce ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil add commands

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Parameters

Parameter Description
wdsutil add-device command Pre-stages a computer in active directory.
wdsutil add-image command Adds boot or installation images.
wdsutil add-imagegroup command Adds an image group.
wdsutil add-drivergrouppackage command Adds a driver package to a driver group.
wdsutil add-drivergrouppackages command Adds driver packages to a driver group.
wdsutil add-driverpackage command Adds a driver package to the server.
wdsutil add-imagedriverpackage command Adds a driver package that is in the driver store to an existing boot image on the server.
wdsutil add-imagedriverpackages command Adds driver packages from the driver store to a boot image on the server.
wdsutil add-alldriverpackages subcommand Adds driver packages from a folder to a server.
wdsutil add-drivergroup command Adds a driver group to a server.
wdsutil add-drivergroupfilter command Adds a filter to a driver group on a server.

Additional References



title: append description: Reference article for the append command, which allows programs to open data files in specified directories, as if they were in the current directory. ms.topic: reference ms.assetid: 9c3fea20-9502-40ad-a442-7a927aad88eb ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

append

Allows programs to open data files in specified directories as if they were in the current directory. If used without parameters, append displays the appended directory list.

[!NOTE] This command not supported in Windows 10.

Syntax

append [[<drive>:]<path>[;...]] [/x[:on|:off]] [/path:[:on|:off] [/e]
append ;

Parameters

Parameter Description
[\<drive>:]<path> Specifies a drive and directory to append.
/x:on Applies appended directories to file searches and launching applications.
/x:off Applies appended directories only to requests to open files. The /x:off option is the default setting.
/path:on Applies appended directories to file requests that already specify a path. /path:on is the default setting.
/path:off Turns off the effect of /path:on.
/e Stores a copy of the appended directory list in an environment variable named APPEND. /e may be used only the first time you use append after starting your system.
; Clears the appended directory list.
/? Displays help at the command prompt.

Examples

To clear the appended directory list, type:

append ;

To store a copy of the appended directory to an environment variable named append, type:

append /e

Additional References



title: add-DriverPackage description: Reference article for the add-DriverPackage command, which adds a driver package to the server. ms.topic: reference ms.assetid: 3ac9e8d5-63ec-4ce8-86fc-85d28011050b ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

add-DriverPackage

Adds a driver package to the server.

Syntax

wdsutil /Add-DriverPackage /InfFile:<Inf File path> [/Server:<Server name>] [/Architecture:{x86 | ia64 | x64}] [/DriverGroup:<Group Name>] [/Name:<Friendly Name>]

Parameters

Parameter Description
/InfFile:<InfFilepath> Specifies the full path of the .inf file to add.
[/Server:<Servername>] Specifies the name of the server. This can be the NetBIOS name or the FQDN. If no server name is specified, the local server is used.
[/Architecture:`{x86 ia64 x64}`] Specifies the architecture type for the driver package.
[/DriverGroup:<groupname>] Specifies the name of the driver group to which the packages should be added.
[/Name:<friendlyname>] Specifies the friendly name for the driver package.

Examples

To add a driver package, type either:

wdsutil /verbose /Add-DriverPackage /InfFile:C:\Temp\Display.inf
wdsutil /Add-DriverPackage /Server:MyWDSServer /InfFile:C:\Temp\Display.inf /Architecture:x86 /DriverGroup:x86Drivers /Name:Display Driver

Additional References



title: wdsutil add-alldriverpackages description: Reference article for the wdsutil add-alldriverpackages command, which adds all driver packages that are stored in a folder to a server. ms.topic: reference ms.assetid: ba6641c1-d7e9-43a9-9819-702dad5484ed ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil add-alldriverpackages

Adds all driver packages that are stored in a folder to a server.

Syntax

wdsutil /Add-AllDriverPackages /FolderPath:<folderpath> [/Server:<servername>] [/Architecture:{x86 | ia64 | x64}] [/DriverGroup:<groupname>]

Parameters

Parameter Description
/FolderPath:<folderpath> Specifies the full path to the folder that contains the .inf files for the driver packages.
[/Server:<servername>] Specifies the name of the server. This can be the NetBIOS name or the FQDN. If no server name is specified, the local server is used.
[/Architecture:`{x86 ia64 x64}`] Specifies the architecture type for the driver package.
[/DriverGroup:<groupname>] Specifies the name of the driver group to which the packages should be added.

Examples

To add driver packages, type either:

wdsutil /verbose /Add-AllDriverPackages /FolderPath:C:\Temp\Drivers /Architecture:x86
wdsutil /Add-AllDriverPackages /FolderPath:C:\Temp\Drivers\Printers /DriverGroup:Printer Drivers

Additional References



title: wbadmin get status description: Reference article for the wbadmin get status command, which reports the status of the backup or recovery operation that is currently running. ms.topic: reference ms.assetid: 2911b944-7b95-46aa-8c1e-1d55a2fcc94c ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wbadmin get status

Reports the status of the backup or recovery operation that is currently running.

To get the status of the currently running backup or recovery operation using this command, you must be a member of the Backup Operators group or the Administrators group, or you must have been delegated the appropriate permissions. In addition, you must run wbadmin from an elevated command prompt, by right-clicking Command Prompt, and then selecting Run as administrator.

[!IMPORTANT] This command doesn't stop until the backup or recovery operation is finished. The command continues to run even if you close the command window. To stop the current backup or recovery operation, run the wbadmin stop job command.

Syntax

wbadmin get status

Additional References



title: vssadmin resize shadowstorage description: A description of the vssadmin resize shadowstorage command, which resizes the maximum amount of storage space that can be used for shadow copy storage. ms.topic: reference author: JasonGerend ms.author: jgerend ms.date: 03/05/2020

vssadmin resize shadowstorage

Applies to: Windows Server 2022, Windows Server 2019, Windows 10, Windows 8.1, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2, Windows Server 2008

Resizes the maximum amount of storage space that can be used for shadow copy storage.

The minimum amount of storage space that can be used for shadow copy storage can be specified by using the MinDiffAreaFileSize registry value. For more information, see MinDiffAreaFileSize.

[!WARNING] Resizing the storage association may cause shadow copies to disappear.

Syntax

vssadmin resize shadowstorage /for=<ForVolumeSpec> /on=<OnVolumeSpec> [/maxsize=<MaxSizeSpec>]

Parameters

Parameter Description
/for=<ForVolumeSpec> Specifies the volume for which the maximum amount of storage space is to be resized.
/on=<OnVolumeSpec> Specifies the storage volume.
[/maxsize=<MaxSizeSpec>] Specifies the maximum amount of space that can be used for storing shadow copies. If no value is specified for /maxsize, there's no limit placed on the amount of storage space that can be used.

The MaxSizeSpec value must be 1 MB or greater and must be expressed in one of the following units: KB, MB, GB, TB, PB, or EB. If no unit is specified, MaxSizeSpec uses bytes by default.

Examples

To resize shadow copy of volume C on volume D, with a maximum size of 900MB, type:

vssadmin resize shadowstorage /For=C: /On=D: /MaxSize=900MB

To resize shadow copy of volume C on volume D, with no maximum size, type:

vssadmin resize shadowstorage /For=C: /On=D: /MaxSize=UNBOUNDED

To resize shadow copy of volume C by 20%, type:

vssadmin resize shadowstorage /For=C: /On=C: /MaxSize=20%

Additional References



title: mqbkup description: Reference article for the mqbkup command, which backs up MSMQ message files and registry settings to a storage device and restores previously-stored messages and settings. ms.topic: reference ms.assetid: 7bdd41c4-75ef-455f-b241-1d64a4c7acf5 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

mqbkup

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Backs up MSMQ message files and registry settings to a storage device and restores previously-stored messages and settings.

Both the backup and the restore operations stop the local MSMQ service. If the MSMQ service was started beforehand, the utility will attempt to restart the MSMQ service at the end of the backup or the restore operation. If the service was already stopped before running the utility, no attempt to restart the service is made.

Before using the MSMQ Message Backup/Restore utility you must close all local applications that are using MSMQ.

Syntax

mqbkup {/b | /r} <folder path_to_storage_device>

Parameters

Parameter Description
/b Specifies backup operation.
/r Specifies restore operation.
<folder path_to_storage_device> Specifies the path where the MSMQ message files and registry settings are stored.
/? Displays help at the command prompt.

Remarks

Examples

To backup all MSMQ message files and registry settings, and to store them in the msmqbkup folder on your C: drive, type:

mqbkup /b c:\msmqbkup

To delete all existing files and subfolders in the oldbkup folder on your C: drive, and then to store MSMQ message files and registry settings in the folder, type:

mqbkup /b /y c:\oldbkup

To restore MSMQ messages and registry settings, type:

mqbkup /r c:\msmqbkup

Additional References



title: uniqueid description: Reference article for uniqueid, which displays or sets the GUID partition table (GPT) identifier or master boot record (MBR) signature for the disk with focus. ms.topic: reference ms.assetid: 64235a4a-b91c-46da-b9b0-68ee90571c2a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

uniqueid

Displays or sets the GUID partition table (GPT) identifier or master boot record (MBR) signature for the basic or dynamic disk with focus. A basic or dynamic disk must be selected for this operation to succeed. Use the select disk command to select a disk and shift the focus to it.

Syntax

uniqueid disk [id={<dword> | <GUID>}] [noerr]

Parameters

Parameter Description
id=`{ }` For MBR disks, this parameter specifies a 4-byte (DWORD) value in hexadecimal form for the signature. For GPT disks, this parameter specifies a GUID for the identifier.
noerr For scripting only. When an error occurs, DiskPart continues to process commands as if the error didn't occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To display the signature of the MBR disk with focus, type:

uniqueid disk

To set the signature of the MBR disk with focus to the DWORD value 5f1b2c36, type:

uniqueid disk id=5f1b2c36

To set the identifier of the GPT disk with focus to the GUID value baf784e7-6bbd-4cfb-aaac-e86c96e166ee, type:

uniqueid disk id=baf784e7-6bbd-4cfb-aaac-e86c96e166ee

Additional References



title: tskill description: Reference article for the tskill command, which ends a process running in a session on a Remote Desktop Session Host server. ms.topic: reference ms.assetid: 08986e6a-6900-4ece-85a1-8f73b14db1b3 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

tskill

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Ends a process running in a session on a Remote Desktop Session Host server.

[!NOTE] You can use this command to end only those processes that belong to you, unless you are an administrator. Administrators have full access to all tskill functions and can end processes that are running in other user sessions.

To find out what's new in the latest version, see What's New in Remote Desktop Services in Windows Server.

Syntax

tskill {<processID> | <processname>} [/server:<servername>] [/id:<sessionID> | /a] [/v]

Parameters

Parameter Description
<processID> Specifies the ID of the process that you want to end.
<processname> Specifies the name of the process that you want to end. This parameter can include wildcard characters.
/server:<servername> Specifies the terminal server that contains the process that you want to end. If /server isn't specified, the current Remote Desktop Session Host server is used.
/id:<sessionID> Ends the process that is running in the specified session.
/a Ends the process that is running in all sessions.
/v Displays information about the actions being performed.
/? Displays help at the command prompt.

Remarks

Examples

To end process 6543, type:

tskill 6543

To end the process explorer running on session 5, type:

tskill explorer /id:5

Additional References



title: tsdiscon description: Reference article for tsdiscon, which disconnects a session from a Remote Desktop Session Host server. ms.topic: reference ms.assetid: 13139674-7dee-4965-8cac-32f4928e8b9a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

tsdiscon

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Disconnects a session from a Remote Desktop Session Host server. If you don't specify a session ID or session name, this command disconnects the current session.

[!IMPORTANT] You must have Full Control access permission or Disconnect special access permission to disconnect another user from a session.

[!NOTE] To find out what's new in the latest version, see What's New in Remote Desktop Services in Windows Server.

Syntax

tsdiscon [<sessionID> | <sessionname>] [/server:<servername>] [/v]

Parameters

Parameter Description
<sessionID> Specifies the ID of the session to disconnect.
<sessionname> Specifies the name of the session to disconnect.
/server:<servername> Specifies the terminal server that contains the session that you want to disconnect. Otherwise, the current Remote Desktop Session Host server is used. This parameter is required only if you run the tsdiscon command from a remote server.
/v Displays information about the actions being performed.
/? Displays help at the command prompt.

Remarks

Examples

To disconnect the current session, type:

tsdiscon

To disconnect Session 10, type:

tsdiscon 10

To disconnect the session named TERM04, type:

tsdiscon TERM04

Additional References



title: title description: Reference article for the title command, which creates a title for the Command Prompt window. ms.topic: reference ms.assetid: c0bbe8bd-201a-4b6c-b617-5d9809881dc8 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

title

Creates a title for the Command Prompt window.

Syntax

title [<string>]

Parameters

Parameter Description
<string> Specifies the text to appear as the title of the Command Prompt window.
/? Displays help at the command prompt.

Remarks

Examples

To change the Command Prompt window title to Updating Files while the batch file executes the copy command, and then to return the title back to Command Prompt, type the following script:

@echo off
title Updating Files
copy \\server\share\*.xls c:\users\common\*.xls
echo Files Updated.
title Command Prompt

Additional References



title: manage-bde lock description: Reference article for the manage-bde lock command, which locks a BitLocker-protected drive to prevent access to it unless the unlock key is provided. ms.topic: reference ms.assetid: b8858e61-3a7e-4d03-8c98-5c09853f35e8 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

manage-bde lock

Locks a BitLocker-protected drive to prevent access to it unless the unlock key is provided.

Syntax

manage-bde -lock [<drive>] [-computername <name>] [{-?|/?}] [{-help|-h}]

Parameters

Parameter Description
<drive> Represents a drive letter followed by a colon.
-computername Specifies that manage-bde.exe will be used to modify BitLocker protection on a different computer. You can also use -cn as an abbreviated version of this command.
<name> Represents the name of the computer on which to modify BitLocker protection. Accepted values include the computer's NetBIOS name and the computer's IP address.
-? or /? Displays brief Help at the command prompt.
-help or -h Displays complete Help at the command prompt.

Examples

To lock data drive D, type:

manage-bde –lock D:

Additional References



title: manage-bde off description: Reference article for the manage-bde off command, which decrypts the drive and turns off BitLocker. ms.topic: reference ms.assetid: 0a27c119-d385-45e5-89fe-e311d4429876 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

manage-bde off

Decrypts the drive and turns off BitLocker. All key protectors are removed when decryption is complete.

Syntax

manage-bde -off [<volume>] [-computername <name>] [{-?|/?}] [{-help|-h}]

Parameters

Parameter Description
<volume> Specifies a drive letter followed by a colon, a volume GUID path, or a mounted volume.
-computername Specifies that manage-bde.exe will be used to modify BitLocker protection on a different computer. You can also use -cn as an abbreviated version of this command.
<name> Represents the name of the computer on which to modify BitLocker protection. Accepted values include the computer's NetBIOS name and the computer's IP address.
-? or /? Displays brief Help at the command prompt.
-help or -h Displays complete Help at the command prompt.

Examples

To turn off BitLocker on drive C, type:

manage-bde –off C:

Additional References



title: telnet open description: Reference article for the telnet open command, which connects to a telnet server. ms.topic: article ms.assetid: e30ad68c-2366-4754-ac36-311a2392902a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

telnet: open

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Connects to a telnet server.

Syntax

o[pen] <hostname> [<port>]

Parameters

Parameter Description
<hostname> Specifies the computer name or IP address.
[<port>] Specifies the TCP port that the telnet server is listening on. The default is TCP port 23.

Examples

To connect to a telnet server at telnet.microsoft.com, type:

o telnet.microsoft.com

Additional References



title: manage-bde autounlock description: Reference article for the manage-bde autounlock command, which manages the automatic unlocking of BitLocker-protected data drives. ms.topic: reference ms.assetid: 063528bf-d235-4b44-887a-52a7d983e01a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

manage-bde autounlock

Manages the automatic unlocking of BitLocker-protected data drives.

Syntax

manage-bde -autounlock [{-enable|-disable|-clearallkeys}] <drive> [-computername <name>] [{-?|/?}] [{-help|-h}]

Parameters

Parameter Description
-enable Enables automatic unlocking for a data drive.
-disable Disables automatic unlocking for a data drive.
-clearallkeys Removes all stored external keys on the operating system drive.
<drive> Represents a drive letter followed by a colon.
-computername Specifies that manage-bde.exe will be used to modify BitLocker protection on a different computer. You can also use -cn as an abbreviated version of this command.
<name> Represents the name of the computer on which to modify BitLocker protection. Accepted values include the computer's NetBIOS name and the computer's IP address.
-? or /? Displays brief Help at the command prompt.
-help or -h Displays complete Help at the command prompt.

Examples

To enable automatic unlocking of data drive E, type:

manage-bde –autounlock -enable E:

Additional References



title: logman update api description: Reference article for the logman update api command, which updates the properties of an existing API tracking data collector. ms.topic: reference ms.assetid: 6f322e52-0f9f-42b1-bd64-8b8f8fe086fc ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

logman update api

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Updates the properties of an existing API tracing data collector.

Syntax

logman update api <[-n] <name>> [options]

Parameters

Parameter Description
-s <computer name> Performs the command on the specified remote computer.
-config <value> Specifies the settings file containing command options.
[-n] <name> Name of the target object.
-f `<bin bincirc>` Specifies the log format for the data collector.
-[-]u <user [password]> Specifies the user to Run As. Entering a * for the password produces a prompt for the password. The password is not displayed when you type it at the password prompt.
-m <[start] [stop] [[start] [stop] [...]]> Changed to manual start or stop instead of a scheduled begin or end time.
-rf <[[hh:]mm:]ss> Run the data collector for the specified period of time.
-b `<M/d/yyyy h:mm:ss[AM PM]>` Begin collecting data at the specified time.
-e `<M/d/yyyy h:mm:ss[AM PM]>` End data collection at the specified time.
-si <[[hh:]mm:]ss> Specifies the sample interval for performance counter data collectors.
-o `<path dsn!log>` Specifies the output log file or the DSN and log set name in a SQL database.
-[-]r Repeat the data collector daily at the specified begin and end times.
-[-]a Append an existing log file.
-[-]ow Overwrite an existing log file.
-[-]v `<nnnnnn mmddhhmm>` Attaches file versioning information to the end of the log file name.
-[-]rc <task> Run the command specified each time the log is closed.
-[-]max <value> Maximum log file size in MB or maximum number of records for SQL logs.
-[-]cnf <[[hh:]mm:]ss> When time is specified, creates a new file when the specified time has elapsed. When time is not specified, creates a new file when the maximum size is exceeded.
-y Answer yes to all questions without prompting.
-mods <path [path [...]]> Specifies the list of modules to log API calls from.
-inapis<module!api [module!api [...]]> Specifies the list of API calls to include in logging.
-exapis <module!api [module!api [...]]> Specifies the list of API calls to exclude from logging.
-[-]ano Log (-ano) API names only, or do not log only (-ano) API names.
-[-]recursive Log (-recursive) or do not log (-recursive) APIs recursively beyond the first layer.
-exe <value> Specifies the full path to an executable for API Tracing.
/? Displays context-sensitive help.

Remarks

Examples

To update an existing API trace counter called trace_notepad, for the executable file c:\windows\notepad.exe, by excluding the API call TlsGetValue produced by the module kernel32.dll, type:

logman update api trace_notepad -exe c:\windows\notepad.exe -exapis kernel32.dll!TlsGetValue

Additional References



title: logman update alert description: Reference article for the logman update alert command, which updates the properties of an existing alert data collector. ms.topic: reference ms.assetid: ede94a76-931c-40ed-9fda-6766bed8ff72 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

logman update alert

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Updates the properties of an existing alert data collector.

Syntax

logman update alert <[-n] <name>> [options]

Parameters

Parameter Description
-s <computer name> Perform the command on the specified remote computer.
-config <value> Specifies the settings file containing command options.
[-n] <name> Name of the target object.
-[-]u <user [password]> Specifies the user to Run As. Entering an * for the password produces a prompt for the password. The password is not displayed when you type it at the password prompt.
-m <[start] [stop] [[start] [stop] [...]]> Changes to manual start or stop instead of a scheduled begin or end time.
-rf <[[hh:]mm:]ss> Runs the data collector for the specified period of time.
-b `<M/d/yyyy h:mm:ss[AM PM]>` Begins collecting data at the specified time.
-e `<M/d/yyyy h:mm:ss[AM PM]>` Ends data collection at the specified time.
-si <[[hh:]mm:]ss> Specifies the sample interval for performance counter data collectors.
-o `<path dsn!log>` Specifies the output log file or the DSN and log set name in a SQL database.
-[-]r Repeats the data collector daily at the specified begin and end times.
-[-]a Appends an existing log file.
-[-]ow Overwrites an existing log file.
-[-]v `<nnnnnn mmddhhmm>` Attaches file versioning information to the end of the log file name.
-[-]rc <task> Runs the command specified each time the log is closed.
-[-]max <value> Maximum log file size in MB or maximum number of records for SQL logs.
-[-]cnf <[[hh:]mm:]ss> When time is specified, creates a new file when the specified time has elapsed. When time is not specified, creates a new file when the maximum size is exceeded.
-y Answers yes to all questions without prompting.
-cf <filename> Specifies the file listing performance counters to collect. The file should contain one performance counter name per line.
-[-]el Enables or disables Event Log reporting.
-th <threshold [threshold [...]]> Specify counters and their threshold values for an alert.
-[-]rdcs <name> Specifies the Data Collector Set to start when an alert fires.
-[-]tn <task> Specifies the task to run when an alert fires.
-[-]targ <argument> Specifies the task arguments to be used with the task specified using -tn.
/? Displays context-sensitive help.

Remarks

Examples

To update the existing alert called new_alert, setting the threshold value for the counter % Processor time in the Processor(_Total) counter group to 40%, type:

logman update alert new_alert -th \Processor(_Total)\% Processor time>40

Additional References



title: logman query description: Reference article for the logman query command, which queries data collector or data collector set properties. ms.topic: reference ms.assetid: 1116a0f0-5415-4369-a045-12f79f8f66de ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

logman query

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Queries data collector or data collector set properties.

Syntax

logman query [providers|Data Collector Set name] [options]

Parameters

Parameter Description
-s <computer name> Perform the command on the specified remote computer.
-config <value> Specifies the settings file containing command options.
[-n] <name> Name of the target object.
-ets Sends commands to Event Trace Sessions directly without saving or scheduling.
/? Displays context-sensitive help.

Examples

To list all Data Collector Sets configured on the target system, type:

logman query

To list the data collectors contained in the Data Collector Set named perf_log, type:

logman query perf_log

To list all available providers of data collectors on the target system, type:

logman query providers

Additional References



title: logman start and logman stop description: Reference article for the logman start and logman stop commands, which starts a data collector and sets the begin time to manual, or stops a Data Collector Set and sets the end time to manual. ms.topic: reference ms.assetid: a40006a1-876e-474b-aaf1-f365c730deea ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

logman start and logman stop

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

The logman start command starts a data collector and sets the begin time to manual. The logman stop command stops a Data Collector Set and sets the end time to manual.

Syntax

logman start <[-n] <name>> [options]
logman stop <[-n] <name>> [options]

Parameters

Parameter Description
-s <computer name> Perform the command on the specified remote computer.
-config <value> Specifies the settings file containing command options.
[-n] <name> Specifies the name of the target object.
-ets Sends commands to Event Trace Sessions directly, without saving or scheduling.
-as Performs the requested operation asynchronously.
-? Displays context-sensitive help.

Examples

To start the data collector perf_log, on the remote computer server_1, type:

logman start perf_log -s server_1

Additional References



title: takeown description: Reference article for the takeown command, which enables an administrator to recover access to a file that was previously denied. ms.topic: reference ms.assetid: 0683cd65-a6db-4cab-962b-45a0ff61f43c ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

takeown

Enables an administrator to recover access to a file that previously was denied, by making the administrator the owner of the file. This command is typically used on batch files.

Syntax

takeown [/s <computer> [/u [<domain>\]<username> [/p [<password>]]]] /f <filename> [/a] [/r [/d {Y|N}]]

Parameters

Parameter Description
/s <computer> Specifies the name or IP address of a remote computer (do not use backslashes). The default value is the local computer. This parameter applies to all of the files and folders specified in the command.
/u [<domain>\]<username> Runs the script with the permissions of the specified user account. The default value is system permissions.
/p [<[password>] Specifies the password of the user account that is specified in the /u parameter.
/f <filename> Specifies the file name or directory name pattern. You can use the wildcard character * when specifying the pattern. You can also use the syntax <sharename>\<filename>.
/a Gives ownership to the Administrators group instead of the current user. If you don't specify this option, file ownership is given to the user who is currently logged on to the computer.
/r Performs a recursive operation on all files in the specified directory and subdirectories.
/d `{Y N}` Suppresses the confirmation prompt that is displayed when the current user does not have the List Folder permission on a specified directory, and instead uses the specified default value. Valid values for the /d option are:
  • Y - Take ownership of the directory.
  • N - Skip the directory.

    NOTE
    You must use this option in conjunction with the /r option.

/? Displays help at the command prompt.

Remarks

Examples

To take ownership of a file named Lostfile, type:

takeown /f lostfile

Additional References



title: logman create api description: Reference article for the logman create api command, which creates an API-tracing data collector. ms.topic: reference ms.assetid: 2ecc0a75-2613-464a-8616-c5dc404bb736 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

logman create api

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates an API tracing data collector.

Syntax

logman create api <[-n] <name>> [options]

Parameters

Parameter Description
-s <computer name> Performs the command on the specified remote computer.
-config <value> Specifies the settings file containing command options.
[-n] <name> Name of the target object.
-f `<bin bincirc>` Specifies the log format for the data collector.
-[-]u <user [password]> Specifies the user to Run As. Entering a * for the password produces a prompt for the password. The password is not displayed when you type it at the password prompt.
-m <[start] [stop] [[start] [stop] [...]]> Changed to manual start or stop instead of a scheduled begin or end time.
-rf <[[hh:]mm:]ss> Run the data collector for the specified period of time.
-b `<M/d/yyyy h:mm:ss[AM PM]>` Begin collecting data at the specified time.
-e `<M/d/yyyy h:mm:ss[AM PM]>` End data collection at the specified time.
-si <[[hh:]mm:]ss> Specifies the sample interval for performance counter data collectors.
-o `<path dsn!log>` Specifies the output log file or the DSN and log set name in a SQL database.
-[-]r Repeat the data collector daily at the specified begin and end times.
-[-]a Append an existing log file.
-[-]ow Overwrite an existing log file.
-[-]v `<nnnnnn mmddhhmm>` Attaches file versioning information to the end of the log file name.
-[-]rc <task> Run the command specified each time the log is closed.
-[-]max <value> Maximum log file size in MB or maximum number of records for SQL logs.
-[-]cnf <[[hh:]mm:]ss> When time is specified, creates a new file when the specified time has elapsed. When time is not specified, creates a new file when the maximum size is exceeded.
-y Answer yes to all questions without prompting.
-mods <path [path [...]]> Specifies the list of modules to log API calls from.
-inapis<module!api [module!api [...]]> Specifies the list of API calls to include in logging.
-exapis <module!api [module!api [...]]> Specifies the list of API calls to exclude from logging.
-[-]ano Log (-ano) API names only, or do not log only (-ano) API names.
-[-]recursive Log (-recursive) or do not log (-recursive) APIs recursively beyond the first layer.
-exe <value> Specifies the full path to an executable for API Tracing.
/? Displays context-sensitive help.

Remarks

Examples

To create an API trace counter called trace_notepad, for the executable file c:\windows\notepad.exe, and putting the results in the file c:\notepad.etl, type:

logman create api trace_notepad -exe c:\windows\notepad.exe -o c:\notepad.etl

To create an API trace counter called trace_notepad, for the executable file c:\windows\notepad.exe, collecting values produced by the module at c:\windows\system32\advapi32.dll, type:

logman create api trace_notepad -exe c:\windows\notepad.exe -mods c:\windows\system32\advapi32.dll

To create an API trace counter called trace_notepad, for the executable file c:\windows\notepad.exe, excluding the API call TlsGetValue produced by the module kernel32.dll, type:

logman create api trace_notepad -exe c:\windows\notepad.exe -exapis kernel32.dll!TlsGetValue

Additional References



title: subst description: Reference article for the subst command, which associates a path with a drive letter. ms.topic: reference ms.assetid: 3e69234c-2312-4343-868b-afc1017c622a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

subst

Associates a path with a drive letter. If used without parameters, subst displays the names of the virtual drives in effect.

Syntax

subst [<drive1>: [<drive2>:]<path>]
subst <drive1>: /d

Parameters

Parameter Description
<drive1>: Specifies the virtual drive to which you want to assign a path.
[<drive2>:]<path> Specifies the physical drive and path that you want to assign to a virtual drive.
/d Deletes a substituted (virtual) drive.
/? Displays help at the command prompt.

Remarks

Examples

To create a virtual drive z for the path b:\user\betty\forms, type:

subst z: b:\user\betty\forms

Instead of typing the full path, you can reach this directory by typing the letter of the virtual drive followed by a colon as follows:

z:

Additional References



title: list description: Reference article for the list command, which displays a list of disks, of partitions in a disk, of volumes in a disk, or of virtual hard disks (VHDs). ms.topic: reference ms.assetid: 69b105a1-9710-4a06-8102-38cc9e475ca5 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

list

Displays a list of disks, of partitions in a disk, of volumes in a disk, or of virtual hard disks (VHDs).

Syntax

list { disk | partition | volume | vdisk }

Parameters

Parameter Description
disk Displays a list of disks and information about them, such as their size, amount of available free space, whether the disk is a basic or dynamic disk, and whether the disk uses the master boot record (MBR) or GUID partition table (GPT) partition style.
partition Displays the partitions listed in the partition table of the current disk.
volume Displays a list of basic and dynamic volumes on all disks.
vdisk Displays a list of the VHDs that are attached and/or selected. This command lists detached VHDs if they are currently selected; however, the disk type is set to Unknown until the VHD is attached. The VHD marked with an asterisk (*) has focus.

Remarks

Examples

list disk
list partition
list volume
list vdisk

Additional References



title: shrink description: Reference article for the DiskPart shrink command, which reduces the size of the selected volume by the amount you specify. ms.topic: reference ms.assetid: ec87cc7c-9846-465e-a10d-4ee10db4f4e6 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

shrink

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

The Diskpart shrink command reduces the size of the selected volume by the amount you specify. This command makes free disk space available from the unused space at the end of the volume.

A volume must be selected for this operation to succeed. Use the select volume command to select a volume and shift the focus to it.

[!NOTE] This command works on basic volumes, and on simple or spanned dynamic volumes. It doesn't work on original equipment manufacturer (OEM) partitions, Extensible Firmware Interface (EFI) system partitions, or recovery partitions.

Syntax

shrink [desired=<n>] [minimum=<n>] [nowait] [noerr]
shrink querymax [noerr]

Parameters

Parameter Description
desired=<n> Specifies the desired amount of space in megabytes (MB) to reduce the size of the volume by.
minimum=<n> Specifies the minimum amount of space in MB to reduce the size of the volume by.
querymax Returns the maximum amount of space in MB by which the volume can be reduced. This value may change if applications are currently accessing the volume.
nowait Forces the command to return immediately while the shrink process is still in progress.
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Remarks

Examples

To reduce the size of the selected volume by the largest possible amount between 250 and 500 megabytes, type:

shrink desired=500 minimum=250

To display the maximum number of MB that the volume can be reduced by, type:

shrink querymax

Additional References



title: ktmutil description: Reference article for the ktmutil command, which starts the Kernel Transaction Manager utility. ms.topic: reference ms.assetid: 53bc56df-f0e5-443b-ab20-bbf8b11d4a9a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ktmutil

Starts the Kernel Transaction Manager utility. If used without parameters, ktmutil displays available subcommands.

Syntax

ktmutil list tms
ktmutil list transactions [{TmGUID}]
ktmutil resolve complete {TmGUID} {RmGUID} {EnGUID}
ktmutil resolve commit {TxGUID}
ktmutil resolve rollback {TxGUID}
ktmutil force commit {GUID}
ktmutil force rollback {GUID}
ktmutil forget

Examples

To force an Indoubt transaction with GUID 311a9209-03f4-11dc-918f-00188b8f707b to commit, type:

ktmutil force commit {311a9209-03f4-11dc-918f-00188b8f707b}

Additional References



title: set verbose description: Reference article for the set verbose command, which specifies whether verbose output is provided during shadow copy creation. ms.topic: reference ms.assetid: 93cb93c9-666f-4c74-814b-1c404a949935 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

Set verbose

Specifies whether verbose output is provided during shadow copy creation. If used without parameters, set verbose displays help at the command prompt.

Syntax

set verbose {on | off}

Parameters

Parameter Description
on Turns on verbose output logging during the shadow copy creation process. If verbose mode is on, set provides details of writer inclusion or exclusion and details of metadata compression and extraction.
off Turns off verbose output logging during the shadow copy creation process.

Additional References



title: ksetup setenctypeattr description: Reference article for the ksetup setenctypeattr command, which sets the encryption type attribute for the domain. ms.topic: reference ms.assetid: 88fb913e-6b57-48d9-8c16-a035ab2977ac ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ksetup setenctypeattr

Sets the encryption type attribute for the domain. A status message is displayed upon successful or failed completion.

You can view the encryption type for the Kerberos ticket-granting ticket (TGT) and the session key, by running the klist command and viewing the output. You can set the domain to connect to and use, by running the ksetup /domain <domainname> command.

Syntax

ksetup /setenctypeattr <domainname> {DES-CBC-CRC | DES-CBC-MD5 | RC4-HMAC-MD5 | AES128-CTS-HMAC-SHA1-96 | AES256-CTS-HMAC-SHA1-96}

Parameters

Parameter Description
<domainname> Name of the domain to which you want to establish a connection. Use the fully qualified domain name or a simple form of the name, such as corp.contoso.com or contoso.
encryption type Must be one of the following supported encryption types:
  • DES-CBC-CRC
  • DES-CBC-MD5
  • RC4-HMAC-MD5
  • AES128-CTS-HMAC-SHA1-96
  • AES256-CTS-HMAC-SHA1-96

Remarks

Examples

To view the encryption type for the Kerberos ticket-granting ticket (TGT) and the session key, type:

klist

To set the domain to corp.contoso.com, type:

ksetup /domain corp.contoso.com

To set the encryption type attribute to AES-256-CTS-HMAC-SHA1-96 for the domain corp.contoso.com, type:

ksetup /setenctypeattr corp.contoso.com AES-256-CTS-HMAC-SHA1-96

To verify that the encryption type attribute was set as intended for the domain, type:

ksetup /getenctypeattr corp.contoso.com

Additional References



title: set id description: Reference article for the Diskpart set id command, which changes the partition type field for the partition with focus. ms.topic: reference ms.assetid: 5793d7ad-827e-4285-b2c6-ae60eeb0e886 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

set id (Diskpart)

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Changes the partition type field for the partition with focus. This command doesn't work on dynamic disks or on Microsoft Reserved partitions.

[!IMPORTANT] This command is intended for use by original equipment manufacturers (OEMs) only. Changing partition type fields with this parameter might cause your computer to fail or be unable to boot. Unless you are an OEM or experienced with gpt disks, you should not change partition type fields on gpt disks by using this parameter. Instead, always use the create partition efi command to create EFI system partitions, the create partition msr command to create Microsoft Reserved partitions, and the create partition primary command without the ID parameter to create primary partitions on gpt disks.

Syntax

set id={ <byte> | <GUID> } [override] [noerr]

Parameters

Parameter Description
<byte> For master boot record (MBR) disks, specifies the new value for the type field, in hexadecimal form, for the partition. Any partition type byte can be specified with this parameter except for type 0x42, which specifies an LDM partition. Note that the leading 0x is omitted when specifying the hexadecimal partition type.
<GUID> For GUID partition table (gpt) disks, specifies the new GUID value for the type field for the partition. Recognized GUIDs include:
  • EFI system partition: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
  • Basic data partition: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
Any partition type GUID can be specified with this parameter except the following:
  • Microsoft Reserved partition: e3c9e316-0b5c-4db8-817d-f92df00215ae
  • LDM metadata partition on a dynamic disk: 5808c8aa-7e8f-42e0-85d2-e1e90434cfb3
  • LDM data partition on a dynamic disk: af9b60a0-1431-4f62-bc68-3311714a69ad
  • Cluster metadata partition: db97dba9-0840-4bae-97f0-ffb9a327c7e1
override forces the file system on the volume to dismount before changing the partition type. When you run the set id command, DiskPart attempts to lock and dismount the file system on the volume. If override isn't specified, and the call to lock the file system fails (for example, because there is an open handle), the operation fails. If override is specified, DiskPart forces the dismount even if the call to lock the file system fails, and any open handles to the volume will stop being valid.
noerr Used for scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Remarks

Examples

To set the type field to 0x07 and force the file system to dismount, type:

set id=0x07 override

To set the type field to be a basic data partition, type:

set id=ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

Additional References



title: ksetup server description: Reference article for the ksetup server command, which allows you to specify a name for a computer running the Windows operating system, so changes made by the ksetup command update the target computer. ms.topic: reference ms.assetid: e3407111-ac92-457f-aa1f-a04fe9109d59 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ksetup server

Allows you to specify a name for a computer running the Windows operating system, so changes made by the ksetup command update the target computer.

The target server name is stored in the registry under HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\LSA\Kerberos. This entry isn't reported when you run the ksetup command.

[!IMPORTANT] There's no way to remove the targeted server name. Instead, you can change it back to the local computer name, which is the default.

Syntax

ksetup /server <servername>

Parameters

Parameter Description
<servername> Specifies the full computer name on which the configuration will be effective, such as IPops897.corp.contoso.com.

If an incomplete fully-qualified domain computer name is specified, the command will fail.

Examples

To make your ksetup configurations effective on the IPops897 computer, which is connected on the Contoso domain, type:

ksetup /server IPops897.corp.contoso.com

Additional References



title: ksetup mapuser description: Reference article for the ksetup mapuser command, which maps the name of a Kerberos principal to an account. ms.topic: reference ms.assetid: 84113e6e-89ff-488a-9cd0-f14bbf23b543 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ksetup mapuser

Maps the name of a Kerberos principal to an account.

Syntax

ksetup /mapuser <principal> <account>

Parameters

Parameter Description
<principal> Specifies the fully-qualified domain name of any principal user. For example, mike@corp.CONTOSO.COM. If you don't specify an account parameter, mapping is deleted for the specified principal.
<account> Specifies any account or security group name that exists on this computer, such as Guest, Domain Users, or Administrator. If this parameter is omitted, mapping is deleted for the specified principal.

Remarks

Examples

To see the current mapped settings and the default realm, type:

ksetup

To map Mike Danseglio's account within the Kerberos realm CONTOSO to the guest account on this computer, granting him all the privileges of a member of the built-in Guest account without having to authenticate to this computer, type:

ksetup /mapuser mike@corp.CONTOSO.COM guest

To remove the mapping of Mike Danseglio's account to the guest account on this computer to prevent him from authenticating to this computer with his credentials from CONTOSO, type:

ksetup /mapuser mike@corp.CONTOSO.COM

To map Mike Danseglio's account within the CONTOSO Kerberos realm to any existing account on this computer, type:

ksetup /mapuser mike@corp.CONTOSO.COM *

[!NOTE] If only the Standard User and Guest accounts are active on this computer, Mike's privileges are set to those.

To map all accounts within the CONTOSO Kerberos realm to any existing account of the same name on this computer, type:

ksetup /mapuser * *

Additional References



title: ksetup removerealm description: Reference article for the ksetup removerealm command, which deletes all information for the specified realm from the registry. ms.topic: reference ms.assetid: 39f0c6f0-4c50-4781-941e-0893495405e8 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ksetup removerealm

Deletes all information for the specified realm from the registry.

The realm name is stored in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos and HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Lsa\Kerberos. This entry doesn't exist in the registry by default. You can use the ksetup addrealmflags command to populate the registry.

[!IMPORTANT] You can't remove the default realm name from the domain controller because this resets its DNS information, and removing it might make the domain controller unusable.

Syntax

ksetup /removerealm <realmname>

Parameters

Parameter Description
<realmname> Specifies the uppercase DNS name, such as CORP.CONTOSO.COM, and is listed as the default realm or Realm= when ksetup is run.

Examples

To remove an erroneous realm name (.CON instead of .COM) from the local computer, type:

ksetup /removerealm CORP.CONTOSO.CON

To verify the removal, you can run the ksetup command and review the output.

Additional References



title: set commands description: Reference article for the set commands, which sets the context, options, verbose mode, and metadata file for shadow copy creation. ms.topic: reference ms.assetid: acf24663-1a50-4321-b48d-1717655e9476 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

set commands (shadow copy creation)

Sets the context, options, verbose mode, and metadata file for shadow copy creation. If used without parameters, set lists all current settings.

Syntax

set
set context
set option
set verbose
set metadata

Parameters

Parameters Description
set context Sets the context for shadow copy creation.
set metadata Sets the name and location of the shadow creation metadata file.
set option Sets options for shadow copy creation.
set verbose Turns the verbose output mode on or off.
/? Displays help at the command prompt.

Additional References



title: serverceipoptin description: Reference article for the serverceipoptin, which allows you to participate in the Customer Experience Improvement Program (CEIP). ms.topic: reference ms.assetid: 3d7d7fa7-0689-4797-b802-36fe260d21a0 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

serverceipoptin

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Allows you to participate in the Customer Experience Improvement Program (CEIP).

Syntax

serverceipoptin [/query] [/enable] [/disable]

Parameters

Parameter Description
/query Verifies your current setting.
/enable Turns on your participation in CEIP.
/disable Turns off your participation in CEIP.
/? Displays help at the command prompt.

Examples

To verify your current settings, type:

serverceipoptin /query

To turn on your participation, type:

serverceipoptin /enable

To turn off your participation, type:

serverceipoptin /disable

Additional References



title: ksetup domain description: Reference article for the ksetup domain command, which sets the domain name for all Kerberos operations. ms.topic: reference ms.assetid: 2ef766e3-6071-44f2-946b-22ea5b61a508 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ksetup domain

Sets the domain name for all Kerberos operations.

Syntax

ksetup /domain <domainname>

Parameters

Parameter Description
<domainname> Name of the domain to which you want to establish a connection. Use the fully-qualified domain name or a simple form of the name, such as contoso.com or contoso.

Examples

To establish a connection to a valid domain, such as Microsoft, by using the ksetup /mapuser subcommand, type:

ksetup /mapuser principal@realm domain-user /domain domain-name

After a successful connection, you'll receive a new TGT or an existing TGT will be refreshed.

Additional References



title: ksetup dumpstate description: Reference article for the ksetup dumpstate commnand, which displays the current state of realm settings for all realms that are defined on the computer. ms.topic: reference ms.assetid: 3ef2f7b8-97af-4f42-9542-cff324840637 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ksetup dumpstate

Displays the current state of realm settings for all realms that are defined on the computer. This command displays the same output as the ksetup command.

Syntax

ksetup /dumpstate

Remarks

Examples

To locate the Kerberos realm configurations on a computer, type:

ksetup /dumpstate

Additional References



title: ksetup delkdc description: Reference article for the ksetup delkdc command, which deletes instances of Key Distribution Center (KDC) names for the Kerberos realm. ms.topic: reference ms.assetid: 7d6ec389-094c-4a7b-a78b-605497ddc289 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ksetup delkdc

Deletes instances of Key Distribution Center (KDC) names for the Kerberos realm.

The mapping is stored in the registry, under HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\LSA\Kerberos\Domains. After running this command, we recommend making sure the KDC was removed and no longer appears in the list.

[!NOTE] To remove realm configuration data from multiple computers, use the Security Configuration Template snap-in with policy distribution, instead of using the ksetup command explicitly on individual computers.

Syntax

ksetup /delkdc <realmname> <KDCname>

Parameters

Parameter Description
<realmname> Specifies the uppercase DNS name, such as CORP.CONTOSO.COM. This is the default realm that appears when you run the ksetup command, and it's the realm from which you want to delete the KDC.
<KDCname> Specifies the case-sensitive, fully-qualified domain name, such as mitkdc.contoso.com.

Examples

To view all of the associations between the Windows realm and the non-Windows realm, and to determine which ones to remove, type:

ksetup

To remove the association, type:

ksetup /delkdc CORP.CONTOSO.COM mitkdc.contoso.com

Additional References



title: select partition description: Reference article for the select partition command, which selects the specified partition and shifts the focus to it. ms.topic: reference ms.assetid: 25f70083-b8f7-4a8e-9b34-4b3ffbe06670 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

select partition

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Selects the specified partition and shifts the focus to it. This command can also be used to display the partition that currently has the focus in the selected disk.

Syntax

select partition=<n>

Parameters

Parameter Description
partition=<n> The number of the partition to receive the focus. You can view the numbers for all partitions on the disk currently selected by using the list partition command in DiskPart.

Remarks

Examples

To shift the focus to partition 3, type:

select partitition=3

To display the partition that currently has the focus in the selected disk, type:

select partition

Additional References



title: secedit validate description: Reference article for the secedit validate command, which validates the security settings stored in a security template. ms.topic: reference ms.assetid: 9fb06354-f55a-4ca4-9fbc-9a872eb9b9cf ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

secedit /validate

Validates the security settings stored in a security template (.inf file). Validating security templates can help you determine if one is corrupted or inappropriately set. Corrupted or inappropriately set security templates aren't applied.

Syntax

secedit /validate <configuration file name>

Parameters

Parameter Description
<configuration file name> Required. Specifies the path and file name for the security template that will be validated. Log files aren't updated by this command.

Examples

To verify that the rollback .inf file, secRBKcontoso.inf, is still valid after rollback, type:

secedit /validate secRBKcontoso.inf

Additional References



title: select commands description: Reference article for the select commands, which shifts the focus to a disk, partition, volume, or virtual hard disk (VHD). ms.topic: reference ms.assetid: 9eeb40c0-4258-46e2-8dbc-94f63497e771 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

select commands

Shifts the focus to a disk, partition, volume, or virtual hard disk (VHD).

Syntax

select disk
select partition
select vdisk
select volume

Parameters

Parameter Description
Select disk Shifts the focus to a disk.
Select partition Shifts the focus to a partition.
Select vdisk Shifts the focus to a VHD.
Select volume Shifts the focus to a volume.

Remarks

Additional References



title: ksetup addkpasswd description: Reference article for the ksetup addkpasswd command, which adds a Kerberos password (kpasswd) server address for a realm. ms.topic: reference ms.assetid: d3196995-1b38-48ff-ba08-911cfab77317 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ksetup addkpasswd

Adds a Kerberos password (kpasswd) server address for a realm.

Syntax

ksetup /addkpasswd <realmname> [<kpasswdname>]

Parameters

Parameter Description
<realmname> Specifies the uppercase DNS name, such as CORP.CONTOSO.COM, and is listed as the default realm or Realm= when ksetup is run.
<kpasswdname> Specifies the Kerberos password server. It's stated as a case-insensitive, fully-qualified domain name, such as mitkdc.contoso.com. If the KDC name is omitted, DNS might be used to locate KDCs.

Remarks

Examples

To configure the CORP.CONTOSO.COM realm to use the non-Windows KDC server, mitkdc.contoso.com, as the password server, type:

ksetup /addkpasswd CORP.CONTOSO.COM mitkdc.contoso.com

To verify the KDC name is set, type ksetup and then view the output, looking for the text, kpasswd =. If you don't see the text, it means the mapping hasn't been configured.

Additional References



title: scwcmd view description: Reference article for the scwcmd view command, which renders an .xml file by using a specified .xsl transform. ms.topic: reference ms.assetid: 7995959a-d93e-4865-a6a0-2ab18c2bb47f ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

scwcmd view

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2012 R2 and Windows Server 2012

Renders an .xml file by using a specified .xsl transform. This command can be useful for displaying Security Configuration Wizard (SCW) .xml files by using different views.

Syntax

scwcmd view /x:<Xmlfile.xml> [/s:<Xslfile.xsl>]

Parameters

Parameter Description
/x:<Xmlfile.xml> Specifies the .xml file to be viewed. This parameter must be specified.
/s:<Xslfile.xsl> Specifies the .xsl transform to apply to the .xml file as part of the rendering process. This parameter is optional for SCW .xml files. When the view command is used to render a SCW .xml file, it will automatically try to load the correct default transform for the specified .xml file. If an .xsl transform is specified, the transform must be written under the assumption that the .xml file is in the same directory as the .xsl transform.
/? Displays help at the command prompt.

Example

To view Policyfile.xml by using the Policyview.xsl transform, type:

scwcmd view /x:C:\policies\Policyfile.xml /s:C:\viewers\Policyview.xsl

Additional References



title: ksetup addhosttorealmmap description: Reference article for the ksetup addhosttorealmmap command, which adds a service principal name (SPN) mapping between the stated host and the realm. ms.topic: reference ms.assetid: 237742d5-fa68-466c-b97e-636f489248ea ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ksetup addhosttorealmmap

Adds a service principal name (SPN) mapping between the stated host and the realm. This command also allows you to map a host or multiple hosts that are sharing the same DNS suffix to the realm.

The mapping is stored in the registry, under HKEY_LOCAL_MACHINE\SYSTEM\CurrentContolSet\Control\Lsa\Kerberos\HostToRealm.

Syntax

ksetup /addhosttorealmmap <hostname> <realmname>

Parameters

Parameter Description
<hostname> The host name is the computer name, and it can be stated as the computer's fully qualified domain name.
<realmname> The realm name is stated as an uppercase DNS name, such as CORP.CONTOSO.COM.

Examples

To map the host computer IPops897 to the CONTOSO realm, type:

ksetup /addhosttorealmmap IPops897 CONTOSO

Check the registry to make sure the mapping occurred as intended.

Additional References



title: scwcmd rollback description: Reference article for the scwcmd rollback command, which applies the most recent rollback policy available, and then deletes that rollback policy. ms.topic: reference ms.assetid: 4fd9f89b-0420-420a-ad20-4a328636b1e7 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

scwcmd rollback

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2012 R2 and Windows Server 2012

Applies the most recent rollback policy available, and then deletes that rollback policy.

Syntax

scwcmd rollback /m:<computername> [/u:<username>] [/pw:<password>]

Parameters

Parameter Description
/m:<computername> Specifies the NetBIOS name, DNS name, or IP address of a computer where the rollback operation should be performed.
/u:<username> Specifies an alternate user account to use when performing a remote rollback. The default is the logged on user.
/pw:<password> Specifies an alternate user credential to use when performing a remote rollback. The default is the logged on user.
/? Displays help at the command prompt.

Examples

To roll back the security policy on a computer at IP address 172.16.0.0, type:

scwcmd rollback /m:172.16.0.0

Additional References



title: jetpack description: Reference article for the jetpack command, which compacts a Windows Internet Name Service (WINS) or Dynamic Host Configuration Protocol (DHCP) database. ms.topic: reference ms.assetid: 82a2b7ef-0db5-4575-a028-8acb0bf6c7ba ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

jetpack

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Compacts a Windows Internet Name Service (WINS) or Dynamic Host Configuration Protocol (DHCP) database. We recommend you compact the WINS database whenever it approaches 30 MB.

Jetpack.exe compacts the database by:

  1. Copying the database information to a temporary database file.

  2. Deleting the original database file, either WINS or DHCP.

  3. Renames the temporary database files to the original filename.

Syntax

jetpack.exe <database_name> <temp_database_name>

Parameters

Parameter Description
<database_name> Specifies the name of the original database file.
<temp_database_name> Specifies the name of the temporary database file to be created by jetpack.exe.

Note: This temporary file is removed when the compact process is complete. For this command to work properly, you must make sure your temp file name is unique and that a file with that name doesn't already exist.

/? Displays help at the command prompt.

Examples

To compact the WINS database, where Tmp.mdb is a temporary database and Wins.mdb is the WINS database, type:

cd %SYSTEMROOT%\SYSTEM32\WINS
NET STOP WINS
jetpack Wins.mdb Tmp.mdb
NET start WINS

To compact the DHCP database, where Tmp.mdb is a temporary database and Dhcp.mdb is the DHCP database, type:

cd %SYSTEMROOT%\SYSTEM32\DHCP
NET STOP DHCPSERVER
jetpack Dhcp.mdb Tmp.mdb
NET start DHCPSERVER

Additional References



title: schtasks run description: Reference article for the schtasks run command, which ms.topic: reference ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 09/16/2020

schtasks run

Starts a scheduled task immediately. The run operation ignores the schedule, but uses the program file location, user account, and password saved in the task to run the task immediately. Running a task does not affect the task schedule and does not change the next run time scheduled for the task.

Syntax

schtasks /run /tn <taskname> [/s <computer> [/u [<domain>\]<user> [/p <password>]]]

Parameters

Parameter Description
/tn <taskname> Identifies the task to start. This parameter is required.
/s <computer> Specifies the name or IP address of a remote computer (with or without backslashes). The default is the local computer.
/u [<domain>] Runs this command with the permissions of the specified user account. By default, the command runs with the permissions of the current user of the local computer. The specified user account must be a member of the Administrators group on the remote computer. The /u and /p parameters are valid only when you use /s.
/p <password> Specifies the password of the user account specified in the /u parameter. If you use the /u parameter without the /p parameter or the password argument, schtasks will prompt you for a password. The /u and /p parameters are valid only when you use /s.
/? Displays help at the command prompt.

Remarks

Examples

To start the Security Script task, type:

schtasks /run /tn Security Script

To start the Update task on a remote computer, Svr01, type:

schtasks /run /tn Update /s Svr01

Additional References



title: ipxroute description: Reference article for the ipxroute command, which displays and modifies information about the routing tables used by the IPX protocol. ms.topic: reference ms.assetid: 3a30304f-655e-43d2-a4ac-7568abf8975c ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ipxroute

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays and modifies information about the routing tables used by the IPX protocol. Used without parameters, ipxroute displays the default settings for packets that are sent to unknown, broadcast, and multicast addresses.

Syntax

ipxroute servers [/type=x]
ipxroute ripout <network>
ipxroute resolve {guid | name} {GUID | <adaptername>}
ipxroute board= N [def] [gbr] [mbr] [remove=xxxxxxxxxxxx]
ipxroute config

Parameters

Parameter Description
servers[/type=x] Displays the Service Access Point (SAP) table for the specified server type. x must be an integer. For example, /type=4 displays all file servers. If you don't specify /type, ipxroute servers displays all types of servers, listing them by server name.
resolve`{GUID name}{GUID adaptername}` Resolves the name of the GUID to its friendly name, or the friendly name to its GUID.
board= n Specifies the network adapter for which to query or set parameters.
def Sends packets to the ALL ROUTES broadcast. If a packet is transmitted to a unique Media Access Card (MAC) address that is not in the source routing table, ipxroute sends the packet to the SINGLE ROUTES broadcast by default.
gbr Sends packets to the ALL ROUTES broadcast. If a packet is transmitted to the broadcast address (FFFFFFFFFFFF), ipxroute sends the packet to the SINGLE ROUTES broadcast by default.
mbr Sends packets to the ALL ROUTES broadcast. If a packet is transmitted to a multicast address (C000xxxxxxxx), ipxroute sends the packet to the SINGLE ROUTES broadcast by default.
remove=xxxxxxxxxxxx removes the given node address from the source routing table.
config Displays information about all of the bindings for which IPX is configured.
/? Displays help at the command prompt.

Examples

To display the network segments that the workstation is attached to, the workstation node address, and frame type being used, type:

ipxroute config

Additional References



title: hostname description: Reference article for the hostname command, which displays the host name portion of the full computer name of the computer. ms.topic: reference ms.assetid: b9e7aab4-8f8d-4e18-b5a2-8e81b34a8566 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

hostname

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays the host name portion of the full computer name of the computer.

[!IMPORTANT] This command is available only if the Internet Protocol (TCP/IP) protocol is installed as a component in the properties of a network adapter in Network.

Syntax

hostname

Parameters

Parameter Description
/? Displays help at the command prompt.

Any parameter different than /? produces an error message and sets the errorlevel to 1.

Notes

Examples

hostname
echo %COMPUTERNAME%
set "_CLUSTER_NETWORK_NAME_=Altered Computer Name"
hostname

Additional References



title: rsh description: Reference article for the rsh command, which runs commands on remote computers running the RSH service or daemon. This command has been deprecated and isn't guaranteed to be supported in Windows. ms.topic: reference ms.assetid: 9e3b2b29-208d-4257-8379-0b4738274146 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

rsh

Runs commands on remote computers running the RSH service or daemon.

[!IMPORTANT] The rexec command has been deprecated, and isn't guaranteed to be supported in Windows.

After installing the subsystem for UNIX-based Applications, you can then open a C Shell or Korn Shell command window and run rsh. For more information, type man rsh at the C Shell or Korn Shell prompt.



title: help description: Reference article for the help command, which displays a list of the available commands or detailed help information on a specified command. ms.topic: reference ms.assetid: c65b5ac3-711a-4368-95b8-ba82e2d00713 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

help

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays a list of the available commands or detailed help information on a specified command. If used without parameters, help lists and briefly describes every system command.

Syntax

help [<command>]

Parameters

Parameter Description
<command> Specifies the command for which to display detailed help information.

Examples

To view information about the robocopy command, type:

help robocopy

To display a list of all commands available in DiskPart, type:

help

To display detailed help information about how to use the create partition primary command in DiskPart, type:

help create partition primary

Additional References



title: helpctr description: Reference article for the helpctr command. This command has been deprecated and isn't guaranteed to be supported in future releases of Windows. ms.topic: reference ms.assetid: d19ff7dc-57fb-49b2-aad7-b6b040f3fb49 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

helpctr

The helpctr command has been deprecated, and isn't guaranteed to be supported in Windows.

This tool is included in Windows Server 2003. For more information, see Helpctr.



title: rpcinfo description: Reference article for the rpcinfo command, which lists the programs on a remote computer. ms.topic: reference ms.assetid: 7c342232-a8f0-42ff-8f11-d18c4981f5ca ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 07/11/2018

rpcinfo

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Lists programs on remote computers. The rpcinfo command-line utility makes a remote procedure call (RPC) to an RPC server and reports what it finds.

Syntax

rpcinfo [/p [<node>]] [/b <program version>] [/t <node program> [<version>]] [/u <node program> [<version>]]

Parameters

Parameter Description
/p [<node>] lists all programs registered with the port mapper on the specified host. If you do not specify a node (computer) name, the program queries the port mapper on the local host.
/b <program version> Requests a response from all network nodes that have the specified program and version registered with the port mapper. You must specify both a program name or number and a version number.
/t <node program> [\<version>] Uses the TCP transport protocol to call the specified program. You must specify both a node (computer) name and a program name. If you do not specify a version, the program calls all versions.
/u <node program> [\<version>] Uses the UDP transport protocol to call the specified program. You must specify both a node (computer) name and a program name. If you do not specify a version, the program calls all versions.
/? Displays help at the command prompt.

Examples

To list all programs registered with the port mapper, type:

rpcinfo /p [<node>]

To request a response from network nodes that have a specified program, type:

rpcinfo /b <program version>

To use Transmission Control Protocol (TCP) to call a program, type:

rpcinfo /t <node program> [<version>]

Use User Datagram Protocol (UDP) to call a program:

rpcinfo /u <node program> [<version>]

Additional References



title: gpresult description: Reference article for the gpresult command, which displays the Resultant Set of Policy (RSoP) information for a remote user and computer. ms.topic: reference ms.assetid: dfaa3adf-2c83-486c-86d6-23f93c5c883c ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

gpresult

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays the Resultant Set of Policy (RSoP) information for a remote user and computer. To use RSoP reporting for remotely targeted computers through the firewall, you must have firewall rules that enable inbound network traffic on the ports.

Syntax

gpresult [/s <system> [/u <username> [/p [<password>]]]] [/user [<targetdomain>\]<targetuser>] [/scope {user | computer}] {/r | /v | /z | [/x | /h] <filename> [/f] | /?}

[!NOTE] Except when using /?, you must include an output option, /r, /v, /z, /x, or /h.

Parameters

Parameter Description
/s <system> Specifies the name or IP address of a remote computer. Don't use backslashes. The default is the local computer.
/u <username> Uses the credentials of the specified user to run the command. The default user is the user who is logged on to the computer that issues the command.
/p [<password>] Specifies the password of the user account that is provided in the /u parameter. If /p is omitted, gpresult prompts for the password. The /p parameter can't be used with /x or /h.
/user [<targetdomain>\]<targetuser>] Specifies the remote user whose RSoP data is to be displayed.
/scope `{user computer}` Displays RSoP data for either the user or the computer. If /scope is omitted, gpresult displays RSoP data for both the user and the computer.
`[/x /h] ` Saves the report in either XML (/x) or HTML (/h) format at the location and with the file name that is specified by the filename parameter. Can't be used with /u, /p, /r, /v, or /z.
/f Forces gpresult to overwrite the file name that is specified in the /x or /h option.
/r Displays RSoP summary data.
/v Displays verbose policy information. This includes detailed settings that were applied with a precedence of 1.
/z Displays all available information about Group Policy. This includes detailed settings that were applied with a precedence of 1 and higher.
/? Displays help at the command prompt.

Remarks

Examples

To retrieve RSoP data for only the remote user, maindom\hiropln with the password p@ssW23, who's on the computer srvmain, type:

gpresult /s srvmain /u maindom\hiropln /p p@ssW23 /user targetusername /scope user /r

To save all available information about Group Policy to a file named, policy.txt, for only the remote user maindom\hiropln with the password p@ssW23, on the computer srvmain, type:

gpresult /s srvmain /u maindom\hiropln /p p@ssW23 /user targetusername /z > policy.txt

To display RSoP data for the logged on user, maindom\hiropln with the password p@ssW23, for the computer srvmain, type:

gpresult /s srvmain /u maindom\hiropln /p p@ssW23 /r

Additional References



title: gettype description: Reference article for the gettype command. This command has been deprecated and isn't guaranteed to be supported in future releases of Windows. ms.topic: reference ms.assetid: a423030b-2bae-4e6f-8020-36163058fa3a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

gettype

The gettype command has been deprecated, and isn't guaranteed to be supported in Windows.

This tool is included in Windows Server 2003. For more information, see gettype.

Additional References



title: ftp type description: Reference article for the ftp type command, which sets or displays the file transfer type. ms.topic: reference ms.assetid: 6e96dcd4-08f8-4e7b-90b7-1e1761fea4c7 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp type

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Sets or displays the file transfer type. The ftp command supports both ASCII (default) and binary image file transfer types:

Syntax

type [<typename>]

Parameters

Parameter Description
[<typename>] Specifies the file transfer type. If you don't specify this parameter, the current type is displayed.

Examples

To set the file transfer type to ASCII, type:

type ascii

To set the transfer file type to binary, type:

type binary

Additional References



title: reg unload description: Reference article for the reg unload command, which removes a section of the registry loaded using the reg load operation. ms.topic: reference ms.assetid: 1d07791d-ca27-454e-9797-27d7e84c5048 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

reg unload

Removes a section of the registry that was loaded using the reg load operation.

Syntax

reg unload <keyname>

Parameters

Parameter Description
<keyname> Specifies the full path of the subkey. To specify a remote computer, include the computer name (in the format `\`) as part of the keyname. Omitting `\` causes the operation to default to the local computer. The keyname must include a valid root key. Valid root keys for the local computer are: HKLM, HKCU, HKCR, HKU, and HKCC. If a remote computer is specified, valid root keys are: HKLM and HKU. If the registry key name contains a space, enclose the key name in quotes.
/? Displays help at the command prompt.

Remarks

Examples

To unload the hive TempHive in the file HKLM, type:

reg unload HKLM\TempHive

[!CAUTION] Don't edit the registry directly unless you have no alternative. The registry editor bypasses standard safeguards, allowing settings that can degrade performance, damage your system, or even require you to reinstall Windows. You can safely alter most registry settings by using the programs in Control Panel or Microsoft Management Console (MMC). If you must edit the registry directly, back it up first.

Additional References



title: reg copy description: Reference article for the reg copy command, which copies a registry entry to a specified location on the local or remote computer. ms.topic: reference ms.assetid: 3fe74213-39ec-4b2d-ba3d-i ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

==reg copy==

<!-- Copies --> a registry entry to a specified location on the local or remote computer.

Syntax

reg copy <keyname1> <keyname2> [/s] [/f]

Parameters

Parameter Description
<keyname1> Specifies the full path of the subkey or entry to be added. To specify a remote computer, include the computer name (in the format `\`) as part of the keyname. Omitting `\` causes the operation to default to the local computer. The keyname must include a valid root key. Valid root keys for the local computer are: HKLM, HKCU, HKCR, HKU, and HKCC. If a remote computer is specified, valid root keys are: HKLM and HKU. If the registry key name contains a space, enclose the key name in quotes.
<keyname2> Specifies the full path of the second subkey to be compared. To specify a remote computer, include the computer name (in the format `\`) as part of the keyname. Omitting `\` causes the operation to default to the local computer. The keyname must include a valid root key. Valid root keys for the local computer are: HKLM, HKCU, HKCR, HKU, and HKCC. If a remote computer is specified, valid root keys are: HKLM and HKU. If the registry key name contains a space, enclose the key name in quotes.
/s Copies all subkeys and entries under the specified subkey.
/f Copies the subkey without prompting for confirmation.
/? Displays help at the command prompt.

Remarks

Examples

To copy all subkeys and values under the key MyApp to the key SaveMyApp, type:

reg copy HKLM\Software\MyCo\MyApp HKLM\Software\MyCo\SaveMyApp /s

To copy all values under the key MyCo on the computer named ZODIAC to the key MyCo1 on the current computer, type:

reg copy \\ZODIAC\HKLM\Software\MyCo HKLM\Software\MyCo1

Additional References



title: ftp quit description: Reference article for the ftp quit command, which ends the ftp session with the remote computer, and then exits. ms.topic: reference ms.assetid: f5de9a79-5177-4e3a-80d9-df8f4d7660b7 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp quit

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Ends the ftp session with the remote computer, and then exits.

[!NOTE] This command is the same as the ftp bye command.

Syntax

quit

Examples

To end the ftp session with the remote computer and return to the operating system command prompt, type:

quit

Additional References



title: reg export description: Reference article for the reg export command, which copies the specified subkeys, entries, and values of the local computer into a file for transfer to other servers. ms.topic: reference ms.assetid: 0ad9526f-1e29-4fa5-9d2d-feaa92f12d7c ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

reg export

Copies the specified subkeys, entries, and values of the local computer into a file for transfer to other servers.

Syntax

reg export <keyname> <filename> [/y]

Parameters

Parameter Description
<keyname> Specifies the full path of the subkey. The export operation only works with the local computer. The keyname must include a valid root key. Valid root keys for the local computer are: HKLM, HKCU, HKCR, HKU, and HKCC. If the registry key name contains a space, enclose the key name in quotes.
<filename> Specifies the name and path of the file to be created during the operation. The file must have a .reg extension.
/y Overwrites any existing file with the name filename without prompting for confirmation.
/? Displays help at the command prompt.

Remarks

Examples

To export the contents of all subkeys and values of the key MyApp to the file AppBkUp.reg, type:

reg export HKLM\Software\MyCo\MyApp AppBkUp.reg

Additional References



title: ftp open description: Reference article for the ftp open command, which connects to the specified ftp server. ms.topic: reference ms.assetid: 4b61926a-dc60-4b4c-96d3-64e5c91c18ba ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp open

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Connects to the specified ftp server.

Syntax

open <computer> [<port>]

Parameters

Parameter Description
<computer> Specifies the remote computer to which you are trying to connect. You can use an IP address or computer name (in which case a DNS server or Hosts file must be available).
[<port>] Specifies a TCP port number to use to connect to an ftp server. By default, TCP port 21 is used.

Examples

To connect to the ftp server at ftp.microsoft.com, type:

open ftp.microsoft.com

To connect to the ftp server at ftp.microsoft.com that is listening on TCP port 755, type:

open ftp.microsoft.com 755

Additional References



title: ftp mput description: Reference article for the ftp mput command, which copies local files to the remote computer using the current file transfer type. ms.topic: reference ms.assetid: 980f15e7-7cf1-4813-9946-a8cc4edfb198 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp mput

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Copies local files to the remote computer using the current file transfer type.

Syntax

mput <localfile>[ ]

Parameters

Parameter Description
<localfile> Specifies the local file to copy to the remote computer.

Examples

To copy Program1.exe and Program2.exe to the remote computer using the current file transfer type, type:

mput Program1.exe Program2.exe

Additional References



title: recover (DiskPart) description: Reference article for the DiskPart recover command, which refreshes the state of all disks in a disk group, attempt to recover disks in an invalid disk group, and resynchronizes mirrored volumes and RAID-5 volumes that have stale data. ms.topic: reference ms.assetid: 8cc3a73d-9456-41a0-b375-2b4cc37c3992 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

recover (DiskPart)

Refreshes the state of all disks in a disk group, attempt to recover disks in an invalid disk group, and resynchronizes mirrored volumes and RAID-5 volumes that have stale data. This command operates on disks that are failed or failing. It also operates on volumes that are failed, failing, or in failed redundancy state.

This command operates on groups of dynamic disks. If this command is used on a group with a basic disk, it won't return an error, but no action will be taken.

[!NOTE] A disk that is part of a disk group must be selected for this operation to succeed. Use the select disk command to select a disk and shift the focus to it.

Syntax

recover [noerr]

Parameters

Parameter Description
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To recover the disk group that contains the disk with focus, type:

recover

Additional References



title: ftp mkdir description: Reference article for the ftp mkdir command, which creates a directory on the remote computer. ms.topic: reference ms.assetid: 5fac19fb-6835-4011-93cc-ac62f484d5d4 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp mkdir

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates a directory on the remote computer.

Syntax

mkdir <directory>

Parameters

Parameter Description
<directory> Specifies the name of the new remote directory.

Examples

To create a directory called dir1 on the remote computer, type:

mkdir dir1

Additional References



title: ftp literal description: Reference article for the ftp literal command, which sends verbatim arguments to the remote ftp server. ms.topic: reference ms.assetid: fb81aa2d-07fa-4e79-bf44-1fb5526fdf14 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

ftp literal

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Sends verbatim arguments to the remote ftp server. A single ftp reply code is returned.

[!NOTE] This command is the same as the ftp quote command.

Syntax

literal <argument> [ ]

Parameters

Parameter Description
<argument> Specifies the argument to send to the ftp server.

Examples

To send a quit command to the remote ftp server, type:

literal quit

Additional References



title: detail description: Reference article for the detail command, which displays information about the selected disk, partition, volume, or virtual hard disk (VHD). ms.topic: reference ms.assetid: 305755bd-1a51-486b-8515-62d3f227c291 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

detail

Displays information about the selected disk, partition, volume, or virtual hard disk (VHD).

Syntax

detail disk
detail partition
detail volume
detail vdisk

Parameters

Parameter Description
Detail disk Displays the properties of the selected disk and the volumes on that disk.
Detail partition Displays the properties of the selected partition.
Detail volume Displays the disks on which the current volume resides.
Detail vdisk Displays the properties of the selected VHD.

Additional References



title: delete volume description: Reference article for the delete volume command, which deletes the selected volume. ms.topic: reference ms.assetid: f625933d-0f47-409e-93b2-a3e234049a5d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

delete volume

Deletes the selected volume. Before you begin, you must select a volume for this operation to succeed. Use the select volume command to select a volume and shift the focus to it.

[!IMPORTANT] You can't delete the system volume, boot volume, or any volume that contains the active paging file or crash dump (memory dump).

Syntax

delete volume [noerr]

Parameters

Parameter Description
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To delete the volume with focus, type:

delete volume

Additional References



title: dcgpofix description: Reference article for the dcgpofix command, which recreates the default Group Policy Objects (GPOs) for a domain. ms.topic: reference ms.assetid: 81d5fa65-2aea-49d3-b353-357441846c00 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

dcgpofix

Recreates the default Group Policy Objects (GPOs) for a domain. To get to the Group Policy Management Console (GPMC), you must install Group Policy Management as a feature through Server Manager.

[!IMPORTANT] As a best practice, you should configure the Default Domain Policy GPO only to manage the default Account Policies settings, Password Policy, Account Lockout Policy, and Kerberos Policy. Additionally, you should configure the Default Domain Controllers Policy GPO only to set user rights and audit policies.

Syntax

dcgpofix [/ignoreschema] [/target: {domain | dc | both}] [/?]

Parameters

Parameter Description
/ignoreschema Ignores the version of the Active Directory schema when you run this command. Otherwise, the command only works on the same schema version as the Windows version in which the command was shipped.
`/target {domain dc both` Specifies whether to target the Default Domain policy, the Default Domain Controllers policy, or both types of policies.
/? Displays Help at the command prompt.

Examples

To manage the default Account Policies settings, Password Policy, Account Lockout Policy, and Kerberos Policy, while ignoring the Active Directory schema version, type:

dcgpofix /ignoreschema /target:domain

To configure the Default Domain Controllers Policy GPO only to set user rights and audit policies, while ignoring the Active Directory schema version, type:

dcgpofix /ignoreschema /target:dc

Additional References



title: convert mbr description: Reference article for the convert mbr command, which converts an empty basic disk with the GUID Partition Table (GPT) partition style into a basic disk with the master boot record (MBR) partition style. ms.topic: reference ms.assetid: a635a4c0-af73-4330-b021-51d483424537 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

convert mbr

Converts an empty basic disk with the GUID Partition Table (GPT) partition style into a basic disk with the master boot record (MBR) partition style. A basic disk must be selected for this operation to succeed. Use the select disk command to select a basic disk and shift the focus to it.

[!IMPORTANT] The disk must be empty to convert it to a basic disk. Back up your data, and then delete all partitions or volumes before converting the disk.

[!NOTE] For instructions regarding how to use this command, see Change a GUID Partition Table Disk into a Master Boot Record Disk.

Syntax

convert mbr [noerr]

Parameters

Parameter Description
noerr For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code.

Examples

To convert a basic disc from GPT partition style to MBR partition style, type>:

convert mbr

Additional References



title: Commands by Server role description: Reference article for Commands by Server role, which describes the primary function of the server. ms.topic: reference ms.assetid: 343597ec-9b92-4b92-8d6c-faef4b565068 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

Commands by Server role

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

A server role describes the primary function of the server. Administrators can choose to dedicate an entire server to one role, or install multiple server roles and sub-roles on a single computer. Each role might include additional command-line tools, installed as part of the role. The following topics provide a list of commands associated with each server role.



title: bootcfg default description: Reference article for the bootcfg default command, which specifies the operating system entry to designate as the default. ms.topic: reference ms.assetid: e21824d7-8278-41d7-a2c5-ce09803d513a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bootcfg default

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Specifies the operating system entry to designate as the default.

Syntax

bootcfg /default [/s <computer> [/u <domain>\<user> /p <password>]] [/id <osentrylinenum>]

Parameters

Parameter Description
/s <computer> Specifies the name or IP address of a remote computer (don't use backslashes). The default is the local computer.
/u <domain>\<user> Runs the command with the account permissions of the user specified by <user> or <domain>\<user>. The default is the permissions of the current logged on user on the computer issuing the command.
/p <password> Specifies the password of the user account that is specified in the /u parameter.
/id <osentrylinenum> Specifies the operating system entry line number in the [operating systems] section of the Boot.ini file to which the operating system load options are added. The first line after the [operating systems] section header is 1.
/? Displays help at the command prompt.

Examples

To use the bootcfg /default command:

bootcfg /default /id 2
bootcfg /default /s srvmain /u maindom\hiropln /p p@ssW23 /id 2

Additional References



title: bitsadmin wrap description: Reference article for the bitsadmin wrap command, which wraps any line of output text extending beyond the rightmost edge of the command window to the next line. ms.topic: reference ms.assetid: 14e57522-539d-4621-ad15-09f7a44ccab7 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin wrap

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Wraps any line of output text extending beyond the rightmost edge of the command window to the next line. You must specify this switch before any other switches.

By default, all switches except the bitsadmin monitor switch, wrap the output text.

Syntax

bitsadmin /wrap <job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To retrieve information for the job named myDownloadJob and wrap the output text:

bitsadmin /wrap /info myDownloadJob /verbose

Additional References



title: bitsadmin util and enableanalyticchannel description: Reference article for the bitsadmin util and enableanalyticchannel command, which enables or disables the BITS client analytic channel. ms.topic: reference ms.assetid: 0d7645aa-b91b-4ed7-b630-a1e1be6f6ae9 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin util and enableanalyticchannel

Enables or disables the BITS client analytic channel.

Syntax

bitsadmin /util /enableanalyticchannel TRUE|FALSE
Parameter Description
TRUE or FALSE TRUE turns on content validation for the specified file, while FALSE turns it off.

Examples

To turn the BITS client analytic channel on or off.

bitsadmin /util / enableanalyticchannel TRUE

Additional References



title: bitsadmin takeownership description: Reference article for the bitsadmin takeownership command, which lets a user with administrative privileges take ownership of the specified job. ms.topic: reference ms.assetid: ea0ce7cb-440a-498f-a3ef-8368fa43e399 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin takeownership

Lets a user with administrative privileges take ownership of the specified job.

Syntax

bitsadmin /takeownership <job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To take ownership of the job named myDownloadJob:

bitsadmin /takeownership myDownloadJob

Additional References



title: bitsadmin setvalidationstate description: Reference article for the bitsadmin setvalidationstate command, which sets the content validation state of the given file within the job. ms.topic: reference ms.assetid: e8fc8e8c-171c-4681-8057-6986b018e576 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin setvalidationstate

Sets the content validation state of the given file within the job.

Syntax

bitsadmin /setvalidationstate <job> <file_index> <TRUE|FALSE>

Parameters

Parameter Description
Job The job's display name or GUID.
file_index Starts at 0.
TRUE or FALSE TRUE turns on content validation for the specified file, while FALSE turns it off.

Examples

To set the content validation state of file 2 to TRUE for the job named myDownloadJob:

bitsadmin /setvalidationstate myDownloadJob 2 TRUE

Additional References



title: bitsadmin suspend description: Reference article for the bitsadmin suspend command, which suspends the specified job. ms.topic: reference ms.assetid: f9d42500-7bea-4aa8-a9f0-c22f6ed3e73b ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin suspend

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Suspends the specified job. If you suspended your job by mistake, you can use the bitsadmin resume switch to restart the job.

Syntax

bitsadmin /suspend <job>

Parameters

Parameter Description
job The job's display name or GUID.

Example

To suspend the job named myDownloadJob:

bitsadmin /suspend myDownloadJob

Additional References



title: bitsadmin setpeercachingflags description: Reference article for the bitsadmin setpeercachingflags command, which sets flags that determine if the files of the job can be cached and served to peers and if the job can download content from peers. ms.topic: reference ms.assetid: 3f54a127-fb68-49a5-b843-664ec833df67 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin setpeercachingflags

Sets flags that determine if the files of the job can be cached and served to peers and if the job can download content from peers.

Syntax

bitsadmin /setpeercachingflags <job> <value>

Parameters

Parameter Description
job The job's display name or GUID.
value An unsigned integer, including:
  • 1. The job can download content from peers.
  • 2. The files of the job can be cached and served to peers.

Examples

To allow the job named myDownloadJob to download content from peers:

bitsadmin /setpeercachingflags myDownloadJob 1

Additional References



title: bitsadmin sethttpmethod description: Reference article for the bitsadmin sethttpmethod command, which sets the HTTP verb to use. ms.topic: reference ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 03/01/2019

bitsadmin sethttpmethod

Sets the HTTP verb to use.

Syntax

bitsadmin /sethttpmethod <job> <httpmethod>

Parameters

Parameter Description
job The job's display name or GUID.
httpmethod The HTTP verb to use. For information about available verbs, see Method Definitions.

Additional References



title: bitsadmin setdisplayname description: Reference article for the bitsadmin setdisplayname command, which sets the display name of the specified job. ms.topic: reference ms.assetid: 13706c53-fb5f-4879-b5ca-82531361d6e1 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin setdisplayname

Sets the display name for the specified job.

Syntax

bitsadmin /setdisplayname <job> <display_name>

Parameters

Parameter Description
job The job's display name or GUID.
display_name Text used as the displayed name for the specific job.

Examples

To set the display name for the job to myDownloadJob:

bitsadmin /setdisplayname myDownloadJob

Additional References



title: bitsadmin resume description: Reference article for the bitsadmin resume command, which activates a new or suspended job in the transfer queue. ms.topic: reference ms.assetid: 7c7540a9-a11a-4910-923a-2a2a61cbf11d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin resume

Activates a new or suspended job in the transfer queue. If you resumed your job by mistake, or simply need to suspend your job, you can use the bitsadmin suspend switch to suspend the job.

Syntax

bitsadmin /resume <job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To resume the job named myDownloadJob:

bitsadmin /resume myDownloadJob

Additional References



title: pause description: Reference article for the pause command, which suspends the processing of batch programs. ms.topic: reference ms.assetid: cab3afc3-d046-432f-a0bf-6282f0099032 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

pause

Suspends the processing of a batch program, displaying the prompt, Press any key to continue . . .

Syntax

pause

Parameters

Parameter Description
/? Displays help at the command prompt.

Remarks

Examples

To create a batch program that prompts the user to change disks in one of the drives, type:

@echo off
:Begin
copy a:*.*
echo Put a new disk into Drive A
pause
goto begin

In this example, all the files on the disk in Drive A are copied to the current directory. After the message prompts you to put a new disk in Drive A, the pause command suspends processing so that you can change disks and then press any key to resume processing. This batch program runs in an endless loop—the goto begin command sends the command interpreter to the Begin label of the batch file.

Additional References



title: bitsadmin peercaching and getconfigurationflags description: Reference article for the bitsadmin peercaching and getconfigurationflags command, which gets the configuration flags that determine if the computer serves content to peers and if it can download content from peers. ms.topic: reference ms.assetid: 124ddc15-3444-4bd5-96e5-c6bfabe4f9c2 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin peercaching and getconfigurationflags

Gets the configuration flags that determine if the computer serves content to peers and if it can download content from peers.

Syntax

bitsadmin /peercaching /getconfigurationflags <job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To get the configuration flags for the job named myDownloadJob:

bitsadmin /peercaching /getconfigurationflags myDownloadJob

Additional References



title: bitsadmin peercaching description: Reference article for the bitsadmin peercaching command, which lists the /peercaching switches. ms.topic: reference ms.assetid: c2eaa3c7-9d30-4731-8a78-4b6e6041d29a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin peercaching

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Lists the /peercaching switches.

Lists the /peercaching switches.

Syntax

bitsadmin /peercaching /help
bitsadmin /peercaching /setconfigurationflags
bitsadmin /peercaching /getconfigurationflags

Parameters

Parameter Description
bitsadmin peercaching and help Displays the command-line usage for the /peercaching switches.
bitsadmin peercaching and setconfigurationflags Sets the configuration flags that determine if the computer can serve content to peers and if it can download content from peers.
bitsadmin peercaching and getconfigurationflags Gets the configuration flags that determine if the computer serves content to peers and if it can download content from peers.

Additional References



title: nslookup set type description: Reference article for the nslookup set type command, which changes the resource record type for the query. ms.topic: reference ms.assetid: 5248e314-fac1-413e-81dc-bbe0a0873ba5 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup set type

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Changes the resource record type for the query. For information about resource record types, see Request for Comment (Rfc) 1035.

[!NOTE] This command is the same as the nslookup set querytype command.

Syntax

set type=<resourcerecordtype>

Parameters

Parameter Description
<resourcerecordtype> Specifies a DNS resource record type. The default resource record type is A, but you can use any of the following values:
  • A: Specifies a computer's IP address.
  • ANY: Specifies a computer's IP address.
  • CNAME: Specifies a canonical name for an alias.
  • GID Specifies a group identifier of a group name.
  • HINFO: Specifies a computer's CPU and type of operating system.
  • MB: Specifies a mailbox domain name.
  • MG: Specifies a mail group member.
  • MINFO: Specifies mailbox or mail list information.
  • MR: Specifies the mail rename domain name.
  • MX: Specifies the mail exchanger.
  • NS: Specifies a DNS name server for the named zone.
  • PTR: Specifies a computer name if the query is an IP address; otherwise, specifies the pointer to other information.
  • SOA: Specifies the start-of-authority for a DNS zone.
  • TXT: Specifies the text information.
  • UID: Specifies the user identifier.
  • UINFO: Specifies the user information.
  • WKS: Describes a well-known service.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: bitsadmin help description: Reference article for the bitsadmin help command, which displays the command-line usage. ms.topic: reference ms.assetid: c30d89e4-25a3-4974-a002-37138d01e077 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin help

Displays help-related information about the bitsadmin command-line parameters and options.

Syntax

bitsadmin /help | /?

Examples

To retrieve the command-line help.

bitsadmin /help

Additional References



title: wdsutil progress description: Reference article for wdsutil progress, which displays progress while a command is running. ms.topic: reference ms.assetid: 8ce5e77b-e13f-4ac3-948d-31770a6c7e25 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil /progress

Displays progress while a command is running. You can use /progress with any other wdsutil commands that you run. If you want to turn on verbose logging for this command, you must specify /verbose and /progress directly after wdsutil.

Syntax

wdsutil /progress <commands>

Examples

To initialize the server and display progress, type:

wdsutil /verbose /progress /Initialize-Server /Server:MyWDSServer /RemInst:C:\RemoteInstall

Additional References



title: wdsutil new-multicasttransmission description: Reference article for wdsutil new-multicasttransmission, which creates a new multicast transmission for an image. ms.topic: reference ms.assetid: c1f1dc46-dd50-4eb9-9f72-cf0e5d71bd3d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil new-multicasttransmission

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates a new multicast transmission for an image. This command is equivalent to creating a transmission by using the Windows Deployment Services mmc snap-in (right-click the Multicast Transmissions node, and then click create Multicast Transmission). You should use this command when you have both the Deployment Server role service and the Transport Server role service installed (which is the default installation). If you have only the Transport Server role service installed, use wdsutilnew-Namespace command.

Syntax

For install images transmissions:

wdsutil [Options] /New-MulticastTransmissiomedia:<Image name>
        [/Server:<Server name>]
        /FriendlyName:<Friendly name>
        [/Description:<Description>]
        /Transmissiontype: {AutoCast | ScheduledCast}
            [/time:<YYYY/MM/DD:hh:mm>]
            [/Clients:<Num of Clients>]
      imagetype:Install
       ImageGroup:<Image Group>]
        [/Filename:<File name>]

For boot image transmissions (only supported for Windows Server 2008 R2):

wdsutil [Options] /New-MulticastTransmissiomedia:<Image name>
        [/Server:<Server name>]
        /FriendlyName:<Friendly name>
        [/Description:<Description>]
        /Transmissiontype: {AutoCast | ScheduledCast}
            [/time:<YYYY/MM/DD:hh:mm>]
            [/Clients:<Num of Clients>]
      imagetype:Boot
        /Architecture:{x86 | ia64 | x64}
        [/Filename:<File name>]

Parameters

Parameter Description
/image:<Image name> Specifies the name of the image to be transmitted using multicasting.
[/Server:<Server name>] Specifies the name of the server. This can be the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.
/FriendlyName:<Friendly name> Specifies the friendly name of the transmission.
[/Description:<Description>] Specifies the description of the transmission.
/imagetype:{Boot|Install} Specifies the type of image to be transmitted using multicasting. Note Boot is only supported for Windows Server 2008 R2.
/ImageGroup:<Image group name>] Specifies the image group that contains the image. If no image group name is specified and only one image group exists on the server, that image group is used. If more than one image group exists on the server, you must use this option to specify the image group name.
[/Filename:<File name>] Specifies the file name. If the source image cannot be uniquely identified by name, you must use this option to specify the file name.
/Transmissiontype:{AutoCast | ScheduledCast} Specifies whether to start the transmission automatically (AutoCast) or based on the specified start criteria (ScheduledCast).

  • Auto-Cast. This transmission type indicates that as soon as an applicable client requests an install image, a multicast transmission of the selected image begins. As other clients request the same image, they are joined to the transmission that is already started.
  • Scheduled-Cast. This transmission type sets the start criteria for the transmission based on the number of clients that are requesting an image and/or a specific day and time. You can specify the following options:

    • [/time: <time>] - Sets the time that the transmission should start by using the following format: YYYY/MM/DD:hh:mm.
    • [/Clients: <Number of clients>] - Sets the minimum number of clients to wait for before the transmission starts.
/Architecture:{x86 | ia64 | x64} Specifies the architecture of the boot image to transmit using multicasting. Because it is possible to have the same name for boot images of different architectures, you should specify the architecture to ensure the correct image is used.
[/Filename:<File name>] Specifies the file name. If the source image cannot be uniquely identified by name, you must specify the file name.

Examples

To create an Auto-Cast transmission of a boot image in Windows Server 2008 R2, type:

wdsutil /New-MulticastTransmission /FriendlyName:WDS Boot Transmission
/Image:X64 Boot imagetype:Boot /Architecture:x64 /Transmissiontype:AutoCast

To create an Auto-Cast transmission of an install image, type:

wdsutil /New-MulticastTransmission /FriendlyName:WDS AutoCast Transmission
/Image:Vista with Officeimage imagetype:Install /Transmissiontype:AutoCast

To create a Scheduled-Cast transmission of an install image, type:

wdsutil /New-MulticastTransmission /FriendlyName:WDS SchedCast Transmission /Server:MyWDSServer Image:Vista with Office imagetype:Install
/Transmissiontype:ScheduledCast /time:2006/11/20:17:00 /Clients:100

Additional References



title: wdsutil initialize-server description: Reference article for wdsutil initialize-server, which configures a Windows Deployment Services server for initial use after the server role has been installed. ms.topic: reference ms.assetid: 68a26ad9-5eb2-4490-b782-b7cd46b8000d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil initialize-server

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Configures a Windows Deployment Services server for initial use after the server role has been installed. After you run this command, you should use the wdsutil add-Image command command to add images to the server.

Syntax

wdsutil /Initialize-Server [/Server:<Server name>] /remInst:<Full path> [/Authorize]

Parameters

Parameter Description
[/Server:<Server name>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.
/remInst:<Full path> Specifies the full path and name of the remoteInstall folder. If the specified folder does not already exist, this option will create it when the command is run. You should always enter a local path, even in the case of a remote computer. For example: D:\remoteInstall.
[/Authorize] Authorizes the server in Dynamic Host Control Protocol (DHCP). This option is necessary only if DHCP rogue detection is enabled, meaning that the Windows Deployment Services PXE server must be authorized in DHCP before client computers can be serviced. Note that DHCP rogue detection is disabled by default.

Examples

To initialize the server and set the remoteInstall shared folder to the F: drive, type.

wdsutil /Initialize-Server /remInst:F:\remoteInstall

To initialize the server and set the remoteInstall shared folder to the C: drive, type.

wdsutil /verbose /Progress /Initialize-Server /Server:MyWDSServer /remInst:C:\remoteInstall

Additional References



title: wdsutil get-server description: Reference article for wdsutil get-server, which retrieves information from the specified Windows Deployment Services server. ms.topic: reference ms.assetid: bef60db4-d58d-4304-ab4b-be53dd3271c3 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil get-server

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Retrieves information from the specified Windows Deployment Services server.

Syntax

wdsutil [Options] /Get-Server [/Server:<Server name>] /Show:{Config | Images | All} [/detailed]

Parameters

Parameter Description
[/Server:<Server name>] Specifies the name of the server. This can be the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server is used.
/Show:{Config | Images | All} Specifies the type of information to return.

- Config returns configuration information.
- Images returns information about image groups, boot images, and install images.
- All returns configuration information and image information.

[/detailed] You can use this option with /Show:Images or /Show:All to indicate that all image metadata from each image should be returned. If the /detailed option is not used, the default behavior is to return the image name, description, and file name.

Examples

To view information about the server, type:

wdsutil /Get-Server /Show:Config

To view detailed information about the server, type:

wdsutil /verbose /Get-Server /Server:MyWDSServer /Show:All /detailed

Additional References



title: wdsutil get-driverpackagefile description: Reference article for wdsutil get-driverpackagefile, which displays information about a driver package, including the drivers and files it contains. ms.topic: reference ms.assetid: f01a2c67-7e9c-4aad-b625-383f5a1fca25 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil get-driverpackagefile

Displays information about a driver package, including the drivers and files it contains.

Syntax

wdsutil /Get-DriverPackageFile /InfFile:<Inf File path> [/Architecture:{x86 | ia64 | x64}] [/Show:{Drivers | Files | All}]

Parameters

Parameter Description
/InfFile:<Inf File path> Specifies the full path and file name of the driver package .inf file.
[/Architecture:{x86 ia64
[/Show: {Drivers Files

Examples

To view information about a driver file, type:

wdsutil /Get-DriverPackageFile /InfFile:C:\temp\1394.inf /Architecture:x86

Additional References



title: wdsutil get-alldevices description: Reference article for the wdsutil get-alldevices command, which displays the Windows Deployment Services properties of all pre-staged computers. ms.topic: reference ms.assetid: 5824b3d2-2df1-4ed6-a289-e6c47c13fea2 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil get-alldevices

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays the Windows Deployment Services properties of all pre-staged computers. A pre-staged computer is a physical computer that has been linked to a computer account in active directory Domain Services.

Syntax

wdsutil [options] /get-alldevices [/forest:{Yes | No}] [/referralserver:<servername>]

Parameters

Parameter Description
`[/forest:{Yes No}]` Specifies whether Windows Deployment Services should return computers in the entire forest or the local domain. The default setting is No, meaning that only the computers in the local domain are returned.
[/referralserver:<servername>] Returns only those computers that are pre-staged for the specified server.

Examples

To view all computers, type either:

wdsutil /get-alldevices
wdsutil /verbose /get-alldevices /forest:Yes /referralserver:MyWDSServer

Additional References



title: wdsutil enable-transportserver description: Reference article for the wdsutil enable-transportserver command, which enables all services for the Transport Server. ms.topic: reference ms.assetid: 9d79dba1-4b57-4a00-8cba-877e6b8618e6 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil enable-transportserver

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Enables all services for the Transport Server.

Syntax

wdsutil [options] /Enable-TransportServer [/Server:<Servername>]

Parameters

Parameter Description
[/Server:<Servername>] Specifies the name of the server. This can be the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server is used.

Examples

To enable the services on the server, type either:

wdsutil /Enable-TransportServer
wdsutil /verbose /Enable-TransportServer /Server:MyWDSServer

Additional References



title: convert-riprepimage description: Reference article for the convert-riprepimage command, which converts an existing Remote Installation Preparation (RIPrep) image to Windows Image (.wim) format. ms.topic: reference ms.assetid: 88c2b96f-5947-4b64-9dcf-1946b3c013cf ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

convert-riprepimage

Converts an existing Remote Installation Preparation (RIPrep) image to Windows Image (.wim) format.

Syntax

wdsutil [Options] /Convert-RIPrepImage /FilePath:<Filepath and name> /DestinationImage /FilePath:<Filepath and name> [/Name:<Name>] [/Description:<Description>] [/InPlace] [/Overwrite:{Yes | No | Append}]

Parameters

Parameter Description
/FilePath:<Filepath and name> Specifies the full filepath and name of the .sif file that corresponds to the RIPrep image. This file is typically called Riprep.sif and is found in the \Templates subfolder of the folder that contains the RIPrep image.
/DestinationImage Specifies the settings for the destination image. Uses the following options;
  • /FilePath:<Filepath and name> - Sets the full file path for the new file. For example: C:\Temp\convert.wim
  • [/Name:<Name>] - Sets the display name of the image. If no display name is specified, the display name of the source image is used.
  • [/Description:<Description>] - Sets the description of the image.
  • [/InPlace] - Specifies that the conversion should take place on the original RIPrep image and not on a copy of the original image, which is the default behavior.
  • [`/Overwrite:{Yes
No Append}` - Sets whether this image should overwrite or append any existing files.

Examples

To convert the specified RIPrep.sif image to RIPREP.wim, type:

wdsutil /Convert-RiPrepImage /FilePath:R:\RemoteInstall\Setup\English \Images\Win2k3.SP1\i386\Templates\riprep.sif /DestinationImage /FilePath:C:\Temp\RIPREP.wim

To convert the specified RIPrep.sif image to RIPREP.wim with the specified name and description, and overwrite it with the new file if a file already exists, type:

wdsutil /Verbose /Progress /Convert-RiPrepImage /FilePath:\\Server \RemInst\Setup\English\Images\WinXP.SP2\i386\Templates\riprep.sif /DestinationImage /FilePath:\\Server\Share\RIPREP.wim /Name:WindowsXP image /Description:Converted RIPREP image of WindowsXP /Overwrite:Append

Additional References



title: wdsutil add-imagedriverpackage description: Reference article for the wdsutil add-imagedriverpackage command, which adds a driver package that is in the driver store to an existing boot image on the server. ms.topic: reference ms.assetid: 6c2a4833-6427-47f8-9ffb-20b3786cb406 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil add-imagedriverpackage

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Adds a driver package that is in the driver store to an existing boot image on the server.

Syntax

wdsutil /add-ImageDriverPackage [/Server:<Servername>] [media:<Imagename>] [mediatype:Boot] [/Architecture:{x86 | ia64 | x64}] [/Filename:<Filename>] {/DriverPackage:<Package Name> | /PackageId:<ID>}

Parameters

Parameter Description
[/Server:<Servername>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If a server name is not specified, the local server is used.
[media:<Imagename>] Specifies the name of the image to add the driver to.
[mediatype:Boot] Specifies the type of image to add the driver to. Driver packages can only be added to boot images.
[/Architecture:`{x86 ia64 x64}`] Specifies the architecture of the boot image. Because it's possible to have the same image name for boot images in different architectures, you should specify the architecture to ensure the correct image is used.
[/Filename:<Filename>] Specifies the name of the file. If the image cannot be uniquely identified by name, the file name must be specified.
[/DriverPackage:<Name> Specifies the name of the driver package to add to the image.
[/PackageId:<ID>] Specifies the Windows Deployment Services ID of the driver package. You must specify this option if the driver package can't be uniquely identified by name. To find the Package ID, select the driver group that the package is in (or the All Packages node), right-click the package, and then select Properties. The Package ID is listed on the General tab. For example: {DD098D20-1850-4fc8-8E35-EA24A1BEFF5E}.

Examples

To add a driver package to a boot image, type either:

wdsutil /add-ImageDriverPackagmedia:WinPE Boot Imagemediatype:Boot /Architecture:x86 /DriverPackage:XYZ
wdsutil /verbose /add-ImageDriverPackagmedia:WinPE Boot Image /Server:MyWDSServemediatype:Boot /Architecture:x64 /PackageId:{4D36E972-E325-11CE-Bfc1-08002BE10318}

Additional References



title: shift description: Reference article for the shift command, which changes the position of batch parameters in a batch file. ms.topic: reference ms.assetid: b56574e8-570a-4cc9-bbac-1b94fbf6a47a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

shift

Changes the position of batch parameters in a batch file.

Syntax

shift [/n <N>]

Parameters

Parameter Description
/n <N> Specifies to start shifting at the Nth argument, where N is any value from 0 to 8. Requires command extensions, which are enabled by default.
/? Displays help at the command prompt.

Remarks

Examples

To use a batch file, called Mycopy.bat, to copy a list of files to a specific directory, type:

@echo off
rem MYCOPY.BAT copies any number of files
rem to a directory.
rem The command uses the following syntax:
rem mycopy dir file1 file2 ...
set todir=%1
:getfile
shift
if "%1"=="" goto end
copy %1 %todir%
goto getfile
:end
set todir=
echo All done

Additional References



title: mklink description: Reference article for the mklink command, which creates a directory or file symbolic or hard link. ms.topic: reference ms.assetid: 0ce4df22-2dbc-48fc-9c16-b721ae85f857 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

mklink

Creates a directory or file symbolic or hard link.

Syntax

mklink [[/d] | [/h] | [/j]] <link> <target>

Parameters

Parameter Description
/d Creates a directory symbolic link. By default, this command creates a file symbolic link.
/h Creates a hard link instead of a symbolic link.
/j Creates a Directory Junction.
<link> Specifies the name of the symbolic link being created.
<target> Specifies the path (relative or absolute) that the new symbolic link refers to.
/? Displays help at the command prompt.

Examples

To create and remove a symbolic link named MyFolder from the root directory to the \Users\User1\Documents directory, and a hard link named Myfile.file to the example.file file located within the directory, type:

mklink /d \MyFolder \Users\User1\Documents
mklink /h \MyFile.file \User1\Documents\example.file
rd \MyFolder
del \MyFile.file

Additional References



title: rwinsta description: Reference article for the rwinsta command, which resets (deletes) a session on a Remote Desktop Session Host server. ms.topic: reference ms.assetid: 82bee0e4-1c2c-43fe-afd3-04a6ce0f4518 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

rwinsta

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Resets (deletes) a session on a Remote Desktop Session Host server.

[!NOTE] This command is the same as the reset session command.

[!NOTE] To find out what's new in the latest version, see What's New in Remote Desktop Services in Windows Server.

Additional References



title: risetup description: Reference article for the risetup command, which creates an operating system image by pulling the files from the original Windows Server 2003 CD or from a customized distribution folder containing these files. ms.topic: reference ms.assetid: ce81ac89-a929-40a5-87c2-6a64a3b27a7a ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

risetup

Creates an operating system image by pulling the files from the original Windows Server 2003 CD or from a customized distribution folder containing these files.

[!IMPORTANT] The rexec command has been deprecated, and isn't guaranteed to be supported in Windows.



title: nslookup set srchlist description: Reference article for the nslookup set srchlist command, which changes the default Domain Name System (DNS) domain name and search list. ms.topic: reference ms.assetid: 8486266d-22ac-4ce5-aad6-1cd0c08110a2 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup set srchlist

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Changes the default Domain Name System (DNS) domain name and search list. This command overrides the default DNS domain name and search list of the nslookup set domain command.

Syntax

set srchlist=<domainname>[/...]

Parameters

Parameter Description
<domainname> Specifies new names for the default DNS domain and search list. The default domain name value is based on the host name. You can specify a maximum of six names separated by slashes (/).
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Remarks

Examples

To set the DNS domain to mfg.widgets.com and the search list to the three names:

set srchlist=mfg.widgets.com/mrp2.widgets.com/widgets.com

Additional References



title: bitsadmin info description: Reference article for the bitsadmin info command, which displays summary information about the specified job. ms.topic: reference ms.assetid: 5c306677-0d64-41c0-8276-5bba7750cecb ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin info

Displays summary information about the specified job.

Syntax

bitsadmin /info <job> [/verbose]

Parameters

Parameter Description
job The job's display name or GUID.
/verbose Optional. Provides detailed information about each job.

Examples

To retrieve information about the job named myDownloadJob:

bitsadmin /info myDownloadJob

Additional References



title: bitsadmin getvalidationstate description: Reference article for the bitsadmin getvalidationstate command, which reports the content validation state of the given file within the job. ms.topic: reference ms.assetid: 6ada3f1f-9967-4262-9d22-ed641e23f516 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin getvalidationstate

Reports the content validation state of the given file within the job.

Syntax

bitsadmin /getvalidationstate <job> <file_index>

Parameters

Parameter Description
job The job's display name or GUID.
file_index Starts from 0.

Examples

To retrieve the content validation state of file 2 within the job named myDownloadJob:

bitsadmin /getvalidationstate myDownloadJob 1

Additional References



title: bitsadmin getsecurityflags description: Reference article for the bitsadmin getsecurityflags command, which reports the HTTP security flags for URL redirection and checks performed on the server certificate during the transfer. ms.topic: reference ms.assetid: c2e73519-34f4-487b-af11-97d5d08ef9bb ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin getsecurityflags

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Reports the HTTP security flags for URL redirection and checks performed on the server certificate during the transfer.

Syntax

bitsadmin /getsecurityflags <job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To retrieve the security flags from a job named myDownloadJob:

bitsadmin /getsecurityflags myDownloadJob

Additional References



title: bitsadmin getreplydata description: Reference article for the bitsadmin getreplydata command, which retrieves the server's upload-reply data in hexadecimal format for the job. ms.topic: reference ms.assetid: 819f97d5-b255-4b2d-9f63-0daa73915434 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

bitsadmin getreplydata

Retrieves the server's upload-reply data in hexadecimal format for the job.

[!NOTE] This command isn't supported by BITS 1.2 and earlier.

Syntax

bitsadmin /getreplydata <job>

Parameters

Parameter Description
job The job's display name or GUID.

Examples

To retrieve the upload-reply data for the job named myDownloadJob:

bitsadmin /getreplydata myDownloadJob

Additional References



title: nslookup finger description: Reference article for the nslookup finger command, which connects with the finger server on the current device. ms.topic: reference ms.assetid: 11ea2bde-8ccb-4b87-bbad-231dd9e5e858 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nslookup /finger

Connects with the finger server on the current device.

Syntax

finger [<username>] [{[>] <filename> | [>>] <filename>}]

Parameters

Parameter Description
<username> Specifies the name of the user to look up.
<filename> Specifies a file name in which to save the output. You can use the greater than (>) and double greater than (>>) characters to redirect the output in the usual manner.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: writer description: Reference article for the writer command, which verifies that a writer or component is included or excludes a writer or component from the backup or restore procedure. ms.topic: reference ms.assetid: 7cf98295-411d-4705-8573-f898ff45c140 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

writer

Verifies that a writer or component is included or excludes a writer or component from the backup or restore procedure. If used without parameters, writer displays help at the command prompt.

Syntax

writer verify [writer> | <component>]
writer exclude [<writer> | <component>]

Parameters

Parameter Description
verify Verifies that the specified writer or component is included in the backup or restore procedure. The backup or restore procedure will fail if the writer or component is not included.
exclude Excludes the specified writer or component from the backup or restore procedure.

Examples

To verify a writer by specifying its GUID (for this example, 4dc3bdd4-ab48-4d07-adb0-3bee2926fd7f), type:

writer verify {4dc3bdd4-ab48-4d07-adb0-3bee2926fd7f}

To exclude a writer with the name System Writer, type:

writer exclude System Writer

Additional References



title: nlbmgr description: Reference article for the nlbmgr command, which helps you to configure and manage your Network Load Balancing clusters and all cluster hosts from a single computer, using the Network Load Balancing Manager. ms.topic: reference ms.assetid: 89cb8590-b7cf-4a27-89fa-0fa62ea1a1ca ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

nlbmgr

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Configure and manage your Network Load Balancing clusters and all cluster hosts from a single computer, using the Network Load Balancing Manager. You can also use this command to replicate the cluster configuration to other hosts.

You can start the Network Load Balancing Manager from the command-line using the command nlbmgr.exe, which is installed in the systemroot\System32 folder.

Syntax

nlbmgr [/noping][/hostlist <filename>][/autorefresh <interval>][/help | /?]

Parameters

Parameter Description
/noping Prevents the Network Load Balancing Manager from pinging the hosts prior to trying to contact them through Windows Management Instrumentation (WMI). Use this option if you have disabled Internet Control Message Protocol (ICMP) on all available network adapters. If the Network Load Balancing Manager attempts to contact a host that isn't available, you'll experience a delay when using this option.
/hostlist <filename> Loads the hosts specified in filename into the Network Load Balancing Manager.
/autorefresh <interval> Causes the Network Load Balancing Manager to refresh its host and cluster information every <interval> seconds. If no interval is specified, the information is refreshed every 60 seconds.
/? Displays help at the command prompt.
/help Displays help at the command prompt.

Additional References



title: whoami description: Reference article for whoami, which displays user, group and privileges information for the user who is currently logged on to the local system. ms.topic: reference ms.assetid: 6e3f4d5c-f1f5-4429-b602-afad2b3488bf ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

whoami

Displays user, group and privileges information for the user who is currently logged on to the local system. If used without parameters, whoami displays the current domain and user name.

Syntax

whoami [/upn | /fqdn | /logonid]
whoami {[/user] [/groups] [/priv]} [/fo <Format>] [/nh]
whoami /all [/fo <Format>] [/nh]

Parameters

Parameter Description
/upn Displays the user name in user principal name (UPN) format.
/fqdn Displays the user name in fully qualified domain name (FQDN) format.
/logonid Displays the logon ID of the current user.
/user Displays the current domain and user name and the security identifier (SID).
/groups Displays the user groups to which the current user belongs.
/priv Displays the security privileges of the current user.
/fo <Format> Specifies the output format. Valid values include:
table Displays output in a table. This is the default value.
list Displays output in a list.
csv Displays output in comma-separated value (CSV) format.
/all Displays all information in the current access token, including the current user name, security identifiers (SID), privileges, and groups that the current user belongs to.
/nh Specifies that the column header should not be displayed in the output. This is valid only for table and CSV formats.
/? Displays help at the command prompt.

Examples

To display the domain and user name of the person who is currently logged on to this computer, type:

whoami

Output similar to the following appears:

DOMAIN1\administrator

To display all of the information in the current access token, type:

whoami /all

Additional References



title: Update-ServerFiles description: Reference article for Update-ServerFiles, which updates files in the REMINST shared folder by using the latest files that are stored in the server's %Windir%\System32\RemInst folder. ms.topic: reference ms.assetid: 23aa79df-38c6-401e-91bd-cd23811b30b4 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

Update-ServerFiles

Updates files in the REMINST shared folder by using the latest files that are stored in the server's %Windir%\System32\RemInst folder. To ensure the validity of your Windows Deployment Services installation, you should run this command once after each server upgrade, service pack installation, or update to Windows Deployment Services files.

Syntax

wdsutil [Options] /Update-ServerFiles [/Server:<Server name>]

Parameters

Parameter Description
[/Server:<Server name>] Specifies the name of the server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.

Examples

To update the files, type one of the following:

wdsutil /Update-ServerFiles
wdsutil /Verbose /Progress /Update-ServerFiles /Server:MyWDSServer

Additional References



title: wdsutil start-transportserver description: Reference article for Subcommand start-TransportServer, which starts all services for a Transport Server. ms.topic: reference ms.assetid: 0e93bc84-5b9e-4f9d-8cf0-1634417da0f6 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil start-transportserver

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Starts all services for a Transport Server.

Syntax

wdsutil [Options] /start-TransportServer [/Server:<Server name>]

Parameters

Parameter Description
[/Server:<Server name>] Specifies the name of the Transport Server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.

Examples

To start the server, type one of the following:

wdsutil /start-TransportServer
wdsutil /verbose /start-TransportServer /Server:MyWDSServer

Additional References



title: wdsutil stop-transportserver description: Reference article for stop-TransportServer ms.topic: reference ms.assetid: dc1b1eec-6893-445e-81dc-16b3fae287fa ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil stop-transportserver

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Stops all services on a Transport Server.

Syntax

wdsutil [Options] /Stop-TransportServer [/Server:<Server name>]

Parameters

Parameter Description
[/Server:<Server name>] Specifies the name of the Transport Server. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no Transport Server is specified, the local server will be used.

Examples

To stop the services, type one of the following:

wdsutil /Stop-TransportServer
wdsutil /verbose /Stop-TransportServer /Server:MyWDSServer

Additional References



title: wdsutil start-server description: Reference article for Subcommand start-Server, which starts all services for a Windows Deployment Services server. ms.topic: reference ms.assetid: 1e4343e2-0a16-4e65-8769-c09adaef5680 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil start-server

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Starts all services for a Windows Deployment Services server.

Syntax

wdsutil [Options] /start-Server [/Server:<Server name>]

Parameters

Parameter Description
[/Server:<Server name>] Specifies the name of the server to be started. This can be either the NetBIOS name or the fully qualified domain name (FQDN). If no server name is specified, the local server will be used.

Examples

To start the server, type one of the following:

wdsutil /start-Server
wdsutil /verbose /start-Server /Server:MyWDSServer

Additional References



title: remove-DriverGroup description: Reference article for remove-DriverGroup, which removes a driver group from a server. ms.topic: reference ms.assetid: 1fefe9df-9782-433c-8abe-3f1a35e50da2 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

remove-DriverGroup

Removes a driver group from a server.

Syntax

wdsutil /Remove-DriverGroup /DriverGroup:<Group Name> [/Server:<Server name>]

Parameters

Parameter Description
/DriverGroup:<Group Name> Specifies the name of the driver group to remove.
[/Server:<Server name>] Specifies the name of the server. This can be the NetBIOS name or the FQDN. If a server name is not specified, the local server is used.

Examples

To remove a driver group, type one of the following:

wdsutil /Remove-DriverGroup /DriverGroup:PrinterDrivers
wdsutil /Remove-DriverGroup /DriverGroup:PrinterDrivers /Server:MyWdsServer

Additional References



title: wdsutil new description: Reference article for wdsutil new, which creates capture and discover images, multicast transmissions, and namespaces. ms.topic: reference ms.assetid: 0f06f310-c585-42f4-9d15-4680b4a3355d ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil new

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Creates capture and discover images, multicast transmissions, and namespaces.

Subcommands

Subcommand Description
wdsutil new-captureimage command creates a new capture image from an existing boot image.
wdsutil new-discoverimage command creates a new discover image from an existing boot image.
wdsutil new-multicasttransmission command creates a new multicast transmission.
wdsutil new-namespace command creates a new namespace.


title: wdsutil get-alldrivergroups description: Reference article for the wdsutil get-alldrivergroups command, which displays information about all the driver groups on a server. ms.topic: reference ms.assetid: f245ba53-f150-41b1-8418-38dcf0410a05 ms.author: jgerend author: JasonGerend manager: mtillman ms.date: 10/16/2017

wdsutil get-alldrivergroups

Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012

Displays information about all the driver groups on a server.

Syntax

wdsutil /get-alldrivergroups [/server:<servername>] [/show:{packagemetadata | filters | all}]

Parameters

Parameter Description
[/server:<servername>] Specifies the name of the server. This can be the NetBIOS name or the FQDN. If a server name is not specified, the local server is used.
`/show:{packagemetadata filters all}]` Displays the metadata for all the driver packages in the specified group. PackageMetaData displays information about all the filters for the driver group. Filters displays the metadata for all driver packages and filte