MoonPoint Support Logo

 


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
April
Sun Mon Tue Wed Thu Fri Sat
           
24 25 26 27 28 29
30            
2017
Months
AprMay Jun
Jul Aug Sep
Oct Nov Dec


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

Mon, Jan 11, 2016 10:54 pm

WMIC startup

The WMIC startup command can be used to check the programs that will be run when a user logs into a Microsoft Windows system.

C:\>wmic startup /?

STARTUP - Management of commands that run automatically when users log onto the
computer system.

HINT: BNF for Alias usage.
(<alias> [WMIObject] | <alias> [<path where>] | [<alias>] <path where>) [<verb c
lause>].

USAGE:

STARTUP ASSOC [<format specifier>]
STARTUP CREATE <assign list>
STARTUP DELETE
STARTUP GET [<property list>] [<get switches>]
STARTUP LIST [<list format>] [<list switches>]


C:\>

The list parameter can be specified to obtain a list of programs that will be run upon logon.

C:\>wmic startup list /?

Property list operations.
USAGE:

LIST [<list format>] [<list switches>]

The following LIST formats are available:

BRIEF                     - Command, User, Caption
FULL                      - Command, Description, SettingID, User, Location, Cap
tion
INSTANCE                  - Caption
SYSTEM                    - __CLASS, __DERIVATION, __DYNASTY, __GENUS, __NAMESPA
CE, __PATH, __PROPERTY_COUNT, __RELPATH, __SERVER, __SUPERCLASS

The following LIST switches are available:

/TRANSLATE:<table name>      - Translate output via values from <table name>.
/EVERY:<interval> [/REPEAT:<repeat count>] - Returns value every (X interval) se
conds, 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 outp
ut.
Case1: If /TRANSLATE precedes /FORMAT, then translation of results will be follo
wed by formatting.
Case2: If /TRANSLATE succeeds /FORMAT, then translation of the formatted results
 will be done.


C:\>

E.g., if I only want a brief listing, i.e, just the Command, User, and Caption values, I can use wmic startup list brief. If I just want the "caption", I can use wmic startup list instance as shown below:

C:\>wmic startup list instance
Caption
Akamai NetSession Interface
SpybotPostWindows10UpgradeReInstall
Intuit Data Protect
QuickBooks Update Agent
QuickBooks_Standard_21
IgfxTray
HotKeysCmds
Persistence

AdAwareTray


C:\>

If I don't want to use any of the predefined list formats like brief, full, instance, etc., I can use wmic startup get followed by the values I'm interested in. E.g., if I wanted the caption and command values, I could use the command shown below:

C:\>wmic startup get caption, command
Caption                              Command
Akamai NetSession Interface          "C:\Users\Pamela\AppData\Local\Akamai\netsession_win.exe"
SpybotPostWindows10UpgradeReInstall  "C:\Program Files\Common Files\AV\Spybot - Search and Destroy\Test.exe"
Intuit Data Protect                  C:\PROGRA~2\COMMON~1\Intuit\DATAPR~1\INTUIT~1.EXE /Startup
QuickBooks Update Agent              C:\PROGRA~2\COMMON~1\Intuit\QUICKB~1\QBUpdate\qbupdate.exe
QuickBooks_Standard_21               C:\PROGRA~2\Intuit\QUICKB~1\QBW32.EXE -silent
IgfxTray                             C:\Windows\system32\igfxtray.exe
HotKeysCmds                          C:\Windows\system32\hkcmd.exe
Persistence                          C:\Windows\system32\igfxpers.exe

AdAwareTray                          "C:\Program Files\Security\Ad-Aware\Ad-Aware Antivirus\11.8.586.8535\AdAwareTray.exe"

[/os/windows/commands/wmic] permanent link

Sun, Jan 10, 2016 11:40 pm

WMIC share get

If you need to obtain a list of shared resources on a Microsoft Windows system, such as shared folders, you can use a Windows Management Instrumentation Command-line (WMIC) command, wmic share get. E.g., wmic share get caption,name,path, which will show the share names on the system on which the command is issued and the full directory path for shared folders associated with those sharenames.

[ More Info ]

[/os/windows/commands/wmic] permanent link

Sat, Jan 09, 2016 11:05 pm

WMIC printer get

The Windows Management Instrumentation Command-line (WMIC) can be used to query the available printers for a system using wmic printer get. Parameters the command accepts are shown below:

c:\>wmic printer 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
========                                ====                    =========
Attributes                              N/A                     N/A
Availability                            N/A                     N/A
AvailableJobSheets                      N/A                     N/A
AveragePagesPerMinute                   N/A                     N/A
Capabilities                            N/A                     N/A
CapabilityDescriptions                  N/A                     N/A
Caption                                 N/A                     N/A
CharSetsSupported                       N/A                     N/A
Comment                                 N/A                     N/A
ConfigManagerErrorCode                  N/A                     N/A
ConfigManagerUserConfig                 N/A                     N/A
CurrentCapabilities                     N/A                     N/A
CurrentCharSet                          N/A                     N/A
CurrentLanguage                         N/A                     N/A
CurrentMimeType                         N/A                     N/A
CurrentNaturalLanguage                  N/A                     N/A
CurrentPaperType                        N/A                     N/A
Default                                 N/A                     N/A
DefaultCapabilities                     N/A                     N/A
DefaultCopies                           N/A                     N/A
DefaultLanguage                         N/A                     N/A
DefaultMimeType                         N/A                     N/A
DefaultNumberUp                         N/A                     N/A
DefaultPaperType                        N/A                     N/A
DefaultPriority                         N/A                     N/A
Description                             N/A                     N/A
DetectedErrorState                      N/A                     N/A
DeviceID                                N/A                     N/A
Direct                                  N/A                     N/A
DoCompleteFirst                         N/A                     N/A
DriverName                              N/A                     N/A
EnableBIDI                              N/A                     N/A
EnableDevQueryPrint                     N/A                     N/A
ErrorCleared                            N/A                     N/A
ErrorDescription                        N/A                     N/A
ErrorInformation                        N/A                     N/A
ExtendedDetectedErrorState              N/A                     N/A
ExtendedPrinterStatus                   N/A                     N/A
Hidden                                  N/A                     N/A
HorizontalResolution                    N/A                     N/A
InstallDate                             N/A                     N/A
JobCountSinceLastReset                  N/A                     N/A
KeepPrintedJobs                         N/A                     N/A
LanguagesSupported                      N/A                     N/A
LastErrorCode                           N/A                     N/A
Local                                   N/A                     N/A
Location                                N/A                     N/A
MarkingTechnology                       N/A                     N/A
MaxCopies                               N/A                     N/A
MaxNumberUp                             N/A                     N/A
MaxSizeSupported                        N/A                     N/A
MimeTypesSupported                      N/A                     N/A
Name                                    N/A                     N/A
PNPDeviceID                             N/A                     N/A
PaperSizesSupported                     N/A                     N/A
PortName                                N/A                     N/A
PowerManagementCapabilities             N/A                     N/A
PowerManagementSupported                N/A                     N/A
PrintJobDataType                        N/A                     N/A
PrintProcessor                          N/A                     N/A
PrinterPaperNames                       N/A                     N/A
PrinterState                            N/A                     N/A
PrinterStatus                           N/A                     N/A
SeparatorFile                           N/A                     N/A
ServerName                              N/A                     N/A
ShareName                               N/A                     N/A
SpoolEnabled                            N/A                     N/A
StartTime                               N/A                     N/A
Status                                  N/A                     N/A
StatusInfo                              N/A                     N/A
SystemName                              N/A                     N/A
TimeOfLastReset                         N/A                     N/A
UntilTime                               N/A                     N/A
VerticalResolution                      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) se
conds, 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 outp
ut.
Case1: If /TRANSLATE precedes /FORMAT, then translation of results will be follo
wed by formatting.
Case2: If /TRANSLATE succeeds /FORMAT, then translation of the formatted results
 will be done.

Some parameters may yield similar results, e.g., the results of a query for DeviceID, DriverName, and Name on one system are shown below:

c:\>wmic printer get DeviceID, Name
DeviceID                             Name
Send To OneNote 2010                 Send To OneNote 2010
Ricoh Aficio MP C2500 PCL5c          Ricoh Aficio MP C2500 PCL5c
Microsoft XPS Document Writer        Microsoft XPS Document Writer
HP Photosmart 6510 series (Network)  HP Photosmart 6510 series (Network)
HP Deskjet 6940 series               HP Deskjet 6940 series
Fax                                  Fax
Adobe PDF                            Adobe PDF

c:\>wmic printer get DeviceID, DriverName
DeviceID                             DriverName
Send To OneNote 2010                 Send To Microsoft OneNote 2010 Driver
Ricoh Aficio MP C2500 PCL5c          Ricoh Aficio MP C2500 PCL5c
Microsoft XPS Document Writer        Microsoft XPS Document Writer
HP Photosmart 6510 series (Network)  HP Photosmart 6510 series
HP Deskjet 6940 series               HP Deskjet 6940 series
Fax                                  Microsoft Shared Fax Driver
Adobe PDF                            Adobe PDF Converter

If I want to check the IP address for a printer, I can use PortName.

c:\>wmic printer get DeviceID, PortName
DeviceID                             PortName
Send To OneNote 2010                 nul:
Ricoh Aficio MP C2500 PCL5c          192.168.0.90
Microsoft XPS Document Writer        XPSPort:
HP Photosmart 6510 series (Network)  192.168.0.21
HP Deskjet 6940 series               192.168.0.9
Fax                                  SHRFAX:
Adobe PDF                            Documents\*.pdf


c:\>

If I just want the IP address for a particular printer I can specify it with where DeviceId="printer_deviceid PortName where printer_deviceid is that printer's device ID. I could also query based on Name, DriverName, etc.

c:\>wmic printer where DeviceID="HP Deskjet 6940 series" get PortName
PortName
192.168.0.9

To check the horizontal and vertical resolution, I can use HorizontalResolution and VerticalResolution:

c:\>wmic printer get DeviceID, HorizontalResolution, VerticalResolution
DeviceID                             HorizontalResolution  VerticalResolution
Send To OneNote 2010                 600                   600
Ricoh Aficio MP C2500 PCL5c          600                   600
Microsoft XPS Document Writer        600                   600
HP Photosmart 6510 series (Network)  600                   600
HP Deskjet 6940 series               600                   600
Fax                                  200                   200
Adobe PDF                            1200                  1200

If I want to see a sharename for a printer, i.e., the name used for a printer that is a shared resource for other computers on the network, I can use the ShareName parameter. E.g., the results for such a command issued on a Windows Server 2012 system showing a printer shared from another system in the Windows domain for which it is the domain controller:

C:\Users\Admin>wmic printer where portname="LPT3:" get deviceid, sharename
DeviceID                                                       ShareName
\\MERGENTHALER.IMAGINATION.local\HP LaserJet 5100 Series PCL6  CSR_HP_5100


C:\Users\Admin>

[/os/windows/commands/wmic] permanent link

Sat, Jan 02, 2016 10:48 pm

Using wmic to obtain model and serial numbers for Dell systems

If you wish to get the model number for a Dell system from a command line interface (CLI), i.e., a command prompt, you can use the wmic command wmic csproduct get vendor, name as shown below:

C:\Users>wmic csproduct get vendor,name
Name          Vendor
Inspiron 570  Dell Inc.

If you just wanted the model, you could use wmic csproduct get name .

Besides "vendor", you can also use "manufacturer" in a BIOS query with WMIC to see the system was manufactured by Dell.

C:\Users>wmic bios get manufacturer
Manufacturer
Dell Inc.


C:\Users>

For some Dell models, e.g., an Inspiron 620s, you can also get the service tag, which is the equivalent of a serial number for Dell systems, by issuing the command wmic bios get serialnumber.

C:\>wmic csproduct get vendor,name
Name           Vendor
Inspiron 620s  Dell Inc.


C:\>wmic bios get manufacturer, name, serialnumber
Manufacturer  Name                                        SerialNumber
Dell Inc.     BIOS Date: 11/21/11 10:52:35 Ver: 04.06.04  FP1QVR1

You will see in the above example that if you use "name" as a parameter for the wmic bios get command that, unlike with the wmic csproduct get name command, you see information for the BIOS, in this case the BIOS date and version number, rather than the model number for the system. But the serial number corresponds to the Dell service tag.

For some systems, you will see the manufacturer of the BIOS, such as Award Software listed when you issue a wmic bios get manufacturer command. E.g., the example below is for a custom-built system rather than one from Dell. For this system, there is no manufacturer assigning a serial number to the system. I can get the BIOS version by appending version to the wmic query.

C:\Users\Lee>wmic bios get manufacturer, version, serialnumber
Manufacturer                        SerialNumber  Version
Award Software International, Inc.                GBT    - 42302e31

For the Dell Inspiron 620s, I can use either the wmic bios get serialnumber or the wmic csproduct get identifyingnumber to get the Dell service tag.

C:\>wmic csproduct get vendor,name
Name           Vendor
Inspiron 620s  Dell Inc.


C:\>wmic bios get manufacturer, name, serialnumber
Manufacturer  Name                                        SerialNumber
Dell Inc.     BIOS Date: 11/21/11 10:52:35 Ver: 04.06.04  FP1QVR1


C:\>wmic csproduct get vendor,name,identifyingnumber
IdentifyingNumber  Name           Vendor
FP1QVR1            Inspiron 620s  Dell Inc.


C:\>

I found the commands also show the service tag on a Dell Latitude E6530 laptop, however, you won't be able to use those for all Dell computer models to get the service tag. E.g., a Dell Inspiron 570:

C:\Users>wmic csproduct get vendor,name,identifyingnumber
IdentifyingNumber  Name          Vendor
                   Inspiron 570  Dell Inc.


C:\Users>wmic bios get manufacturer, name, serialnumber
Manufacturer  Name                                        SerialNumber
Dell Inc.     BIOS Date: 09/02/10 15:02:26 Ver: 08.00.15


C:\Users>

You can use the same commands with computers from other manufacturers. E.g., the output from the same commands run on a Gateway system running Windows Small Business Server (SBS) 2003 is shown below (the Dell systems in the above examples were running Windows 7 Professional):

C:\Documents and Settings>wmic bios get manufacturer,name,serialnumber
Manufacturer              Name                                                        SerialNumber
American Megatrends Inc.  AMIBIOS (C)2001 American Megatrends Inc., Version 07.00.00  0032880113


C:\Documents and Settings>wmic csproduct get vendor,name,identifyingnumber
IdentifyingNumber  Name        Vendor
0032880113         920 Series  Gateway

And the output from an HP system running Windows Server 2012:

C:\Users\Admin>wmic bios get manufacturer, name, serialnumber
Manufacturer  Name                       SerialNumber
AMI           Ver: RED_807.ROM vRED8.07  MXU24202NE


C:\Users\Admin>wmic csproduct get vendor,name,identifyingnumber
IdentifyingNumber  Name     Vendor
MXU24202NE         p2-1310  Hewlett-Packard


C:\Users\Admin>

References:

  1. View DELL Service Tag and Express Service Code From Linux and Windows
    By: Ramesh Natarajan
    Date: October 24, 2008
    The Geek Stuff

[/os/windows/commands/wmic] permanent link

Tue, Oct 13, 2015 9:35 pm

Obtaining the model number and serial number for a HDD from the command line

If you wish to obtain the model number and serial number for a hard disk drive (HDD) from the command line on a Microsoft Windows system, you can use the Windows Management Instrumentation command line tool wmic at a command prompt or get-wmiobject -class win32_diskdrive from a Windows PowerShell prompt.

For wmic, you can use the following command:

C:\Users\JDoe\Documents>wmic diskdrive get caption, model, serialnumber
Caption                          Model                            SerialNumber

TOSHIBA MQ01ABD075               TOSHIBA MQ01ABD075               73RISBDFS

Seagate Backup+ Desk USB Device  Seagate Backup+ Desk USB Device  NA5J4H3R

In the above example, I also included the caption parameter to get a description for the drive that may help me more easily identify it, though in this case the caption information and the model information are the same. In the above case, the Toshiba drive is the internal drive in the system while the Seagate is an external, USB-attached drive.

To use PowerShell to obtain the same information, I could use the command below:

PS C:\Users\JDoe> get-wmiobject -class win32_diskdrive | format-table Caption, Model, SerialNumber

Caption                                 Model                                   SerialNumber
-------                                 -----                                   ------------
TOSHIBA MQ01ABD075                      TOSHIBA MQ01ABD075                                 73RISBDFS
Seagate Backup+ Desk USB Device         Seagate Backup+ Desk USB Device         NA5J4H3R

You can obtain much more information on drives in PowerShell with the get-wmiobject -class win32_diskdrive | format-list * command. If the drive supports Self-Monitoring, Analysis and Reporting Technology (SMART), you can use the status command to learn if the drive may be failing or is encountering problems that could lead to a drive failue.

PS C:\Users\Jim> get-wmiobject -class win32_diskdrive | format-table Caption, Model, Status, SerialNumber

Caption                       Model                         Status                        SerialNumber
-------                       -----                         ------                        ------------
TOSHIBA MQ01ABD075            TOSHIBA MQ01ABD075            Pred Fail                                73RISBDFS
Seagate Backup+ Desk USB D... Seagate Backup+ Desk USB D... OK                            NA5J4H3R

The Toshiba drive has a status of Pred Fail, which indicates a SMART-enabled hard disk may be functioning correctly, but a failure is predicted soon. You can also retrieve the status of a drive using the wmic command.

C:\Users\JDoe\Documents>wmic diskdrive get model, status, serialnumber
Model                            SerialNumber  Status
TOSHIBA MQ01ABD075               73RISBDFS     Pred Fail
Seagate Backup+ Desk USB Device  NA5J4H3R      OK

Other parameters you can use with wmic to obtain drive information, such as the capacity of the drive, etc., are listed at Using wmic to get disk drive information.

A PowerShell command that can be used to determine which drive the operating system considers to be drive zero, drive one, etc. is shown below:

PS C:\Users\JDoe> Get-WmiObject Win32_PhysicalMedia | Format-Table Tag, SerialNumber

Tag                                                         SerialNumber
---                                                         ------------
\\.\PHYSICALDRIVE0                                                     73RISBDFS
\\.\PHYSICALDRIVE1                                          NA5J4H3R
\\.\CDROM1
\\.\CDROM0

References:

  1. Physical disk status is not OK
    Microsoft Developer Network
  2. Disk Drive Dangers - SMART and WMI
    I Programmer - programming, reviews and projects
  3. Using wmic to get disk drive information
    Date: July 10, 2010
    MoonPoint Support

[/os/windows/commands/wmic] permanent link

Once You Know, You Newegg AliExpress by Alibaba.com

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo