<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.snowland.se/~d/styles/itemcontent.css"?><rss 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/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>snowland.se</title>
	
	<link>http://www.snowland.se</link>
	<description>Rikard Rönnkvist blogging about Microsoft System Center and other management stuff...</description>
	<lastBuildDate>Mon, 23 Aug 2010 11:19:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.snowland.se/snowland" /><feedburner:info uri="snowland" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><thespringbox:skin xmlns:thespringbox="http://www.thespringbox.com/dtds/thespringbox-1.0.dtd">http://feeds.snowland.se/snowland?format=skin</thespringbox:skin><geo:lat>60.602214</geo:lat><geo:long>15.586493</geo:long><item>
		<title>Maintenance Mode via Powershell Remoting</title>
		<link>http://feeds.snowland.se/~r/snowland/~3/A2JWAvc0294/</link>
		<comments>http://www.snowland.se/2010/08/23/maintenance-mode-via-powerhsell-remoting/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 11:19:46 +0000</pubDate>
		<dc:creator>riro</dc:creator>
				<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[Maintenance Mode]]></category>
		<category><![CDATA[Remoting]]></category>

		<guid isPermaLink="false">http://www.snowland.se/?p=502</guid>
		<description><![CDATA[There are loads of scripts and GUIs that you can use to set Maintenance Mode in OpsMgr, but if you want to do this from a server that doesn&#8217;t have the OpsMgr-snapins for Powershell it&#8217;s a bit harder&#8230;
But then there is Powershell v2 and Remoting&#8230; It gives you the option to run a  scriptblock [...]]]></description>
			<content:encoded><![CDATA[<p>There are loads of scripts and GUIs that you can use to set Maintenance Mode in OpsMgr, but if you want to do this from a server that doesn&#8217;t have the OpsMgr-snapins for Powershell it&#8217;s a bit harder&#8230;</p>
<p>But then there is Powershell v2 and Remoting&#8230; It gives you the option to run a  scriptblock on another computer&#8230;</p>
<p>Just enable remoting on your RMS and then try this script from another machine:</p>
<pre class="brush: powershell;">
Function setMaintMode {
	PARAM (
		[string] $rmsHostname,
		[string] $agentName,
		[string] $Comment,
		[string] $Reason,
		[int] $Time
	)

	Invoke-Command -ComputerName $rmsHostname -scriptblock {
		PARAM (
			[string] $agentName,
			[string] $Comment,
			[string] $Reason,
			[int] $Time
		)

		Add-PSSnapin &quot;Microsoft.EnterpriseManagement.OperationsManager.Client&quot;
		Set-Location &quot;OperationsManagerMonitoring::&quot;
		New-ManagementGroupConnection -ConnectionString:localhost | Out-Null

		$computerClass = Get-MonitoringClass -name:Microsoft.Windows.Computer
		$computerCriteria = &quot;PrincipalName='&quot; + $agentName + &quot;'&quot;
		$computer = get-monitoringobject -monitoringclass:$computerClass -criteria:$computerCriteria

		if ($computer.InMaintenanceMode -eq $false) {
			$startTime = [System.DateTime]::Now
			$endTime = $startTime.AddMinutes($Time)

			New-MaintenanceWindow -startTime $startTime -endTime $endTime -Comment $comment -Reason $Reason -monitoringObject $computer
			return $true
		}  else {
			# Allready in maintenance mode
			return $false
		}

	} -ArgumentList $agentName, $Comment, $Reason, $Time
}

setMaintMode -rmsHostname &quot;rmsserver.domain.local&quot; -agentName &quot;currentserver.domain.local&quot; -Comment &quot;Some comment&quot; -Time 30 -Reason &quot;PlannedOperatingSystemReconfiguration&quot;
</pre>
<p>What it does is that it run&#8217;s the OpsMgr-specific parts on the RMS instead on your local machine&#8230; so with that in place it&#8217;s easy to create a GUI around it and then spread a shortcut to all your servers that have Powershell v2 installed.</p>
<p><strong>Notes:</strong><br />
The quick and dirty way to enable remoting on your rms, start cmd as an administrator and run <strong>winrm quickconfig</strong><br />
<a href="http://blogs.msdn.com/b/powershell/archive/2008/05/10/remoting-with-powershell-quickstart.aspx">Here</a> can you find a quick intro to PS Remoting.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/_s0xlT_PrZaaEAxD7kQNJdVz7ZM/0/da"><img src="http://feedads.g.doubleclick.net/~a/_s0xlT_PrZaaEAxD7kQNJdVz7ZM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/_s0xlT_PrZaaEAxD7kQNJdVz7ZM/1/da"><img src="http://feedads.g.doubleclick.net/~a/_s0xlT_PrZaaEAxD7kQNJdVz7ZM/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.snowland.se/~ff/snowland?a=A2JWAvc0294:GQzHu5YkCgQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/snowland?i=A2JWAvc0294:GQzHu5YkCgQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=A2JWAvc0294:GQzHu5YkCgQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/snowland?i=A2JWAvc0294:GQzHu5YkCgQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=A2JWAvc0294:GQzHu5YkCgQ:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/snowland?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=A2JWAvc0294:GQzHu5YkCgQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/snowland?i=A2JWAvc0294:GQzHu5YkCgQ:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/snowland/~4/A2JWAvc0294" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.snowland.se/2010/08/23/maintenance-mode-via-powerhsell-remoting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snowland.se/2010/08/23/maintenance-mode-via-powerhsell-remoting/</feedburner:origLink></item>
		<item>
		<title>ConfigMrg Native Mode and site signing certificate</title>
		<link>http://feeds.snowland.se/~r/snowland/~3/RHcov8Fsd7k/</link>
		<comments>http://www.snowland.se/2010/07/09/configmrg-native-mode-and-site-signing-certificate/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 08:48:38 +0000</pubDate>
		<dc:creator>riro</dc:creator>
				<category><![CDATA[ConfigMgr]]></category>
		<category><![CDATA[Certificate]]></category>
		<category><![CDATA[CertReq]]></category>
		<category><![CDATA[Native Move]]></category>
		<category><![CDATA[SMS_POLICY_PROVIDER]]></category>

		<guid isPermaLink="false">http://www.snowland.se/?p=496</guid>
		<description><![CDATA[After trying to switch to native mode i ConfigMgr we got some errors from SMS_POLICY_PROVIDER saying &#8220;SMS Policy Provider has failed to sign one or more policy assignments. It will retry this operation automatically.&#8221;
Strange since we did follow a (this one) step-by-step guide from Microsoft.
After a few searches on Google and TechNet I found out [...]]]></description>
			<content:encoded><![CDATA[<p>After trying to switch to native mode i ConfigMgr we got some errors from SMS_POLICY_PROVIDER saying &#8220;SMS Policy Provider has failed to sign one or more policy assignments. It will retry this operation automatically.&#8221;</p>
<p>Strange since we did follow a (<a href="http://technet.microsoft.com/en-us/library/cc872789.aspx">this one</a>) step-by-step guide from Microsoft.</p>
<p>After a few searches on Google and TechNet I found out that I tried to add a few lines in the request-file&#8230; FriendlyName and KeyLength&#8230;</p>
<pre class="brush: plain;">
[NewRequest]
FriendlyName = &quot;ConfigMgr Site Signing ABC&quot;
Subject = &quot;CN=The site code of this site server is ABC&quot;
MachineKeySet = True
KeyLength = 2048

[RequestAttributes]
CertificateTemplate = ConfigMgrSiteServerSigningCertificate
</pre>
<p>Then I requested a new cert and used that instead&#8230; and a few minutes later SMS_POLICY_PROVIDER says &#8220;SMS Policy Provider successfully updated a settings policy and a settings policy assignment.&#8221;</p>
<p> <img src='http://www.snowland.se/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

<p><a href="http://feedads.g.doubleclick.net/~a/PyCZOiMnD5DEnu-CnW1Dnyhj290/0/da"><img src="http://feedads.g.doubleclick.net/~a/PyCZOiMnD5DEnu-CnW1Dnyhj290/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/PyCZOiMnD5DEnu-CnW1Dnyhj290/1/da"><img src="http://feedads.g.doubleclick.net/~a/PyCZOiMnD5DEnu-CnW1Dnyhj290/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.snowland.se/~ff/snowland?a=RHcov8Fsd7k:T2g-YQNeP6U:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/snowland?i=RHcov8Fsd7k:T2g-YQNeP6U:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=RHcov8Fsd7k:T2g-YQNeP6U:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/snowland?i=RHcov8Fsd7k:T2g-YQNeP6U:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=RHcov8Fsd7k:T2g-YQNeP6U:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/snowland?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=RHcov8Fsd7k:T2g-YQNeP6U:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/snowland?i=RHcov8Fsd7k:T2g-YQNeP6U:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/snowland/~4/RHcov8Fsd7k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.snowland.se/2010/07/09/configmrg-native-mode-and-site-signing-certificate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snowland.se/2010/07/09/configmrg-native-mode-and-site-signing-certificate/</feedburner:origLink></item>
		<item>
		<title>Change a folder LastWriteTime based on files within it</title>
		<link>http://feeds.snowland.se/~r/snowland/~3/3OVTzPj8rsU/</link>
		<comments>http://www.snowland.se/2010/06/21/change-a-folder-lastwritetime-based-on-files-within-it/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 13:42:37 +0000</pubDate>
		<dc:creator>riro</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Date]]></category>
		<category><![CDATA[Folders]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[LastWriteTime]]></category>

		<guid isPermaLink="false">http://www.snowland.se/?p=492</guid>
		<description><![CDATA[A few days ago I wrote a script that copies some files. Did notice that everything except the date on the folders were ok. So I added a few more lines of powershell code.
Did find a few suggestions on the web, but I like this one&#8230;. Since I wrote it.  

Function Set-FolderDate {
	Param (
		[string] [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I wrote a script that copies some files. Did notice that everything except the date on the folders were ok. So I added a few more lines of powershell code.</p>
<p>Did find a few suggestions on the web, but I like this one&#8230;. Since I wrote it. <img src='http://www.snowland.se/wp/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
<pre class="brush: powershell;">
Function Set-FolderDate {
	Param (
		[string] $Path
	)
	Trap  [Exception] {
		Write-Debug $(&quot;TRAPPED: &quot; + $_.Exception.Message);
		Write-Verbose &quot;Could not change date on folder (Folder open in explorer?)&quot;
		Continue
	}

	# Get latest filedate in folder
	$LatestFile = Get-ChildItem $Path | Sort-Object LastWriteTime -Descending | Select-Object -First 1

	# Change the date, if needed
	$Folder = Get-Item $path
	if ($LatestFile.LastWriteTime -ne $Folder.LastWriteTime) {
		Write-Verbose &quot;Changing date on folder '$($Path)' to '$($LatestFile.LastWriteTime)' taken from '$($LatestFile)'&quot;
		$Folder.LastWriteTime = $LatestFile.LastWriteTime
	}

	Return $Folder
}

Set-FolderDate -Path &quot;D:\temp&quot;
</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/9qRwt1cRTlePhQG9rOgJVv643js/0/da"><img src="http://feedads.g.doubleclick.net/~a/9qRwt1cRTlePhQG9rOgJVv643js/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/9qRwt1cRTlePhQG9rOgJVv643js/1/da"><img src="http://feedads.g.doubleclick.net/~a/9qRwt1cRTlePhQG9rOgJVv643js/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.snowland.se/~ff/snowland?a=3OVTzPj8rsU:IZX1VG2EkIU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/snowland?i=3OVTzPj8rsU:IZX1VG2EkIU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=3OVTzPj8rsU:IZX1VG2EkIU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/snowland?i=3OVTzPj8rsU:IZX1VG2EkIU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=3OVTzPj8rsU:IZX1VG2EkIU:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/snowland?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=3OVTzPj8rsU:IZX1VG2EkIU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/snowland?i=3OVTzPj8rsU:IZX1VG2EkIU:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/snowland/~4/3OVTzPj8rsU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.snowland.se/2010/06/21/change-a-folder-lastwritetime-based-on-files-within-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snowland.se/2010/06/21/change-a-folder-lastwritetime-based-on-files-within-it/</feedburner:origLink></item>
		<item>
		<title>Unzip multiple files via Powershell</title>
		<link>http://feeds.snowland.se/~r/snowland/~3/vclgPYjawhc/</link>
		<comments>http://www.snowland.se/2010/06/01/unzip-multiple-files-via-powershell/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 11:41:06 +0000</pubDate>
		<dc:creator>riro</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[Progressbar]]></category>
		<category><![CDATA[Unzip]]></category>
		<category><![CDATA[Zip]]></category>

		<guid isPermaLink="false">http://www.snowland.se/?p=488</guid>
		<description><![CDATA[Simple and effective.

PARAM (
	[string] $ZipFilesPath = &#34;X:\Somepath\Full\Of\Zipfiles&#34;,
	[string] $UnzipPath = &#34;X:\Somepath\to\extract\to&#34;
)

$Shell = New-Object -com Shell.Application
$Location = $Shell.NameSpace($UnzipPath)

$ZipFiles = Get-Childitem $ZipFilesPath -Recurse -Include *.ZIP

$progress = 1
foreach ($ZipFile in $ZipFiles) {
	Write-Progress -Activity &#34;Unzipping to $($UnzipPath)&#34; -PercentComplete (($progress / ($ZipFiles.Count + 1)) * 100) -CurrentOperation $ZipFile.FullName -Status &#34;File $($Progress) of $($ZipFiles.Count)&#34;
	$ZipFolder = $Shell.NameSpace($ZipFile.fullname)

	$Location.Copyhere($ZipFolder.items(), 1040) # 1040 - No msgboxes [...]]]></description>
			<content:encoded><![CDATA[<p>Simple and effective.</p>
<pre class="brush: powershell;">
PARAM (
	[string] $ZipFilesPath = &quot;X:\Somepath\Full\Of\Zipfiles&quot;,
	[string] $UnzipPath = &quot;X:\Somepath\to\extract\to&quot;
)

$Shell = New-Object -com Shell.Application
$Location = $Shell.NameSpace($UnzipPath)

$ZipFiles = Get-Childitem $ZipFilesPath -Recurse -Include *.ZIP

$progress = 1
foreach ($ZipFile in $ZipFiles) {
	Write-Progress -Activity &quot;Unzipping to $($UnzipPath)&quot; -PercentComplete (($progress / ($ZipFiles.Count + 1)) * 100) -CurrentOperation $ZipFile.FullName -Status &quot;File $($Progress) of $($ZipFiles.Count)&quot;
	$ZipFolder = $Shell.NameSpace($ZipFile.fullname)

	$Location.Copyhere($ZipFolder.items(), 1040) # 1040 - No msgboxes to the user - http://msdn.microsoft.com/en-us/library/bb787866%28VS.85%29.aspx
	$progress++
}
</pre>
<p>Btw&#8230; Watch out&#8230; there is a <strong>-Recurse</strong> on gci&#8230; <img src='http://www.snowland.se/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

<p><a href="http://feedads.g.doubleclick.net/~a/QDV_3x7eu_s7lnbdcVWrbQT8O1o/0/da"><img src="http://feedads.g.doubleclick.net/~a/QDV_3x7eu_s7lnbdcVWrbQT8O1o/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/QDV_3x7eu_s7lnbdcVWrbQT8O1o/1/da"><img src="http://feedads.g.doubleclick.net/~a/QDV_3x7eu_s7lnbdcVWrbQT8O1o/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.snowland.se/~ff/snowland?a=vclgPYjawhc:EgmQJcsZ_LU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/snowland?i=vclgPYjawhc:EgmQJcsZ_LU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=vclgPYjawhc:EgmQJcsZ_LU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/snowland?i=vclgPYjawhc:EgmQJcsZ_LU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=vclgPYjawhc:EgmQJcsZ_LU:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/snowland?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=vclgPYjawhc:EgmQJcsZ_LU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/snowland?i=vclgPYjawhc:EgmQJcsZ_LU:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/snowland/~4/vclgPYjawhc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.snowland.se/2010/06/01/unzip-multiple-files-via-powershell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snowland.se/2010/06/01/unzip-multiple-files-via-powershell/</feedburner:origLink></item>
		<item>
		<title>PSOL: Get-SNMPDevices</title>
		<link>http://feeds.snowland.se/~r/snowland/~3/SdhRVA_fIjQ/</link>
		<comments>http://www.snowland.se/2010/05/25/psol-get-snmpdevices/#comments</comments>
		<pubDate>Tue, 25 May 2010 07:41:27 +0000</pubDate>
		<dc:creator>riro</dc:creator>
				<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[PSOL]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[SNMP]]></category>

		<guid isPermaLink="false">http://www.snowland.se/?p=485</guid>
		<description><![CDATA[Quick and easy way to get a list of all OpsMgr monitored SNMP devices

Get-MonitoringClass -name 'System.NetworkDevice' &#124; Get-MonitoringObject &#124; Format-Table PathName, DisplayName

]]></description>
			<content:encoded><![CDATA[<p>Quick and easy way to get a list of all OpsMgr monitored SNMP devices</p>
<pre class="brush: powershell;">
Get-MonitoringClass -name 'System.NetworkDevice' | Get-MonitoringObject | Format-Table PathName, DisplayName
</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/dJTLorJgqe4NRiF4hGJjvziAUHk/0/da"><img src="http://feedads.g.doubleclick.net/~a/dJTLorJgqe4NRiF4hGJjvziAUHk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/dJTLorJgqe4NRiF4hGJjvziAUHk/1/da"><img src="http://feedads.g.doubleclick.net/~a/dJTLorJgqe4NRiF4hGJjvziAUHk/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.snowland.se/~ff/snowland?a=SdhRVA_fIjQ:VR4vdZV7IBw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/snowland?i=SdhRVA_fIjQ:VR4vdZV7IBw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=SdhRVA_fIjQ:VR4vdZV7IBw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/snowland?i=SdhRVA_fIjQ:VR4vdZV7IBw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=SdhRVA_fIjQ:VR4vdZV7IBw:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/snowland?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=SdhRVA_fIjQ:VR4vdZV7IBw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/snowland?i=SdhRVA_fIjQ:VR4vdZV7IBw:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/snowland/~4/SdhRVA_fIjQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.snowland.se/2010/05/25/psol-get-snmpdevices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snowland.se/2010/05/25/psol-get-snmpdevices/</feedburner:origLink></item>
		<item>
		<title>Review: Savision LiveMaps v5</title>
		<link>http://feeds.snowland.se/~r/snowland/~3/TCWu96FSNR0/</link>
		<comments>http://www.snowland.se/2010/05/21/review-savision-livemaps-v5/#comments</comments>
		<pubDate>Fri, 21 May 2010 12:36:16 +0000</pubDate>
		<dc:creator>riro</dc:creator>
				<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[Jalasoft]]></category>
		<category><![CDATA[LiveMaps]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Savision]]></category>
		<category><![CDATA[XianIO]]></category>

		<guid isPermaLink="false">http://www.snowland.se/?p=477</guid>
		<description><![CDATA[The last days I have been looking in to Savision LiveMaps, thought I share some of my thoughts on the product.
My two cents
Maps
So the product is named LiveMaps, it should be good at doing maps&#8230; is it? Well, I havn&#8217;t seen any product with tight OpsMgr integration that does it better.
You can set almost any [...]]]></description>
			<content:encoded><![CDATA[<p>The last days I have been looking in to Savision LiveMaps, thought I share some of my thoughts on the product.</p>
<h1>My two cents</h1>
<h3>Maps</h3>
<p>So the product is named Live<b>Maps</b>, it should be good at doing maps&#8230; is it? Well, I havn&#8217;t seen any product with tight OpsMgr integration that does it better.<br />
You can set almost any picture as a background (vector-based is preferred since they scale up/down best) and then you just drag n&#8217; drop object from OpsMgr on to the map.<br />
A nice feature is that you can create membership rules for every map, so if you are creating a map of a part of your network you can set rules to include every object named XYZ, have an IP-adress of 1.2.3.*&#8230; if you are know how to create a group in OpsMgr, it&#8217;s basicly the same&#8230; with all the options. <img src='http://www.snowland.se/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h3>Application</h3>
<p>Most of the things you can do on application monitoring you can do with OpsMgr Distributed Applications. The best part with doing it in LiveMaps is the placing of objects. In OpsMgr you can&#8217;t select that you want to place your database on spot X and service on spot Y. When doing this kind of applications in LiveMaps you can easily set an exact spot for you object and then if you want add an small image, colored box or something nice to give it some more bling. <img src='http://www.snowland.se/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
<img src="http://www.snowland.se/wp/wp-content/uploads/100521_DemoApp.jpg" alt="" title="100521_DemoApp" /></p>
<h3>Network Topologies</h3>
<p>When creating network topologies for a large network you should probably use <a href="http://www.jalasoft.com/">Jalasoft</a> XianIo as well. Today, with a plain vanilla OpsMgr you can&#8217;t autocreate relations between devices. So if you have a large network, this will take time&#8230; loads of time.<br />
I hope that Savision will post some information on how we can use this to create relations in our own environments without the need of third party products, even with XianIO there are SNMP-enabled devices that XianIO doesn&#8217;t cover&#8230;</p>
<p>Take a look at this YouTube video: <a href="http://www.youtube.com/watch?v=RpV3EAKRNLQ">http://www.youtube.com/watch?v=RpV3EAKRNLQ</a> and you understand why you should look in to XianIO Today.</p>
<h3>Dashboards</h3>
<p>Together with maps, this is the easy way to get project-fundings. <img src='http://www.snowland.se/wp/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /><br />
Starting with a map or distributed application, just drag and drop your objects and within seconds you have the dashboard your CIO always wanted. &#8220;Economy App &#8211; Green&#8221;, &#8220;HR App &#8211; Yellow&#8221;, &#8220;Mail &#8211; Green&#8221;&#8230; easy to set up, easy to understand.</p>
<h1>Notes, suggestions and general thoughts to Savision</h1>
<h3>Live Maps in OpsMgr</h3>
<p>When using large maps it&#8217;s hard (well, not hard&#8230; just to many clicks) to zoom in/out and then pan around.</p>
<p>Some easier way (than <a href="http://blog.savision.com/livemapsblog.php/2009/03/04/how-to-override-the-state-rollup-behavio">this blogpost</a>) to control the health rollup.<br />
For a OpsMgr admin this shouldn&#8217;t be a problem&#8230; but we are aiming on having network guys draw the maps and relations between network equipment.</p>
<h3>Authoring Console</h3>
<p>Where is the export/import button? I want to create my maps in test/dev, export them and then import them to production. Ok, I understand that you need the refering objects GUID when you import a map&#8230;<br />
&#8230;what if you make it like this: When you export a map you don&#8217;t save GUID, instead you save the name of the object. Then, when you import the object you get a wizard that alows you to map saved names against the real object in the new environment.</p>
<p>A &#8220;replace this object&#8221;-Icon would be nice. When creating larger overviews (say country) I start out by creating the easy dynamic lists for the tier 2 maps (say city). Then, when I have the right amount of information, a background map and so on, I want to replace the dynamic list with a nice map for that city. But today you will loose all connections from and to that city-object on the country map. So&#8230; a replace button would be nice.</p>
<p>Missing a global option to set different (default) Sate-icons. I would like to have one for every object with Class X or Class Y.<br />
For instance I want to create Server-icons, Network device-icons and so on. With that option you can remove the image and only use stateicon to describe the equipment.</p>
<p>Missing the option to place the State Icon in the center of the image.</p>
<p>Option to mark the Visible-flag on/off for a folder instead of separate maps.<br />
I know that you can do this by creating a OpsMgr User Role and scope that one&#8230; When you have the option for every map/list, why not on folders?</p>
<h3>Web</h3>
<p>I want to be able to create a Web-url without alerts and the right-click menu, only icons.</p>
<p>An option to grant anonymous access to a single drawing. Say that you want to do a dashboard with your larger applications and publish it on the intranet&#8230;</p>
<p>Is it possible to integrate tighter with the OpsMgr Web Console, you do not want to have two consoles for one monitoring solution. Yes, I know that you can work around that by linking in the weburl&#8230; It works but it isn&#8217;t the nice way to do it.</p>
<p>And please, give some basic support for users not using MSIE.</p>
<h3>Licensemodel</h3>
<p>How about test/dev-environments? Today the licenses is based on MgmtGroups and most of us have a separate test/dev environment. Ok, you can use the free version but it&#8217;s limited to 5 maps and I want my dev environment to reflect the production environment.</p>
<h3>Information / Relations</h3>
<p>I have been in contact with Savision support, I wanted to know how I can enable the automagic relations-button. Got an answer and they will look in to it.<br />
I want to discover hardware devices, SAN-Switches for instance, how nice wouldn&#8217;t it be if LiveMaps could draw the relations to servers for me?</p>

<p><a href="http://feedads.g.doubleclick.net/~a/f61VZ-Zls6jpmtbpLQZI6Rf-wQs/0/da"><img src="http://feedads.g.doubleclick.net/~a/f61VZ-Zls6jpmtbpLQZI6Rf-wQs/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/f61VZ-Zls6jpmtbpLQZI6Rf-wQs/1/da"><img src="http://feedads.g.doubleclick.net/~a/f61VZ-Zls6jpmtbpLQZI6Rf-wQs/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.snowland.se/~ff/snowland?a=TCWu96FSNR0:AzcLAHE5SN0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/snowland?i=TCWu96FSNR0:AzcLAHE5SN0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=TCWu96FSNR0:AzcLAHE5SN0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/snowland?i=TCWu96FSNR0:AzcLAHE5SN0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=TCWu96FSNR0:AzcLAHE5SN0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/snowland?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=TCWu96FSNR0:AzcLAHE5SN0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/snowland?i=TCWu96FSNR0:AzcLAHE5SN0:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/snowland/~4/TCWu96FSNR0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.snowland.se/2010/05/21/review-savision-livemaps-v5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snowland.se/2010/05/21/review-savision-livemaps-v5/</feedburner:origLink></item>
		<item>
		<title>No more secrets…???</title>
		<link>http://feeds.snowland.se/~r/snowland/~3/bwhspgDwCOk/</link>
		<comments>http://www.snowland.se/2010/05/12/no-more-secrets-2/#comments</comments>
		<pubDate>Wed, 12 May 2010 06:05:28 +0000</pubDate>
		<dc:creator>riro</dc:creator>
				<category><![CDATA[Snowland.se]]></category>

		<guid isPermaLink="false">http://www.snowland.se/?p=473</guid>
		<description><![CDATA[After almost 10 years (3 weeks short) at Atea Sweden I&#8217;m now leaving the company for an employment on the customer side.
Since I&#8217;m not working at a consultant company that sells the kind of solutions I&#8217;m blogging about&#8230; I have no &#8220;restrictions&#8221; on what I can blog about.
Hope that I can share more of my [...]]]></description>
			<content:encoded><![CDATA[<p>After almost 10 years (3 weeks short) at <a href="http://www.atea.se/">Atea Sweden</a> I&#8217;m now leaving the company for an employment on the <a href="http://www.ssab.com/">customer side</a>.<br />
Since I&#8217;m not working at a consultant company that sells the kind of solutions I&#8217;m blogging about&#8230; I have no &#8220;restrictions&#8221; on what I can blog about.</p>
<p>Hope that I can share more of my scripts, findings and solutions instead of keeping them as a &#8220;company secret&#8221;.</p>
<p>No more secrets! <img src='http://www.snowland.se/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<blockquote><p>
On the one hand information wants to be expensive, because it&#8217;s so valuable. The right information in the right place just changes your life. On the other hand, information wants to be free, because the cost of getting it out is getting lower and lower all the time. So you have these two fighting against each other.
</p></blockquote>
<p>Thoughtful quote by <a href="http://www.rogerclarke.com/II/IWtbF.html">Stewart Brand</a> at the first Hackers&#8217; Conference back in 1984</p>

<p><a href="http://feedads.g.doubleclick.net/~a/Q8BZ_H9291SsII610kVYrEqpSCo/0/da"><img src="http://feedads.g.doubleclick.net/~a/Q8BZ_H9291SsII610kVYrEqpSCo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Q8BZ_H9291SsII610kVYrEqpSCo/1/da"><img src="http://feedads.g.doubleclick.net/~a/Q8BZ_H9291SsII610kVYrEqpSCo/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.snowland.se/~ff/snowland?a=bwhspgDwCOk:5qhU_mjb_DI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/snowland?i=bwhspgDwCOk:5qhU_mjb_DI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=bwhspgDwCOk:5qhU_mjb_DI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/snowland?i=bwhspgDwCOk:5qhU_mjb_DI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=bwhspgDwCOk:5qhU_mjb_DI:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/snowland?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=bwhspgDwCOk:5qhU_mjb_DI:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/snowland?i=bwhspgDwCOk:5qhU_mjb_DI:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/snowland/~4/bwhspgDwCOk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.snowland.se/2010/05/12/no-more-secrets-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snowland.se/2010/05/12/no-more-secrets-2/</feedburner:origLink></item>
		<item>
		<title>ACT filling up your disks?</title>
		<link>http://feeds.snowland.se/~r/snowland/~3/ygdX_fLVIEo/</link>
		<comments>http://www.snowland.se/2010/04/19/act-filling-up-your-disks/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 08:52:52 +0000</pubDate>
		<dc:creator>riro</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[ACT]]></category>
		<category><![CDATA[Disk]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[old]]></category>

		<guid isPermaLink="false">http://www.snowland.se/?p=459</guid>
		<description><![CDATA[When you have ACT (The Microsoft Application Compatibility Toolkit) running in your environment you might get disks filled up with XML-files on your ACT-server.
The logprocessor uses those files to populate the database with information. So, when those are processed you do not need them anymore. (If you have a backup of your database&#8230;)
So, I did [...]]]></description>
			<content:encoded><![CDATA[<p>When you have ACT (The Microsoft Application Compatibility Toolkit) running in your environment you might get disks filled up with XML-files on your ACT-server.</p>
<p>The logprocessor uses those files to populate the database with information. So, when those are processed you do not need them anymore. (If you have a backup of your database&#8230;)</p>
<p>So, I did it the easy way, scheduled a powershell command to remove files older than 7 days:</p>
<pre class="brush: powershell;">
Get-ChildItem D:\ACTLogs -Recurse -Include *.xml* | where {$_.CreationTime -lt (Get-Date).AddDays(-7)} | Remove-Item
</pre>
<p>If you want a nicer look and feel to your script you can use this instead:</p>
<pre class="brush: powershell;">
Get-ChildItem D:\ACTLogs -Recurse -Include *.xml* | where {$_.CreationTime -lt (Get-Date).AddDays(-7)} | Sort-Object CreationTime | ForEach-Object {
	Write-Host &quot;Processing: &quot; -ForegroundColor Yellow -NoNewline
	Write-Host $_.FullName -ForegroundColor White -NoNewline

	$span = New-TimeSpan $_.CreationTime $(get-date)
	Write-Host &quot; $($span.Days) days old&quot; -ForegroundColor Yellow -NoNewline

	Remove-Item $_.FullName

	Write-Host &quot; [del]&quot; -ForegroundColor Red
}
</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/m7nLZhWVYpOsGalkUfT7c9TC3sM/0/da"><img src="http://feedads.g.doubleclick.net/~a/m7nLZhWVYpOsGalkUfT7c9TC3sM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/m7nLZhWVYpOsGalkUfT7c9TC3sM/1/da"><img src="http://feedads.g.doubleclick.net/~a/m7nLZhWVYpOsGalkUfT7c9TC3sM/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.snowland.se/~ff/snowland?a=ygdX_fLVIEo:aT6MPguVe_w:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/snowland?i=ygdX_fLVIEo:aT6MPguVe_w:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=ygdX_fLVIEo:aT6MPguVe_w:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/snowland?i=ygdX_fLVIEo:aT6MPguVe_w:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=ygdX_fLVIEo:aT6MPguVe_w:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/snowland?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=ygdX_fLVIEo:aT6MPguVe_w:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/snowland?i=ygdX_fLVIEo:aT6MPguVe_w:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/snowland/~4/ygdX_fLVIEo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.snowland.se/2010/04/19/act-filling-up-your-disks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snowland.se/2010/04/19/act-filling-up-your-disks/</feedburner:origLink></item>
		<item>
		<title>SCOM vs OpsMgr</title>
		<link>http://feeds.snowland.se/~r/snowland/~3/HZRnzg5fNHs/</link>
		<comments>http://www.snowland.se/2010/04/15/scom-vs-opsmgr/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 04:43:10 +0000</pubDate>
		<dc:creator>riro</dc:creator>
				<category><![CDATA[OpsMgr]]></category>
		<category><![CDATA[SCOM]]></category>
		<category><![CDATA[Search]]></category>

		<guid isPermaLink="false">http://www.snowland.se/?p=456</guid>
		<description><![CDATA[This will not be a post with the technical content you might be used to read on this blog.
In the last 5 years I have been working on &#8220;a few&#8221; OpsMgr projects with different customers&#8230; one thing I have to remind almost every customer of is that they should not use the acronym SCOM for [...]]]></description>
			<content:encoded><![CDATA[<p>This will not be a post with the technical content you might be used to read on this blog.</p>
<p>In the last 5 years I have been working on &#8220;a few&#8221; OpsMgr projects with different customers&#8230; one thing I have to remind almost every customer of is that they should not use the acronym <strong>SCOM</strong> for <strong>S</strong>ystem <strong>C</strong>enter <strong>O</strong>perations <strong>M</strong>anager.</p>
<p><strong>Why?</strong><br />
The main reason is the community. Today everyone (well&#8230; the most of us) use <strong>OpsMgr</strong> in writing.<br />
When you search for SCOM you get more hits than a search for OpsMgr, but most of the hits are pointing you to old articles and blogposts.<br />
A few years back the most of us (even Microsoft) used the acronym SCOM, but as I just pointed out&#8230; today almost everyone is using OpsMgr.</p>
<p><strong>Ok I&#8217;ll use OpsMgr, but what to say?</strong><br />
You probably go nuts if you try to say &#8220;System Center Operations Manager&#8221; every time&#8230;<br />
I have heard a few:<br />
<strong>OpsMgr</strong><br />
<strong>Ops Manager</strong><br />
<strong>Operations Manager</strong><br />
<strong>Operations</strong></p>
<p>I probably use Ops Manager the most.</p>
<p><strong>So why this blogpost?</strong><br />
Ehrm&#8230; to give you &#8220;new guys&#8221; an easier way to search for new articles and to give myself an easier way to search for new articles. <img src='http://www.snowland.se/wp/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
<p>So&#8230; please, do not write SCOM, write <strong>OpsMgr</strong> instead.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/mHeT1XzxeOs8bEC6tf8zPQKbICo/0/da"><img src="http://feedads.g.doubleclick.net/~a/mHeT1XzxeOs8bEC6tf8zPQKbICo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/mHeT1XzxeOs8bEC6tf8zPQKbICo/1/da"><img src="http://feedads.g.doubleclick.net/~a/mHeT1XzxeOs8bEC6tf8zPQKbICo/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.snowland.se/~ff/snowland?a=HZRnzg5fNHs:zoBX6TfIYAw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/snowland?i=HZRnzg5fNHs:zoBX6TfIYAw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=HZRnzg5fNHs:zoBX6TfIYAw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/snowland?i=HZRnzg5fNHs:zoBX6TfIYAw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=HZRnzg5fNHs:zoBX6TfIYAw:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/snowland?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=HZRnzg5fNHs:zoBX6TfIYAw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/snowland?i=HZRnzg5fNHs:zoBX6TfIYAw:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/snowland/~4/HZRnzg5fNHs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.snowland.se/2010/04/15/scom-vs-opsmgr/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.snowland.se/2010/04/15/scom-vs-opsmgr/</feedburner:origLink></item>
		<item>
		<title>Manufacturer / Model Collections with hierarchy</title>
		<link>http://feeds.snowland.se/~r/snowland/~3/VuzhtLQPn1w/</link>
		<comments>http://www.snowland.se/2010/03/24/manufacturer-model-collections-with-hierarchy/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 08:27:39 +0000</pubDate>
		<dc:creator>riro</dc:creator>
				<category><![CDATA[ConfigMgr]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Collections]]></category>
		<category><![CDATA[Hierarchy]]></category>
		<category><![CDATA[Manufacturer]]></category>
		<category><![CDATA[Model]]></category>

		<guid isPermaLink="false">http://www.snowland.se/?p=434</guid>
		<description><![CDATA[The last post made a flat structure of collections with &#8220;Manufacturer &#8211; Model&#8221;, in this post the script creates a hierarchy with (almost) the same collections.

The Model-collections queries are limited to the parent Manufacturer-collection.

# - - - - - - - - - - - - - - - - - - - - - [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.snowland.se/2010/03/23/manufacturer-model-collections/">last post</a> made a flat structure of collections with &#8220;Manufacturer &#8211; Model&#8221;, in this post the script creates a hierarchy with (almost) the same collections.</p>
<p><img src="http://www.snowland.se/wp/wp-content/uploads/100224_Manufacturer-Model.png" alt="" title="100224_Manufacturer-Model" /><br />
The Model-collections queries are limited to the parent Manufacturer-collection.</p>
<pre class="brush: powershell;">
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#                                                                                                                            Rikard Ronnkvist / snowland.se
#  Usage:
#   Download and install http://www.snowland.se/sccm-posh/
#   Save the file as CreateMM-collections-Hierarchy.ps1
#   PS:&gt;.\CreateMM-collections-Hierarchy.ps1 -rootCollectionName &quot;Name Of Some Collection&quot;
#
#  2010-03-24   Rikard Ronnkvist    First snowland.se release
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PARAM (
	[string] $rootCollectionName = $(throw &quot;rootCollectionName required.&quot;),
	[string] $hostName = (Get-Content env:computername),
	[switch] $Verbose,
	[Switch] $WhatIf
)

if ($verbose.IsPresent) {
	$VerbosePreference = 'Continue'
} Else {
	$VerbosePreference = 'SilentlyContinue'
}

Import-Module SCCM\SCCM-Functions -Force

Write-Verbose &quot;Connect to SCCM-server $($hostName)&quot;
$sccm = Connect-SCCMServer -HostName $hostName

Write-Host &quot;Get root collection: &quot;&quot;$($rootCollectionName)&quot;&quot;&quot;
$rootCollection = Get-SCCMCollection -filter &quot;Name='$($rootCollectionName)'&quot; -sccmserver $sccm
if (!$rootCollection) {
	throw &quot;Cant find &quot;&quot;$($rootCollectionName)&quot;&quot;&quot;
}
Write-Host &quot;Found collection: $($rootCollection.CollectionID)&quot;

Function checkAndCreate ($CollectionName, $ParentCollectionID, $wql, $limit = $null) {
	Write-Host &quot;Checking &quot;&quot;$($CollectionName)&quot;&quot;&quot; -ForegroundColor Cyan
	$newCollection = Get-SCCMCollection -filter &quot;Name='$($CollectionName)'&quot; -sccmserver $sccm

	if (!$newCollection) {
		if (!$WhatIf.IsPresent) {
			Write-Host &quot;Creating collection: &quot;&quot;$($CollectionName)&quot;&quot;&quot;
			$newCollection = New-SCCMCollection -name &quot;$($CollectionName)&quot; -SccmServer $sccm -parentCollectionID $ParentCollectionID -refreshDays 1 -Verbose
		} else {
			Write-Host &quot;What if: Creating collection: &quot;&quot;$($CollectionName)&quot;&quot;&quot; -ForegroundColor Red
		}

		if (!$WhatIf.IsPresent) {
			Write-Verbose &quot;Adding rule with WQL: $wql&quot;
			Add-SCCMCollectionRule -queryExpression $wql -Server $sccm -collectionID $newCollection.CollectionId -queryRuleName $CollectionName -limitToCollectionId $limit
		} else {
			Write-Host &quot;What if: Adding collection rule to new collection with wql: $($wql)&quot; -ForegroundColor Red
		}
	} else {
		Write-Host &quot;Found collection &quot;&quot;$($CollectionName)&quot;&quot;&quot;
	}

	return $newCollection
}

Write-Host &quot;Lookup Manufacturer and Model&quot;
$Manufacturer = Get-wmiobject -query &quot;SELECT DISTINCT Manufacturer FROM SMS_G_System_COMPUTER_SYSTEM&quot; -computername $Sccm.Machine -namespace $Sccm.Namespace | Sort-Object Manufacturer, Model
$Manufacturer | ForEach-Object {
	$wql = &quot;SELECT * FROM SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Manufacturer = '$($_.Manufacturer)'&quot;
	$ManufacturerCollection = checkAndCreate -collectionName $_.Manufacturer -ParentCollectionID $rootCollection.CollectionId -wql $wql -limit $null

	$Model = Get-wmiobject -query &quot;SELECT DISTINCT Model FROM SMS_G_System_COMPUTER_SYSTEM WHERE Manufacturer = '$($ManufacturerCollection.Name)'&quot; -computername $Sccm.Machine -namespace $Sccm.Namespace | Sort-Object Manufacturer, Model
	$Model | ForEach-Object {
		$wql = &quot;SELECT * FROM SMS_R_System inner join SMS_G_System_COMPUTER_SYSTEM on SMS_G_System_COMPUTER_SYSTEM.ResourceId = SMS_R_System.ResourceId where SMS_G_System_COMPUTER_SYSTEM.Model = '$($_.Model)'&quot;
		$ModelCollection = checkAndCreate -collectionName $_.Model -ParentCollectionID $ManufacturerCollection.CollectionId -wql $wql -limit $ManufacturerCollection.CollectionId
	}
}
</pre>

<p><a href="http://feedads.g.doubleclick.net/~a/y9Fl7OSOL8ZdqcAceSRBZNzpJ1U/0/da"><img src="http://feedads.g.doubleclick.net/~a/y9Fl7OSOL8ZdqcAceSRBZNzpJ1U/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/y9Fl7OSOL8ZdqcAceSRBZNzpJ1U/1/da"><img src="http://feedads.g.doubleclick.net/~a/y9Fl7OSOL8ZdqcAceSRBZNzpJ1U/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.snowland.se/~ff/snowland?a=VuzhtLQPn1w:NUYX79zY8uA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/snowland?i=VuzhtLQPn1w:NUYX79zY8uA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=VuzhtLQPn1w:NUYX79zY8uA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/snowland?i=VuzhtLQPn1w:NUYX79zY8uA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=VuzhtLQPn1w:NUYX79zY8uA:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/snowland?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.snowland.se/~ff/snowland?a=VuzhtLQPn1w:NUYX79zY8uA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/snowland?i=VuzhtLQPn1w:NUYX79zY8uA:D7DqB2pKExk" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/snowland/~4/VuzhtLQPn1w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.snowland.se/2010/03/24/manufacturer-model-collections-with-hierarchy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.snowland.se/2010/03/24/manufacturer-model-collections-with-hierarchy/</feedburner:origLink></item>
	</channel>
</rss>
