There are three methods I believe you can use to wipe data from an HD2 running NAN Android (meaning that WM6.5 is gone entirely and Android is the one and only OS):
1. Boot into MAGLDR and then drop into recovery. This assumes of course that you (or whoever rooted it) installed ClockworkMod recovery. From there you can wipe your data partition, cache, and dalvik cache. The next time the phone boots up it will act as if it was the first time Android ever booted up. If you didn't then this isn't a viable option for you (unless you want to install it).
2. I have never tried this personally (don't even own an HD2) but I was told in another thread that booted into MAGLDR (press and hold power button until you get the black/white MAGLDR screen), and then select "AD HardReset".
http://androidforums.com/htc-leo-hd...te-previous-google-user-info.html#post3231148
3. You simply flash a new ROM over to the phone.
If you are booting from the sd card it sounds like you might not be using NAND Android? When you restart the phone does it boot into Windows first (and then you run something like haret.exe or whatever to boot into Android), or does it boot directly into Android?
Also, when you say restore it, are you trading it back to T-Mobile? If so you'll need Windows on there and I think the easiest thing to do is to simply download the WM6.5 image from tmobile.com and then run the program. It will just wipe it and reinstall Windows.
For more information just ask, though you might want to take a look at a few of the threads that I have posted in for more information. Here are some of the most useful ones:
http://androidforums.com/htc-leo-hd2/387887-unrooting-htc-hd2.html
http://androidforums.com/htc-leo-hd2/393055-noob-here-need-help-hd2-please.html