Archive for the ‘ technology ’ Category

One line administration – search and delete computer accounts

Here’s a quick one-line script I’ve been using to clean up some old computer accounts in active directory. It requires the dsquery and dsrm tools from the Server 2003 Admin Pack or the Remote Server Administration Toolkit.

@for /f %%a in ('DSQUERY COMPUTER -NAME *%1') do (dsrm %%a)

Save that in as a batch file and it’ll query Active Directory for computers including the argument passed.  Here’s an example with a naming structure where we have the last 4 digits of the MAC address in the name for uniqueness.

C:\>adrm.cmd 6736
C:\>(dsrm "CN=LABPC6736,OU=Labs,DC=yakk0,DC=org" )
Are you sure you wish to delete CN=LABPC6736,OU=Labs,DC=yakk0,DC=org (Y/N)? y
dsrm succeeded:CN=LABPC6736,OU=Labs,DC=yakk0,DC=org

Fun with icacls

We’ve been having some random problems at work with various software packages and have tracked it down to folder redirection policies and permissions. It appears that years ago people couldn’t get folder redirection working right and rigged it up with some registry hacks and scripts. It works fine in 2000, which most of our users use, but breaks in Vista because Vista doesn’t like to redirect to a drive letter. In particular we were noticing the Application Data was partially on the network share and partially on the local drive. The other thing we’ve noticed is the permissions on the folders aren’t set properly. Following Microsoft’s recommended settings for permissions and redirection policy, we tested and sure enough things started working.

Read more

Fun with virtualization

Part one of my home computing infrastructre is done. I am moving from the free VMWare Server to Hyper-V on Windows Server 2008 R2 Beta (thanks to my Technet subscription). VMWare Server is nice, but a little slow. Hyper-V is something I’ve wanted to play with for a while, but I was also considering VMWare ESXi, which is a free version of their enterprise ESX server. I settled on Hyper-V moved everything off my server onto my Drobo.

Read more

Increasing max capacity on Drobo (or how my network learned to hate me)

My wonderful wife got me a 1.5TB drive for my Drobo for Christmas. Currently the little storage robot has 3 500GB drives configured for a max capacity of 4TB. When I got the device, I thought that it’d be longer until the larger drives came down in price and figured it’d be enough. Boy, was I wrong. that 1.5TB drive was around $100 when we got it. The 500GB drives were around the same price in June when I got the drobo. Hard drive prices are plummeting, so I figured that I’d reconfigure the Drobo for the current max of 16TB now while I had the chance. It’ll be a long time before I can fill that up…right? Read more

Bookmark pruning

It’s a new year, so I felt like it was time to do some major housecleaning on my systems.I started with my bookmarks. It might not seem like much, but I’ve been carrying the same bookmarks.html file from system to system since I first started using Netscape in 96-97. It’s gone from Netscape to IE, with some time spent in Opera along the way, and currently lives in Firefox. I’ve kept it in sync on my various computers with Google Browser Sync, and now with Foxmarks. There were a ton of dead sites in there, as well as many, many duplicate entries. I figure the dupes are from problems importing and exporting, as well as when I used browser sync. When I started I had nearly 2000 bookmarks, and now I have under 200.

Next up on my cleaning list is probably my macbook pro which is under 6 months old, but has a lot of junk on it. I’m also working on my Drobo, trying to get everything off it so I can increase the max capacity on it. It’s got 715GB used out of 1TB available, and I got another big drive for Christmas to put in there.