Monday, November 12, 2007

Initial steps with Scripting System Center Configuration Manager

I've begun delving into the ConfigMgr SDK to start writing some scripts for it.  My primary interest is in working on a set of Resource Kit tools for Desired Configuration Manager.  I've found that everything I've looked so far has been in WMI.  Which is both a blessing and a curse. It certainly makes it easier to access from Powershell's native Get-WMIObject Cmdlet.

Obviously the first thing I needed to be able to do was figure out the right namespace.  Easy!  root/sms looks good.  Wait there's almost no information here... Time poke around some more.  Hey look an object named SMS_ProviderLocation What could that be?  Turns out it lists the sites that it knows about and most importantly it has a flag on which one is the local site and where the namespace for that site is. 

The method to my madness scripting wise is to break down every task in to the smallest reasonable chunks and create scripts or functions out of them.  This is what I have done for getting the sitecode.


Param (
    [switch] $Verbose = $True,   
    [string] $ComputerName = '.'
Begin {
    if ($Verbose) {
        # Set verbosity
        $VerbosePreference = 2
    $ErrorActionPreference = "Stop"
    # Constructed Variables
    $script:Namespace = $("root\sms")
    Write-Verbose $("Namespace: " + $Script:Namespace)
Process {
    #get baselines
    $q = 'select * from SMS_ProviderLocation where ProviderForLocalSite = true'
    $wmi = Get-WmiObject -ComputerName $ComputerName -Namespace $Script:Namespace -Query $q -ErrorAction Stop
    Write-Output $wmi.SiteCode

Saturday, September 29, 2007

So it's been a while since my last post...

It's been quite some time since my last post. So I figured I should put something out here so Blogger doesn't think I died or something.
I'm right now siting at a bar in the Denver airport waiting for my flight to start boarding.

But that's the end of my story, let me begin at the beginning.
About 2 months ago now I got a phone call on my cell.  Totally out of the blue and unexpected I was being asked if I would be willing to entertain the possibility of leaving my comfortable position at The Bank and move to a small, young company.  The company had the benefits of being small, young, growing like a weed and being pushed as the go to partner for security monitoring by an exceptionally large and prosperous company we all love to hate.

The next day nobody could piss me off.  There's nothing quite like somebody you respect as really knowing their stuff calling because they want you to work for them.  An interview and trip to the office later and I'm pretty well hooked.  We worked out the details of an offer I simply couldn't refuse and I put in my notice.  They encouraged me to put in an extra week as a courtesy to The Bank which I also agreed was for the best.  To top it all off I left that week to head off for a week of vacation.  Promising new job, a little more financial freedom and vacation all at once?  I must have dome something right in a previous life!

Once I finish off the rest of my time at The Bank, which seemed to pass instantly and drag on forever at the same time, I showed up at my new office.  Oh I actually get my own office now?  Start poking around and find that they simply haven't had a systems admin and there's a ton to be done from that perspective as well as the job they hired me for.  Within the week I felt like I was contributing to the Team (very unusual for me to feel that way in my experience).
The hours have been flying by.  This is the busy season so there's been a lot of work to do and not enough hours to do it in.  We rush to complete a project that the Aforementioned (not so) "Evil Empire" hired us to do because they looked to us as the experts.  Then I fly to Redmond, the seat of the Empire.

The Empire's dominion is everything you could think of it to be.  They set me up in the product lab and gave me a run through of the tool they use to build their lab environments.  My jaw drops, the clouds part, the sun shines, angels sing and life becomes so much easier.  Of course it'll be available internally everywhere in the Empire in a year or so and not to see the light of day outside for a few years.  15 minutes of "work" later my lab is building itself with nothing for me to do but watch and listen to the people around me.
It was amazing, the tool and the conversations both. These people were me.  (NOTE:  Had to shut down and actually get on the flight. Frontier has a cool feature, along with doing the Jet Blue thing and offering DirectTV in-flight, they have a channel that shows your current position, speed and altitude. I'm presently at 458 MPH at 36472 feet ASL.)


Where was I? Oh yes, listening to the people around me in the lab. They were talking about random stuff related to testing the products the lab was centered around.  Their conversations were very technical and enthusiastic.  They had fun playing with their toys, reveling in the chance to make life better for Tech Geeks everywhere.  I ate lunch and had drinks with various Peon Geeks as well as Product Managers and architects.  All of them truly loved the products they were working on.  They expressed a desire to understand how their products were used in the real world and what the deficiencies were.  It is apparent that the rumors of the Empire taking good care of it's people are true.  Refrigerated cases with Sodas and juices were on every floor, every office had been uniquely marked by the inhabitant, there were pool tables and foosball tables that one would occasionally during lunch or near the end of the day see see Geeks playing at while discussing what they were working on. 


There was an obvious desire to "tell all" but alas every company must keep it's secrets about what lays ahead.  What we did learn was both exciting and encouraging.


The future looks bright for the Corporate IT Geek.  I feel blessed to have the opportunity to be involved even at the fringes of the groups who are the movers and shakers of this industry.


Signing off from 520MPH, 40647 Ft ASL somewhere over Colorado, K5WTF

Wednesday, February 28, 2007

Windows Home Server Install

So I found a machine laying around last night that met the modest specs required by WHS. After popping a bigger hard drive in it I started the install. It was a relatively painless install with no choices required (both good and bad) . The lack of choices is a small annoyance.

I'd like to be able to name my server whatever I want for instance but you do not get a choice there. The name is chooses incidentally is Server. While accurate it simply doesn't fit with the names of my other machines.

Also of a greater annoyance is the extremely high number of reboots required during the installation process. I didn't count but wish I had at this point. I'm surely hoping this is a Beta artifact.

Once it finished rebooting for the 47millionth time, it started up and I was able to login as administrator with a blank password which it immediately prompted me to change. It did allow me to continue with a blank password which I found out accidentally. As always when this is released as an embedded appliance, default passwords will be the primary security weakness. The first client to connect should force a password change from the client side (appliance units will be totally headless) to make this seamless and simple for the user.

I had some pretty significant difficulties getting the client installed and working on my first machine. However, these were all issues with my network at home. Recent updates of Fedora had broken my DDNS setup on the DNS domain I'm using internal to my home network. This kept the client from being able to resolve the server's name properly. After correcting this issue, the client connected up flawlessly.

Due to the late evening start time and the DNS problems, I didn't have time to delve any further into my new toy. I do however look forward to playing with the backup system in the next few days.

Monday, February 19, 2007

Windows Home Server Beta

You may or may not have seen the recent news that Windows Home Server has gone Beta 2. I applied for and received an invitation to the Beta.

I'm 60% through the 1755.4MB download of the most recent build package with all of the accompanying discs for client software and recovery etc.

Nothing much to say about it yet but I'm quite excited to see how it plays once I get it home and installed.