Removing Bitlocker Volume (BDEDrive) from Windows Server 2008R2

**** THIS DOCUMENT IS PROVIDED WITHOUT WARRANTY, USE AT YOUR OWN RISK ****

I recently ran into a situation where I needed to add more Harddrive space to one of my Windows Server 2008 R2 virtual machines. Seemed simple enough, add some GBs to the drive in VMWare, get in Disk Management on the VM, right-click the volume and hit Extend.

Not so fast, I look in Disk Management and I have a 300mb Volume labeled BDEDrive. Because that volume is present I have no option to extend my system partition. A little googling yielded this result.

Apparently the template I use to deploy all my virtual machines has the 300mb volume even though Bitlocker is not running. Still not sure why that is, maybe it part of the default Windows Server 2k8 R2 install.

Anyway, to get rid of that 300mb volume do the following:

1. You might want to snapshot the VM before proceeding. I’ve done this about 20 times and never had a problem but you never know.

2. Open a CMD prompt as an Administrator

3. Type bcdboot c:\windows /s c:

4. Reboot the server

5. Get in Disk Management and delete the 300mb volume and you should now be able to extend the system partition.

Search all Exchange 2010 Mailboxes for a specific filename (Powershell)

**** THIS SCRIPT IS PROVIDED WITHOUT WARRANTY, USE AT YOUR OWN RISK ****

Tested on Windows Server 2k8 R2 and Exchange 2010

NOTE: The user you run the script with must have the “Discovery Management” RBAC Role.

This script will search all mailboxes for email with attachments named “document1” and “document2” regardless of the file extension. The script will then copy the email message to the “admin.mailbox” mailbox in a folder called “Search_07102014”. Once the script is complete open “admin.mailbox” in Outlook and you’ll see the “Search_07102014” folder under the Inbox containing all the results.

 

This modification will search for all “.doc” and “.pdf” files and copy them to the same mailbox and folder.

 

To search for keywords use this modification.

 

Scan for Pii with Powershell

I use this script to search our fileshare for Social Security Numbers… or something that has the same format as a SSN.

 

SMPTdiag Powershell Script

*** THIS SCRIPT IS PROVIDED WITHOUT WARRANTY, USE AT YOUR OWN RISK ***

This script will take input of the Sender Email address as well as the Receiver Email address. Once it checks for an Email address smtpdiag.exe /v (verbose logging) is executed and written to c:\userprofile\desktop\smtpdiag\smtpdiag.log

Tested on Windows Server 2k8 R2 and Exchange 2010

Usage:
1: You must download SMTPdiag from the Microsoft Website here (http://www.microsoft.com/en-us/download/details.aspx?id=11393).
2. Copy the smtpdiag.exe and this script to a folder on you computer. (I put is all in c:\smtpdiag)
3. Open Powershell and navigate to the folder in step 2.
4. Run the script by typing .\smtpdiag.ps1