Wednesday, July 28, 2010

Automating a Windows 7 install

Lookie! I’m ranting about computers now! Smile

Ok, so for the last couple of weeks, I’ve been working with Windows AIK, scripts, and Windows PowerShell to come up with a fully automated Windows 7 install for work. Mind you, I’m extremely anal when it comes to computer procedure and writing scripts. This is why I’m not a programmer. I probably would have finished this a week ago were it not for my OCD-ism.

It took a couple of days to learn the WSIM (Windows System Image Manager) interface. Once you get used to it and understand the different passes in an install (this is something new that started with Vista), it’s actually pretty intuitive. Between this and Sysprep, creating an automated install has become so much simpler than it was during the .ini file early days of Windows NT to XP. I’m starting to really like XML (eXtensible Markup Language).

To save from having to do a bunch of stuff by hand (I have some “geniuses” I work alongside that don’t follow written and verbal directions very well), the install calls some registry tweaks and does a few other things in the “post-install” phase. In the past, I accomplished this with another coworker via .cmd scripts. Now that the responsibility has fallen solely on me, I’m trying to broaden my horizons by leveraging more powerful and secure tools in the Windows environment. Most of the computer’s configuration settings are accomplished via Group Policy Objects (GPO’s) via our domain environment. I L-O-V-E GPO’s! However, GPO’s have their limitations and scripts are still required. Eh. Why can’t Windows be simpler like Linux? WSH and VBS are still the primary scripting languages in Windows with WMI and WinRM (Windows Remote Management) being the primary form of system management. However, Microsoft is highly touting and pushing the PowerShell environment. Now learning PowerShell is a pain. PowerShell a collection of Windows Scripting Host (WSH - Windows’ primary scripting language along with Visual Basic Scripting - VBS - and Javascript), Windows Management Interface (WMI) calls, and Command-line scripting (“BAT files”, for the old computer literates) all in one. It’s an extremely powerful tool to have in your management tool bag. Like learning any new “language”, it takes time. I’ve been cheating and modifying scripts off the web for my own usage. I’ll write my own and learn the contexts some other time.

Now that I’ve introduced you to my carefully crafted baby (and extreme headache), I’ll try to break down each of the parts in a tutorial, of sorts, for you to apply to your own environment. Hopefully this will allow you to have your install ready to test and push to production within a couple of days instead of the couple of weeks it took me. Winking smile Stay tuned for the details.

 

l8rz!

No comments: