WMI class for common powershell Data Types

Source: Internet
Author: User

WMI class for common powershell Data Types

 

Ps d: \> help * WMI *

Name category synopsis
--------------------
Gwmi alias get-wmiobject
IWMI alias invoke-wmimethod
Rwmi alias remove-wmiobject
Swmi alias set-wmiinstance
Get-wmiobject cmdlet gets instances of Windows Management Instrumentation (Wmi) classes or information about the available classes.
Invoke-wmimethod cmdlet CILS Windows Management Instrumentation (Wmi) methods.
Remove-wmiobject cmdlet deletes an instance of an existing Windows Management Instrumentation (Wmi) class.
Register-wmievent cmdlet subscribes to a Windows Management Instrumentation (Wmi) event.
Set-wmiinstance cmdlet creates or updates an instance of an existing Windows Management Instrumentation (Wmi) class.
About_wmi_cmdlets helpfile provides background information about Windows Management Instrumentation

 

Gwmi = Get-wmiobject

 

Ps d: \> Get-wmiobject <A Class Name of WMI>

 

For example, you want to get the PC disk information, you can use cmdlet

Ps d: \> Get-wmiobject

Cmdlet get-wmiobject at command pipeline position 1
Supply values for the following parameters:
Class:Win32_logicaldisk

DeviceID: C:
Drivetype: 3
Providername:
Freespace: 33891364864
Size: 786427244544
Volumename:

DeviceID: D:
Drivetype: 3
Providername:
Freespace: 43317985280
Size: 213668098048
Volumename:

DeviceID: F:
Drivetype: 5
Providername:
Freespace:
Size:
Volumename:

 

You can get all Class Name and related info from msdn,

Http://msdn.microsoft.com/en-us/library/windows/desktop/aa394554 (V = vs.85). aspx

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.