Exchange 2007 Mailbox Size Report – With Powershell

This Powershell script generates a report of all mailboxes in an organization that are larger than 100MB. It sorts them from largest to smallest and generates a pretty HTML report to send. Using variations of this script you could set it to only generate the first 10 “big hitters”, ignore the Custom Attribute fields (which in my situation show which company the box belongs to), or make any other change that would customize it for your environment.

Exchange 2007 OWA HTTP to HTTPS Redirect

UPDATE: Check my next post for further info on this, and the issues it has with IE. There are many methods for setting up IIS to redirect users to the correct site. If a user visits http://email.contoso.com, they need to end up at https://email.contoso.com/owa.  If a user visits https://email.contoso.com, they need to end up at the same place. This is the easiest way I could find to accomplish both tasks:

Full backups of running Hyper-V guests

I’ve written a Powershell script to execute the diskshadow script I mentioned earlier, and implemented a couple of ideas I had. This script will create full backups of Hyper-V guests while they are running. First, this script will check to see if the destination folder has any VHDs that were backed up more than 10 days ago (since this runs every two weeks it will remove the oldest of the two backups that are stored).

Hyper-V VLAN Tagging Issue

I ran into an issue with VLAN tagging on our Hyper-V server. We are attempting to utilize this as part of an overall cable management “new years resolution” of sorts. While the setup through Hyper-V’s management console appears to be straight-forward enough, after following several sets of instructions it was still not working. We were unable to ping the gateway address of the VLANs we were testing with. The issue was based off of the drivers we use on that network card (It’s an Intel Pro/1000 PT).

Installing SugarCRM on Bluehost

Here’s my experience installing SugarCRM on Bluehost. 1 – Uploaded contents of SugarCRM CE after downloading it from Sugar’s site. 2 – Browsed to root of directory. 3 – Ran install. 4 – Failure occurred: The session.save_path setting in your php configuration file (php.ini) is not set or is set to a folder which did not exist. You might need to set the save_path setting in php.ini or verify that the folder sets in save_path exist.

OWA HTTP to HTTPS Redirect, and 403 Errors in IE.

In my previous post I talked about how to accomplish a redirect, however there is a small snag: Using a redirect page without enough text in the HTML file will, in some browsers (*ahem*IE*ahem*) cause them to use their own copy of the error page. This copy won’t have a redirect to the site, obviously, and it won’t work. This can be solved by changing the page to something like this:

Retrieving the Site Collection ID from SharePoint (WSS 3)

I took a quick look through the Central Administration page and was unable to find the Site Collection ID. In the end the quickest way for me to retrieve this was to run a SQL query against the content database. “select id from sites”

Script to Remotely Reset Cisco 7900 Series Phones through Telnet

I used AutoIT to create the following script to reset my Cisco 7940 IP Phones. It could be modified to script almost any telnet commands. It uses a file called “phones.txt” with a list of IP addresses (one on each line). Make sure you have that in the same directory. Let me know if there is an interest in a compiled EXE version of this script that prompts for the password and I can put that together here.

Set a User’s UPN in Active Directory with a Batch File

This simple batch file will modify a user’s UPN and also set first name, last name, and display name. It uses the dsquery command to pipe the required variable into dsmod. Simple and straightforward. SET /P SAM=Sam Account Name:<br /> SET /P UPN=New FULL UPN:<br /> SET /P FIRST=First:<br /> SET /P LAST=Last: dsquery user -samid %SAM% | dsmod user -upn "%UPN%" -fn %FIRST% -ln %LAST% -display "%FIRST% %LAST%" pause

Using diskshadow to backup Hyper-V guests

EDIT: I wrote a Powershell script to leverage this. Recently I required a simple backup method for our virtual servers, which our guests in our Hyper-V based office development environment. Thanks to several knowledgeable bloggers I found information on using Windows Server 2008’s VSS writer: diskshadow.exe. This allows an administrator to mount a shadow copy like a physical drive, and copy its contents elsewhere. There are many other functions to diskshadow, but for this implementation I haven’t delved too far into those.
Newer Older