←December→
Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
|
|
|
|
|
|
Tue, Mar 19, 2024 9:38 pm
Obtaining information on a CD/DVD drive with WMIC
If you want to determine the model number of an optical drive, such as
a CD or DVD drive, in a system running a Microsoft Windows operating system
from a command-line interface (CLI), you can
open a command prompt window
and issue a Windows Management
Instrumentation Command-line (WMIC) command:
wmic cdrom get name
(the value for
caption
may return the same information). E.g.:
C:\>wmic cdrom get name
Name
HL-DT-ST DVD-ROM DU90N
C:\>wmic cdrom get caption
Caption
HL-DT-ST DVD-ROM DU90N
C:\>
If you wish to determine whether media, such as a CD or DVD, is in the
drive, you can use the command wmic cdrom get medialoaded
. If
there is no disc in the drive, the value for MediaLoaded
will be
FALSE
. If there is a disc in the drive, the value will be true
as in the example below where there is a CD in the drive.
C:\>wmic cdrom get medialoaded
MediaLoaded
TRUE
C:\>
[ More Info ]
[/os/windows/commands/wmic]
permanent link
Fri, Mar 15, 2024 10:43 pm
Getting the video resolution on a Windows system
If you need to determine the horizontal and vertical video resolution of the
system you are working on from a command-line interface (CLI) on a Microsoft
Windows systeem, you can open a
PowerShell window
(you can type PowerShell
in the Windows "search" field and
click on PowerShell when you see it in the returned results) and
issue the
Windows Management Instrumentation Command-line (WMIC) command
Get-WmiObject win32_videocontroller | select caption, CurrentHorizontalResolution, CurrentVerticalResolution
.
PS C:\> Get-WmiObject win32_videocontroller | select caption, CurrentHorizontalResolution, CurrentVerticalResolution
caption CurrentHorizontalResolution CurrentVerticalResolution
------- --------------------------- -------------------------
NVIDIA Quadro K2000 2560 1440
PS C:\>
If you need to determine the resolution on another system in the same
Windows domain on
the local area network (LAN), you can add -ComputerName
followed
by the name of the computer to the command as shown below.
PS C:\> Get-WmiObject -ComputerName apollo win32_videocontroller | select caption, CurrentHorizontalResolution, CurrentVerticalResolution
caption CurrentHorizontalResolution CurrentVerticalResolution
------- --------------------------- -------------------------
Microsoft Basic Display Adapter 1024 768
PS C:\>
[ More Info ]
[/os/windows/commands/wmic]
permanent link
Wed, Mar 06, 2024 10:56 pm
Obtaining processor information with WMIC
You can obtain information on the
Central
Processing Unit (CPU) in a system
running a Microsoft Windows
operating system
(OS) using
Windows Management Instrumentation Command-line (WMIC) commands. To
see the value of all parameters,
open a command prompt window
and issue the command wmic /namespace:\\root\cimv2 path win32_processor
get /format:list
(using the /format option, you can see the information
in a more readable fashion).
C:\>wmic /namespace:\\root\cimv2 path win32_processor get /format:list
AddressWidth=64
Architecture=9
AssetTag=UNKNOWN
Availability=3
Caption=Intel64 Family 6 Model 85 Stepping 4
Characteristics=252
ConfigManagerErrorCode=
ConfigManagerUserConfig=
CpuStatus=1
CreationClassName=Win32_Processor
CurrentClockSpeed=2195
CurrentVoltage=16
DataWidth=64
Description=Intel64 Family 6 Model 85 Stepping 4
DeviceID=CPU0
ErrorCleared=
ErrorDescription=
ExtClock=100
Family=179
InstallDate=
L2CacheSize=14336
L2CacheSpeed=
L3CacheSize=19712
L3CacheSpeed=0
LastErrorCode=
Level=6
LoadPercentage=3
Manufacturer=GenuineIntel
MaxClockSpeed=2195
Name=Intel(R) Xeon(R) Gold 5120 CPU @ 2.20GHz
NumberOfCores=14
NumberOfEnabledCore=14
NumberOfLogicalProcessors=28
OtherFamilyDescription=
PartNumber=
PNPDeviceID=
PowerManagementCapabilities=
PowerManagementSupported=FALSE
ProcessorId=BFEBFBFF00050654
ProcessorType=3
Revision=21764
Role=CPU
SecondLevelAddressTranslationExtensions=TRUE
SerialNumber=
SocketDesignation=CPU0
Status=OK
StatusInfo=3
Stepping=
SystemCreationClassName=Win32_ComputerSystem
SystemName=MUNICH
ThreadCount=28
UniqueId=
UpgradeMethod=1
Version=
VirtualizationFirmwareEnabled=TRUE
VMMonitorModeExtensions=TRUE
VoltageCaps=
C:\>
[ More Info ]
[/os/windows/commands/wmic]
permanent link
Sat, Oct 28, 2017 10:45 pm
Checking operating system information with WMIC
You can use wmic os get
commands on a Microsoft Windows system
to view information related to the operating system via a command-line
interface (CLI). E.g., to determine the version of the operating system you
can issue the command
Windows Management Instrumentation Command-line (WMIC)
command wmic os get version
.
C:\Users\Public>wmic os get version
Version
10.0.15063
C:\Users\Public>
Or if you know the system is running a particular version of the Windows
operating system, e.g., Windows 10, but want to see just the build number
for that version of Windows, you could issue the command wmic os get
BuildNumber
.
C:\Users\Public>wmic os get BuildNumber
BuildNumber
15063
C:\Users\Public>
[ More Info ]
[/os/windows/commands/wmic]
permanent link
Sat, Sep 16, 2017 11:05 pm
Determining the antivirus software on a Windows system from the command line
You can determine the antivirus software present on a system, if the
antivirus software is registered with the Windows Security Center, using
Windows Management Instrumentation Command-line (WMIC).
E.g., for a Windows 10 system using Microsoft
Windows Defender:
C:\>WMIC /Node:localhost /Namespace:\\root\SecurityCenter2 Path AntiVirusProduct Get displayName
displayName
Windows Defender
C:\>
[ More Info ]
[/os/windows/commands/wmic]
permanent link
Sat, Feb 18, 2017 3:30 pm
Changing the host name for a Windows system from a command prompt
There are a variety of ways you can
determine the system name for a Windows
computer from a
command line interface (CLI), such as a
command prompt or
PowerShell prompt
window. But what if you wish to rename the computer from a command line
interface? You can
obtain a command
prompt and then use a
Windows Management Instrumentation Command-line (WMIC)
command in the form shown below where
oldname is the curent name of
the system and
newname is the new name you wish to assign to the
system.
wmic computersystem where caption='oldname' rename newname
[ More Info ]
[/os/windows/commands/wmic]
permanent link
Tue, Feb 14, 2017 11:14 pm
Determining S.M.A.R.T disk drive status from a command prompt
Many hard disk drives have a
Self-Monitoring, Analysis and Reporting Technology (S.M.A.R.T.)
capability. On a Microsoft Windows system, you can use a utility such
as
SpeedFan
to query the S.M.A.R.T, or SMART, information for a drive. You can also
check the status of a drive using a
Windows Instrumentation Command-line (WMIC) command by issuing the
command
wmic diskdrive get status
at a
command prompt, though you
won't get the same level of detail. But if you have
multiple drives in or atached to the system, you will need to use an
additional parameter to identify which status applies to which drive. You
could include the size and/or model, e.g.:
C:\Users\Lila>wmic diskdrive get status, size, model
Model Size Status
Seagate Backup+ Desk SCSI Disk Device 5000970240000 OK
Seagate Backup+ Desk USB Device 4000776192000 OK
Generic- Compact Flash USB Device OK
Generic- SD/MMC USB Device OK
Generic- MS/MS-Pro USB Device OK
WD My Book 1140 USB Device 2000363420160 OK
Generic- SM/xD-Picture USB Device OK
WDC WD4003FZEX-00Z4SA0 ATA Device 4000784417280 OK
C:\Users\Lila>
[ More Info ]
[/os/windows/commands/wmic]
permanent link
Wed, Dec 07, 2016 11:27 pm
Show all drives from Windows command prompt
If you need to obtain a list of all disk drives on a Microsoft Windows system
from a
command line interface (CLI), e.g., a command prompt window, you can do so using
Windows Management Instrumentation Command-line (WMIC). You can obtain
a list of drives by
opening a
command prompt window and then issuing a
wmic logicaldisk get
command followed by parameters relevant to the information you
wish to see. You can see a list of parameter options by issuing the command
wmic logicaldisk get /?
.
C:\>wmic logicaldisk get /?
Property get operations.
USAGE:
GET [<property list>] [<get switches>]
NOTE: <property list> ::= <property name> | <property name>, <property list>
The following properties are available:
Property Type Operation
======== ==== =========
Access N/A N/A
Availability N/A N/A
BlockSize N/A N/A
Caption N/A N/A
Compressed N/A N/A
ConfigManagerErrorCode N/A N/A
ConfigManagerUserConfig N/A N/A
Description N/A N/A
DeviceID N/A N/A
DriveType N/A N/A
ErrorCleared N/A N/A
ErrorDescription N/A N/A
ErrorMethodology N/A N/A
FileSystem N/A N/A
FreeSpace N/A N/A
InstallDate N/A N/A
LastErrorCode N/A N/A
MaximumComponentLength N/A N/A
MediaType N/A N/A
Name N/A N/A
NumberOfBlocks N/A N/A
PNPDeviceID N/A N/A
PowerManagementCapabilities N/A N/A
PowerManagementSupported N/A N/A
ProviderName N/A N/A
Purpose N/A N/A
QuotasDisabled N/A N/A
QuotasIncomplete N/A N/A
QuotasRebuilding N/A N/A
Size N/A N/A
Status N/A N/A
StatusInfo N/A N/A
SupportsDiskQuotas N/A N/A
SupportsFileBasedCompression N/A N/A
VolumeName N/A N/A
VolumeSerialNumber N/A N/A
The following GET switches are available:
/VALUE - Return value.
/ALL(default) - Return the data and metadata for the attribute.
/TRANSLATE:<table name> - Translate output via values from <table name>.
/EVERY:<interval> [/REPEAT:<repeat count>] - Returns value every (X interval) seconds, If /REPEAT specified the command is executed <repeat count> times.
/FORMAT:<format specifier> - Keyword/XSL filename to process the XML results.
NOTE: Order of /TRANSLATE and /FORMAT switches influences the appearance of output.
Case1: If /TRANSLATE precedes /FORMAT, then translation of results will be followed by formatting.
Case2: If /TRANSLATE succeeds /FORMAT, then translation of the formatted results will be done.
C:\>
For example, the results from issuing the command on a Windows 10
system to display the device ID, volume name, and description are shown
below:
C:\>wmic logicaldisk get deviceid, volumename, description
Description DeviceID VolumeName
Local Fixed Disk C: OS
CD-ROM Disc D:
CD-ROM Disc E:
Removable Disk F: EMTEC
C:\>
[ More Info ]
[/os/windows/commands/wmic]
permanent link
Thu, Jan 28, 2016 10:53 pm
Viewing date and time information under Windows with WMIC
If you want to obtain the current date and time on a Windows system from
a command prompt, you can use
date /t
and
time /t
-
if you omit the
/t
you will be prompted to change the values.
C:\>date /t
Thu 01/28/2016
C:\>time /t
10:38 PM
You can also obtain the information using a
Windows Management Instrumentation Command-line command,
wmic path win32_localtime get *
. Times will be shown in
24-hour clock format,
aka "military time", so 10 PM is hour 22.
C:\>wmic path win32_localtime get *
Day DayOfWeek Hour Milliseconds Minute Month Quarter Second WeekInMonth Year
28 4 22 47 1 1 42 5 2016
C:\>
You can format the display of the information using the /format
option, e.g., you can put it in a list format.
C:\>wmic path win32_localtime get * /format:list
Day=28
DayOfWeek=4
Hour=22
Milliseconds=
Minute=45
Month=1
Quarter=1
Second=50
WeekInMonth=5
Year=2016
C:\>
[/os/windows/commands/wmic]
permanent link
Thu, Jan 21, 2016 10:44 pm
WMIC cpu get commands
On Microsoft Windows systems since Windows XP, you can use the
Windows Management Instrumentation Command-line (WMIC) to obtain information
on a system's
Central Processing Unit (CPU). E.g., you can issue the command
wmic
cpu get name
to determine if the processor is an AMD or Intel processor.
C:\>wmic cpu get name
Name
AMD FX(tm)-4100 Quad-Core Processor
You can also specify, manufacturer
as an option to the command,
instead.
C:\>wmic cpu get manufacturer
Manufacturer
AuthenticAMD
C:\>
Or wmic cpu get caption
.
C:\>wmic cpu get caption
Caption
AMD64 Family 21 Model 1 Stepping 2
If you want to know the CPU's clock speed, you can use
currentclockspeed
. There is also a maxclockspeed
parameter.
C:\>wmic cpu get currentclockspeed
CurrentClockSpeed
3600
C:\>wmic cpu get maxclockspeed
MaxClockSpeed
3600
C:\>
If you want to obtain a figure for the current CPU utilization from
a command line interface (CLI), i.e.,
a
command prompt, rather than checking it through a
GUI, such as
through the Task Manager, you can use wmic cpu get
loadpercentage
.
C:\>wmic cpu get loadpercentage
LoadPercentage
19
[/os/windows/commands/wmic]
permanent link
Privacy Policy
Contact