Saturday, August 26, 2006

The NETSH(ell) command is a very powerful tool included in the Windows 2K+ systems. The following article brings you a few tips on using this command - have a nice one!

A)I have seen a problem a few times where Windows XP computers do not want to change their IP addresses after a move from one network to another. It's like some part of the computers IP stack is still attached to the old IP address - and this happens even though you use IPCONFIG /RELEASE & /RENEW!

Well, in this case the NETSH command is very useful, try this:

NETSH INT IP RESET C:\IPRESET.TXT

After executing the command you IP stack is rebuild in a few seconds.

B)Some spyware and other awful software replaces parts of the Winsock Catalog for "sniffing" purposes - when this crap is removed (by anti-spyware apps for instance) you will sometimes find that your Internet connection is no longer up and running. In this case try the following command:

NETSH WINSOCK RESET

After executing the command you must restart your computer for the changes to take effect. When the system is back up and running you may have to reset the IP stack (tip 1A) - and you should be up and running again now.

C)Within Help & Support you may have found the Network Diagnostics Tool which tests the computers network access in detail - it's actually pretty good, but seldom used I think. If you (like myself) are a command line junkie, you (or a user) can launch the tool by running the following command:

NETSH DIAG GUI

After executing the command a nice HTML interface (The Help & Support page) pops up and you can click "Scan your system" which will end up with a network report.

Testing SMS and other phone stuffYou can use the VMND to test different phone features too. You could try to send an SMS message by doing the following on the mobile device:- "Start" > "Messaging"- click "Menu" > "Switch Accounts..."- select "Text Messages" > click NewSend an SMS to phone# 0010001 with some message and click "Send".Within no time you receive a message from 0010001 with the same message as you sent before.

You can test emergency calls - like: 911A phone line that is allways Busy: 7272024A phone line which is never answered: 7272773

What is next?Next time I have a hard time sleeping I'll expand the VDPS articles with:- "Remote Wipe" and the "ActiveSync Web Administration Tool"- "Device security" settings (in ESM) and how they apply to the device- Direct Push and encryption using HTTPS (SSL)- The mentioned features from an ISA 2004/2006 admins point of view

Well, the virtual domain environment is up and running, now for the funny part.

On "DC" create a new user account called "mobile" and be sure to create a mailbox for the user also - make the password something relatively easy for testing purpose, like "Start123" (must be uppercase + lowercase + numbers by default). From now on just minimize the "DC" VM to save on performance - the rest of the time all we need it love... No, the Exchange server of course - Doh! If nothing else is stated, please use the "EXCH" VM from now on (maybe even in Full Screen mode for better performance.

On "EXCH": From the OWA (http://localhost/exchange - logged in as Administrator) send a test email to "mobile". Hopefully no error messages will return :)

Open Exchange System Manager (ESM) on "EXCH" - expand "Global Settings" > Right click "Mobile Services" and select Properties. On the "General" tab select "Enable user initiated synchronization" AND "Enable Direct Push over HTTP(s)". For now we will not set up any "Device Security" options - but we will test this out later on! For now just select "OK" and close down ESM. Exchange is now ready to handle Direct Push... See picture.

Now we get to the "Virtual Machine Network Driver for Microsoft Device Emulator". Copy the "netsvwrap.msi" file to "EXCH" (use the "drag and drop" feature in VPC) and execute the file (next, next, next etc.).

Now we need the "Standalone Device Emulator 1.0 with Windows Mobile OS Images"... First copy the downloaded Device Emulator files to "EXCH" - then extract the downloaded "V1Emulator.zip" file, and run: "standalone_emulator_V1.exe" (next, next, next etc.). Next execute the "efp.msi" file (next, next, next etc.). Now you are all set :)

- Note: MSFP (Messaging and Security Feature Pack) is required on the Windows Mobile 5.0 device - we are "lucky" that Microsoft provided a Mobile OS image with this Feature Pack on it. This image is a great part in making the VDPS possible...!

Now - within the "WM 5.0 MSFP" mobile device click "Start" > "Programs" > open "ActiveSync". In ActiveSync click "Menu" > "Add Server source", in the field "Server address" specify the (static) IP address of you virtual Exchange server and uncheck the "This server requires an encrypted (SSL) connection" checkbox. Say "OK" to the "Security Warning" that pops up - IRL you should of course use SSL, but this is just a first glance at Direct Push, so no need to get too complicated at this point. You should now see this.

Click "Next" - on the "Edit Server Settings" page specify "User name" (mobile), "Password" (Start123) and Domain (whatever you named your AD domain). Remember to enable/check the checkbox "Save password (required for automatic sync)". This is what you should see now. Let's just ignore the "Advanced" button for now and click "Next". Please also ignore the "Settings" button at the next screen and click "Finish". The mobile device will try to synchronize with our Exchange server - but fails...

It fails because no network connection have been established yet on the mobile device - so don't worry too much yet. The network driver we installed earlier sets up some functionality that I'm going to cover in detail later on (VDPS part 3)- but the most important thing to know right now is, that it creates the "Fake Network" which is used to communicate with the virtual Exchange server.

To establish the needed network connection, click the "antenna" icon at the top of the screen (still within the virtual mobile device). You will see a dialog like this. The dialog states "This network card connects me to: The Internet (or work via VPN)" (default choice) - let's just click "Connect"!

Next click "Sync" to manually initialize the first synchronization from the mobile device - hopefully your device will successfully contact the Exchange server and perform the sync nicely - like you see here - and when finished you should see something similar to this.

As you may claim, we haven't really performed a Direct Push of mail yet - but now it's time for the big test... On the mobile device close the "ActiveSync" application, the "Programs" folder and you should see the default startup view.

Hello there... The following article will try to explain an easy way to setup a virtual environment for you to test out the Exchange 2003 SP2 & Windows Mobile 5.0 Feature Pack features... Without buying any hardware like servers, mobile phones/PDA's etc... Sounds nice, right?

You will have to be able to install several products and components your self (Virtual PC 2004, Windows Server 2003 + Exchange Server 2003 and a few other products)

What do I need to make it happen?Well, you need a pretty good computer (laptop or stationary) with at least 1 GB memory - that is at least what I prefer as a minimum. The CPU should not be less that 2 GHz. You will also need some GB's on you hard drive - could be an external USB 2.0 drive without any problems.

The computer must have a version of Windows XP running - personally I'm running Windows XP SP2 on an IBM Thinkpad T43 with 2GB. I was only able to find the host operating system in a free trial for the 64 bit platforms: http://www.microsoft.com/windowsxp/64bit/facts/trial.mspx (550 MB) - but if you haven't got XP running you must be a "Microsoft Hater" anyway, bye bye ;-)

Please note that the above links may be subject to change, but I trust you ability to Google - please send me some info if/when a link is broken...

I'm ready - everything is downloaded now!Nice job :)

Now, first you must install your host operating system on you computer if this is not already done... Hopefully you have a system up and running already. Then you should install Microsoft Virtual PC 2004 SP1 on top of your host OS.

I can't explain the way VPC works right here, sorry - but from here you must install the first Virtual Machine (VM) - min. 256 MB memory - this would be the Windows Server 2003 SP1. The two VM we will create here both use the "Local only" NIC - disable sound - and enable "Undo discs" whenever you get scared of messing up stuff :) Please remember to install the Virtual Machine Additions at this point for your own convenience.

Update the OS using "Windows Update" (or even better install "Microsoft Update" - with MU you will be able to update your Exchange installation when we get so far).

When you have a good VM server up and running close down the VM and make a backup of the Virtual hard drive - save this backup in a safe place :)

Now set up the virtual server as a Domain Controller (static IP, name like "DC", DNS server & DCPROMO - you could just use the "role" wizard) - when the DC is done we want to create the Exchange server. I prefer to have the Exchange server on it's own box (never on a DC) - not even in a test environment, hehe - that is why we create 2 VMs, if you want to try VDPS on a single box feel free to try it out on your own. Close down the DC while we prepare the Exchange server.

Copy the backup you created of the VMs hard drive and use this in a new VPC (min. 512 MB).

Before booting this new VM the first time edit the MAC address in the .VMC file (check the location of your VM) - find the MAC address in the line stating something like "ethernet_card_address" etc. and edit (using Notepad) the address to another random 12 digit HEX value.

Now boot the VM. When this OS is up and running you should run the NewSID tool from Sysinternals - choose to generate a new random SID and rename the computer to something like "EXCH" or whatever you like. Reboot as required. This tool is used instead of SYSPREP - NewSID is much faster and work great.

Well - when the server is up and running join it to the domain (remember to set static IP info first - DNS should point to the DC, which should be bootet of course). Reboot and logon as domain administrator - start the Exchange installation (including FORESTPREP, DOMAINPREP, restart etc.). Install Exchange SP2 when possible, update the server (you could use "Microsoft Update" as mentioned) and be sure to test the server functionality - easy by using Outlook Web Access (OWA).

When satisfied install Exchange Management Tools on the DC also.

You should now have the following virtual domain scenario:1. A Windows Server 2003 SP1 DC running DNS and Active Directory (with Exchange tools installed)2. An Exchange Server 2003 SP2 up and running nicely (with OWA)