Month: August 2008

Script to mark mounted VHD as online disk

Updated scripts are here http://www.ravichaganti.com/blog/?p=241 In a previous post, I wrote a script to mount/unmount a Hyper-V VHD from command-line as well as right-click context menu. However, on Windows Server 2008 & Vista systems, the mounted VHD will be kept offline. You will have to mark it online from disk management MMC or using diskpart. Glenn asked about an automated means of marking the disk online after mounting it. I remember writing something like that using diskpart and never posted it online. With that background, here is the script to do that job. You may call it from the same VBScript using WshShell.Run method. @echo off :::::::::::::::::::::::::::::::::::::: :: Wait a bit before VDS restarts :::::::::::::::::::::::::::::::::::::: echo WScript.Sleep(5000) > %temp%\sleep.vbs cscript.exe %temp%\sleep.vbs :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Build a temp diskpart script to get offline disk details :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: echo list disk > %temp%\listdisk.dps FOR /F “tokens=1,2,3” %%i IN (‘diskpart /s %temp%\listdisk.dps’) DO @IF %%k == offline SET VHDDISK=%%i %%j echo VHD Disk is: %VHDDISK% ::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Build a temp diskpart script to make the VHD online ::::::::::::::::::::::::::::::::::::::::::::::::::::::: echo select %VHDDISK% …

Quick links to scripts & tools on this blog

I am working on implementing a PHP file explorer on this site. You will be able to walk though all the public content and download scripts & tools. Until then, here is a list of scripts & tools on this blog Time Tracker HTA Enable Hyper-V.vbs VHD Mount.VBS & HV Reg.ZIP (Both these files are needed to implement VHD Mount) Hyper-V VM start/Shutdown/save state VBScript Get VM network Information VBScript Get VM Summary Information VBScript

Watsup @ Work…!

It has been a while since I wrote about my career or what I am working on. Well, I am working on solutions around Sharepoint Services, doing some OS deployment work, generating lot of new ideas and finally, finding ways to productize my ideas 🙂 Doesn’t that sound exicitng..!?! Yes, I found what I love to do. I am really enjoying every bit of my work these days. It feels so good when you do what you always wanted to do and feels even more better when you achieve success in all that you do..! I am exactly in this phase of my career. There is lot of exciting stuff happening right now and I want to catch up with every bit of it 🙂

WordPress upgrade

I started upgrading this blog to WP 2.6 and screwed up the whole thing. I lost some galley content and some plug-ins. It was completely my mistake because I didn’t really bother about good backup. Anyways, all my posts are online again, I will work on this when I get some free time to restore the remaining content. Overall, I am happy with 2.6 and some of it’s new features