IT Ramblings

Ramblings from an IT manager and long time developer.

NAVIGATION - SEARCH

Keyboard shortcut to enable/disable track activity in solution explorer

When I'm working in Visual Studio, I generally turn off the option to automatically track the curent item in the Solution Explorer. I don't like the Solution Explorer hopping about as I switch from file to file. Sometimes I do like to find whatever I'm working on, though, and that can be painful if you do it manually.

Fortunately, Visual Studio has a command you can bind to a keystroke to do exactly that: View.TrackActivityinSolutionExplorer

It's not bound to a key by default, but you can go to Tools -> Options and bind it yourself. I've got mine bound to Ctrl+Shift+Alt+T. ('T' for 'Track' but you might want something more memorable for you.)

NOTE: This will TOGGLE the Track Activity -- so remember to hit it again to turn it off!

Identify a web server

Here is a quick way to tell what software a web server is running

 

  1. Open a command prompt
  2. Enter: telnet [SERVER NAME/IP] 80
  3. Enter: HEAD / HTTP/1.0
  4. Enter: [blank line]
Result should look something like this

HTTP/1.1 200 OK
Server: Sun-ONE-Web-Server/6.1
Date: Tue, 17 Aug 2010 20:38:38 GMT
Content-type: text/html
Connection: close

or 


HTTP/1.0 500 Internal Server Error
Server: Microsoft-IIS
Date: Tue, 17 Aug 2010 20:41:41 GMT
p3p: CP="CAO PSA OUR"
Content-type: text/html

 

Resizing a VHD drive

Resizing a VHD drive is not particularly complicated, it just involves a number of steps.

To Shrink

  1. Mount the VHD in Windows 7/2008 using Disk Management Tools (or DISKPART)
  2. Defragment the drive, makeing sure the free space is also defragmented (UltraDefrg in Optimize mode is a good free tools for this)
  3. Resize the main parition using Disk Management Tools (or DISKPART)
  4. Unmount the VHD Drive
  5. Resize the actual VHD file (VHDResizer is a great tool for this)
    1. http://sysadmingeek.com/articles/how-to-resize-a-microsoft-virtual-hard-drive-vhd-file/

To Expand

Resize the actual VHD file (VHDResizer is a great tool for this)

  1. http://sysadmingeek.com/articles/how-to-resize-a-microsoft-virtual-hard-drive-vhd-file/
  2. Mount the VHD in Windows 7/2008 using Disk Management Tools (or DISKPART)
  3. Defragment the drive, makeing sure the free space is also defragmented (UltraDefrg in Optimize mode is a good free tools for this)
  4. Resize the main parition using Disk Management Tools (or DISKPART)
  5. Unmount the VHD Drive

 

Using Windows Server 2008 as a SUPER workstation OS [Part 2]

[Note: This is a copy of this post]

This is a continuation of my previous post  Using Windows Server 2008 as a SUPER workstation OS

Here are a couple of things I missed in my previous post

11. Processor Scheduling

As pointed out in a comment on my previous post; On Windows Server 2008 background services are given preference over interactive programs. You can change this behavior by

Control Panel > System and Maintenance > System > Advanced System Settings > Advanced > Performance > Settings > Advanced > Processor Scheduling

Setting this to Programs will make foreground programs more responsive.

12. Visual Effects

One thing you will notice on Windows Server 2008 is that by default you will not see Preview Thumbnails in your Documents / Music / Video folders. This has to be enabled explicitly.

Control Panel > System and Maintenance > System > Advanced System Settings > Advanced > Performance > Settings > Visual Effects

Based on your preference you can tweak these settings.

13. Power Options

Do your bit for a Green World! The Balanced (default) power plan on Windows Server 2008  does not turn off hard disks by default. On Vista hard disks are turned off after 20 mins. You can change this by

Control Panel > Hardware and Sound > Power Options > Change plan settings

It does take a bit to kick start the hard disks when you resume work but that's a sacrifice worth making for a greener world :).

14. IE Enhanced Security 

IE Enhanced Security Configuration has been moved from Add Remove Windows Components (on Windows 2003) to the Server Manager on Windows Server 2008.

Server Manager > Security Information > Configure IE ESC

You now have a choice to disable it only for Administrators. 

And to end with a couple of clarifications

* Why am I recommending Windows Server 2008 over Windows Vista ?

I am not!

* How to get Sidebar / Media center on Windows Server 2008?

My honest opinion would be to look for alternatives.

* Will hardware problems go away moving to Windows Server 2008?

Not likely. One of the biggest complaints against Vista was hardware issues. Without proper  drivers from your hardware vendors your ride on Windows Server 2008 is again going to be bumpy. For me all Vista compatible drivers worked fine with Server 2008 and I believe they should work for you as well.

* Will all software work on Windows Server 2008?

Most will but some setups detect Windows Server 2008 as a server OS and may not install. The compatibility mode does not have a Vista option only XP / Windows 2003 and other legacy OS.

Using Windows Server 2008 as a SUPER workstation OS [Part 1]

[Note: This is a copy of this post]

Windows Server 2008 is the best OS to be released till date from Microsoft's stable. And the moment I got hold of the RTM build I could not resist installing it on my workstation. Due to the nature of my work I always prefer running a Server OS on my main workstation... I have been running Windows 2003 disguised as XP (with all the themes and stuff) all these days.

So here is my tale of how I went about setting up Windows Server 2008 to look and fell like its desktop counterpart Windows Vista.

1. Enable Hardware Virtualization

My workstation is a x64 machine with hardware virtualization capabilities. This means I can run Hyper-V on my machine. Even if your machine's hardware supports virtualization it is most likely not going to be enabled by default. You have to enable it via your BIOS setup.

2. Install the latest Graphics and Audio drivers

Being a server OS Windows 2008 carries with it basic graphics and audio drivers. To utilize the full strength of your hardware ensure you install the latest drivers for both graphics and audio hardware. Only with the proper graphics drivers will you be able to enable the "Aero" experience on Windows 2008.

3. Desktop Experience Feature

The Desktop Experience Feature enables a bunch of stuff that is by default present on a desktop OS. Most importantly it includes Themes, Windows Media player and the Aero related features. You will have to enable it form the Server Manager. The "Turn Windows features on or off" / "Add remove windows components" has all been rolled into the Server Manager now.

Server Manager > Features > Desktop Experience

Installing the Desktop Experience feature does not enable them. You have to manually set them up.

4. Themes

To enable Themes you will basically have to enable the Themes Service. Again being a server OS it is not enabled by default.

Services.MSC > Themes

Set the start up type to Automatic

Enabling the Aero Theme.

For this go to Control Panel > Personalization >Theme and select Windows Aero

5. Search

Search is also disabled by default on Windows 2008. Searching is important for me as I use it a lot to find my emails. To enable search you will have to add the File Services Role via Server Manager.

Server Manager > Roles > File Services > Windows Search

Outlook relies on this search service.

6. Disable Shutdown Event Tracker

Since I am using it as a workstation I do not want to keep a track of all the Shutdowns. The Shutdown Event Tracker is the pop up that you get asking you for a shutdown reason. To disable it

Open mmc.msc

Add the Group Policy snap-in

Under Administrative Templates expand System

Set Display Shutdown Event Tracer to Disabled

7. Audio

For audio you need to enable the Windows Audio service. You do this by setting the startup type to Automatic.

Services.msc > Windows Audio

Ensure you have proper drivers for your audio hardware... for me the default driver was not enabling the headphones ... it started working fine after I got the proper driver.

8. SuperFetch

As a workstation, enabling SupertFetch will give you that additional bit of responsiveness. The SuperFetch services is disabled by default and when you try to enable it you will most likely get an error message "The operating system is not presently configured to run this application"

You will have to make two registry changes to enable this service. I basically copied them over from my Vista machine.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters

EnablePrefetcher DWORD 3

EnableSuperfetch DWORD 3

9. Get a codec pack.

For media hungry buffs download a codec pack. This will ensure you can play all media files.

10. Enable Hyper-V

With Hyper-V you can run virtual machines on your workstation. This is useful if you want to run your tests on older OS versions. Enabling  Hyper-V is easy

Server Manager > Roles > Hyper-V

Remember you need a Hyper-V enabled Windows 2008 licence and also your hardware has to support virtualization.

Also If you are using an existing VHD it may ask you to re-Activate Windows as it detected hardware changes.

One good thing about Windows Server 2008 is that it no longer asks for the i386 folder like Windows 2003 while you enable features.

Remote Desktop Manager

Remote Desktop Manager is a small application used to manage all your remote connections and virtual machines. Add, edit, delete, shared, organize and find your remote connection quickly. Compatible with Microsoft Remote Desktop, Terminal Services, VNC, LogMeIn, Team Viewer, Ftp, SSH, Telnet, Dameware, X Window, VMware, Virtual PC, PC Anywhere, Hyper-V, Citrix, Radmin, Microsoft Remote Assistance, Sun Virtual Box and more.

And best of all, there is a free version

URL: http://remotedesktopmanager.com/

Boot from VHD (Windows 7 and/or Server 2008 R2)

Windows 7 Boot from VHD

One of the new features in Windows 7 and Windows Server 2008 R2 is the ability to boot from a VHD. This allows for the use of multiple operation systems on a single computer (like when using Virtualization) however it has much better performance as the OS boots natively.  The great part is that it is pretty simple to enable this feature and have it ready at your disposal!  Before you begin you should note the following…

·         You can only boot a Windows 7 or Windows Server 2008 R2 VHD

·         You must configure the boot editor from a Windows 7 or Server 2008 R2 install

·         You cannot use a Virtual PC VHD, I suggest a Hyper-V VHD

·         You need to start with a clean slate, don’t try and reuse an old VHD

Start by launching a Command Prompt and be sure to run as Administrator, once that is done run the following commands…

bcdedit /copy {current} /d “Boot From VHD (put any name here)”

Copy the CSLID that is displayed and then run…

bcdedit /set {CLSID} device vhd=[C:]\vhdname.vhd

bcdedit /set {CLSID} osdevice vhd=[C:]\vhdname.vhd

bcdedit /set {CLSID} detecthal on

You can replace [C:]\vhdname.vhd with the path and name of your VHD.

Once that is complete reboot and you will have the option to “Boot_From_VHD”!  You can verify the bootloader is configured correctly with the bcdedit command which will list all the boot options.  If you want to delete the entry make note of the GUID listed in bcdedit and use the following command…

bcdedit /delete {GUID} /cleanup

For more information be sure to check out the Windows 7 resource page on Technet.com

Some other useful links:

http://blogs.msdn.com/b/knom/archive/2009/04/07/windows-7-vhd-boot-setup-guideline.aspx