MoonPoint Support Logo

 


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



Advanced Search
November
Sun Mon Tue Wed Thu Fri Sat
     
21 22 23 24 25
26 27 28 29 30    
2017
Months
NovDec


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

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

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