WMIC

WMIC [global switches] <command>

The following global switches are available:

/NAMESPACE
Path for the namespace the alias operate against.
/ROLE
Path for the role containing the alias definitions.
/NODE
Servers the alias will operate against.
/IMPLEVEL
Client impersonation level.
/AUTHLEVEL
Client authentication level.
/LOCALE
Language id the client should use.
/PRIVILEGES
Enable or disable all privileges.
/TRACE
Outputs debugging information to stderr.
/RECORD
Logs all input commands and output.
/INTERACTIVE
Sets or resets the interactive mode.
/FAILFAST
Sets or resets the FailFast mode.
/USER
User to be used during the session.
/PASSWORD
Password to be used for session login.
/OUTPUT
Specifies the mode for output redirection.
/APPEND
Specifies the mode for output redirection.
/AGGREGATE
Sets or resets aggregate mode.
/AUTHORITY
Specifies the for the connection.
/?[:]
Usage information.

For more information on a specific global switch, type: switch-name /?

The following alias/es are available in the current role:

ALIAS
Access to the aliases available on the local system
BASEBOARD
Base board (also known as a motherboard or system board) management.
BIOS
Basic input/output services (BIOS) management.
BOOTCONFIG
Boot configuration management.
CDROM
CD-ROM management.
COMPUTERSYSTEM
Computer system management.
CPU
CPU management.
CSPRODUCT
Computer system product information from SMBIOS.
DATAFILE
DataFile Management.
DCOMAPP
DCOM Application management.
DESKTOP
User’s Desktop management.
DESKTOPMONITOR
Desktop Monitor management.
DEVICEMEMORYADDRESS
Device memory addresses management.
DISKDRIVE
Physical disk drive management.
DISKQUOTA
Disk space usage for NTFS volumes.
DMACHANNEL
Direct memory access (DMA) channel management.
ENVIRONMENT
System environment settings management.
FSDIR
Filesystem directory entry management.
GROUP
Group account management.
IDECONTROLLER
IDE Controller management.
IRQ
Interrupt request line (IRQ) management.
JOB
Provides access to the jobs scheduled using the schedule service.
LOADORDER
Management of system services that define execution dependencies.
LOGICALDISK
Local storage device management.
LOGON
LOGON Sessions.
MEMCACHE
Cache memory management.
MEMORYCHIP
Memory chip information.
MEMPHYSICAL
Computer system’s physical memory management.
NETCLIENT
Network Client management.
NETLOGIN
Network login information (of a particular user) management.
NETPROTOCOL
Protocols (and their network characteristics) management.
NETUSE
Active network connection management.
NIC
Network Interface Controller (NIC) management.
NICCONFIG
Network adapter management.
NTDOMAIN
NT Domain management.
NTEVENT
Entries in the NT Event Log.
NTEVENTLOG
NT eventlog file management.
ONBOARDDEVICE
Management of common adapter devices built into the motherboard (system board).
OS
Installed Operating System/s management.
PAGEFILE
Virtual memory file swapping management.
PAGEFILESET
Page file settings management.
PARTITION
Management of partitioned areas of a physical disk.
PORT
I/O port management.
PORTCONNECTOR
Physical connection ports management.
PRINTER
Printer device management.
PRINTERCONFIG
Printer device configuration management.
PRINTJOB
Print job management.
PROCESS
Process management.
PRODUCT
Installation package task management.
QFE
Quick Fix Engineering.
QUOTASETTING
Setting information for disk quotas on a volume.
RDACCOUNT
Remote Desktop connection permission management.
RDNIC
Remote Desktop connection management on a specific network adapter.
RDPERMISSIONS
Permissions to a specific Remote Desktop connection.
RDTOGGLE
Turning Remote Desktop listener on or off remotely.
RECOVEROS
Information that will be gathered from memory when the operating system fails.
REGISTRY
Computer system registry management.
SCSICONTROLLER
SCSI Controller management.
SERVER
Server information management.
SERVICE
Service application management.
SHADOWCOPY
Shadow copy management.
SHADOWSTORAGE
Shadow copy storage area management.
SHARE
Shared resource management.
SOFTWAREELEMENT
Management of the elements of a software product installed on a system.
SOFTWAREFEATURE
Management of software product subsets of SoftwareElement.
SOUNDDEV
Sound Device management.
STARTUP
Management of commands that run automatically when users log onto the computer system.
SYSACCOUNT
System account management.
SYSDRIVER
Management of the system driver for a base service.
SYSTEMENCLOSURE
Physical system enclosure management.
SYSTEMSLOT
Management of physical connection points including ports, slots and peripherals, and proprietary connections points.
TAPEDRIVE
Tape drive management.
TEMPERATURE
Data management of a temperature sensor (electronic thermometer).
TIMEZONE
Time zone data management.
UPS
Uninterruptible power supply (UPS) management.
USERACCOUNT
User account management.
VOLTAGE
Voltage sensor (electronic voltmeter) data management.
VOLUME
Local storage volume management.
VOLUMEQUOTASETTING
Associates the disk quota setting with a specific disk volume.
VOLUMEUSERQUOTA
Per user storage volume quota management.
WMISET
WMI service operational parameters management.

For more information on a specific alias, type: alias /?

CLASS
Escapes to full WMI schema.
PATH
Escapes to full WMI object paths.
CONTEXT
Displays the state of all the global switches.
QUIT/EXIT
Exits the program.

For more information on CLASS/PATH/CONTEXT, type: (CLASS | PATH | CONTEXT) /?

XCOPY

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W] [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U] [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/B] [/EXCLUDE:file1[+file2][+file3]…]

source
Specifies the file(s) to copy.
destination
Specifies the location and/or name of new files.
/A
Copies only files with the archive attribute set, doesn’t change the attribute.
/M
Copies only files with the archive attribute set, turns off the archive attribute.
/D:m-d-y
Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.
/EXCLUDE:file1[+file2][+file3]…
Specifies a list of files containing strings. Each string should be in a separate line in the files. When any of the strings match any part of the absolute path of the file to be copied, that file will be excluded from being copied. For example, specifying a string like \obj\ or .obj will exclude all files underneath the directory obj or all files with the .obj extension respectively.
/P
Prompts you before creating each destination file.
/S
Copies directories and subdirectories except empty ones.
/E
Copies directories and subdirectories, including empty ones. Same as /S /E. May be used to modify /T.
/V
Verifies the size of each new file.
/W
Prompts you to press a key before copying.
/C
Continues copying even if errors occur.
/I
If destination does not exist and copying more than one file, assumes that destination must be a directory.
/Q
Does not display file names while copying.
/F
Displays full source and destination file names while copying.
/L
Displays files that would be copied.
/G
Allows the copying of encrypted files to destination that does not support encryption.
/H
Copies hidden and system files also.
/R
Overwrites read-only files.
/T
Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirectories.
/U
Copies only files that already exist in destination.
/K
Copies attributes. Normal Xcopy will reset read-only attributes.
/N
Copies using the generated short names.
/O
Copies file ownership and ACL information.
/X
Copies file audit settings (implies /O).
/Y
Suppresses prompting to confirm you want to overwrite an existing destination file.
/-Y
Causes prompting to confirm you want to overwrite an existing destination file.
/Z
Copies networked files in restartable mode.
/B
Copies the Symbolic Link itself versus the target of the link

The switch /Y may be preset in the COPYCMD environment variable. This may be overridden with /-Y on the command line.

VOL

VOL [drive:]

Displays the disk volume label and serial number, if they exist.

VERIFY

VERIFY [ON | OFF]

Type VERIFY without a parameter to display the current VERIFY setting.

TREE

TREE [drive:][path] [/F] [/A]

/F
Display the names of the files in each folder.
/A
Use ASCII instead of extended characters.

TITLE

TITLE [string]

string
Specifies the title for the command prompt window.

TIME

TIME [/T | time]

Type TIME with no parameters to display the current time setting and a prompt for a new one. Press ENTER to keep the same time.

If Command Extensions are enabled the TIME command supports the /T switch which tells the command to just output the current time, without prompting for a new time.

TASKKILL

TASKKILL [/S system [/U username [/P [password]]]] { [/FI filter] [/PID processid | /IM imagename] } [/T] [/F]

/S system
Specifies the remote system to connect to.
/U [domain\]user
Specifies the user context under which the command should execute.
/P [password]
Specifies the password for the given user context. Prompts for input if omitted.
/FI filter
Applies a filter to select a set of tasks. Allows “*” to be used. ex. imagename eq acme*
/PID processid
Specifies the PID of the process to be terminated. Use TaskList to get the PID.
/IM imagename
Specifies the image name of the process to be terminated. Wildcard ‘*’ can be used to specify all tasks or image names.
/T
Terminates the specified process and any child processes which were started by it.
/F
Specifies to forcefully terminate the process(es).
/?
Displays this help message.

Filters:

    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
                                            of hh:mm:ss.
                                            hh - hours,
                                            mm - minutes, ss - seconds
    MEMUSAGE      eq, ne, gt, lt, ge, le    Memory usage in KB
    USERNAME      eq, ne                    User name in [domain\]user
                                            format
    MODULES       eq, ne                    DLL name
    SERVICES      eq, ne                    Service name
    WINDOWTITLE   eq, ne                    Window title

NOTE:

  1. Wildcard ‘*’ for /IM switch is accepted only when a filter is applied.
  2. Termination of remote processes will always be done forcefully (/F).
  3. “WINDOWTITLE” and “STATUS” filters are not considered when a remote machine is specified.

Examples:
TASKKILL /IM notepad.exe
TASKKILL /PID 1230 /PID 1241 /PID 1253 /T
TASKKILL /F /IM cmd.exe /T
TASKKILL /F /FI “PID ge 1000” /FI “WINDOWTITLE ne untitle*”
TASKKILL /F /FI “USERNAME eq NT AUTHORITY\SYSTEM” /IM notepad.exe
TASKKILL /S system /U domain\username /FI “USERNAME ne NT*” /IM *
TASKKILL /S system /U username /P password /FI “IMAGENAME eq note*”