Browse by Tags

Tagged Content List
  • Blog Post: PowerShell Direct & Waiting for an IP Address

    Here is an interesting problem. With PowerShell Direct it is possible to get connected to a PowerShell session inside a virtual machine before the virtual machine has received an IP address. While this is cool - it can result in annoying script failures. To handle this - if I am using PowerShell Direct...
  • Blog Post: PowerShell Direct + Hot Add NIC == Give me an IP address

    Here is a fun script snippet that is possible with Windows 10: function addNicWithIP ( [ string ] $VMName , $cred , [ string ] $Switch , [ string ] $IPaddress , [ string ] $subnetPrefixLength ){ $newNetAdapter = Add-VMNetworkAdapter -VMName $VMName -SwitchName $Switch -Passthru Write-Output "[ $(...
  • Blog Post: Sending a script file into the VM using PowerShell Direct

    Okay, PowerShell Direct is cool - but sometimes you just want to copy a script (or set of scripts) into the virtual machine and run them there. How can you do that? Fortunately - PowerShell Direct comes to the rescue. Here is a simple snippet that will send any text file from the host to the virtual...
  • Blog Post: Using PowerShell Direct for Script Locking

    Here is one of the most helpful code snippets that I have come up with using PowerShell Direct: function waitForPSDirect([string]$VMName, $cred){ Write-Output "[$($VMName)]:: Waiting for PowerShell Direct (using $($cred.username))" while ((icm -VMName $VMName -Credential $cred {"Test"} -ea SilentlyContinue...
  • Blog Post: PowerShell Direct - handling authentication for better scripting

    In Windows 10 (and Windows Server 2016 TP2) we introduced a great new feature called PowerShell Direct. You can read about it all here: http://blogs.technet.com/b/virtualization/archive/2015/05/14/powershell-direct-running-powershell-inside-a-virtual-machine-from-the-hyper-v-host.aspx In essence it...
  • Blog Post: Virtual PC Guy on GitHub

    Over the years I have posted many scripts and code samples on this blog. Often, I get queries from people about whether it is okay to modify them / redistribute them / etc... Well - I have now started the process of moving all these scripts over to GitHub where they are being published under the MIT...
  • Blog Post: Hyper-V Survey: Why do you turn VMs off?

    We have a survey up asking for information about why and when you need to turn virtual machines off with Hyper-V. You can go and fill it out here: http://www.instant.ly/s/9qQwF/?s=ba Please note, we will be taking feedback for a week (this will be shutting it down on end of day Tuesday next week...
  • Blog Post: Testing a USB Windows Install disk with Hyper-V

    Recently I was putting together a new Windows USB Install disk (if you are not familiar with the process for doing this - here is a good article: http://windowsitpro.com/windows-8/q-how-do-i-create-bootable-usb-stick-can-install-uefi-system ). I really wanted to use virtual machines to test the disk...
  • Blog Post: Building a Daily Ubuntu image for Hyper-V

    After getting my Windows Image Factory up and running – the next thing I started to look at was how to create an “always up-to-date Ubuntu image”. To solve this problem I ended up taking a very different route. Some of the tools / services I used are as follows: Ubuntu Cloud Images...
  • Blog Post: Handy Tool for Converting KVM / VMware Images to Hyper-V

    I was recently involved in a conversation where people needed to convert a handful of KVM virtual machine images to Hyper-V. Now, the QEMU project already includes the necessary tools to do this – but what if you do not have a Linux computer handy? Well – thankfully the people over at Cloudbase...
  • Blog Post: Script: Image Factory for Hyper-V

    Update 7/20/2015: This script is now available on GitHub. Please go to http://github.com/BenjaminArmstrong/Hyper-V-PowerShell/tree/master/Image-Factory to get the latest version, and to contribute any changes and bug fixes. Summer has come to Seattle - which means that it is time for me to get going...
  • Blog Post: Using PowerShell to Ping Test a VM

    I have been spending some time creating PowerShell snippets to help when you need to troubleshoot / debug a Hyper-V environment. Here is a handy one-liner that I recently created: Get-VM "File Server" | Select -ExpandProperty NetworkAdapters | Select -ExpandProperty IPAddresses | %{Ping $_} When...
  • Blog Post: Hyper-V Survey

    We want to hear from you! Right now there is a small survey (under 10 minutes of work to complete) on Hyper-V available here: https://www.instant.ly/s/G5bPn?s=bb In this survey we: Ask for some basic information about how you are using virtualization Ask for feedback on Hyper-V in Windows...
  • Blog Post: The Most Popular Hyper-V PowerShell Cmdlets - by Bing

    Last week Jose Barreto made an excellent post about using PowerShell and Bing to check the popularity of various SMB PowerShell cmdlets. Well, I could not resist doing the same with Hyper-V! I made a slight tweak to Jose's code - by storing my data in a hashtable. This made it easier to sort and output...
  • Blog Post: Hyper-V PowerShell One-Line-Challenge - Part 3

    After posting my Hyper-V one-line PowerShell snippets last week - I had numerous people ask me: "Can you make this export to a CSV file?". How could I resist the ability to make this command even longer? So here you are: Get-Volume | ?{$_.DriveLetter -ne $null} | select @{N='Drive Letter';E={$_.DriveLetter...
  • Blog Post: Virtual PC Guy @ Ignite

    I will be at Microsoft Ignite this year. What will I be speaking about? Well - let me tell you: Looking forward to seeing everyone there! Cheers, Ben
  • Blog Post: Using PowerShell to Look at a VM Configuration

    I was recently asked to provide a PowerShell sample that would let you see everything inside a virtual machine configuration file - without having to import the virtual machine in question. Here is what I put together: Function Expand-VMConfig ($VMConfig) { $tempVM = (Compare-VM -Copy -Path $VMConfig...
  • Blog Post: Hyper-V PowerShell One-Line-Challenge - Part 2

    Building on the Hyper-V PowerShell One-Liner that I posted on Monday - comes this even more complicated one-liner: Get-Volume | ?{$_.DriveLetter -ne $null} | select @{N='Drive Letter';E={$_.DriveLetter}},@{N='Free Space (GB)';E={"{0:N2}" -f ($_.SizeRemaining / 1GB)}},@{N='Space Used By VHDs (GB)';E...
  • Blog Post: Hyper-V PowerShell One-Line-Challenge

    While digging through my notes I came across an exchange between a colleague and I - where we were challenging each other to come up with the most impressive (and functional) "Hyper-V PowerShell One Liner". Here is an example of a good one: Get-Volume | ?{$_.DriveLetter -ne $null} | select @{N='Drive...
  • Blog Post: Hyper-V and "Event ID: 157 - Disk x has been surprise removed"

    After posting about Hyper-V and Event ID 58 the other week - I had a number of people ask me about Event ID 157. They told me that each time they backed up a virtual machine they were seeing this event inside of the virtual machine as well. At first, I could not figure out why they were seeing this...
  • Blog Post: Removing a Missing Network Adapter

    I recently hit a problem with one of my virtual machines. I had copied a virtual hard disk from one server to another, created a new virtual machine that used this virtual hard disk, and found that my scripts did not work anymore. After a bit of inspection I realized what was going on - in moving the...
  • Blog Post: Hyper-V on Windows 10 Technical Preview Build 10049

    Last night we released Windows 10 Technical Preview Build 10049 to Windows Insiders on the Fast ring. This is an exciting release - as it has some key new technology in it. Most notably it is the first release with Project Spartan in it. You can read all about it here: http://blogs.windows.com/bloggingwindows...
  • Blog Post: Checking Virtual Machine Health After a Disaster

    Last weekend I suffered a human disaster in my "server room". Which is to say that I knocked down a shelf in my garage and accidentally disconnected the UPS. This, in turn turned off all of my hardware. An hour later I had fixed the shelf, reconnected all the wiring and had booted the servers again....
  • Blog Post: SMB Bandwidth Limits and Shared Nothing Live Migration

    This week I have been discussing the network QoS options available for a Windows Server private cloud. On Wednesday I talked about the SMB bandwidth limit capability - that allows you to specify separate bandwidth limits for virtual machine storage and live migration traffic over SMB. One interesting...
  • Blog Post: Converged Network QoS and Live Migration over SMB

    On Monday I gave you a pointer to a great resource on configuring network QoS in converged networking configurations. One thing that this documentation does not cover is how to configure QoS for Live Migration over SMB. If you are using Live Migration over SMB, and storing virtual machine hard drives...
Page 1 of 22 (550 items) 12345»