I'm just a tiny bit buzzed on St. Bernardus Abbey Ale right now, so forgive my incoherent babbling ,please.
I've been head-down coding for weeks on a cool little project. The project builds a mountain atop the web-interface we have to SCCM+AD+ our asset management system. The new mountain extends it by essentially "snapshotting" an SCCM collection (computers and all their apps), into a standalone table where we can "model" future replacement needs before putting them back into production. All of this is via web interface. I have to say it was/is the most fun I've had writing code in a long time. I've been swimming around in the SQL end of Configuration Manager for months and learning new stuff every day. I'm dying to dig into 2012! I have RC1 in a virtual lab and will be diving into that asap. Some changes I've seen look really cool. I'm also eager to see what legacy trash they've finally cut loose.
The excitement I had for CAD programming during the 1990's and up until 2006 had faded when I parted ways with the Autodesk development world. The move into "mainstream" Microsoft infrastructure IT has been both exciting and scary at the same time. In some respects not nearly as interesting as writing code to automate design tasks, extracting and integrating data with graphical objects, automating design processes, let alone leaving the fucking awesome world of LISP programming (go ahead and laugh, it blows the shit out of your .NET, Ruby and Java stuff). Alas, the world doesn't stop moving. At 47 it's becoming more difficult to keep up.
St. Berndardus is 10% ABV by the way. Holy shit! A 2 pt bottle and I'm only half done. Bzzzzzzz.
Onward!
What I've missed most about LISP when moving into PHP, VB.NET and Powershell is things like (apply), (mapcar) and (lambda). And (defun), oohhhh. ohhhh.. I need a Kleenex. God - I miss that. There's just nothing in the newer "modern" languages that does that. Sure, they can mimic, but they don't really do it for me.
If I had to rate newer langauges for which is "more fun" I'd have to say it's a close tie between PHP and KiXtart. PHP probably wins out. And before you start moaning about KiXtart and your horrid memories of login scripts - STOP! It's much much MUCH more than that. The language is awesome. The engine is pure perfection. If Powershell could execute on a dime like Kix32.exe - well - let's just say you'd need to call for a cleanup on aisle 9 because I'd lose control of my bowels. Powershell is cool and all, but there's things that bother me about it (like the slow engine start-up, and the cruddy mirror of VBscript's NOW function), but it's still "the future" so we have to open up and drink the new Kool Aid.
I'm really buzzed, um.... yep.
Where was I? Oh yeah... got my Google+ YouTube player blasting. Hold on...
SCCM Collections to Distribution Points
So - one interesting thing about this web/sccm project has been tying intangibles to tangibles. A theoretical data integration model known as "tenuous relations" (sounds like a bad date). The concept is how to link things that are relatively static or predictable to things that aren't. Let's digress - Yes!
So, we have a collection built upon computers which are discovered that are members of a specific AD group. This group is intended to define a "department-based" group of computer assets. We need to identify which protected distribution point server they will hit (as a priority, not exclusively, mind you), but how do you do that?
You can perform a "select distinct" on the v_R_System table (view) using the AD_SiteName0 field (I may have mis-typed that name, don't sue me), and get a list of unique Site Boundaries. From that I can link to the site boundaries view vSMS_CurrentBoundary (more) and hop on through to the DP's via the v_DistributionPoint_Info view (again, I may have the name mis-typed). If you do the SQL joins properly you can pull it off.
Alternatively, if that's too much hair-pulling, you can do this the monkey-wrench way:
Open the MMC console, expand the Site and site management, then click on Site Boundaries. Right click and export to a tab-delimited text file. Save it to your web server, make a code page module to parse it using FSO and map the AD site to the left-most column to pull the list of link speeds and protected DP names.
Warning: The site boundaries do not show all the DP's. Only the protected DPs. If you need all the others (including the branch DPs) you have to query more database tables/views. It depends on which "list" you really need/want. Remember that clients won't exclusively pull from protected DP's if there are non-protected DP's in the same site (or over a fast link as well).
Eh. enough of this. I'm supposed to forget work stuff on Friday night.
No comments:
Post a Comment