{"id":52783,"date":"2009-08-06T03:01:00","date_gmt":"2009-08-06T03:01:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/heyscriptingguy\/2009\/08\/06\/hey-scripting-guy-where-can-i-find-a-list-of-all-the-things-i-can-do-with-windows-powershell-and-wmi\/"},"modified":"2009-08-06T03:01:00","modified_gmt":"2009-08-06T03:01:00","slug":"hey-scripting-guy-where-can-i-find-a-list-of-all-the-things-i-can-do-with-windows-powershell-and-wmi","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/scripting\/hey-scripting-guy-where-can-i-find-a-list-of-all-the-things-i-can-do-with-windows-powershell-and-wmi\/","title":{"rendered":"Hey, Scripting Guy! Where Can I Find a List of All the Things I Can Do with Windows PowerShell and WMI?"},"content":{"rendered":"<p class=\"MsoNormal\">&nbsp;<\/p>\n<p class=\"MsoNormal\"><img decoding=\"async\" class=\"nearGraphic\" title=\"Hey, Scripting Guy! Question\" border=\"0\" alt=\"Hey, Scripting Guy! Question\" align=\"left\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/q-for-powertip.jpg\" width=\"34\" height=\"34\"><\/p>\n<p class=\"MsoNormal\">Hey, Scripting Guy! Using the <b>Get-Member<\/b> cmdlet with Windows PowerShell is pretty cool, but the one thing I do not like is the way that Windows PowerShell hides stuff from me. When I look in MSDN for information about a WMI class, I see all of these methods listed. When I use the <b>Get-Member<\/b><span>&nbsp; <\/span>cmdlet, some of the methods are not listed. So it seems that the WMI implementation in Windows PowerShell is incomplete. If this is the case, how can I find out where this stuff is documented? I would like to see a list of all the things I can do with Windows PowerShell and WMI. <\/p>\n<\/p>\n<p class=\"MsoNormal\">&#8212; DF<\/p>\n<p class=\"MsoNormal\"><span><img decoding=\"async\" class=\"nearGraphic\" title=\"Hey, Scripting Guy! Answer\" border=\"0\" alt=\"Hey, Scripting Guy! Answer\" align=\"left\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/29\/2019\/02\/a-for-powertip.jpg\" width=\"34\" height=\"34\"><\/span>Hello DF, <\/p>\n<p class=\"MsoNormal\">You already have the documentation. It is called (drumroll please) <a href=\"http:\/\/msdn.microsoft.com\/en-us\/default.aspx\"><font face=\"Segoe\">MSDN<\/font><\/a>. All of the information about our products can be found in the reference documentation on MSDN. You may also want to check out some of the various team blogs as well. There are two things you need to know about Windows Management Instrumentation (WMI). The first is that the WMI team does not write all the WMI classes. They develop the core technology, and the various teams at Microsoft create their own WMI providers and write their own WMI classes. When you go to the WMI documentation (the software development kit [SDK] on <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa394582(VS.85).aspx\"><font face=\"Segoe\">MSDN<\/font><\/a>), you only find information about the WMI core classes. For example, if you want to find out about the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/cc136992(VS.85).aspx\"><font face=\"Segoe\">WMI classes for Hyper-V<\/font><\/a>, you will find the documentation under virtualization<span>&mdash;<\/span>not under WMI. <\/p>\n<p class=\"MsoNormal\">But when you talk about hidden WMI class methods, you are not talking about hidden WMI documentation. You are talking about the way the information is supplied via the <b>Get-Member<\/b> cmdlet. Let&#8217;s take a common scenario: the <b>Win32_Process<\/b> cmdlet. This important WMI class has been <a href=\"http:\/\/blogs.technet.com\/heyscriptingguy\/search.aspx?q=win32_process&amp;p=1\"><font face=\"Segoe\">written about by Microsoft Scripting Guys<\/font><\/a> numerous times, and therefore our loyal informed readers know the things this class can do. It is also <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa394372(VS.85).aspx\"><font face=\"Segoe\">documented on MSDN<\/font><\/a> with the WMI core classes. As seen in Table 1, the Win32_Process WMI class exposes 6 methods. <\/p>\n<p class=\"TableNum-Title\"><strong>Table 1&emsp;Methods of the Win32_Process class<\/p>\n<p><\/strong><\/p>\n<table class=\"MsoNormalTable\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"312\">\n<p class=\"TableHead\"><strong>Method <\/p>\n<p><\/strong><\/p>\n<\/td>\n<td valign=\"top\" width=\"312\">\n<p class=\"TableHead\"><b>Description <\/p>\n<p><\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"312\">\n<p class=\"TableText\">AttachDebugger<\/p>\n<\/td>\n<td valign=\"top\" width=\"312\">\n<p class=\"TableText\">Launches the currently registered debugger for a process.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"312\">\n<p class=\"TableText\">Create <\/p>\n<\/td>\n<td valign=\"top\" width=\"312\">\n<p class=\"TableText\">Creates a new process.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"312\">\n<p class=\"TableText\">GetOwner<\/p>\n<\/td>\n<td valign=\"top\" width=\"312\">\n<p class=\"TableText\">Retrieves the user name and domain name under which the process is running.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"312\">\n<p class=\"TableText\">GetOwnerSid <\/p>\n<\/td>\n<td valign=\"top\" width=\"312\">\n<p class=\"TableText\">Retrieves the security identifier (SID) for the owner of a process.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"312\">\n<p class=\"TableText\">SetPriority <\/p>\n<\/td>\n<td valign=\"top\" width=\"312\">\n<p class=\"TableText\">Changes the execution priority of a process.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" width=\"312\">\n<p class=\"TableText\">Terminate <\/p>\n<\/td>\n<td valign=\"top\" width=\"312\">\n<p class=\"TableText\">Terminates a process and all of its threads.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"MsoNormal\">\n<p>&nbsp;<\/p>\n<\/p>\n<p class=\"MsoNormal\">When you use the <b>Get-Member<\/b> cmdlet to examine the methods of the <b>Win32_Process<\/b> WMI class, you see only five methods that are returned. As seen here, the <b>Create<\/b> method is missing: <\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">PS C:&gt; Get-WmiObject -Class win32_process | Get-Member -MemberType method<\/p>\n<p><br><span>&nbsp;&nbsp; <\/span>TypeName: System.Management.ManagementObject#rootcimv2Win32_Process<\/p>\n<p>Name<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>MemberType Definition<br>&#8212;-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<br>AttachDebugger Method<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>System.Management.ManagementBaseObject AttachDebug&#8230;<br>GetOwner<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Method<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>System.Management.ManagementBaseObject GetOwner()<br>GetOwnerSid <span>&nbsp;&nbsp;&nbsp;<\/span>Method<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>System.Management.ManagementBaseObject GetOwnerSid()<br>SetPriority<span>&nbsp;&nbsp;&nbsp; <\/span>Method<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>System.Management.ManagementBaseObject SetPriority&#8230;<br>Terminate<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Method<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>System.Management.ManagementBaseObject Terminate(S&#8230;<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"MsoNormal\">A clue can be obtained by using the Method Editor from the Windows Management Instrumentation Tester (WbemTest). For more information about using WbemTest, refer to <a href=\"http:\/\/blogs.technet.com\/heyscriptingguy\/archive\/2009\/08\/05\/hey-scripting-guy-can-windows-powershell-call-wmi-methods.aspx\"><span>yesterday&rsquo;s Hey, Scripting Guy! article<\/span><\/a>. <\/p>\n<p class=\"MsoNormal\">As seen in the following image, the <b>Create<\/b> method has the <b>Static<\/b> qualifier.<\/p>\n<p class=\"Fig-Graphic\">\n<p><img decoding=\"async\" title=\"Image of the Create method with the Static qualifier\" alt=\"Image of the Create method with the Static qualifier\" src=\"http:\/\/img.microsoft.com\/library\/media\/1033\/technet\/images\/scriptcenter\/qanda\/hsg\/2009\/august\/hey0806\/hsg-08-06-09-01.jpg\" width=\"482\" height=\"270\"><a href=\"http:\/\/img.microsoft.com\/library\/media\/1033\/technet\/images\/scriptcenter\/qanda\/hsg\/2009\/august\/hey0806\/hsg-08-06-09-01.jpg\"><\/a><\/p>\n<\/p>\n<p class=\"MsoNormal\"><br>Armed with the fact that the <b>Create<\/b> method is a static method from the <b>Win32_Process<\/b> WMI class, you might be tempted to once again return to the <b>Get-Member<\/b> cmdlet, this time to retrieve static methods. To retrieve static methods, you use the <b>MemberType<\/b> parameter and choose methods and the static switch. This is seen here: <\/p>\n<p class=\"CodeBlock\"><font face=\"Lucida Sans Typewriter\"><span>PS C:&gt; Get-WmiObject -Class win32_process | Get-Member -MemberType method -Stat<br>ic<\/p>\n<p><br><span>&nbsp;&nbsp; <\/span>TypeName: System.Management.ManagementObject<\/p>\n<p>Name<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>MemberType Definition<br>&#8212;-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<br>Equals<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Method<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>static bool Equals(System.Object objA, System.Obj&#8230;<br>ReferenceEquals Method<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>static bool ReferenceEquals(System.Object objA, S&#8230;<\/span><span><\/p>\n<p><\/span><\/font><\/p>\n<p class=\"MsoNormal\">Unfortunately, the two static methods that are returned by the <b>Get-Member<\/b> cmdlet do not solve our problem. In fact the two static methods that are returned by <b>Get-Member<\/b> do not even appear in the MSDN documentation for the <b>Win32_Process<\/b> WMI class (this is because they are inherited from the <b>System.Object<\/b> .NET Framework class). <\/p>\n<p class=\"MsoNormal\">What have we discovered so far? We have seen that the WbemTest utility states that the <b>Create<\/b> method from the <b>Win32_Process<\/b> WMI class is a static method. We have also seen that the <b>Get-Member<\/b> cmdlet did not appear to find the <b>Create<\/b> method. The reason that the <b>Get-Member<\/b> cmdlet did not find the <b>Create<\/b> method is that the <b>Get-WmiObject<\/b> cmdlet returns instances of <b>Win32_Processes<\/b>. This is seen here: <\/p>\n<p class=\"CodeBlock\"><font face=\"Lucida Sans Typewriter\"><span>PS C:&gt; Get-WmiObject -Class win32_process | Select-Object -Property name<\/p>\n<p>name<br>&#8212;-<br>System Idle Process<br>System<br>smss.exe<br>csrss.exe<br>wininit.exe<br>csrss.exe<br>winlogon.exe<br>services.exe<br>lsass.exe<br>lsm.exe<br>svchost.exe<br>svchost.exe<br>svchost.exe<br>svchost.exe<br>svchost.exe<br>SLsvc.exe<br>svchost.exe<br>svchost.exe<br>svchost.exe<br>spoolsv.exe<br>svchost.exe<br>vmsrvc.exe<br>inetinfo.exe<br>svchost.exe<br>vpcmap.exe<br>taskeng.exe<br>SearchIndexer.exe<br>taskeng.exe<br>dwm.exe<br>explorer.exe<br>vmusrvc.exe<br>SnagIt32.exe<br>TscHelp.exe<br>SnagPriv.exe<br>SnagItEditor.exe<br>powershell.exe<br>WmiPrvSE.exe<\/span><span><\/p>\n<p><\/span><\/font><\/p>\n<p class=\"MsoNormal\">Each of the objects that are returned by the <b>Get-WmiObject<\/b> cmdlet is an instance of a <b>Win32_Process<\/b> WMI class. It makes sense that an instance of a WMI class cannot be used to create an instance of a class. We need to move up one step in the WMI hierarchy. We need to move to the class itself, not to an instance of the class. This process is true, whether you are using the <b>Get-WmiObject<\/b> cmdlet from Windows PowerShell, or whether you are using the <a href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/scripts\/os\/process\/procthd\/pcthvb03.mspx\"><font face=\"Segoe\">GetObject method from VBScript<\/font><\/a>. To try to keep things in perspective, you can think of using the <b>Get-WmiObject<\/b> cmdlet in a similar fashion to the way you used the <b>ExecQuery<\/b> method from within VBScript. You can certainly use the <b>ExecQuery<\/b> method from VBScript to return a collection of processes that match the name &#8220;Notepad&#8221; and you can certainly <a href=\"http:\/\/www.microsoft.com\/technet\/scriptcenter\/scripts\/os\/process\/procthd\/pcthvb09.mspx\"><font face=\"Segoe\">call the terminate method to stop such a process<\/font><\/a>. This process makes sense because you are working with an instance of the <b>Win32_Process<\/b> class. You want to terminate an instance of the class. Terminating a process named &ldquo;Notepad&rdquo; can be as easy as using a WMI query that retrieves a single instance of the class and calling the <b>terminate<\/b> method. If the query returns more than one instance of the <b>Win32_Process<\/b> class, you will need to use the <b>Foreach-Object<\/b> cmdlet to walk through the collection. This is seen here: <\/p>\n<p class=\"CodeBlock\"><font face=\"Lucida Sans Typewriter\"><span>PS C:&gt; (Get-WmiObject -Class win32_process -Filter &#8220;name = &#8216;notepad.exe'&#8221;).Term<br>inate()<\/p>\n<p><br>__GENUS<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: 2<br>__CLASS<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: __PARAMETERS<br>__SUPERCLASS<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>:<br>__DYNASTY<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: __PARAMETERS<br>__RELPATH<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>:<br>__PROPERTY_COUNT : 1<br>__DERIVATION<span>&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: {}<br>__SERVER<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>:<br>__NAMESPACE<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>:<br>__PATH<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>:<br>ReturnValue<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: 0<\/span><span><\/p>\n<p><\/span><\/font><\/p>\n<p class=\"MsoNormal\">All this might make you wonder where the hidden WMI methods are. The key to finding the hidden WMI methods is understanding if the method is an instance method or if it is a static WMI method. If the method is an instance method, it is available directly from within using the <b>Get-WmiObject<\/b>, in the same way the methods were available from VBScript using the <b>ExecQuery<\/b> method. The method operates on an instance of the WMI class. If the method is a static WMI method, you will need to use the <b>[wmiclass]<\/b> type accelerator. This is similar to the way you had to use a different syntax in VBScript to call the class methods. In Windows PowerShell, you use the <b>[wmiclass]<\/b> type accelerator to retrieve the WMI class&mdash;not an instance of the class. To retrieve the class, you use <b>[wmiclass]<\/b> and the WMI class name. This is seen here: <\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">PS C:&gt; [wmiclass]&#8221;Win32_process&#8221;<\/p>\n<p><br><span>&nbsp;&nbsp; <\/span>NameSpace: ROOTcimv2<\/p>\n<p>Name<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Methods<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Properties<br>&#8212;-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>&#8212;&#8212;-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span>&#8212;&#8212;&#8212;-<br>Win32_Process<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>{Create, Terminat&#8230; {Caption, CommandLi&#8230;<\/p>\n<p><\/font><\/span><\/p>\n<p class=\"MsoNormal\">You can think of it as casting a string into a WMI class, or you can think of it as a type accelerator because it makes it easy to get access to the WMI class. After you have the WMI class, you can send it to <b>Get-Member<\/b> as seen here: <\/p>\n<p class=\"CodeBlock\"><span><font face=\"Lucida Sans Typewriter\">PS C:&gt; [wmiclass]&#8221;Win32_process&#8221; | Get-Member<\/p>\n<p><br><span>&nbsp;&nbsp; <\/span>TypeName: System.Management.ManagementClass#ROOTcimv2Win32_Process<\/p>\n<p>Name<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>MemberType<span>&nbsp;&nbsp;&nbsp; <\/span>Definition<br>&#8212;-<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span>&#8212;&#8212;&#8212;-<span>&nbsp;&nbsp;&nbsp; <\/span>&#8212;&#8212;&#8212;-<br>Name<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>AliasProperty Name = __Class<br>Create<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Method<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>System.Management.ManagementBaseObject Cre&#8230;<br>__CLASS<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Property<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>System.String __CLASS {get;set;}<br>__DERIVATION<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Property<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>System.String[] __DERIVATION {get;set;}<br>__DYNASTY<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Property<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>System.String __DYNASTY {get;set;}<br>__GENUS<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Property<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>System.Int32 __GENUS {get;set;}<br>__NAMESPACE<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Property<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>System.String __NAMESPACE {get;set;}<br>__PATH<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Property<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>System.String __PATH {get;set;}<br>__PROPERTY_COUNT<span>&nbsp;&nbsp;&nbsp; <\/span>Property<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>System.Int32 __PROPERTY_COUNT {get;set;}<br>__RELPATH<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Property<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>System.String __RELPATH {get;set;}<br>__SERVER<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Property<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>System.String __SERVER {get;set;}<br>__SUPERCLASS<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>Property<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>System.String __SUPERCLASS {get;set;}<br>ConvertFromDateTime ScriptMethod<span>&nbsp; <\/span>System.Object ConvertFromDateTime();<br>ConvertToDateTime<span>&nbsp;&nbsp; <\/span>ScriptMethod<span>&nbsp; <\/span>System.Object ConvertToDateTime();<\/font><\/span><span><\/p>\n<p><\/span><\/p>\n<p class=\"MsoNormal\">The only WMI method that is seen is the <b>Create<\/b> method. The remaining properties are all system properties. There are two <b>scriptMethods<\/b> that were added by Windows PowerShell team to the object. To use the <b>create<\/b> method, you can call the method directly from the class as seen here: <\/p>\n<p class=\"CodeBlock\"><font face=\"Lucida Sans Typewriter\"><span>PS C:&gt; ([wmiclass]&#8221;Win32_process&#8221;).Create(&#8220;notepad&#8221;)<\/p>\n<p><br>__GENUS<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>: 2<br>__CLASS<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><\/span><\/font><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Hey, Scripting Guy! Using the Get-Member cmdlet with Windows PowerShell is pretty cool, but the one thing I do not like is the way that Windows PowerShell hides stuff from me. When I look in MSDN for information about a WMI class, I see all of these methods listed. When I use the Get-Member&nbsp; [&hellip;]<\/p>\n","protected":false},"author":595,"featured_media":87096,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[3,4,45,6],"class_list":["post-52783","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-scripting","tag-scripting-guy","tag-scripting-techniques","tag-windows-powershell","tag-wmi"],"acf":[],"blog_post_summary":"<p>&nbsp; Hey, Scripting Guy! Using the Get-Member cmdlet with Windows PowerShell is pretty cool, but the one thing I do not like is the way that Windows PowerShell hides stuff from me. When I look in MSDN for information about a WMI class, I see all of these methods listed. When I use the Get-Member&nbsp; [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/52783","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/users\/595"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/comments?post=52783"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/posts\/52783\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media\/87096"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/media?parent=52783"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/categories?post=52783"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/scripting\/wp-json\/wp\/v2\/tags?post=52783"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}