Skip to main content

Writing

2009

Logon Script: Move Local PST Files To Network Share

So, my buddy (and former co-worker) called me yesterday for some help with a script he put together. His script checked the local profile in Outlook for any PST files that were stored locally. If it found any, it would them move them to the users home space. We tried and tried to get the script to work properly but it never seemed to work 100%. Being that he is a good friend and this would be useful at work, I decided to take the work he had put in and get the thing working.

Fedora 11 Beta: First Reactions

·2 mins
It seems like just yesterday that I got home from Iraq and refreshed my laptop (Dell Latitude D610). I ran Fedora 8 the entire time I was in Habbaniyah. After getting home, I was excited to get a chance to skip 9 and go right to Fedora 10. I didn’t use it long before I got a new laptop (Dell Latitude D630). Linux never made it on the new laptop. After I read a review of Fedora 11 Beta, I figured it was worth a shot. I downloaded Gparted LiveCD, opened up 20GB of space and popped in the DVD. I split this posting into three sections: the good, the mediocre and the ugly.

vbScript - List All Members Of Sensitive Groups: Schema, Enterprise and Domain Admins

·4 mins
Update 2011.06.21: I found a missing line in this script keeping it from running. I fixed that in the code below. I also added a downloadable zip file with the script to help with the formatting issues caused when copying and pasting directly from the site. Update 2009.04.16: At the request of a commenter, I added a couple lines to the script that will dump the output to a text file in the root of the C: drive. I also corrected a couple errors in the script.

SNMP In A Windows Environment

·2 mins
The difficult part with managing SNMP via Group Policy is that SNMP is not installed by default. The first step is to install SNMP on all the machines you want to monitor via SNMP. This can be managed a couple ways. The simplest method that I have used is the one Zenoss recommends. If you only have a couple of machines to install SNMP on, it may be easier just to go into the Add/Remove Programs –> Add/Remove Windows Components –> Management and Monitoring Tools –> Simple Network Monitoring Protocol.

List All User Object Attributes in Active Directory Schema.. Whew!

·2 mins
Here is a little script I put together for one of our developers here at work. Feel free to use, abuse, change, tweak, fix, etc. '* Script name: List All Attributes.vbs '* Created on: 01/28/2009 '* Author: Andrew J Healey '* Purpose: Exports all attributes from the user object type within '* the Active Directory schema. '* Usage: cscript /nologo "list all attributes.vbs" > Attributes.csv '* History: Andrew J Healey 01/28/2009 '* - Created script ' Option Explicit 'Declarations Dim objUserClass : Set objUserClass = GetObject("LDAP://schema/user") Dim objSchemaClass : Set objSchemaClass = GetObject(objUserClass.Parent) wscript.echo chr(34) & "Mandatory" & chr(34) & "," & _ chr(34) & "Name" & chr(34) & "," & _ chr(34) & "Syntax" & chr(34) & "," & _ chr(34) & "Single/Multi Valued" & chr(34) Call GetAttributes(objUserClass.MandatoryProperties,objSchemaClass,True) Call GetAttributes(objUserClass.OptionalProperties,objSchemaClass,False) Private Sub GetAttributes(x,y,z) Dim strAttribute 'Loop through all attributes For Each strAttribute in x Dim strOut : strOut = "" 'Compares whether the attribute is mandatory or optional 'Prints whether mandatory/optional and name of attribute If z = True then strOut = strOut & chr(34) & "Yes" & chr(34) & "," & _ chr(34) & strAttribute & chr(34) & "," Else strOut = strOut & chr(34) & "No" & chr(34) & "," & _ chr(34) & strAttribute & chr(34) & "," End If 'Get the attributes syntax: i.e. Integer, String, NumericString, etc. Dim objAttribute : Set objAttribute = y.GetObject("Property", strAttribute) strOut = strOut & chr(34) & objAttribute.Syntax & chr(34) & "," 'Determines whether column holds multi or single values If objAttribute.MultiValued Then strOut = strOut & chr(34) & "Multi" & chr(34) Else strOut = strOut & chr(34) & "Single" & chr(34) End If 'Print string to screen. Each line its own CSV. wscript.echo strOut strOut = Empty Next Set objAttribute = Nothing strAttribute = Empty End Sub

2008

Fedora 10. Two days later...

·3 mins
So, I found a way to download, burn and install Fedora. This normally wouldn’t be a big deal but I’m roaming house to house until Rose and I find somewhere to live. I survived Iraq with Fedora 8 and I really wanted to try out the latest. I really enjoyed 8. It was stable and served me well on my journey. But, being the geek I am, I couldn’t resist but install the latest and greatest. And, two days later, I have no regrets. I can honestly say that this is the best distribution I have tried. I used Ubuntu 8.10 as soon as I got home to see what had changed on the Debian front. I wasn’t all that impressed. While it operated smooth, it was missing a few bits which I really wanted. It was lacking the latest OpenOffice.org, Mono and Eclipse and it excluded the Empathy IM package which I wanted to try. It also didn’t have a ready-to-go NetBeans installation in its repositories.

Where the Sidewalk Ends

·1 min
There is a place where the sidewalk ends And before the street begins, And there the grass grows soft and white, And there the sun burns crimson bright, And there the moon-bird rests from his flight To cool in the peppermint wind. Let us leave this place where the smoke blows black And the dark street winds and bends. Past the pits where the asphalt flowers grow We shall walk with a walk that is measured and slow, And watch where the chalk-white arrows go To the place where the sidewalk ends.

Don't Fear the OOP

·2 mins
One of my biggest hurdles I have come across since taking on Java is really getting my head wrapped around the OOP (object oriented programming) idea. Most of my previous experience with visual basic and php was procedural programming. Because of this, my mind is stuck thinking in those terms. All the e-books I have been going over describe OOP as something that “should” be easy to grasp. A class is a classification of an object. An object is a noun, like a dog, that can be described attributes or fields: four legs, two ears, two eyes, brown, tail, etc. A method is how that dog interacts with other objects: playFetch(), catchFrisbee(), peeOnLeg(), etc.

Software for CTARNG

The other day I was contacted by a Cpt Miller with the Connecticut Army National Guard (CTARNG). It turns out that the entire CTARNG uses the program I wrote called Active Directory UserMod Assistant. Cpt Miller needed some modifications made to make it work in his environment. I was able to help him out with his mods. It was a bit odd getting a request like that in Iraq. He didn’t know I was here but it was nice knowing that the program I wrote is helping out the Military.