<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>System Center Operations Manager and POwerSHell.</title>
	<atom:link href="http://scomposh.hackthemind.org/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://scomposh.hackthemind.org</link>
	<description>Hack The Mind</description>
	<lastBuildDate>Thu, 12 Aug 2010 20:15:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>HackTheMind LLC</title>
		<link>http://scomposh.hackthemind.org/?p=118</link>
		<comments>http://scomposh.hackthemind.org/?p=118#comments</comments>
		<pubDate>Thu, 12 Aug 2010 20:15:01 +0000</pubDate>
		<dc:creator>Zolon</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://scomposh.hackthemind.org/?p=118</guid>
		<description><![CDATA[So, it has been some time since I have done an update. HackTheMind LLC is up and running, but I have not had the time to work on the site. I am also starting an online toy and game store with www.htmgames.com . Take care.]]></description>
			<content:encoded><![CDATA[<p>So, it has been some time since I have done an update.</p>
<p>HackTheMind LLC is up and running, but I have not had the time to work on the site.</p>
<p>I am also starting an online toy and game store with <a href="http://www.htmgames.com">www.htmgames.com</a> .</p>
<p>Take care.</p>
]]></content:encoded>
			<wfw:commentRss>http://scomposh.hackthemind.org/?feed=rss2&amp;p=118</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Job &#8211; Change of focus.</title>
		<link>http://scomposh.hackthemind.org/?p=116</link>
		<comments>http://scomposh.hackthemind.org/?p=116#comments</comments>
		<pubDate>Mon, 03 May 2010 18:32:57 +0000</pubDate>
		<dc:creator>Zolon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://scomposh.hackthemind.org/?p=116</guid>
		<description><![CDATA[Wow it has been a long time since I have posted here. So here is what has changed. I got laid off from the place that used SCOM and Power Shell, and now work for a company that uses *nix servers. Unfortunately, this has brought about a &#8220;use it or lose it&#8221; scenario. My PowerShell [...]]]></description>
			<content:encoded><![CDATA[<p>Wow it has been a long time since I have posted here. So here is what has changed.</p>
<p>I got laid off from the place that used SCOM and Power Shell, and now work for a company that uses *nix servers. Unfortunately, this has brought about a &#8220;use it or lose it&#8221; scenario. My PowerShell skills have diminished.</p>
<p>This will be changing though. I have a few projects I am working on for HackTheMind, LLC. that will require PowerShell, and as I get them completed, I will post writeups on them.</p>
<p>Take care, and keep scripting.</p>
]]></content:encoded>
			<wfw:commentRss>http://scomposh.hackthemind.org/?feed=rss2&amp;p=116</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Privacy rights attacked at City Level.</title>
		<link>http://scomposh.hackthemind.org/?p=114</link>
		<comments>http://scomposh.hackthemind.org/?p=114#comments</comments>
		<pubDate>Thu, 18 Jun 2009 22:46:56 +0000</pubDate>
		<dc:creator>Zolon</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://scomposh.hackthemind.org/?p=114</guid>
		<description><![CDATA[I know I know. This is not SCOM or Posh related, but I feel it is of too note. I will not go into the long boring details, instead, I will just paste the email I sent which has more then enough information. &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; From: Jason M. Rydstrand Sent: Thursday, June 18, 2009 3:42 PM [...]]]></description>
			<content:encoded><![CDATA[<p>I know I know. This is not SCOM or Posh related, but I feel it is of too note.</p>
<p>I will not go into the long boring details, instead, I will just paste the email I sent which has more then enough information.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<div dir="ltr"><span style="font-family: Tahoma; color: #000000; font-size: x-small;"><strong>From:</strong> Jason M. Rydstrand<br />
<strong>Sent:</strong> Thursday, June 18, 2009 3:42 PM<br />
<strong>To:</strong> gsullivan@bozeman.net<br />
<strong>Cc:</strong> aclu@aclumontana.org; BJ@KISW.com; newstips@king5.com; bethg@privacyrights.org<br />
<strong>Subject:</strong> Breach of Privacy Rights and Terms Of Service<br />
</span></div>
<div dir="ltr"><span style="font-family: Tahoma; color: #000000; font-size: x-small;">Hello Greg,</span></div>
<div dir="ltr"> </div>
<div dir="ltr"><span style="font-family: tahoma; font-size: x-small;">I am writing you in response to the news article I stumbled across.</span></div>
<div dir="ltr"> </div>
<div dir="ltr"><span style="font-family: tahoma; font-size: x-small;"><a href="http://scomposh.hackthemind.org/wp-admin/redir.aspx?C=9ec5d3e44aa148ac84d572ac3caff2b8&amp;URL=http%3a%2f%2fmontanasnewsstation.com%2fGlobal%2fstory.asp%3fS%3d10551414" target="_blank">http://montanasnewsstation.com/Global/story.asp?S=10551414</a></span></div>
<div dir="ltr"> </div>
<div dir="ltr"><span style="font-family: tahoma; font-size: x-small;">After doing some research at the City website, I confirmed that the background check asks for Website Addresses as well as User Names and Passwords that the applicant utalizes.</span></div>
<div dir="ltr"> </div>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><a href="http://scomposh.hackthemind.org/wp-admin/redir.aspx?C=9ec5d3e44aa148ac84d572ac3caff2b8&amp;URL=http%3a%2f%2fwww.bozeman.net%2fbozeman%2fhumanResource%2fforms.aspx" target="_blank"><span style="font-family: Calibri; color: #800080;">http://www.bozeman.net/bozeman/humanResource/forms.aspx</span></a></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: Calibri;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: Calibri;">The part that has the form in question:</span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: Calibri;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-family: 'Arial','sans-serif'; color: black; font-size: 9.5pt;"><a href="http://scomposh.hackthemind.org/wp-admin/redir.aspx?C=9ec5d3e44aa148ac84d572ac3caff2b8&amp;URL=http%3a%2f%2fwww.bozeman.net%2fbozeman%2fhumanResource%2fforms%2fBackground_Check_Form_MASTER.pdf" target="_blank"><span style="color: #800080;">Consent and Release to Conduct a Criminal Background Check</span></a> (Notarized Version)</span></p>
<div dir="ltr"> </div>
<div dir="ltr"><span style="font-family: tahoma; font-size: x-small;">The problem with asking for this information is three fold.</span></div>
<div dir="ltr"> </div>
<div dir="ltr"><span style="font-family: tahoma; font-size: x-small;">1. The laws state that a employer can not ask for age, race, creed, and many other points of information of a applicant.</span></div>
<div dir="ltr"> </div>
<div dir="ltr"><span style="font-family: tahoma; font-size: x-small;">The problem is, a facebook profile commonly contains this information, and by asking for the said profile, one is also asking for the protected information.</span></div>
<div dir="ltr"> </div>
<div dir="ltr"><span style="font-family: tahoma; font-size: x-small;">2. <span style="font-size: x-small;">Please list any and all, past and present, personal or business website or web pages, memberships on any Internet-based chat rooms, social clubs or forums, to include but not limited to: Facebook, Google, Yahoo, YouTube.com, MySpace, etc</span></span></div>
<div dir="ltr"><span style="font-family: tahoma; font-size: x-small;"></span> </div>
<div dir="ltr"><span style="font-family: tahoma; font-size: x-small;">Now, if one was to take this literally, you are also asking for Internet Banking information. That would set a applicant up for identify theft, and in turn the City would be liable. This also includes email accounts, as YouTube and GMail utalize the same passwords, and private communications protected.</span></div>
<div dir="ltr"> </div>
<div dir="ltr"><span style="font-family: tahoma; font-size: x-small;">3. Terms Of Service (TOS)</span></div>
<div dir="ltr"> </div>
<div dir="ltr"><span style="font-family: tahoma; font-size: x-small;">Many providers of these sites specificly state that one can not share their login credentials with other parties. This means, that by requiring this information in a background check, you have opened the applicant to a lawsuit from the Service Provider.</span></div>
<div dir="ltr"> </div>
<div dir="ltr"><span style="font-family: tahoma; font-size: x-small;">You will notice that I have CC&#8217;d the ACLU and a couple media outlets in regards to this.</span></div>
<div dir="ltr"> </div>
<div dir="ltr"><span style="font-family: tahoma; font-size: x-small;">Thank you for your time,</span></div>
<div dir="ltr"><span style="font-family: tahoma; font-size: x-small;">Jason Rydstrand</span></div>
]]></content:encoded>
			<wfw:commentRss>http://scomposh.hackthemind.org/?feed=rss2&amp;p=114</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Monkey Wrench &#8211; SCOM R2</title>
		<link>http://scomposh.hackthemind.org/?p=112</link>
		<comments>http://scomposh.hackthemind.org/?p=112#comments</comments>
		<pubDate>Wed, 03 Jun 2009 01:39:57 +0000</pubDate>
		<dc:creator>TheZolon</dc:creator>
				<category><![CDATA[RC2]]></category>
		<category><![CDATA[System Center Operations Manager]]></category>

		<guid isPermaLink="false">http://scomposh.hackthemind.org/?p=112</guid>
		<description><![CDATA[Well, sure enough they released R2 on the 23rd like they said they would. What they didn&#8217;t say was it was the EVAL only. Only under a couple days ago did I get confirmation that even people in the Software Asurance Program wouldn&#8217;t get R2 proper until the 1st of July. Bleh.]]></description>
			<content:encoded><![CDATA[<p>Well, sure enough they released R2 on the 23rd like they said they would. What they didn&#8217;t say was it was the EVAL only.</p>
<p>Only under a couple days ago did I get confirmation that even people in the Software Asurance Program wouldn&#8217;t get R2 proper until the 1st of July. Bleh.</p>
]]></content:encoded>
			<wfw:commentRss>http://scomposh.hackthemind.org/?feed=rss2&amp;p=112</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>System Center Operations Manager 2007 R2 &#8211; RTM!</title>
		<link>http://scomposh.hackthemind.org/?p=79</link>
		<comments>http://scomposh.hackthemind.org/?p=79#comments</comments>
		<pubDate>Fri, 22 May 2009 23:41:59 +0000</pubDate>
		<dc:creator>Zolon</dc:creator>
				<category><![CDATA[RC2]]></category>
		<category><![CDATA[System Center Operations Manager]]></category>

		<guid isPermaLink="false">http://scomposh.hackthemind.org/?p=79</guid>
		<description><![CDATA[As alot of others are saying, the R2 RTm EVAL has been relased to the public. You can download it here: http://www.microsoft.com/downloads/details.aspx?FamilyID=93ddf25b-1ef0-4851-81b0-5fb9a2f76181&#38;displaylang=en YAY!]]></description>
			<content:encoded><![CDATA[<p>As alot of others are saying, the R2 RTm EVAL has been relased to the public.</p>
<p>You can download it here:<br />
<a title="SCOM R2 RTM Eval" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=93ddf25b-1ef0-4851-81b0-5fb9a2f76181&amp;displaylang=en" target="_blank">http://www.microsoft.com/downloads/details.aspx?FamilyID=93ddf25b-1ef0-4851-81b0-5fb9a2f76181&amp;displaylang=en</a></p>
<p>YAY!</p>
]]></content:encoded>
			<wfw:commentRss>http://scomposh.hackthemind.org/?feed=rss2&amp;p=79</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Change IIS 6.0 Home Directory</title>
		<link>http://scomposh.hackthemind.org/?p=76</link>
		<comments>http://scomposh.hackthemind.org/?p=76#comments</comments>
		<pubDate>Fri, 15 May 2009 20:38:53 +0000</pubDate>
		<dc:creator>Zolon</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[V2]]></category>

		<guid isPermaLink="false">http://scomposh.hackthemind.org/?p=76</guid>
		<description><![CDATA[The following script can be used to change all the websites on a server or group of servers to the same webroot. #============================================================================================== # # Microsoft PowerShell Source File -- Created with SAPIEN Technologies PrimalScript 2009 # # NAME: Set-Webroot.ps1 # # AUTHOR: Jason Rydstrand # DATE  : 5/15/2009 # VERSION: 1.1 # # COMMENT: [...]]]></description>
			<content:encoded><![CDATA[<p>The following script can be used to change all the websites on a server or group of servers to the same webroot.<br />
<code>#==============================================================================================<br />
#<br />
# Microsoft PowerShell Source File -- Created with SAPIEN Technologies PrimalScript 2009<br />
#<br />
# NAME: Set-Webroot.ps1<br />
#<br />
# AUTHOR: Jason Rydstrand<br />
# DATE  : 5/15/2009<br />
# VERSION: 1.1<br />
#<br />
# COMMENT: This script is for changing the Webroot on systems.<br />
#<br />
# REQUIREMENTS: 1. Powershell V2<br />
#    2. RPC Access from system script is running on.<br />
#<br />
# CHANGED: 1. Created functions for each step.<br />
#     2. Added comments.<br />
#     3. Added Powershell version checking.<br />
#     4. Added UserValidation before Changes are made.<br />
#     5. Added capability for more then one sytsem to change at a time.<br />
#<br />
# TODO: 1. Pull system from VIP (Not implimented in this version.)<br />
#  2. Wait for system connections to drop. (Not implimented in this version.)<br />
#  4. Do a HTTP Get to spin up IIS. (Not implimented in this version.)<br />
#  5. Put back in VIP. (Not implimented in this version.)<br />
#<br />
#==============================================================================================</p>
<p># Functions<br />
#==============================================================================================</p>
<p># Function to validate version of Powershell is V2</p>
<p>function CheckVersion<br />
{<br />
 Write-Host "Checking for Powershell V2"<br />
 <br />
 if($host.version.Major -ne "2")<br />
 {<br />
  Write-Host "This script requires Powershell Version 2."<br />
  Write-Host "Please download and install Powershell V2 from"<br />
  Write-Host "&lt;a href="<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c913aeab-d7b4-4bb1-a958-ee6d7fe307bc&amp;displaylang=en&quot;&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=c913aeab-d7b4-4bb1-a958-ee6d7fe307bc&amp;displaylang=en&lt;/a">http://www.microsoft.com/downloads/details.aspx?FamilyID=c913aeab-d7b4-4bb1-a958-ee6d7fe307bc&amp;displaylang=en"&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=c913aeab-d7b4-4bb1-a958-ee6d7fe307bc&amp;displaylang=en&lt;/a</a>&gt;"<br />
  break<br />
 }<br />
 else<br />
 {<br />
  Write-Host "Powershell V2 Detected."<br />
  Write-Host " "<br />
 }<br />
}</p>
<p># Function to build array of machines for processing.</p>
<p>function InputMachines<br />
{<br />
 Write-Host "Please input machines. Example: system1 system2 system3 "<br />
 $machines = (Read-Host "Machines").Split(" ")<br />
 Write-Host " "<br />
 return $machines<br />
}</p>
<p># Function to get new Home Directory</p>
<p>function GetDirectory<br />
{<br />
 Write-Host "Please input new IIS Home Directory. Example: E:\webroot_a"<br />
 $webroot = Read-Host "Directory"<br />
 Write-Host " "<br />
 return $webroot<br />
}</p>
<p>function UserValidation<br />
{<br />
 Write-Host "The following systems will be changed:"<br />
 Write-Host " "<br />
 foreach($machine in $machines)<br />
 {<br />
  Write-Host "$machine - $webroot"<br />
 }<br />
 Write-Host " "<br />
 Write-Host "Are these correct?"<br />
 $yesno = Read-Host "Yes/No?"<br />
 if($yesno -eq "Yes")<br />
 {<br />
  Write-Host "Continueing."<br />
 }<br />
 else<br />
 {<br />
  Write-Host "&amp;lt;&amp;lt;&amp;lt; User did not indicate these are correct &amp;gt;&amp;gt;&amp;gt;"<br />
  break<br />
 }<br />
}</p>
<p>function ChangeVirDir<br />
{<br />
 foreach($machine in $machines)<br />
 {<br />
  $iis = Get-WmiObject -class iiswebvirtualdirsetting -namespace "root\microsoftiisv2" -computer $machine -authentication 6 -Credential $credentials<br />
 <br />
  # Count number of websites.<br />
  $i = $iis.count</p>
<p>  # Set array start<br />
  $j = 0</p>
<p>  # Loop through each website.<br />
  while($i -gt 0)<br />
  {<br />
   # Set path for local object of website<br />
   $iis[$j].Path = "$($webroot)"</p>
<p>   # Put local object on remote host<br />
   $iis[$j].Put()<br />
 <br />
   # Increment Counters<br />
   $j++<br />
   $i--<br />
  }<br />
 }<br />
}<br />
#==============================================================================================<br />
# End Functions</p>
<p># Main Script Body Start<br />
#==============================================================================================</p>
<p># Check Powershell Version</p>
<p>CheckVersion</p>
<p># Notify User what script is for.<br />
Write-Host "This script is to switch a machine, or group of machines, IIS Home Directory."<br />
Write-Host "The following will be done by this script:"<br />
Write-Host "1. Pull system from VIP (Not implimented in this version.)"<br />
Write-Host "2. Wait for system connections to drop. (Not implimented in this version.)"<br />
Write-Host "3. Change IIS Home Directory."<br />
Write-Host "4. Do a HTTP Get to spin up IIS. (Not implimented in this version.)"<br />
Write-Host "5. Put back in VIP. (Not implimented in this version.)"<br />
Write-Host " "<br />
Write-Host "Asking for user credentials."<br />
$credentials = Get-Credential<br />
Write-Host " "<br />
# Set what machine to hit<br />
$machines = InputMachines</p>
<p># Set path you want Home Directory to be.<br />
$webroot = GetDirectory</p>
<p># Inform user of what systems will be changed to what directory.</p>
<p>UserValidation</p>
<p># Make change</p>
<p>ChangeVirDir</p>
<p>#==============================================================================================<br />
# End of Main Script Body</code></p>
]]></content:encoded>
			<wfw:commentRss>http://scomposh.hackthemind.org/?feed=rss2&amp;p=76</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MMS 2009 &#8211; The first day.</title>
		<link>http://scomposh.hackthemind.org/?p=70</link>
		<comments>http://scomposh.hackthemind.org/?p=70#comments</comments>
		<pubDate>Mon, 27 Apr 2009 18:25:05 +0000</pubDate>
		<dc:creator>Zolon</dc:creator>
				<category><![CDATA[RC2]]></category>
		<category><![CDATA[System Center Operations Manager]]></category>

		<guid isPermaLink="false">http://scomposh.hackthemind.org/?p=70</guid>
		<description><![CDATA[Well, this year, so far, all I can say is they are better organized. They put the registration in a actual room this time, so they could control the madness that happened last year. In other words, it only took me 10 minutes to register this time, instead of 2.5 hours. Notes will be comming [...]]]></description>
			<content:encoded><![CDATA[<p>Well, this year, so far, all I can say is they are better organized. They put the registration in a actual room this time, so they could control the madness that happened last year. In other words, it only took me 10 minutes to register this time, instead of 2.5 hours.</p>
<p>Notes will be comming soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://scomposh.hackthemind.org/?feed=rss2&amp;p=70</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Version Check from Powershell</title>
		<link>http://scomposh.hackthemind.org/?p=64</link>
		<comments>http://scomposh.hackthemind.org/?p=64#comments</comments>
		<pubDate>Thu, 19 Mar 2009 00:45:47 +0000</pubDate>
		<dc:creator>Zolon</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[V1]]></category>

		<guid isPermaLink="false">http://scomposh.hackthemind.org/?p=64</guid>
		<description><![CDATA[While on the phone with Microsoft I needed a way to check the version of the mommodules.dll on alot of systems to see if the patch was applying. So, I tweaked a script I found long ago and then made it work in Powershell V1 (with help from #powershell user JasonMArcher). I would give credit [...]]]></description>
			<content:encoded><![CDATA[<p>While on the phone with Microsoft I needed a way to check the version of the mommodules.dll on alot of systems to see if the patch was applying.</p>
<p>So, I tweaked a script I found long ago and then made it work in Powershell V1 (with help from #powershell user JasonMArcher). I would give credit to the original author, but I don&#8217;t remember who it was. (aka, if you are reading this, please let me know so I can give proper credit.)<br />
<code>
<pre>$erroractionpreference = "Continue"

$a = New-Object -comobject Excel.Application
$a.visible = $True

$b = $a.Workbooks.Add()
$c = $b.Worksheets.Item(1)

$c.Cells.Item(1,1) = "Machine Name"
$c.Cells.Item(1,2) = "File Name"
$c.Cells.Item(1,3) = "Version"
$c.Cells.Item(1,4) = "Report Time Stamp"

$d = $c.UsedRange
$d.Interior.ColorIndex = 19
$d.Font.ColorIndex = 11
$d.Font.Bold = $True

$intRow = 2

$colComputers = get-content E:\SCOMScripts\patching\Servers.txt

foreach ($strComputer in $colComputers)
{
$c.Cells.Item($intRow,1) = $strComputer

Function GetFileInfo
{

$Path = "\\"+ $strComputer + "\C$\Program Files\System Center Operations Manager 2007\MOMModules.dll"

$File = get-item $Path

$c.Cells.Item($intRow,2) = $File.Name
$c.Cells.Item($intRow,3) = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($Path).ProductVersion
}

GetFileInfo

$c.Cells.Item($intRow,4) = Get-date
$intRow = $intRow + 1
}

$d.EntireColumn.AutoFit()</pre>
<p></code><br />
 </p>
<p>I did some modifications and here is another version that get&#8217;s the machine names from SCOM. This has to be ran from the Operations Manager Console.<br />
<code>
<pre>$erroractionpreference = "Continue"

$a = New-Object -comobject Excel.Application
$a.visible = $True

$b = $a.Workbooks.Add()
$c = $b.Worksheets.Item(1)

$c.Cells.Item(1,1) = "Machine Name"
$c.Cells.Item(1,2) = "File Name"
$c.Cells.Item(1,3) = "Version"
$c.Cells.Item(1,4) = "Report Time Stamp"
$c.Cells.Item(1,5) = "Reporting Node"

$d = $c.UsedRange
$d.Interior.ColorIndex = 19
$d.Font.ColorIndex = 11
$d.Font.Bold = $True

$intRow = 2

$colComputers = get-agent

foreach ($strComputer in $colComputers)
{
$c.Cells.Item($intRow,1) = $strComputer.ComputerName

Function GetFileInfo
{

$Path = "\\"+ $strComputer.ComputerName.ToString() + "\C$\Program Files\System Center Operations Manager 2007\MOMModules.dll"

$File = $Path

$c.Cells.Item($intRow,2) = $File
$c.Cells.Item($intRow,3) = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($Path).ProductVersion
}

GetFileInfo

$c.Cells.Item($intRow,4) = Get-date
$c.Cells.Item($intRow,5) =  $strComputer.PrimaryManagementServerName
$intRow = $intRow + 1
}

$d.EntireColumn.AutoFit()</pre>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://scomposh.hackthemind.org/?feed=rss2&amp;p=64</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lost rule looking for a good home.</title>
		<link>http://scomposh.hackthemind.org/?p=61</link>
		<comments>http://scomposh.hackthemind.org/?p=61#comments</comments>
		<pubDate>Wed, 18 Mar 2009 01:51:39 +0000</pubDate>
		<dc:creator>Zolon</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[RC1]]></category>
		<category><![CDATA[System Center Operations Manager]]></category>
		<category><![CDATA[V1]]></category>

		<guid isPermaLink="false">http://scomposh.hackthemind.org/?p=61</guid>
		<description><![CDATA[Have you every created a rule, and then a month later realize you need to change something on it? Sure. Only you can&#8217;t seem to find it because your SCOM UI locks up and crashes when you try to have full scope to find it? Ohh yeah. Then this one line is for you. ((get-rule [...]]]></description>
			<content:encoded><![CDATA[<p>Have you every created a rule, and then a month later realize you need to change something on it? Sure.</p>
<p>Only you can&#8217;t seem to find it because your SCOM UI locks up and crashes when you try to have full scope to find it? Ohh yeah.</p>
<p>Then this one line is for you.</p>
<p><code><br />
((get-rule | ? {$_.DisplayName -like "*RuleName*"}).getmanagementpack()).displayname<br />
</code></p>
<p>That&#8217;s all it takes. Just change where is says *Rule Name* to match the name, or part of the name your rule has, and hit enter. It will output the MP it&#8217;s in.</p>
<p>Have fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://scomposh.hackthemind.org/?feed=rss2&amp;p=61</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic XML Server Lists and Powershell</title>
		<link>http://scomposh.hackthemind.org/?p=59</link>
		<comments>http://scomposh.hackthemind.org/?p=59#comments</comments>
		<pubDate>Tue, 17 Mar 2009 18:43:37 +0000</pubDate>
		<dc:creator>Zolon</dc:creator>
				<category><![CDATA[Powershell]]></category>
		<category><![CDATA[V1]]></category>
		<category><![CDATA[V2]]></category>

		<guid isPermaLink="false">http://scomposh.hackthemind.org/?p=59</guid>
		<description><![CDATA[While at work, one of my coworkers was attempting to read a XML file with powershell, and couldn&#8217;t get it to work. After looking at it a moment, it dawned on me of a way to have server lists that one can use for automation. Let us say you have a XML file like the [...]]]></description>
			<content:encoded><![CDATA[<p>While at work, one of my coworkers was attempting to read a XML file with powershell, and couldn&#8217;t get it to work.</p>
<p>After looking at it a moment, it dawned on me of a way to have server lists that one can use for automation.</p>
<p>Let us say you have a XML file like the following:</p>
<p>&lt;?xml version=”1.0″ encoding=”utf-16″ ?&gt;<br />
&lt;Objs Version=”1.1.0.1″ xmlns=”http://schemas.microsoft.com/powershell/2004/04″&gt;<br />
   &lt;DataCenter1&gt;<br />
       &lt;FrontEnd&gt;<br />
           &lt;Servers&gt;webserver1&lt;/Servers&gt;<br />
           &lt;Servers&gt;webserver2&lt;/Servers&gt;<br />
          &lt;Servers&gt;webserver3&lt;/Servers&gt;<br />
      &lt;/FrontEnd&gt;<br />
      &lt;BackEnd&gt;<br />
          &lt;Servers&gt;datalayer1&lt;/Servers&gt;<br />
          &lt;Servers&gt;datalayer2&lt;/Servers&gt;<br />
      &lt;/BackEnd&gt;<br />
   &lt;/DataCenter1&gt;<br />
&lt;/Objs&gt;</p>
<p>This is a very simple XML file, that one might use to tell the difference between the front end systems and the back end systems in a datacenter.</p>
<p>Now, how would you load this into powershell?<br />
<code>PS C:\Powershell&gt; [xml]$Servers = gc .\servers.xml</code><br />
Once that is done, you can now grab things from the XML loaded into $Servers.<br />
<code>PS C:\Powershell&gt; $Servers.Objs.DataCenter1.FrontEnd.Servers<br />
webserver1<br />
webserver2<br />
webserver3</code><br />
As you can see, this gave me the list of servers under the FrontEnd element.</p>
<p>So to use this, in a foreach loop for example, just do the following foreach.<br />
<code>foreach($Server in $Servers.Objs.DataCenter1.FrontEnd.Servers)<br />
{<br />
     Write-Host "$Server is a Front End Server."<br />
}<br />
foreach($Server in $Servers.Objs.DataCenter1.BackEnd.Servers)<br />
{<br />
    Write-Host "$Server is a Back End Server."<br />
}</code><br />
This will give you the following.<br />
<code>webserver1 is a Front End Server.<br />
webserver2 is a Front End Server.<br />
webserver3 is a Front End Server.<br />
datalayer1 is a Back End Server.<br />
datalayer2 is a Back End Server.</code><br />
Very basic XML usage, but it was enough to give my co-worker a running start.</p>
<p>Later</p>
]]></content:encoded>
			<wfw:commentRss>http://scomposh.hackthemind.org/?feed=rss2&amp;p=59</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
