Internet Explorer on linux

First off, I really encourage anyone reading this post to move towards google chrome or mozilla firefox. Internet Explorer is best dying a slow death in my opinion. Too many security vulnerabilities, and it’s javascript engine is way slow.

In some situations though you do still need Internet Explorer. Today I had a colleague ask me about running proprietary Microsoft software like Internet Explorer on linux. This is easily accomplished using the many free virtualization packages like vmware and virtual box. I personally prefer virtual box, I run this on Ubuntu 10.04. Once you have virtual box installed, simply install a windows xp or windows 7 guest. The performance is really quite good, and you’ll have easy access to Internet Explorer 8 and 9 as well as proprietary email apps like MS Outlook.

Exchange 2007 fix mailbox permissions error

Often times when migrating mailboxes from exchange 2003 to exchange 2007, one will see an error when trying to login to exchange 2007 owa. The error will occur the first time the user attempts to log in via OWA on the exchange 2007 system. It’s an ugly error that exchange 2007 OWA throws, with text like ‘A problem occurred while trying to use your mailbox. Please contact technical support for your organization.’ There’s a simple fix for this that’s been documented.

In order to verify this problem, you can check the msExchVersion attribute by using the Exchange Management Shell. Run the following command in the Exchange Management Shell prompt:

Get-Mailbox <User_Name>| format-list ExchangeVersion

Note Exchange Server 2007 and Exchange Server 2010 both use the msExchVersion attribute to determine the version of Exchange Server that user objects are associated with.

If the version value is less than 0.1, Exchange Server 2007 or Exchange Server 2010 considers the user object as Read-only.

To resolve this problem, an Exchange administrator should run the following command in the Exchange Management Shell prompt:

Set-Mailbox <User_Name> -ApplyMandatoryProperties

mysql – search all tables, all columns

There are times when I just need to find a phrase or object in mysql that could be buried anywhere. Often this happens with an imported schema where I’m not familiar with the layout and fields. To quickly search the entire db, I somtimes use the anywhereindb script, a project hosted over on google code.

It requires an operational mysql/php based webserver. Although perhaps not the most elegant solution, it does work and and is a quick way to find what you’re looking for in a mysql db. Another caveat that I can think of is that you’ll want to be sure to reset your mysql db password or use a non root mysql user for the anywhereindb scripts connection parameters, since this is sent over clear text using the anywhereindb script.

Better windows file contents searching

Very often I find myself need to search the contents of source files in development projects. This is more than just searching for files, typically I’m looking for a specific word or phrase contained anywhere within a file or many files. On linux platforms, grep makes this trivial. There are windows grep tools, but I’ve always felt the implementation is poor.

By default, Windows XP has a very basic file contents search, problem is it ignores many filetypes. Windows 7 may have improved on this, I’ll have to check into. There is a great utility however that is a vast improvement over the standard windows file contents search. See FileLocator , a powerful tool that performs file contents searching thats light years ahead of the windows built in search. The best parts of the filelocater tool are (1) it’s ability to run from the command line and (2) it’s ability to export results to a csv or text file. Good stuff.

Here’s an example cmd line run of this tool -

C:\Program Files\Mythicsoft\FileLocator Lite>FileLocatorLite.exe -o files-to-change.csv -ofc -ocn -d "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\local-devel" -c live.server.com -f *.php;*.js;*.html -s

In this cmd line we’re using filelocatelite.exe and using ‘-o’ switch to send output of the search to a csv file,  files-to-change.csv.
The ‘-ofc’ switch specifies that we want csv output.
The ‘-ocn’ switch tells filelocator that we don’t want the actual content lines within the file that contain the string we’re searching for.
Next we specify the ‘-d’ switch to tell filelocator what directory we want to search in.
The ‘-c’ switch tells filelocator what string we’re looking for in the files, in this case ‘live.server.com’.
The ‘-f’ switch tells filelocator what files we want to include in the search, in this case we’ve specified them by file extension, *.php, *.js, and *.html.
Finally the ‘-s’ switch tells filelocator that we want to search all subdirectories. Voila!

Exchange 2007 mailbox sizes

Quick powershell cmd for listing all mailboxes with sizes, in MB (copy and paste at ps cmd line)

Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft Disp
layName,@{label="TotalItemSize(MB)";expression={$_.TotalItemSize.Value.ToMB()}},
ItemCount

How to fix broken Exchange 2007 OWA

OWA hopelessly busted in your exchange 2007 server? I scoured lots of posts and forums until I found an easy fix, for me at least. Posting here for my reference, hopefully it helps someone else also.

On your exchange 2007 server -

at a cmd prompt: (substitute wherever exsetup.exe lives on your server for ‘c:\program files\Microsoft\Exchange’ if needed)
c:\Program Files\Microsoft\Exchange\bin\exsetup.exe /mode:uninstall /roles:ca
Next, uninstall IIS completely, including the RPC over HTTP proxy (under networking tools)
(reboot)
then :
C:\Program Files\Microsoft\exchange\bin\exsetup.exe /mode:install /roles:ca
Then reinstall IIS and RPC over HTTP proxy
This solved my OWA woes, after a server reboot, owa works fine again.

Excel 2007 2010 performance links

Three excel links that explain some of the improvements and caveats to Excel 2003,  Excel 2007 and Excel 2010.

DataBison – improving excel performance

add-ins.com – Excel 2007 vs Excel 2003

MS – improving performance in excel 2007

MS – excel team blog – Excel 2010 performance improvements

Outlook NK2 files – another outlook ‘feature’

Most IT admins understand MS Outlooks use of the (sometimes) dreaded .nk2 file.

There are tools available to edit the nk2 files and also to view their contents.

Two good links -

Nirsoft NK2View – good free tool to view and delete bad entries.

Here is the best write up I’ve seen yet on how nk2 files work, and the oft-misunderstood difference between auto-resolve and auto-complete. Also available as a pdf download – Outlook-AutoComplete

Microsoft Network Monitor

After years of using the old outdated Microsoft network monitor when I was forced to on windows (ethereal and wireshark  are better tools by far), I found the microsoft network monitor blog. I downloaded and tried the new version 3.3 (3.4 is in beta). Wow, what an improvement. The capture and display filters actually work like one would expect!

Some of the predefined filters are a nice touch (smtp for example).

I still prefer to have a linux host around with tcpdump and wireshark though for serious traffic monitoring and debugging.

Firefox 4

It’s been announced that the mozilla team is working on Firefox 4. There will be no 3.7 release, the 3.6 chain will be the last versions before version 4. I use firefox as main browser, I’m guilty of having way too many tabs open at one time.

As a developer, the firebug and colorzilla tools are invaluable.

See http://bit.ly/bwEPQZ for more info.