I've written a Powershell script to make it easier to remove computers from the domain. Currently whenever bringing up a new version of a VM that shared a name with an old one there's an annoying process of removing it from the domain, rebooting, re-adding it to the domain, and rebooting one more time. To streamline the process I wrote the following:
- Import the Active Directory Module
- If that fails try and activate that feature using DISM
- If that fails give the user instructions on how to add the feature using Windows dialogues
- Tries to import the Active Directory Module again
- Removes the given computer from the AD Directory
The script is meant to run on Desktop OSs because I haven't figured out how to get Active Directory tools for Powershell installed on a server that isn't a domain controller. There's a group of features called ADRMS that looks promising but is a little outside my scope for now.
One of my suspicions about the in-house build tool were confirmed by Bruce in that there's no known example of it running on anything other that Server 2003. Bruce tackled it and got a version running on Server 2008 successfully but it broke compatibility with 2003 so we've reverted to the old version for now.
Some of my hardware has arrived so I've got a small stack of drives and RAM at my workstation.
I can't wait for Monday.
No comments:
Post a Comment