Logon Script: Move Local PST Files To Network Share

Download Script: move-pst-to-network.zip

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. Read More

Windows Server 2008 Print Services – ntprint.inf and 64-bit

Server 2008
The Good Ole' Days

Due to some unforeseen issues with our 2003 R2 print server, I decided it was about time to build up a new print server.  The old print server was built up by another person and it was never very stable so this was a good time to start with a clean slate.

Our old server was a Dell Poweredge with a 32-bit proc.  This time, we are going to use our new VMWare ESX environment to stand up a 2008 Server in 64-bit.

Everything went well until I got to our Dell Printers.  I added the 64-bit drivers and setup the printer.  All was well.  I went to the sharing tab in the printer properties to add x86 (32-bit) support.  I checked the box and got an error: Read More

Should I be excited to finally receive a Nigerian scam e-mail?

This weekend, I finally received my first Nigerian scam e-mail. In actuality, this is probably not the first but it is the first one to make it through the e-mail filters. I have to admit, I have felt a little left out over the past few years. I always heard about these e-mails but I never received one. Here is the text from the message:

Subject: PLEASE I NEED YOUR ASSISTANCE
From: clementmattins
Sincere Greeting,
I’m Mr. Clement Mattins from bank of Africa. firstly,accept my apologies ,am the personal accountant to Dr. Ravindra F. Shah who died with his wife Mrs. Manjula Parikh-Shah in a plane crash on 1st Oct. 2003 on their way to Boston. i came across ($8,500.000.00USD) in his balance with our Bank (B.O.A), then i want you to provide an account where this money will be transfer into for both of us, If you are willing to assist me, therefore you should contact me immediately you receive this E-mail for more detail, Regards Mr Clement Mattins Telephone: +226 78 31 77 67

After looking around the net, it became obvious that this is a 419 scam. A few ideas came to mind. Should I play along and screw with the scammer? Should I report this to some official government agency? Read More

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

Download Script: AD-Admin-Audit
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.

I was tasked to get a dump of all the users in our Schema Admins, Enterprise Admins and Domain Admins for our Forest. I started thinking about it and realized a couple things. Two of the three groups reside at the forest root while the Domain Admins group exists for every domain in the forest. This meant I would need to enumerate every domain and depending on the domain, enumerate either all three groups or just one. Read More

SNMP In A Windows Environment

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. Read More

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

Here is a little script I put together for one of our developers here at Aerojet. Feel free to use, abuse, change, tweak, fix, etc.

Here is a zip file of the script: list-all-attributes.zip

'*  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

Fedora 10. Two days later…

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.

There is really nothing much to say about the installation of F10. The installation was smooth and easy. Everything just worked. When it first booted, I noticed an immediate difference. Not only did the boot process look different, it also booted a lot faster than F8. This is due to the inclusion of Plymouth as a replacement for RHGB. I wasn’t sure why it looked so plain though. It was just a black screen with a progress bar across the bottom. After some searching, I found that adding “vga=0x318” would allow a more graphical boot screen at 1024×768 with 16M colors. After the change and a subsequent reboot, it looked more like one would expect.

I would have to say that the folks working on NetworkManager have done an outstanding job. I didn’t my Kyocera KPC650 Verizon card with me during installation. However, it didn’t matter. I just plugged it in while working from the desktop and NetworkManager detected it and I was able to connect in seconds. This was much smoother than using wvdial or any of the other older methods. It is also considerably better than Windows approach.

After adding all my bits, I found that I didn’t need to reference any documentation to get my system 100%. It just was. Everything was there and working. I did add the RPMFusion repos to yum but this is as simple as clicking on the download on their site. Viola, libdvdcss, gstreamer-ugly, et. al. were all there and ready.

I do have one complaint with Gnome. The default image viewer application is just too simple. It doesn’t offer any photo touch up tools or anything. I really wish the folks at Gnome would begin pushing gThumb as the default. It is fast, lightweight and simple enough to use as the default. Yet, it offers those that want to crop or adjust color the tools necessary to get the job done.

In conclusion, I would recommend F10 to just about anybody. It is as stable as any release I have ever tried. It is also as bleeding edge as they come. Those two rarely come hand in hand. It’s nice to see they got it right with Fedora 10.

Re: Linux distros and Apple beat Microsoft’s homepage uptime

A really interesting post was placed on the Royal Pingdom blog that compared average load time and up time of operating system websites. The author took measurements from October 17th through November 17th. He used 16 Linux distributions, Apple.com and Microsoft.com. While his results were interesting, I felt a correlation between page size and load time should be included. I asked the author about this and he responded, “from a user perspective it doesn’t really matter what size the web page is. All that matters is how they experience the load time.”

I created the chart below based off his data and a current size snapshot of the same web pages. I used a Firefox add-on called lori or Line-of-request info to measure the complete size of the page including images and anything stored in cache.

The following two charts show the actual size of each page including scripts, images and html and their speed to load in KBps based on the data from Pingdom.

OS Vendor Website Speed (KBps)

Coorelation of load time by size of page for major OS vendors.

OS Vendor Page Sizes (KB)

This is the page size of each OS vendors main page.

Conclusions

  • Most popular, well funded operating systems have main pages which, regardless of size, have ample bandwidth
  • If all linux sites are combined, the average speed is 130.35KBps. The median speed is 70.84KBps.
  • I’m not sure if the Suse Enterprise site load time was measured correctly. It measures in at a whopping 388KB! However, its load time averaged 591ms giving it amazing results. I am wondering if the flash heavy website wasn’t being measured correctly in Pingdom’s tests.
  • There seems to be a direct correlation between the funding, bandwidth and bloat of the website. I guess if you have all the bandwidth you could ever want, file size doesn’t matter. Unless you want to be nice to those of us with SLOW INTERNET!
  • It is interesting to point out that even those with the slowest transfer speeds will still usually beat out the loading of the bloated pages from a users perspective. This is ultimately what really matters as pointed out by Pingdom.
  • PC Linux OS could really do themselves a favor and get rid of some bloat!
  • Apple and Ubuntu seem to be the most balanced between size, bandwidth and load times.

Vista vs XP

So, as most of those who know could have guessed, I’ve become the computer fix-it guy over here. Between our firewalls, proxies and lack of reliable phones, troubleshooting is made difficult. The past week, I have had to fix four computers. That makes nine complete format and OS reinstalls. Of those, all nine had Windows Vista installed. I’m not a Vista guru but it seems to me that Vista was rushed to market. In every case, the only resort available was to upgrade them to XP. I say upgrade because the stability and performance after moving them to XP was remarkable. Every Marine was glad to have the reboots snappy and system stable. Most of them just figured the slowness of their computers was due to the laptop and not due to the bloated operating system Microsoft released.

Only one of them I was able to salvage. I found a nice little hack to reset any users password using Linux and some intuitive programming. This is definitely one of those “must have”‘s for the toolbox. The funny thing was, once I restored the Marine’s password, he asked if I could put XP on his laptop just because Vista was so annoying, bloated and slow.

I was also reading a story on how RedHat plans to capitalize on Microsoft’s release of Vista and the slowdown in the economy. I guess both of these type of events have, historically, led to the adoption of alternative software and operating systems. I really hope so. It would be nice to see some more competition out there. Mac has made a nice stand recently with their products. I guess we will see.

For me, I look forward to the late November release of Fedora 10. I’m going to be building up a new computer based on the “Ultimate Budget Box” on Ars Technica’s website. Sub-$500 isn’t bad for a full system with speakers, LCD monitor, keyboard, mouse, etc. Plus, it only pulls 90 watts which will help with the electricity bill.

Anyway, I guess this is all wishful thinking.

Don’t Fear the OOP

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 wtih 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.

Okay, so that seems pretty simple. I get these things. However, I don’t see how the hell I can relate that methodology to creating an application for LDAP or even a simple calcualtor for Marine Corps Cutting Scores (the score that gets us promoted).

Luckily, the internet has a plethora of information and I found it on a Stanford student’s website. Jos Claerbout wrote the paper back in 1999. It isn’t on the intricacies of Java. Since OOP is a method or style or paradigm of programming, it doesn’t change as much over time so the age of the document is less relevant than its style.

Mr. Claerbout’s paper is called Don’t fear the OOP. He uses a trashy western novel as his focus to describe OOP. Each idea is presented in “pretty” colors. If in green, the idea is discussed in terms any literate human could understand. If in yellow, it is a bit more programmatical but still not full fledged “programming talk”. And, if in red, it is all about the code. I can’t say I have ever read a paper that used these styles of teaching but it works. It has been a great reference to put me over that edge so I can get beyond the rut I’ve been stuck in.

The internet really is a great place…