<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PowerShell Scripting with WMI Part 3</title>
	<atom:link href="http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.powershellpro.com</link>
	<description>Sharing the Experience</description>
	<lastBuildDate>Fri, 03 Feb 2012 08:09:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Lori</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/comment-page-1/#comment-1204</link>
		<dc:creator>Lori</dc:creator>
		<pubDate>Wed, 01 Feb 2012 02:29:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/#comment-1204</guid>
		<description>The output file path is also missing a &quot;\&quot; between the folder name and the file name.</description>
		<content:encoded><![CDATA[<p>The output file path is also missing a &#8220;\&#8221; between the folder name and the file name.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lori</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/comment-page-1/#comment-1203</link>
		<dc:creator>Lori</dc:creator>
		<pubDate>Wed, 01 Feb 2012 02:17:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/#comment-1203</guid>
		<description>In the first example, I think there is an error in the namespace. Should it be root\CIMV2? 

Thanks,
Lori</description>
		<content:encoded><![CDATA[<p>In the first example, I think there is an error in the namespace. Should it be root\CIMV2? </p>
<p>Thanks,<br />
Lori</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Budi Lee</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/comment-page-1/#comment-1074</link>
		<dc:creator>Budi Lee</dc:creator>
		<pubDate>Sun, 15 Jan 2012 04:39:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/#comment-1074</guid>
		<description>I am starting learning the Powershell, but have written lots of Unix Shell script as I am working with company that is doing tons of Microsoft stuff and somehow adapting my knowledge of Unix Shell to Powershell ... definitely lots of cool stuff you could do with Powershell and am now becoming Poshoholic.
Your article here are EXCELLENT and please keep on the good work as many people like me will definitely appreciate all the good examples and help from your good work. Thank you and best regards, B.Lee</description>
		<content:encoded><![CDATA[<p>I am starting learning the Powershell, but have written lots of Unix Shell script as I am working with company that is doing tons of Microsoft stuff and somehow adapting my knowledge of Unix Shell to Powershell &#8230; definitely lots of cool stuff you could do with Powershell and am now becoming Poshoholic.<br />
Your article here are EXCELLENT and please keep on the good work as many people like me will definitely appreciate all the good examples and help from your good work. Thank you and best regards, B.Lee</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/comment-page-1/#comment-700</link>
		<dc:creator>mark</dc:creator>
		<pubDate>Thu, 29 Sep 2011 19:57:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/#comment-700</guid>
		<description>Thanks a ton for taking the time to post this.  It helped out a lot.</description>
		<content:encoded><![CDATA[<p>Thanks a ton for taking the time to post this.  It helped out a lot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Huijari</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/comment-page-1/#comment-500</link>
		<dc:creator>Huijari</dc:creator>
		<pubDate>Tue, 06 Jul 2010 11:23:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/#comment-500</guid>
		<description>I think that for most applications using write-output in the script and piping the script to Tee-Object (ie. the original bios script with write-hosts replaced by write-outputs and then .\bios.ps1 &#124; Tee-Object my_output.txt) would suffice in getting the output both to screen and to a file. I&#039;m not sure whether the Tee-Object commandlet was available at the time of the writing of this tutorial, but at least now it is :) Coming from unix, &quot;tee&quot; was the first thing that popped into my mind while reading this and sure enough there was a similar commandlet available. See Get-Help Tee-Object. Cheers!</description>
		<content:encoded><![CDATA[<p>I think that for most applications using write-output in the script and piping the script to Tee-Object (ie. the original bios script with write-hosts replaced by write-outputs and then .\bios.ps1 | Tee-Object my_output.txt) would suffice in getting the output both to screen and to a file. I&#8217;m not sure whether the Tee-Object commandlet was available at the time of the writing of this tutorial, but at least now it is <img src='http://www.powershellpro.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Coming from unix, &#8220;tee&#8221; was the first thing that popped into my mind while reading this and sure enough there was a similar commandlet available. See Get-Help Tee-Object. Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Doe</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/comment-page-1/#comment-475</link>
		<dc:creator>John Doe</dc:creator>
		<pubDate>Fri, 14 May 2010 15:24:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/#comment-475</guid>
		<description>Get-WmiObject “win32_BIOS” &#124; ConvertTo-HTML -Property Name,Description,Status,Version `
-title “BIOS INFO” &#124; Format-Table -Auto &#124; Out-File “C:MyScriptsBIOSRptWeb.html”

That part of the Tut is not quite right. Or let&#039;s say the format-table is unnecessary because convertto-html always chooses table format. And, try to put in &quot;format-list&quot;, it won&#039;t work. To output the HTML as list you have to write just that:
ConvertTo-Html -As List
apart from that, great tut, helped me a lot. Thanx</description>
		<content:encoded><![CDATA[<p>Get-WmiObject “win32_BIOS” | ConvertTo-HTML -Property Name,Description,Status,Version `<br />
-title “BIOS INFO” | Format-Table -Auto | Out-File “C:MyScriptsBIOSRptWeb.html”</p>
<p>That part of the Tut is not quite right. Or let&#8217;s say the format-table is unnecessary because convertto-html always chooses table format. And, try to put in &#8220;format-list&#8221;, it won&#8217;t work. To output the HTML as list you have to write just that:<br />
ConvertTo-Html -As List<br />
apart from that, great tut, helped me a lot. Thanx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/comment-page-1/#comment-420</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Wed, 21 Oct 2009 19:27:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/#comment-420</guid>
		<description>Thanks so much for the tutorials, these are the best I&#039;ve found.  

With the knowledge learned from this I&#039;m trying to create a script that loads a text file of computers and queries for HD setttings and will output to a one page Excel document.  I&#039;m basically doing a nested loop and calling a function:

Function DiskInfo{
$colItems = Get-wmiObject -class “Win32_LogicalDisk” -namespace “root\CIMV2&quot;`
-computername $strComputer &#124;
% {
$introw += 1
$Sheet.Cells.Item($intRow,1) = $_.SystemName
$Sheet.Cells.Item($intRow,2) = $_.DeviceID
$Sheet.Cells.Item($intRow,3) = $_.Description
$Sheet.Cells.Item($intRow,4) = $_.FileSystem
$Sheet.Cells.Item($intRow,5) = $_.Size / 1GB
$Sheet.Cells.Item($intRow,6) = $_.FreeSpace / 1GB
}
$introw += 1
}


$arrComputers = get-Content -Path “C:\Computers.txt”
foreach ($strComputer in $arrComputers){Diskinfo}

Everything seems to work except &quot;$intRow = $intRow + 1&quot; only increments within the ForEach loop.  So every new computer overwrites the previous computer&#039;s output.

How do I pass the correct $inRow variable outside this loop?

Thanks</description>
		<content:encoded><![CDATA[<p>Thanks so much for the tutorials, these are the best I&#8217;ve found.  </p>
<p>With the knowledge learned from this I&#8217;m trying to create a script that loads a text file of computers and queries for HD setttings and will output to a one page Excel document.  I&#8217;m basically doing a nested loop and calling a function:</p>
<p>Function DiskInfo{<br />
$colItems = Get-wmiObject -class “Win32_LogicalDisk” -namespace “root\CIMV2&#8243;`<br />
-computername $strComputer |<br />
% {<br />
$introw += 1<br />
$Sheet.Cells.Item($intRow,1) = $_.SystemName<br />
$Sheet.Cells.Item($intRow,2) = $_.DeviceID<br />
$Sheet.Cells.Item($intRow,3) = $_.Description<br />
$Sheet.Cells.Item($intRow,4) = $_.FileSystem<br />
$Sheet.Cells.Item($intRow,5) = $_.Size / 1GB<br />
$Sheet.Cells.Item($intRow,6) = $_.FreeSpace / 1GB<br />
}<br />
$introw += 1<br />
}</p>
<p>$arrComputers = get-Content -Path “C:\Computers.txt”<br />
foreach ($strComputer in $arrComputers){Diskinfo}</p>
<p>Everything seems to work except &#8220;$intRow = $intRow + 1&#8243; only increments within the ForEach loop.  So every new computer overwrites the previous computer&#8217;s output.</p>
<p>How do I pass the correct $inRow variable outside this loop?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NevJam</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/comment-page-1/#comment-294</link>
		<dc:creator>NevJam</dc:creator>
		<pubDate>Wed, 11 Mar 2009 14:17:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/#comment-294</guid>
		<description>Thanks to you I now have script I run against my remote servers that gets wmi info for all sort like h/w, s/w, ip etc and dumps it in a .xls file.

Is there anyway you know of including information taken from the registry in this example?

Our OS where I work is patched using an update package. Each package has a version. This version information is stored within HKLM\SOFTWARE\Build and a key called Version stores the version info.

Is there anyway of running a wmi type script against remote registries and storing that info in a .xls? If not wmi perhaps there is another way of gleening info from remote registries using powershell?

Thanks.</description>
		<content:encoded><![CDATA[<p>Thanks to you I now have script I run against my remote servers that gets wmi info for all sort like h/w, s/w, ip etc and dumps it in a .xls file.</p>
<p>Is there anyway you know of including information taken from the registry in this example?</p>
<p>Our OS where I work is patched using an update package. Each package has a version. This version information is stored within HKLM\SOFTWARE\Build and a key called Version stores the version info.</p>
<p>Is there anyway of running a wmi type script against remote registries and storing that info in a .xls? If not wmi perhaps there is another way of gleening info from remote registries using powershell?</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NevJam</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/comment-page-1/#comment-274</link>
		<dc:creator>NevJam</dc:creator>
		<pubDate>Fri, 09 Jan 2009 10:58:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/#comment-274</guid>
		<description>Excellent Article. Two questions:
1. How do I use your output to CSV example without launching excel? I want to pump wmi data into a closed csv file which I can then import into an sql table.

2. I have tried the select-object example which works fine for locally, however if I try to run it on multiple servers using my dodgy scripting skills, my csv output is overwritten by the next server in the list. I can&#039;t seem to append the data:

$arrservers = get-Content -Path &quot;C:\ps\testServers.txt&quot;
foreach ($server in $arrservers){
Get-WmiObject Win32_ComputerSystem -computername $server &#124; Select-Object Name,TotalPhysicalMemory &#124; Export-CSV Meminfo.csv
}

Any help appreciated.
Thanks.</description>
		<content:encoded><![CDATA[<p>Excellent Article. Two questions:<br />
1. How do I use your output to CSV example without launching excel? I want to pump wmi data into a closed csv file which I can then import into an sql table.</p>
<p>2. I have tried the select-object example which works fine for locally, however if I try to run it on multiple servers using my dodgy scripting skills, my csv output is overwritten by the next server in the list. I can&#8217;t seem to append the data:</p>
<p>$arrservers = get-Content -Path &#8220;C:\ps\testServers.txt&#8221;<br />
foreach ($server in $arrservers){<br />
Get-WmiObject Win32_ComputerSystem -computername $server | Select-Object Name,TotalPhysicalMemory | Export-CSV Meminfo.csv<br />
}</p>
<p>Any help appreciated.<br />
Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos</title>
		<link>http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/comment-page-1/#comment-273</link>
		<dc:creator>Carlos</dc:creator>
		<pubDate>Wed, 07 Jan 2009 22:11:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.powershellpro.com/powershell-tutorial-introduction/wmi-part3/#comment-273</guid>
		<description>Very enlightening, I see some of the code snipets have typing errors but was able to correct them after first run. All in all, a great PowerShell primer.

Carlos.</description>
		<content:encoded><![CDATA[<p>Very enlightening, I see some of the code snipets have typing errors but was able to correct them after first run. All in all, a great PowerShell primer.</p>
<p>Carlos.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

