Hello,
I am new to Power Shell , and I try to learn its syntax and functionalities.
I am trying to understand the Get_WmiObject syntax and usage from the Microsoft web site (https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-wmiobject?view=powershell-5.1)
Get instances or information of the Windows management Instruction or (WMI) is defined as
Get-WmiObject
[-Class] <String>
[[-Property] <String[]>]
[-Filter <String>]
[-Amended]
[-DirectRead]
[-AsJob]
[-Impersonation <ImpersonationLevel>]
[-Authentication <AuthenticationLevel>]
[-Locale <String>]
[-EnableAllPrivileges]
[-Authority <String>]
[-Credential <PSCredential>]
[-ThrottleLimit <Int32>]
[-ComputerName <String[]>]
[-Namespace <String>]
[<CommonParameters>]
I have few question regarding the defined WMI class and I would like to seek your helps and expertise.
1) Does the Get-WmiObject [-Class] <String> represent a instance of a class in the Get-WmiObject ,
and is the instance of that class of type String ?
2) Since There are multiple instances of the WMI class , Is it possible to get the list of all instances of the WMI class ?
Would the following command work for getting all of the instances of the WMI class ?
Get Help Get-WmiObject -Class
I tried it and it gave me the following error message :
get : The term 'get' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At line:1 char:1
+ get help Get-WmiObject -class
+ ~~~
+ CategoryInfo : ObjectNotFound: (get:String) [], CommandNotFound
Exception
+ FullyQualifiedErrorId : CommandNotFoundException
Since it does not work, May I ask if there is a way to get all instances of the WMI class ?
Many Thanks for all of the helps.
Student at Georgia Tech