<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwizguide.com/rss_namespace/">
 <channel>
  <title>ScriptingAnswers Forums</title>
  <link>http://www.sapien.com/forums/scriptinganswers/</link>
  <description>This is an XML content feed of; ScriptingAnswers Forums : Last 10 Posts</description>
  <pubDate>Wed, 22 Feb 2012 19:23:48 +0000</pubDate>
  <lastBuildDate>Wed, 22 Feb 2012 12:27:34 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.0</generator>
  <ttl>30</ttl>
  <WebWizForums:feedURL>www.sapien.com/forums/scriptinganswers/RSS_topic_feed.asp</WebWizForums:feedURL>
  <image>
   <title>ScriptingAnswers Forums</title>
   <url>http://www.sapien.com/forums/scriptinganswers/forum_images/web_wiz_forums.png</url>
   <link>http://www.sapien.com/forums/scriptinganswers/</link>
  </image>
  <item>
   <title>VBScript : NIC Power Management</title>
   <link>http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4950&amp;PID=31275#31275</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.sapien.com/forums/scriptinganswers/member_profile.asp?PF=2491" rel="nofollow">jvierra</a><br /><strong>Subject:</strong> NIC Power Management<br /><strong>Posted:</strong> 22 Feb 2012 at 12:27<br /><br />After looking at this code for awhile I can see that it will never work.&nbsp; The location of teh PnP driver information will never be stable.&nbsp; The 'Class' key is a collection that has to be enumerated.<DIV>&nbsp;</DIV><DIV>Most of this is why we usually are required to use the vendors configuration utilities.</DIV><DIV>&nbsp;</DIV><DIV>There is a utility that works on most newer adapters called PowerCfg</DIV><DIV>&nbsp;</DIV><DIV>This will tell you if your device is programmabe.</DIV><DIV><strong>powercfg /DEVICEQUERY wake_programmable</strong></DIV><DIV>&nbsp;</DIV><DIV>This will enable the device assuming it is programmable.</DIV><DIV><strong>powercfg /DEVICEENABLEWAKE "compliant device id"</strong></DIV><DIV>&nbsp;</DIV><DIV>This utility uses APIs that are not available to scripting to resolve device configuration.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 22 Feb 2012 12:27:34 +0000</pubDate>
   <guid isPermaLink="true">http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4950&amp;PID=31275#31275</guid>
  </item> 
  <item>
   <title>VBScript : NIC Power Management</title>
   <link>http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4950&amp;PID=31274#31274</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.sapien.com/forums/scriptinganswers/member_profile.asp?PF=2491" rel="nofollow">jvierra</a><br /><strong>Subject:</strong> NIC Power Management<br /><strong>Posted:</strong> 22 Feb 2012 at 11:57<br /><br />Well it is clear that the code cannot work becuse it was never written correctly. <DIV>&nbsp;</DIV><DIV>What the user is trying to do will only work on one specific machine which has only one setting.&nbsp; Most machines will have multiple entries for the network GUID.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><span style="font-size:10px"><br /><br />Edited by jvierra - Today at 12:29</span>]]>
   </description>
   <pubDate>Wed, 22 Feb 2012 11:57:34 +0000</pubDate>
   <guid isPermaLink="true">http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4950&amp;PID=31274#31274</guid>
  </item> 
  <item>
   <title>Windows PowerShell : Slow WMI query</title>
   <link>http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4964&amp;PID=31273#31273</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.sapien.com/forums/scriptinganswers/member_profile.asp?PF=3359" rel="nofollow">jhicks</a><br /><strong>Subject:</strong> Slow WMI query<br /><strong>Posted:</strong> 22 Feb 2012 at 11:10<br /><br />Absolutely. Even though this thread started out as a discussion of improving WMI performance, it really is about the right way to use PowerShell. My example was more on that than overall WMI performance. The bottom line is find the time to learn how to use PowerShell the way it was designed and you'll eventually get more done with less work.]]>
   </description>
   <pubDate>Wed, 22 Feb 2012 11:10:16 +0000</pubDate>
   <guid isPermaLink="true">http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4964&amp;PID=31273#31273</guid>
  </item> 
  <item>
   <title>VBScript : NIC Power Management</title>
   <link>http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4950&amp;PID=31272#31272</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.sapien.com/forums/scriptinganswers/member_profile.asp?PF=2491" rel="nofollow">jvierra</a><br /><strong>Subject:</strong> NIC Power Management<br /><strong>Posted:</strong> 22 Feb 2012 at 11:01<br /><br />Are you saying that it runs wih no errors eeven after removing the On Error line?<DIV>&nbsp;</DIV><DIV>Are you sure the adapter can use power management.</DIV><DIV>&nbsp;</DIV><DIV>These setting changes will require a restart to function.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 22 Feb 2012 11:01:25 +0000</pubDate>
   <guid isPermaLink="true">http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4950&amp;PID=31272#31272</guid>
  </item> 
  <item>
   <title>Windows PowerShell : Slow WMI query</title>
   <link>http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4964&amp;PID=31271#31271</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.sapien.com/forums/scriptinganswers/member_profile.asp?PF=2491" rel="nofollow">jvierra</a><br /><strong>Subject:</strong> Slow WMI query<br /><strong>Posted:</strong> 22 Feb 2012 at 10:59<br /><br />Nise Jeff.<DIV>&nbsp;</DIV><DIV>One note.&nbsp; When querying multiple computers it may be faster to ping first because WMI timeout talkes too long.</DIV><DIV>&nbsp;</DIV><DIV>Try/Catch on Get-WMIObject is useful for whenWMI is faulty or misconfigured.&nbsp; In this case I find using -ea 0 and -ev myerror and checking the error an easier constuct in some cases.</DIV><DIV>&nbsp;</DIV><DIV>Heirich, Don's book is worth the time.&nbsp; Get a copy.</DIV><DIV>&nbsp;</DIV><DIV>The <EM><U>PowerShell TFM</U></EM> book is good as a learning tool and as a reference.</DIV><DIV>&nbsp;</DIV><DIV>I believe both books are available electronically.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 22 Feb 2012 10:59:47 +0000</pubDate>
   <guid isPermaLink="true">http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4964&amp;PID=31271#31271</guid>
  </item> 
  <item>
   <title>VBScript : NIC Power Management</title>
   <link>http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4950&amp;PID=31270#31270</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.sapien.com/forums/scriptinganswers/member_profile.asp?PF=47011" rel="nofollow">octoj2011</a><br /><strong>Subject:</strong> NIC Power Management<br /><strong>Posted:</strong> 22 Feb 2012 at 08:27<br /><br />Thanks for the suggestion. I've just tried that but still not working. ]]>
   </description>
   <pubDate>Wed, 22 Feb 2012 08:27:51 +0000</pubDate>
   <guid isPermaLink="true">http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4950&amp;PID=31270#31270</guid>
  </item> 
  <item>
   <title>Windows PowerShell : Slow WMI query</title>
   <link>http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4964&amp;PID=31269#31269</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.sapien.com/forums/scriptinganswers/member_profile.asp?PF=3359" rel="nofollow">jhicks</a><br /><strong>Subject:</strong> Slow WMI query<br /><strong>Posted:</strong> 22 Feb 2012 at 08:13<br /><br />Here's another attempt to show you the object nature of PowerShell. You are still just writing strings with added value. I'm not saying this is exactly what you need but it is similar.<br /><br /><table width="99%"><tr><td><pre class="BBcode"><br />$servicenames="spooler","dns","MOM","wuauserv"<br />$Computers="serenity","foo","quark"<br />foreach ($computer in $computers) {<br />Try {<br />&nbsp;&nbsp;&nbsp;&nbsp;Write-Host "Checking $computer" -ForegroundColor Green<br />&nbsp;&nbsp;&nbsp;&nbsp;$wmi=get-wmiobject -class win32_service -ComputerName $computer -ErrorAction "Stop"&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;if ($wmi) {<br />&nbsp;&nbsp;&nbsp;&nbsp;Write-Host "Found $($wmi.count) services" -ForegroundColor Green<br />&nbsp;&nbsp;&nbsp;&nbsp;#create a hash table to be used for new object properties<br />&nbsp;&nbsp;&nbsp;&nbsp;$hash=@{<br />&nbsp;&nbsp;&nbsp;&nbsp;Computername=$wmi&#091;0&#093;.Systemname<br />&nbsp;&nbsp;&nbsp;&nbsp;Connected=$True<br />&nbsp;&nbsp;&nbsp;&nbsp;}  <br />&nbsp;&nbsp;&nbsp;&nbsp;#check each service in the list<br />&nbsp;&nbsp;&nbsp;&nbsp;Write-Host "Processing Services" -ForegroundColor Green<br />&nbsp;&nbsp;&nbsp;&nbsp;foreach ($service in $servicenames) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #find the service<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $s=$wmi | where {$_.name -eq $service}&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($s) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Switch ($s.state) {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  "Running" {$status=$True}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  "Stopped" {$status=$False}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  Default {$status=$False}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  } #switch<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  $name=$s.name<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#service not found so set status to not found<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write-Host "$service not found" -ForegroundColor Red<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$status="Not found"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$name=$service<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #add an entry to the hash table<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $hash.Add($Name,$status)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } #foreach service<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #create a custom object and write to the pipeline<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; New-Object -TypeName PSObject -Property $hash<br />&nbsp;&nbsp;&nbsp;&nbsp;} #if $wmi<br />&nbsp;&nbsp;&nbsp;&nbsp;Remove-Variable wmi,s<br />} #try<br />Catch {<br />&nbsp;&nbsp;&nbsp;&nbsp;Write-Warning "Failed to get services from $computer. $($_.Exception.Message)"<br />}<br />} #foreach computer<br /></pre></td></tr></table><br /><br />This has the benefit of writing a custom object to the pipeline like this:<br /><br />Spooler&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: True<br />MOM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: Not found<br />Connected&nbsp;&nbsp;&nbsp;&nbsp;: True<br />Computername : QUARK<br />wuauserv&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: True<br />dns&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: Not found<br /><br />If I run this script I can now use it many ways. I can save the results to a variable and then sort or filter. I can export to a CSV file. I can send to a printer. Or any combination. I understand PowerShell is tough to get started and you are making a valiant effort. You might consider getting a copy of <a href="http://affiliate.manning.com/idevaffiliate.php?id=1210_253_1_52" target="_blank">Learn PowerShell in a Month of Lunches</a> by Don Jones.  Or take a look at my <a href="http://jdhitsoluti&#111;ns.com/blog" target="_blank">blog</a>and <a href="http://mcpmag.com/Articles/List/Prof-Powershell.aspx" target="_blank">Prof. PowerShell</a> column.<span style="font-size:10px"><br /><br />Edited by jhicks - Today at 08:15</span>]]>
   </description>
   <pubDate>Wed, 22 Feb 2012 08:13:21 +0000</pubDate>
   <guid isPermaLink="true">http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4964&amp;PID=31269#31269</guid>
  </item> 
  <item>
   <title>Windows PowerShell : Slow WMI query</title>
   <link>http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4964&amp;PID=31268#31268</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.sapien.com/forums/scriptinganswers/member_profile.asp?PF=2491" rel="nofollow">jvierra</a><br /><strong>Subject:</strong> Slow WMI query<br /><strong>Posted:</strong> 22 Feb 2012 at 05:48<br /><br />You will waste more time guessing than you will reading.&nbsp; If you are time-bound then you really need to learn PowerSHell correctly as it can save you a tremendous amount of time.<DIV>&nbsp;</DIV><DIV></DIV><DIV></DIV>Without the basics you will never know when someone is sending you down a rabbit hole.&nbsp; There are a great many people on the INternet giving bad advice on PowerSHell.&nbsp; Knowing the basics will protect you from this. <DIV></DIV><DIV></DIV><span style="font-size:10px"><br /><br />Edited by jvierra - Today at 05:48</span>]]>
   </description>
   <pubDate>Wed, 22 Feb 2012 05:48:03 +0000</pubDate>
   <guid isPermaLink="true">http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4964&amp;PID=31268#31268</guid>
  </item> 
  <item>
   <title>Windows PowerShell : Slow WMI query</title>
   <link>http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4964&amp;PID=31267#31267</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.sapien.com/forums/scriptinganswers/member_profile.asp?PF=47177" rel="nofollow">heinrichxs</a><br /><strong>Subject:</strong> Slow WMI query<br /><strong>Posted:</strong> 22 Feb 2012 at 05:44<br /><br />Thank you wil give it a try.<div>&nbsp;</div><div>Problems are not getting the books, it is finding the time to read them. So much to learn, so little time to do it in :-) </div>]]>
   </description>
   <pubDate>Wed, 22 Feb 2012 05:44:23 +0000</pubDate>
   <guid isPermaLink="true">http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4964&amp;PID=31267#31267</guid>
  </item> 
  <item>
   <title>Windows PowerShell : Slow WMI query</title>
   <link>http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4964&amp;PID=31266#31266</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.sapien.com/forums/scriptinganswers/member_profile.asp?PF=2491" rel="nofollow">jvierra</a><br /><strong>Subject:</strong> Slow WMI query<br /><strong>Posted:</strong> 22 Feb 2012 at 05:23<br /><br />This is closer to what you want. <DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV><strong>Get-Content Servers.txt |<BR>&nbsp;&nbsp;&nbsp; ForEach-Object{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (Test-Connection $_ -count 1 -quiet){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $OS = Get-WmiObject -class Win32_OperatingSystem -computername $_ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $services =&nbsp; Get-WMIObject -class Win32_Service -ComputerName $_ <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If ($services | Where-Object{$_.Name -eq 'VMTools'} ) {$VMT = "Yes"}&nbsp; else {$VMT = "No"}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If ($services | Where-Object{$_.Name -eq 'dmexplorer'}) {$DMX = "Yes"}&nbsp; else {$DMX = "No"}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If ($services | Where-Object{$_.Name -eq 'vxsicld'}) {$VXS = "Yes"}&nbsp; else {$VXS = "No"}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If ($services | Where-Object{$_.Name -eq 'vrtshal'})&nbsp; {$VRT = "Yes"}&nbsp; else {$VRT = "No"}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If ($services | Where-Object{$_.Name -eq 'vmicheartbeat'}) {$VMIC = "Yes"}&nbsp; else {$VMIC = "No"}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If ($services | Where-Object{$_.Name -eq 'CcmExec'}) {$CCM = "Yes"}&nbsp; else {$CCM = "No"}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If ($services | Where-Object{$_.Name -eq 'MOM'}) {$MO = "Yes"}&nbsp; else {$MO = "No"}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If ($services | Where-Object{$_.Name -eq 'HealthService'}) {$Health = "Yes"}&nbsp; else {$Health = "No"}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If ($services | Where-Object{$_.Name -eq 'awservices'}) {$aws = "Yes"}&nbsp; else {$aws = "No"}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If ($services | Where-Object{$_.Name -eq 'NetBackup Client Service'}){$NetB = "Yes"}&nbsp; else {$NetB = "No"}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $fcadap = Get-WmiObject -class MSFC_FCAdapterHBAAttributes -computername $_ -ea 0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ($fcadap) {$fca = "Yes"} else {$fca = "No"}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "$_ ; $($os.caption) ; $($os.version) ; $VMT ; $DMX ; $VXS ; $VRT ; $VMIC ; $CCM ; $MO ; $Health ; $aws ; $NetB ; $fca"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }else{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Write-Host "Unable to contact $_" -ForegroundColor red<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; }<BR></strong></pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>I recommend getting a book on PowerShell.&nbsp; You sem to be a bit confused about how it works.</DIV><DIV>&nbsp;</DIV><DIV>You are using try/catch in an odd way.&nbsp; You are also querying computers before testing for their existence. You&nbsp;have suppressed all errors when you do not want to do that.</DIV><DIV>&nbsp;</DIV><DIV>I suspect you are copying and pasting bits without really understanding what they do.&nbsp; A book will get you back on a more successful path.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>If you are not a programmer or skilled scripter PowerShell will confuse you if you don't get the fundamentals correct.</DIV><DIV>&nbsp;</DIV><DIV>PowerShell is very easy to learn but you cannot guess at how it works.&nbsp;How PowerShell works is counter-intuitive. It is an object system and d&#140;s not easily succomb to linear programming ideas.</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><span style="font-size:10px"><br /><br />Edited by jvierra - Today at 05:25</span>]]>
   </description>
   <pubDate>Wed, 22 Feb 2012 05:23:16 +0000</pubDate>
   <guid isPermaLink="true">http://www.sapien.com/forums/scriptinganswers/forum_posts.asp?TID=4964&amp;PID=31266#31266</guid>
  </item> 
 </channel>
</rss>
