Archive for the ‘File Operations’ Category

Howdy all. I have finally got my act together and have moved the blog over to our domain hosting at Please update any bookmarks or subscriptions you have, as over the next week or so I will be taking down this page.

Just a place holder for now, I will come back and update with some more info when I get a chance. (more…)

Nothing too exciting in this one, just had to do a quick comparison of user home folders against what was set in Active Directory as part of file server permission’s remediation task.

Recently had an issue with a poorly coded in house application that was dumping out small report files for every user request and had no cleanup or folder structure for these reports. The end result being some 1.6 million small files in a single directory, all with the same naming structure “FTGReport_. Now, add to this that it is running on Windows 2003 server and you have a problem. As 2003 was still generating short names for files, if you have more than 300,000 files with the same first 6 characters, you hit this odd issue, where file system performance dies a horrible death, as the kernel is looping trying to find a unique shortname to use.

To get around this, I had to attach the VMDK to a Windows 2008 box and use the script below to reorganise all the files into a date stamp based folder hirachy. Because despite the application not actually using any of these files, they needed to still be accessible for historical and audit purposes in some fashion! (more…)

Ever had one of those really odd issues where the prod and test server are supposed to be identical, but a process works on one and not the other? I had that recently and I was sure it was related to a service pack or application upgrade that had taken place. I ran this Powershell script across the 2 servers to find any DLLs in the System32 directory that were different. Turned out to be the MSJET35.dll. (more…)

I had an interesting one this week. The company I was doing work for had a user home drive setup, where by each user had a hidden share on the main file server. This is very different to what I have seen in the passed. I’m used to seeing a single base share, eg. \\fileserver\users$\, where each user then has a sub folder that their home drive maps too. In this case, every user had it’s own share, eg. \\fileserver\dylan$. As part of the migration, there was a decision made to switch this setup around to have a single base share. (more…)

This script requires the PowerShell Community Extensions for the Get-Hash function. It will use the MD5 hash of any file as the key for encryption/decryption, take a plain text input and output the encrypted text, or vice versa. (more…)