PowerShell Logo Small

Get-WmiObject



This is the built-in help made by Microsoft for the command 'Get-WmiObject', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Gets instances of Windows Management Instrumentation (WMI) classes or information about the available classes.

SYNTAX


Get-WmiObject [-Class] <String> [[-Property] [<String[]>]] [-Amended] [-AsJob] [-Authentication {Default | None | Connect | Call | Packet | PacketIntegrity | PacketPrivacy |
Unchanged}] [-Authority [<String>]] [-ComputerName [<String[]>]] [-Credential [<PSCredential>]] [-DirectRead] [-EnableAllPrivileges] [-Filter [<String>]] [-Impersonation
{Default | Anonymous | Identify | Impersonate | Delegate}] [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable
[<System.String>]] [-Locale [<String>]] [-Namespace [<String>]] [-ThrottleLimit [<Int32>]] [<CommonParameters>]
Get-WmiObject [-Amended] [-AsJob] [-Authentication {Default | None | Connect | Call | Packet | PacketIntegrity | PacketPrivacy | Unchanged}] [-Authority [<String>]]
[-ComputerName [<String[]>]] [-Credential [<PSCredential>]] [-EnableAllPrivileges] [-Impersonation {Default | Anonymous | Identify | Impersonate | Delegate}]
[-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] [-Locale [<String>]] [-Namespace [<String>]]
[-ThrottleLimit [<Int32>]] [<CommonParameters>]
Get-WmiObject [-Amended] [-AsJob] [-Authentication {Default | None | Connect | Call | Packet | PacketIntegrity | PacketPrivacy | Unchanged}] [-Authority [<String>]]
[-ComputerName [<String[]>]] [-Credential [<PSCredential>]] [-EnableAllPrivileges] [-Impersonation {Default | Anonymous | Identify | Impersonate | Delegate}]
[-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] [-Locale [<String>]] [-Namespace [<String>]]
[-ThrottleLimit [<Int32>]] [<CommonParameters>]
Get-WmiObject [[-Class] <String>] [-Amended] [-AsJob] [-Authentication {Default | None | Connect | Call | Packet | PacketIntegrity | PacketPrivacy | Unchanged}] [-Authority
[<String>]] [-ComputerName [<String[]>]] [-Credential [<PSCredential>]] [-EnableAllPrivileges] [-Impersonation {Default | Anonymous | Identify | Impersonate | Delegate}]
[-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] [-List] [-Locale [<String>]] [-Namespace
[<String>]] [-Recurse] [-ThrottleLimit [<Int32>]] [<CommonParameters>]
Get-WmiObject [-Amended] [-AsJob] [-Authentication {Default | None | Connect | Call | Packet | PacketIntegrity | PacketPrivacy | Unchanged}] [-Authority [<String>]]
[-ComputerName [<String[]>]] [-Credential [<PSCredential>]] [-DirectRead] [-EnableAllPrivileges] [-Impersonation {Default | Anonymous | Identify | Impersonate | Delegate}]
[-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] [-Locale [<String>]] [-Namespace [<String>]]
[-ThrottleLimit [<Int32>]] -Query <String> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


Starting in Windows PowerShell 3.0, this cmdlet has been superseded by Get-CimInstance.


The Get-WmiObject cmdlet gets instances of WMI classes or information about the available WMI classes. To specify a remote computer, use the ComputerName parameter. If the
List parameter is specified, the cmdlet gets information about the WMI classes that are available in a specified namespace. If the Query parameter is specified, the cmdlet
runs a WMI query language (WQL) statement.


The Get-WmiObject cmdlet does not use Windows PowerShell remoting to perform remote operations. You can use the ComputerName parameter of the Get-WmiObject cmdlet even if
your computer does not meet the requirements for Windows PowerShell remoting or is not configured for remoting in Windows PowerShell.


Beginning in Windows PowerShell 3.0, the __Server property of the object that Get-WmiObject returns has a PSComputerName alias. This makes it easier to include the source
computer name in output and reports.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=290505
Get-WSManInstance
Invoke-WSManAction
New-WSManInstance
Remove-WSManInstance
Invoke-WmiMethod
Remove-WmiObject
Set-WmiInstance

REMARKS

<

Examples


-------------------------- EXAMPLE 1 --------------------------

PS C:\>Get-WmiObject -Class Win32_Process



This command get the processes on the local computer.






-------------------------- EXAMPLE 2 --------------------------

PS C:\>Get-WmiObject -Class Win32_Service -ComputerName 127.0.0.1



This command gets the services on a remote computer. It uses the ComputerName parameter to specify the Internet Protocol (IP) address, 127.0.0.1. By default, the current
account must be a member of the Administrators group on the remote computer.






-------------------------- EXAMPLE 3 --------------------------

PS C:\>Get-WmiObject -Namespace "root/default" -List



This command gets the WMI classes in the root or default namespace of the local computer.






-------------------------- EXAMPLE 4 --------------------------

PS C:\>Get-WmiObject -Query "select * from win32_service where name='WinRM'" -ComputerName Server01, Server02 | Format-List -Property PSComputerName, Name, ExitCode, Name,
ProcessID, StartMode, State, Status
PSComputerName : SERVER01
Name : WinRM
ExitCode : 0
Name : WinRM
ProcessID : 844
StartMode : Auto
State : Running
Status : OK

PSComputerName : SERVER02
Name : WinRM
ExitCode : 0
Name : WinRM
ProcessID : 932
StartMode : Auto
State : Running
Status : OK



This command gets the WinRM service on the computers that are specified by the value of the ComputerName parameter.

A pipeline operator (|) sends the output to the Format-List cmdlet, which adds the PSComputerName property to the default output. This makes it easy to see the computer on
which the service resides.

PSComputerName is an alias of the __Server property of the objects that Get-WmiObject returns. This alias is introduced in Windows PowerShell 3.0.






-------------------------- EXAMPLE 5 --------------------------

PS C:\>(Get-WmiObject -Class Win32_Service -Filter "name='WinRM'" -ComputerName Server01).StopService()



This command stops the WinRM service on the Server01 remote computer. The command uses a Get-WmiObject command to get the WinRM service on Server01. Then, it invokes the
StopService method of the Win32_Service WMI class on the object that the Get-WmiObject command returns.

This command is an alternative to using the Stop-Service cmdlet.






-------------------------- EXAMPLE 6 --------------------------

PS C:\>Get-WmiObject -Class Win32_Bios | Format-List -Property
Status : OK
Name : Phoenix ROM BIOS PLUS Version 1.10 A05
Caption : Phoenix ROM BIOS PLUS Version 1.10 A05
SMBIOSPresent : True
__GENUS : 2
__CLASS : Win32_BIOS
__SUPERCLASS : CIM_BIOSElement
__DYNASTY : CIM_ManagedSystemElement
__RELPATH : Win32_BIOS.Name="Phoenix ROM BIOS PLUS Version 1.10 …
__PROPERTY_COUNT : 27
__DERIVATION : {CIM_BIOSElement, CIM_SoftwareElement, CIM_LogicalElement,…
__SERVER : Server01
__NAMESPACE : root\cimv2
__PATH : \\SERVER01\root\cimv2:Win32_BIOS.Name="Phoenix ROM BIOS
BiosCharacteristics : {7, 9, 10, 11...}
BIOSVersion : {DELL - 15, Phoenix ROM BIOS PLUS Version 1.10 A05}
BuildNumber :
CodeSet :
CurrentLanguage : en|US|iso8859-1
Description : Phoenix ROM BIOS PLUS Version 1.10 A05
IdentificationCode :
InstallableLanguages : 1
InstallDate :
LanguageEdition :
ListOfLanguages : {en|US|iso8859-1}
Manufacturer : Dell Inc.
OtherTargetOS :
PrimaryBIOS : True
ReleaseDate : 20101103000000.000000+000
SerialNumber : 8VDM9P1
SMBIOSBIOSVersion : A05
SMBIOSMajorVersion : 2
SMBIOSMinorVersion : 6SoftwareElementID : Phoenix ROM BIOS PLUS Version 1.10 A05
SoftwareElementState : 3
TargetOperatingSystem : 0
Version : DELL - 15
Scope : System.Management.ManagementScope
Path : \\SERVER01\root\cimv2:Win32_BIOS.Name="Phoenix ROM BIOS
Options : System.Management.ObjectGetOptions
ClassPath : \\JUNE-PC\root\cimv2:Win32_BIOS
Properties : {BiosCharacteristics, BIOSVersion, BuildNumber, Caption...}
SystemProperties : {__GENUS, __CLASS, __SUPERCLASS, __DYNASTY...}
Qualifiers : {dynamic, Locale, provider, UUID}
Site :
Container :



This command gets the BIOS on the local computer. The command uses a value of all (*) for the Property parameter of the Format-List cmdlet to display all properties of the
returned object in a list. By default, only a subset (defined in the Types.ps1xml configuration file) are displayed.






-------------------------- EXAMPLE 7 --------------------------

PS C:\>Get-WmiObject Win32_Service -Credential FABRIKAM\administrator Computer Fabrikam



This command uses the Credential parameter of the Get-WmiObject cmdlet to get the services on a remote computer. The value of the Credential parameter is a user account
name. The user is prompted for a password.