Category Archives: Uncategorized

Manage Hyper-V Virtual machines using WMI and VBS scripts

Today I was working on how to manage Hyper-V virtual machines using WMI.
This VBS scripts can be modified to suit your needs…
Each script takes one argument “machine name”:

listvm.vbs – display all virtual machines on Hyper-V – this script will create a TXT file (you should edit path and filename inside the script) with all virtual machines that are on Hyper-V host. It will print names of the machines and current state (Running, Off, Saved)

sortvm.vbs – this script alphabeticaly sorts list of virtual machines (you should edit path and filename inside the script)

startvm.vbs – usage: startvm.vbs “Name of your virtual machine” – this script will start the virtual machine

stopvm.vbs – usage: stopvm.vbs “Name of your virtual machine” – this script will turn of (dirty!) your virtual machine

shutdownvm.vbs – usage: shutdownvm.vbs “Name of your virtual machine” – this script will shut down your virtual machine if it is Integration Services aware – it will signal/notify guest operating system to initialize shutdown procedure. It works only on machines that support Hyper-V Integration services.

hardresetvm.vbs – usage: hardresertvm.vbs “Name of your virtual machine” – this script will reset (dirty!) your virtual machine

savestatevm.vbs – usage: savestatevm.vbs “Name of your virtual machine” – this script will save and turn off your virtual machine

I have compiled this scripts using resources regarding Hyper-V and WMI
http://msdn.microsoft.com/en-us/library/cc136992(VS.85).aspx
http://blogs.msdn.com/virtual_pc_guy/

Enjoy, WMI power!

SBS 2008 (AD server) virtualized on Hyper-V – what about time synchronization?

Hi!

This blog post is about time synchronization with Hyper-V Integration services when you virtualize SBS 2008 server. You should never leave Hyper-V host to “force” time on servers that you virtualize and that are Active Directory servers (at least not PDC that is the root time server for a domain).

By default Hyper-V enables all Integration services components on your virtual machine but it’s better to configure your virtual machine in my case SBS 2008 server that is Active Directory server too with external NTP time source. Becouse if something goes wrong or you have wrong time on your Hyper-V host you can get in troubles when Hyper-V host will push this “bad time” into your virtual machine.

You should also know that by default on boot virtual machine get’s time from your Hyper-V host becouse of that I have writen two articles. First is about configuring your Hyper-V host that is not joined into a domain (so it does not get the right time from AD server) so it can receive the right time from NTP time source.
And the second one about setting correct values on SBS 2008 server and disabling Hyper-V integration services feature Time Synchronization.

Hope it helps…

Time sync in SBS 2008 virtualized on Hyper – part 1.docx
Time sync in SBS 2008 virtualized on Hyper – part 1.pdf

Time sync in SBS 2008 virtualized on Hyper – part 2.docx
Time sync in SBS 2008 virtualized on Hyper – part 2.pdf

Luka

Map Skydrive as network drive…

I found a fantastic solution… to map my cloud storage that I use. Skydrive is Microsoft Live product that offers me 25 GB of storage in Microsoft cloud. As system administrator it would be great if I coud use thist storage as mapped network drive – so I can manage, copy and edit files directly from Windows Explorer window…ž

Ok, there is a free solution… Combination of Skydrive cloud storage and Gladinet client…
http://skydrive.live.com
+
http://www.gladinet.com/

Enjoy your cloud storage as I do 🙂

“I need to put a document online for our costumer can you enable this?” – use Skydrive!

Hi! I was having session on Infosek 2009 conference regarding documents, xls, pdfs and other jujcy information that can be found using search engines… How it happens?

It happens when someone needs to publish something in a rush and asks sysadmin to create a public folder on a website on which they start to put documents… It’s all right but the problem is that nobody is monitoring that folder any more and nobody is deleting files that are not in use. So search engines crawl that information and we create a disaster becouse now anyone can search within our documents. So they are not published only for a specific person that should download them but it is published for anyone…

My suggestion is – if you publish documents on a web server for your costumers to be able to download them then PLEASE monitor that directory and delete files immediately after your costumers downloaded them. Also do not use “Directory browsing” feature on web server – it will harden the possibility for search engines to find specific file – you then send to your costumers EXACT URL where specific document can be downloaded.

For this kind of activity when you need a storage space publicly available I suggest that you start using Microsoft Skydrive solution:

http://skydrive.live.com
http://www.windowslive.com/Online/SkyDrive
http://skydriveteam.spaces.live.com/
http://en.wikipedia.org/wiki/Windows_Live_SkyDrive

Nova ucinkovitost – novi val tehnologij v 7 slovenskih mestih “Windows 7 je tu!”

Moja prezentacija in plonkci, ki sem jih uporabil pri predstavitvi…

Enjoy7

Novi val ucinkovitosti – Windows 7.ppt
Novi val ucinkovitosti – Windows 7.pptx
boot from vhd.txt – kako naredimo bootable vhd v Windows 7
25 novosti, ki sem vam jih pokazal

pa še par zanimivih povezav:
http://www.microsoft.com/windows/enterprise/products/windows-7/features.aspx – Windows 7 enterprise features
http://blogs.techrepublic.com.com/window-on-windows/?p=1176 – Bitlocker & Bitlocker to go
http://technet.microsoft.com/en-us/magazine/2009.10.77windows.aspx?sid=5cbb6c33dee24e04beee633c420481a2 77 trikov W7