Skip to main content

Posts

Showing posts from September, 2009

list active directory subnets with powershell

sometimes it’s fun to do things the long way (not) and then do the equivalent in a shortcut fashion.these are the steps i used to retrieve subnets from active directory.first of all, let’s grab the forest.$myForest = [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest()
now, we can get the list of sites names.$myForest.Sites | Select-Object name
if we see a site name that we like, we can retrieve just that site name and the subnets associated with it.$myForest.Sites | Where-Object { $_.Name -eq'myCity' } | Select-Object Subnets well, that’s probably not what you wanted unless you have such few subnets you can see the whole thing.  let’s pass that through the ExpandProperty feature of select-object.$myForest.Sites | Where-Object { $_.Name -eq'myCity' } | Select-Object -ExpandProperty Subnets
that’s better!

using powershell select-string creatively…

this came up yesterday.  i thought it was cool enough to blog.  i’m sure this is pretty elementary for most of you.

backgroundi was trying to find a way to search a list of files for content and pull back some attributes along with the search.  the problem is once you pass objects from get-childitems through select-string, the type changes. looking at the object typelet’s look at the type before we send it through select-string:PS C:\data\temp> ls | gm -MemberType property TypeName: System.IO.FileInfo Name MemberType Definition ---- ---------- ---------- Attributes Property System.IO.FileAttributes Attributes {get;set;} CreationTime Property System.DateTime CreationTime {get;set;} CreationTimeUtc Property System.DateTime CreationTimeUtc {get;set;} Directory Property System.IO.DirectoryInfo Directory {get;} DirectoryName Property System.String DirectoryName {get;} Exists Property System.Boolean Exists {ge…

how to identify the smsexec thread when processor utilization is high

there’s no secret formula to this.  you’ll just have to roll up your sleeves and do it.  apparently, this used to be in some old article Q234508 which has been removed for whatever reason since this works with sms 2.0, sms 2003, and configmgr (sccm) 2007.identifying the instanceon your troubled server, use these steps to get perfmon to show you where the problem is occurring:fire up perfmon (obviously).add thread object with the following counters:% processor timeid threadfor instances, choose all the instances that begin with smsexec.could be quite a bit.  i had close to 90.if you think it’ll help, you can try the report view (ctrl+r) to isolate the thread causing the problems.  otherwise, you can enable highlighting (ctrl+h) and with zen like patience, move through all of the smsexec threads until you see the thread that’s eating up % processor time.  sometimes it’s easier watching it in histogram view, then double-clicking the line that’s bouncing around like an ice cream charged 4…

looking for a new IM client? try digsby and never go back! (and switch to alpha mode, if you dare)

alright, i admit i might be a little slow.  i wasn’t catching the hidden message behind the trend initially.  lately, people i communicate with pretty frequently had either mentioned switching to digsby or asking my opinion of it.  i guess it has to do with a few well-placed statements about trying out new features in digsby like global status updates and here most recently, the tighter facebook integration.switch to digsbythe trend i didn’t realize was that people are in search of a new messenger client – and usually one that handles all of their social requirements.  i’ve been a long time fan of messengers that are capable of interacting with a variety of services.  gAIM was where i started (which has since evolved to pidgin).  (for my macbook pro, i use adium).  about a year ago, i switched over to digsby.  i haven’t gone back since.  it connects me to all my email services, facebook, linkedin, twitter, etc.anyway, i’m posting this because friends i’ve recommended to use digsby giv…

dell server management pack suite v4.0 released

Image via Wikipedia if somehow you haven’t heard yet, dell released their newest management pack – finally.  it looks as if it’s been rewritten because quite frankly, if you had the misfortune of loading the previous one, then you know what a piece of crap it was.the early word is that you cannot upgrade to 4.0.  it’ll be a wipe and reload.  anyway, here’s the link and a few light details.http://support.us.dell.com/support/downloads/download.aspx?c=us&l=en&s=gen&releaseid=R237719&formatcnt=1&libid=0&fileid=342171Feature highlights of this Dell Server Management Pack Suite v4.0 (A00) -Improvements in scalability and performance over the previous releases by including:Server Scalable MP (for managing large enterprise environments)Server Detailed MP (addon MP that provides detailed instance level monitoring)Performance and Power monitoring and OpenManage 6.1 support for Dell Server MPsDRAC and CMC MPs to monitor Dell Remote Access Controllers and Chassis Management…