<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>PowerTip: Using Parameters with the Get-WmiObject PowerShell Cmdlet</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/08/09/powertip-using-parameters-with-the-get-wmiobject-powershell-cmdlet.aspx</link><description>Summary : Use parameters with the Get-WmiObject cmdlet</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: PowerTip: Using Parameters with the Get-WmiObject PowerShell Cmdlet</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/08/09/powertip-using-parameters-with-the-get-wmiobject-powershell-cmdlet.aspx#3520233</link><pubDate>Fri, 14 Sep 2012 16:53:08 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3520233</guid><dc:creator>CoolDBA</dc:creator><description>&lt;p&gt;I am trying to retrieve the disk usage information for the list of SQL servers(a,b,c,d....) using following command&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;$serverlist = get-content &amp;#39;D:\APPS\Serverlist.txt&amp;#39; &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;foreach($server in $serverlist)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Get-WmiObject Win32_Volume &amp;nbsp;-ComputerName $server | Select-Object SystemName,Label,Name,DriveLetter,DriveType,Capacity,Freespace&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; For 4 weeks it executed fine and &amp;nbsp;generated the disk usage report for all the servers.&lt;/p&gt;
&lt;p&gt; but suddenly &amp;nbsp;it started generating &amp;nbsp;error for one of the server as shown below:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Get-WmiObject : Provider load failure &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;At line:1 char:14&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ Get-WmiObject &amp;lt;&amp;lt;&amp;lt;&amp;lt; &amp;nbsp;Win32_Volume &amp;nbsp;-ComputerName &amp;#39;d&amp;#39; | Select-Object SystemName,Label,Name,DriveLetter,DriveType,Capacity,Freespace&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ CategoryInfo &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: InvalidOperation: (:) [Get-WmiObject], ManagementException&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt; I was not able to find any answer on web for this error. Whatever is available is only for Win32_Reliability , not for Win32_Volume.&lt;/p&gt;
&lt;p&gt; Does anybody faced such kind of issue ?&lt;/p&gt;
&lt;p&gt; Please help me resolving this issue.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3520233" width="1" height="1"&gt;</description></item><item><title>re: PowerTip: Using Parameters with the Get-WmiObject PowerShell Cmdlet</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/08/09/powertip-using-parameters-with-the-get-wmiobject-powershell-cmdlet.aspx#3513699</link><pubDate>Fri, 10 Aug 2012 16:43:30 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3513699</guid><dc:creator>Ed WIlson</dc:creator><description>&lt;p&gt;@RLToscano you are welcome. I am glad you enjoy it.&lt;/p&gt;
&lt;p&gt;@JRV you are right ... glad you like the tip&lt;/p&gt;
&lt;p&gt;@K_Schulte you are correct. I LOVE WMI ... especially the way that PowerShell exposes WMI. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3513699" width="1" height="1"&gt;</description></item><item><title>re: PowerTip: Using Parameters with the Get-WmiObject PowerShell Cmdlet</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/08/09/powertip-using-parameters-with-the-get-wmiobject-powershell-cmdlet.aspx#3513586</link><pubDate>Fri, 10 Aug 2012 06:59:58 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3513586</guid><dc:creator>K_Schulte</dc:creator><description>&lt;p&gt;GWMI rocks :-)&lt;/p&gt;
&lt;p&gt;Klaus.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3513586" width="1" height="1"&gt;</description></item><item><title>re: PowerTip: Using Parameters with the Get-WmiObject PowerShell Cmdlet</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/08/09/powertip-using-parameters-with-the-get-wmiobject-powershell-cmdlet.aspx#3513505</link><pubDate>Thu, 09 Aug 2012 20:48:36 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3513505</guid><dc:creator>jrv</dc:creator><description>&lt;p&gt;Excellent. Iti s the &amp;#39;propewrty&amp;quot; parameter that allows us to programmticale select the properties very easily.&lt;/p&gt;
&lt;p&gt;$props=&amp;#39;name&amp;#39;,&amp;#39;version&amp;#39;&lt;/p&gt;
&lt;p&gt;$props[0]&lt;/p&gt;
&lt;p&gt;$props[1]&lt;/p&gt;
&lt;p&gt;Get-WmiObject &amp;nbsp;win32_bios -Property $props|select -expand properties|select name,value|ft -auto&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3513505" width="1" height="1"&gt;</description></item><item><title>re: PowerTip: Using Parameters with the Get-WmiObject PowerShell Cmdlet</title><link>http://blogs.technet.com/b/heyscriptingguy/archive/2012/08/09/powertip-using-parameters-with-the-get-wmiobject-powershell-cmdlet.aspx#3513501</link><pubDate>Thu, 09 Aug 2012 20:43:29 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3513501</guid><dc:creator>RLToscano</dc:creator><description>&lt;p&gt;Thx for the nice tip! &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3513501" width="1" height="1"&gt;</description></item></channel></rss>