All posts filed under: Server 2008 R2

PowerShell to list / add / remove Windows roles & features remotely

Lot of my R & D work at home happens on a couple of physical systems and lot of virtual machines hosted on Hyper-V. One thing that I regularly do is to rebuild lot of these machines and in that process, I add/remove Windows OS features many times. One default setting I have on all my systems is PowerShell remoting. This helps me access any system from a central location to add / remove these Windows features. I have been using PowerShell remoting combined with Server Manager cmdlets in Windows Server 2008 R2. But, every time I want to enable/disable a feature, there is lot of typing. So, I ended up writing my own wrapper for doing this remotely using three functions or cmdlets — whatever you call it. These functions have been tested on Windows Server 2008 R2 and ServerCore R2 OS. ServerCore is a bit tricky though. We don’t have PowerShell enabled by default. So, we have to manually enable Windows PowerShell feature using OCSetup. Only then, we can use this script for …

Refreshed home PC setup

With the recent release of Windows 7 & Windows server 2008 R2, I wanted to refresh how / what I need to install on my home PC. I received this PC with Windows Vista pre-installed and I was never a big fan of that OS. I have always been using Windows Hyper-V server 2008 and running various other operating systems as virtual machines on top of it. With the native VHD boot support on R2, I got a new usage model. Here is how it looks now  So, as it is shown in the diagram above, I am using Hyper-V Server 2008 R2 as the base OS. On top of it, I have Windows 7 and Windows Server 2008 R2 configured to boot using native VHD support. Note that they are not virtual machines. So, I will be able to see these two OS entries in the boot manager menu when I boot up the system. I will be able to use the complete physical machine capability when I boot these OS VHDs. I also …

Hyper-V: VHD Shell Extensions, updated release

I just posted a batch file wrapper around VHD Shell Extensions to find stale VHDs on a Hyper-V Server. However, because of VHDShellExt.vbs design, it will always try to find if the given VHD is associated with a VM on the local Hyper-V machine. One problem with this design is, you need to use the script on all the Hyper-V server machines you have to find any stale VHDs.  I have updated VHDShellExt.vbs to add /Server switch to be able to use it from a non Hyper-V system too. Now, using this new switch you can use the script from even a Windows Server 2003 or Windows XP system.  You can download the new release here http://code.msdn.microsoft.com/VHDShellExt/Release/ProjectReleases.aspx?ReleaseId=3317 Here is the updated documentation for this release http://www.ravichaganti.com/blog/?page_id=612

Hyper-V: finding stale VHDs

I use Hyper-V Server 2008 R2 for running many virtual machines for different purposes. For all of these virtual machines, I either create new VHDs and re-use the existing ones. Here is the problem. I don’t have SCVMM or any similar management software to maintain the VHD library. But I need to keep track of various VHDs because any accidental deletion might lead to unusable virtual machine infrastructure. VHD Shell Extensions script I created a few months back came to my rescue here. If you have not downloaded or started using this script yet, you can do some by visting this page on MSDN Code gallery. So, I just created a batch file wrapper around the VHDShellExt script. Here is what I have @echo off Set SCRIPTPATH=C:\Scripts Set VHDPATH=E:\VHDs :: Find all VHDs from the given VHD Path and use VHDShellExt.vbs for /f %%a IN (‘dir /b /s %VHDPATH%\*.vhd’) do “cscript %SCRIPTPATH% /action:detail /vhd:%%a”  %SCRIPTPATH% is the path to VHDShellExt.vbs and %VHDPATH% is the place where all your VHDs are stored. This script will validate all …

Windows 7 CHKDSK memory consumption – Update

I did check this after installing RTM on my home PC. Looks like the magnitude of the issue increases with the size of the volume and number /size of files on it. For example, when I first verified this with RC, I ran CHKDSK against a 500GB volume with lot of personal data, ISO images, WIM files and VHDs. The result can be seen here. However, after installing RTM build, I ran it once again against an empty partition of 500GB and the memory consumption by CHKDSK for ~35MB. To me, this issue certainly looks like a design bug. I have not seen a BSOD anytime. So, this is not as critical as others might claim. Anyway, as more and more people start talking about it, I am sure MS will release a fix soon. Technorati Tags: Windows 7,Windows Server 2008 R2,CHKDSK

Windows 7 CHKDSK memory consumption

Okay..there is already a lot written about this bug on the Internet. To summarize, many people have reported a memory leak behavior with Windows 7 CHKDSK utility when the /R switch is used. /R switch is used to locate bad sectors and recover readable information. Many of the blog posts also report that it is a RTM bug. So, first thing was to verify if it happens on the RC build. I am still running RC (x64) on my Studio 540S system with 4GB of RAM. I ran chkdsk against D: (500GB SATA disk) and started monitoring memory utilization. Here is what happened after a few seconds – as chkdsk entered stage 4 of it’s process. As you can see, my system is still running Windows 7 RC and I am using all inbox drivers on this. So, this is not something got introduced in RTM build. Now, I killed the chkdsk process to see if it releases the memory or not. It does, unlike others reported at various other places. Next thing was to …

R2: Hyper-V host compatibility checks – A few thoughts

Yesterday, I released a script to find out if a given VM or VMs on a source host can be migrated successfully to another physical host with Hyper-V role. When you use this script to verify if a running VM can be moved from HOST A with most recent Intel processor to HOST B with an older Intel processor, you may find that the migration is not possible. This is because HOST A has a processor feature set that is the superset of HOST B and hence when a running VM is migrated from A to B, it will fail to run. Now, in Windows Server 2008 R2, there is a feature called processor compatibility mode. This can be found in the VM properties window. This feature is disabled by default. When you enable this feature, the overall guest visible processor feature set will be limited. So, this enables a virtual machine to be moved from a host with most recent version of the processor to a host with older version of processor. However, make …