You are browsing the archive for Windows 10.

Windows 10: Set Display, Apps and websites language to English (United States) and keyboard to Belgian (Period)

9:25 am in Belgian (Period), Belgian beers, belgian chocolates, Belgium, ITPro, Keyboard shortcut, Keyboards, scugbe, Windows 10, Windows Apps, Windows Display Language by Wim Matthyssen

When you install and set up Windows 10, you’re asked to choose a default system language. Normally, you do not need to change the language after the initial setup but there might be some situations where you do. I ‘m a Belgian and working as an ITPro in that small country which has the best chocolates and beers, I like to have my Windows 10 display language and Windows Apps language set to English (United States) and my keyboard to Belgian period (Azerty).

However, when you deploy Windows 10, with country or region set to Belgium and system language set to English as a preferred language also Nederlands (België) is installed as first language for Apps and websites.

clip_image002

So even if your Windows display language is all set to English whenever you open a website or Windows App the language used is Dutch.

clip_image004

clip_image006

For me this is a little bit annoying. I know this can come in handy, if you’re bi-lingual and you type documents in Dutch, but also enter commands in Command Prompt in English, but for me that’s not the case. But if you prefer you can set the language on a per-app basis and then Windows will remember which language you prefer to use in that particular app. There is even a keyboard shortcut if you want to switch manually between two or more languages. Just press the Left Alt + Shift keys together to switch between languages on the fly.

To set my Windows display and Windows App (+ websites) language to English and set my keyboard to Belgian (Period) I followed the below steps.

Open All settings (or press the Windows key + I) to open the Windows Setttings page and then click Time & Language.

clip_image008

clip_image010

Select Region & language on the left.

clip_image012

At the Preferred languages topic, you can choose to set Nederlands (België) as the second language or choose to Remove this language. I choose to Remove this language completely (to be able to Remove a language you also need to set if first as the second language, otherwise you are not able to delete it).

clip_image014

clip_image016

If you Remove a first language you also need check and possible set your preferred keyboard language at the first language shown. To do so select the language and click Options.

clip_image018

Because English Unites States uses US (QWERTY), which I do not want to use. I first I need to add my second preferred keyboard. Press Add a keyboard and select the Belgian (Period) keyboard. When added you can remove the US (QWERTY) keyboard.

clip_image020

clip_image022

Now your all done. Like you can see the Windows display, website(s) and Windows App language are all set to English and I can type with my preferred Azerty keyboard settings.

clip_image024

clip_image026

clip_image028

Hope this comes in handy for the Belgium people. Till next time!

Wim Matthyssen (@wmatthyssen)

Microsoft Wireless Display Adapter won’t connect with Windows 10 laptop running Hyper-V

8:35 pm in Client Hyper-V, Hyper-V, Microsoft Wireless Display Adapter, Miracast, Wi-Fi, Windows 10 by Wim Matthyssen

When delivering workshops at customers most of the time I use my Microsoft Wireless Display Adapter to show my presentations or demo’s on a big screen.

clip_image002

Normally, I only just need to plug in the USB and HDMI connectors from the Wireless Display Adapter to the HDTV, monitor or projector, and click Connect on the Windows 10 Action Center. My display adapter is then listed as on option and I only need to click on it to extend or duplicate my laptop screen. It is so easy and connecting with a Windows 10 device could not be quicker.

clip_image004

However last week while preparing a new Azure workshop, making a connection to my home TV did not go that smooth as usual. When I tried to connect to my display adapter, making a connection took a long time and at the end the message “Couldn’t connect” popped up while the TV was still showing Connecting.

 

clip_image006

clip_image008

After troubleshooting for some time and checking the usual steps (check adapter’s firmware, check Windows Updates, reset the adapter …) I finally figured it out. When making a connection the Wireless Display Adapter uses Miracast, a wireless technology, which makes communication between devices possible on either the 2.4 GHz or 5 GHz wireless frequency bands. The display adapter itself, even if it looks like a sort of HDMI to USB cable, has a full Wi-Fi card and antenna on board which it uses to connect to the wireless adapter on your laptop.

That is where my connection problem was situated. I do a lot of research on my laptop with the use of Client Hyper-V, which enables me to run all sorts of virtual machines (VMs) for testing purposes. For connecting some of those VMs to the Internet, I make use of an internal virtual switch, which uses a shared connection (Internet Connection Sharing) on my wireless adapter.

clip_image010

clip_image012

However, this Windows service causes some changes in the way the wireless adapter works, which in normal circumstances does not disturb anything, except when you try to connect to a Wireless Display Adapter.

So, after removing this sharing option, the Wireless Display Adapter connected as easily as before.

clip_image014

clip_image016

clip_image018

Conclusion

A Microsoft Wireless Display Adapter strongly depends on the wireless adapter in your device to setup communication. Any issues or changes to the wireless adapter in any way can cause connecting problems. If you still want to use Client Hyper-V on your Windows 10 laptop and connect your VM to the Internet with the use of your wireless adapter, I suggest to create an External virtual switch which connects to it. Do not forget to allow the management Operating System to share the wireless network adapter. This setup does not seem to disturb the connection with a Wireless Display Adapter.

2016: My blog year in an overview

2:37 pm in Azure, Azure Backup, Azure RemoteApp, Client Hyper-V, Cloud, DC, Hyper-V, IaaS, PowerShell, Private Cloud, Public Cloud, Replica DC, SCAC 2012 R2, SCVMM 2012 R2, System Center 2016, W2K12R2, Windows 10 by Wim Matthyssen

Hi all,

As a blogger completely focused on Microsoft technologies, it was a fun year of writing about all those interesting and ever changing products and services. As we almost end the year 2016 and are preparing for 2017 to start, I wanted to make a list of all the blog posts I wrote throughout the twelve months of 2016. During the year, I’ve published 26 blog posts mostly about Azure, the System Center Suite and Hyper-V. Below you can find them all divided by technology.

 

clip_image002

Azure Compute – IaaS (ASM)

Step-by-step: Move an Azure IaaS VM between different Azure Subscriptions

Clean up Azure PowerShell when using different Azure subscriptions

Replica DCs on Azure – Removing the Azure Endpoints

Replica DCs on Azure – Transferring FSMO roles to the IaaS DCs

Replica DCs on Azure – Manage the Time Configuration settings on the DCs

Replica DCs on Azure – Domain Controller Health Check

Replica DCs on Azure – Promote the Azure IaaS VMs to a domain controller

Replica DCs on Azure – Add the Active Directory Domain Services role

Replica DCs on Azure – Adjustment of some server settings before promoting the DCs

Replica DCs on Azure – Initialize and format the additional data disk

Replica DCs on Microsoft Azure – Create the VMs with Azure PowerShell

Step by step: Change the drive letter of the Temporary Storage on an Azure IaaS v1 VM

 

Azure Networking

How to connect an Azure ARM VNet to an ASM VNet using VNet Peering

Replica DCs on Azure – Switch DNS servers for the VNet

Replica DCs on Azure – Create the Active Directory site for the Azure VNet

 

Azure Backup

Microsoft Azure Backup Server: Install a new version of the Microsoft Azure Recovery Services Agent

Microsoft Azure Backup Server: System State backup fails with WSB Event ID: 546

Microsoft Azure Backup Server: System State backup fails with the message replica is inconsistent

Step by step: How to install Microsoft Azure Backup Server (MABS)

 

Azure RemoteApp

An RDP connection to the Azure RemoteApp custom VM fails with the following error: “No Remote Desktop License Servers available”

 

Windows 10

How to deploy Windows 10 from a USB flash drive

 

System Center

System Center 2016 evaluation VHDs download links

Step by step: How to connect SCAC 2012 R2 to SCVMM 2012 R2 and Microsoft Azure

Step by step: Installing SCAC 2012 R2

 

Hyper-V

A list of tools that can be used to do a V2V from VMware to Hyper-V

Client Hyper-V – Using nested virtualization to run Client Hyper-V on a Windows 10 VM

 

Before I wrap up this blog post, I want to thank you all for reading my blog posts in 2016, and I really hope you will keep doing so in 2017. I wish you all a healthy, successful and outstanding New Year! See you all in 2017!

Wim Matthyssen (@wmatthyssen)

How to deploy Windows 10 from a USB flash drive

1:21 pm in Microsoft, PowerShell, USB, Windows, Windows 10 by Wim Matthyssen

Hi all,

In this blog post, I will show you how you can create your own bootable USB flash drive for Windows 10 installations. And like you will see, it’s pretty easy these days.

Before we start whit the installation a list of some things to keep in mind:

  • An internet connection is needed to download the tool
  • You will need 8 GB of free disk available on the C: drive
  • The minimum capacity of the USB flash drive needs to be at least 4 GB
  • Be aware that all the files on the USB flash drive will be erased
  • Windows 10 Enterprise isn’t available in the media creation tool
  • A Windows 10 product key (for the Windows 10 Edition that will be installed) is needed when you are installing a clean Windows 10
  • To manually download the MediaCreationTool go to the following website: https://www.microsoft.com/en-us/software-download/windows10/

After this short list with things to keep in mind, it’s time start. To do so follow the steps described below:

1) First, make sure your USB flash drive is plugged in

clip_image002

2) Open Windows PowerShell ISE or PowerShell (as administrator) and run the below PowerShell commands (updated 01/06/18) to download the media creation tool to the C:\Temp folder and start it up when downloaded

clip_image004

The complete script can be downloaded from TechNet

3) On the License terms page, select Accept to accept the license terms

clip_image006

4) On the What do you want to do? page, select Create installation media for another pc and then select Next

clip_image008

5) Select the proper Windows 10 Edition, Architecture (x86, x64 or both) and Language to install. Click Next

clip_image010

6) Select USB flash drive on the next page and click Next

clip_image012

7) Select the correct USB flash drive and click Next

clip_image014

8) The tool will start Downloading Windows 10

clip_image016

9) After downloaded the necessary files the tool will start Creating Windows 10 media

clip_image018

10) When done click Finish. Your USB flash drive is now ready for use

clip_image020

11) If you select the USB flash drive (E: in my example) you will see all necessary files are in place to start a clean Windows 10 installation

clip_image022

12) Now that you have created the bootable Windows 10 USB flash drive, you can go to the next step: Installing Windows 10 on a pc (desktop or notebook). To do so, plug in the USB flash drive to the pc and boot from USB. In my example I will use a HP notebook. Startup and when the HP logo is shown press the ESC key to go to the Startup Menu (the sentence Press the ESC key for Startup Menu will appear in the left bottom of your screen)

clip_image024

13) Press F9 to open the Boot Device Options menu

clip_image026

14) Select USB Hard Drive 1 – USB DISK 3.0 (in my example this is my USB flash drive)

clip_image028

15) Select the Windows 10 Setup Architecture (64-bit or 32-bit) and press Enter. This will start the Windows 10 installation. Just go to the complete setup procedure and your pc will be up and running with Windows 10 in no time

clip_image030

This completes this blog post. Have fun with it and if you have any questions feel free to contact me.

Wim Matthyssen (@wmatthyssen)

Client Hyper-V – Using nested virtualization to run Client Hyper-V on a Windows 10 VM

7:37 pm in Client Hyper-V, Hyper-V, Nested Virtualization, PowerShell, W2K16 TP5, Windows 10 by Wim Matthyssen

From Windows 10 build 10565, Microsoft added a long awaited feature called nested virtualization. This technology will allow you to run Hyper-V inside of a virtual machine (VM) running on a Windows 10 (Client Hyper-V) or Windows Server 2016 host. In other words, in the simplest configuration it enables you to install Hyper-V in a guest VM, whit the possibility to create and also run VMs on top of that Hyper-V host VM. Completely different than the previous situation with Windows Server 2012 R2 or Windows 8.1, were you could create the VMs, but weren’t able to actually start them. This new feature kind of creates a second virtualization layer, like shown in the detailed screenshot below.

clip_image002

This new technology is very useful when you are setting up a test/lab environment because there is no need to buy a lot of expensive hardware anymore, it simply can run on top of your notebooks OS. It also comes in handy whenever you want to train you’re failover clustering or even your System Center skills. But it’s main purpose and probably Microsoft’s main reason to finally created this feature, is to enable you to work with Hyper-V containers (operating system level virtualization). If you’re interested in reading more about this type of containers you can do so via following link: https://msdn.microsoft.com/en-us/virtualization/windowscontainers/management/hyperv_container

Now before we start playing around with this new feature, I will first list up some things you should really keep in mind:

  • The Hyper-V host must be running at least Windows 10 build 10565 or Windows Server 2016 Technical Preview (TP) 4
  • An Intel processor with Intel VT-x (AMD-V is not supported yet) and EPT technology is needed to be able to use Hyper-V
  • Currently only Hyper-V is supported, all other hypervisors like for example vSphere ESXi will fail to run
  • Be aware that some VM features are not supported or will fail: Dynamic Memory, applying checkpoints, Live Migration and save/restore, hot memory resizing
  • The VM should have more than 1 vCPU
  • At least 4 GB RAM should be attached to the VM
  • MAC address spoofing must be enabled on the NIC attached to the VM
  • If you’re using Windows 10 Enterprise as the host, you should turnoff Virtualization Based Security (VBS) because it will prevent the use of nested virtualization
  • Plenty of available RAM is needed (at least more than 4GB of RAM is preferred to get started)

After going through the theory it’s now time to get our fingers wet and get everything up and running. I will walk you through all the different steps needed to use this feature on a Windows 10 Enterprise computer. In my example I will setup a generation 1 VM (Windows 10) with a PowerShell script to test the nested virtualization scenario. So off we go.

1) First of all, you should check your windows version (should be build 10565). Click run and type winver

clip_image003

clip_image004

2) Create two internal virtual switches, one is to use your wireless card and the other one will be used in a later step as a Hyper-V vSwitch inside the VM

clip_image006

3) To install the VM, run the following PowerShell script (customize to your need).

clip_image008

clip_image010

4) Go through the Windows Setup Installation Process on the newly created VM

5) When installation is completed shutdown the VMs and run following PowerShell commands on the Windows 10 computer (host) to set the Virtualization Extension for the vCPUs and to enable MAC spoofing on both VMs. Be aware a warning message will appear that Nested Virtualization is an unsupported preview feature. When both commands ran successfully start up the Windows 10 VM

clip_image012

6) To configure the W10-TST VM and to install the Client Hyper-V role with all tools, run the following PowerShell script (customize to your need). Connect to the VM with a Virtual Machine Connection with Enhanced session enabled

7) To create an external virtual switch on W10-TST, logon to this sever with RDP and run the following PowerShell cmdlet as administrator (customize to your need)

clip_image014

8) To create a nested VM named VM1-NESTED on W10-TST, logon to this VM with RDP and run the following PowerShell script as administrator (customize to your need)

clip_image016

9) Go through the Windows Setup Installation Process on the newly created nested VM named VM1-NESTED on W10-TST

10) If the installation is successful, you should now have a nested VM running like in the screenshot below

clip_image018

This concludes this blog post. Keep tuned and I’ll be back soon.

Wim Matthyssen (@wmatthyssen)

How to use mRemoteNG to connect to multiple Client Hyper-V VMs with RDP in a tabbed view

7:56 pm in Client Hyper-V, RDP, Windows 10 by Wim Matthyssen

From Windows 10, Client Hyper-V supports nested virtualization (basically it means that it allows you to run Hyper-V in a Hyper-V virtual machine), something many people were awaiting for a longtime. It also brings other nice new features to the built-in hypervisor like:

  • Windows PowerShell Direct
  • Hot add and remove network adapters and memory
  • Linux secure boot
  • Integration Services delivered through Windows Update
  • A new virtual machine configuration file format .VMCX

I’ve you’re interested in reading more, you can do so via following link:

https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/about/whats_new

Because of all those nice improvements I decided to create my new demo and testing environment with it on my notebook. When Client Hyper-V (optional feature) was installed and the VMs for the complete infrastructure were built, I had the ability to connect to those VMs via two mechanisms: the VM console (VMConnect) and Remote Desktop (RDP).

The VM Console provides a single monitor view of the VM with resolution up to 1600 x 1200 in 32-bit color. This console also provides you with the ability to view the VM’s booting process. You can use it by opening the Hyper-V Manager, right clicking a VM, and select Connect…

clip_image002

If you want a richer experience, you can connect to a VM using an RDP connection. Then the VM will take advantage of the capabilities available on your notebook (multi monitor use, full media capability, shared clipboard, USB redirection and much more). You can use it by opening Run and typing mstsc (like everyone probably knows).

clip_image003

Because you’re mostly working with more than one server in a lab environment, it’s not so easy and practical to use the VM Console. Simply because there is no tool available to manage multiple VM Console connections in a tabbed view, which allows you to switch easily between all those running VMs.

When you use RDP instead to connect to those VMs several of such tools (free or paid) are available:

Before we start, first some practical information and tips:

  • I will be using mRemoteNG to use multiple RDP connections in a tabbed view
  • The IP range used is 192.168.0.0
  • Two VMs will be used in this example: GR-DC-01 and GR-DC-02
  • In all steps PowerShell is used with administrator rights
  • When you use a generation 2 VM, set the Firmware setting to Boot from Hard Drive
  • To use an RDP connection from your notebook to a VM running in Client Hyper-V an internal virtual switch needs to be connected to the VM

1) First of all an internal virtual switch needs to be created on the host. So open PowerShell and run the following command:

New-VMSwitch -Name InternalRDP -SwitchType Internal -Notes 'RDP connection'

clip_image005

2) You can check if the virtual switch is created correctly by opening up your Hyper-V Manager and click on Virtual Switch Manager

clip_image007

3) Still on the host, assign the static IP address 192.168.1.100 to the network adapter that was created for the virtual switch “InternalRDP”. Open up PowerShell and run following commands:

#Retrieve the wright network adapter

$netadapter = Get-NetAdapter -Name “vEthernet (InternalRDP)”

#Disable DHCP

$netadapter | Set-NetIPInterface -DHCP Disabled

#Configure the IP address

$netadapter | New-NetIPAddress -AddressFamily IPv4 -IPAddress 192.168.1.100 -PrefixLength 24 -Type Unicast

clip_image009

clip_image011

4) Connect both VMs to virtual Network Adapter to the InternalRDP virtual switch by use of PowerShell

#Add Networks

Get-VMNetworkAdapter GR-DC-01| Connect-VMNetworkAdapter –SwitchName InternalRDP

Get-VMNetworkAdapter GR-DC-02| Connect-VMNetworkAdapter –SwitchName InternalRDP

clip_image013

clip_image015

5) Logon to both VMs with the VM Console and rename the network adapters with PowerShell

Get-NetAdapter -Name Ethernet | Rename-NetAdapter -NewName Internal –PassThru

clip_image017

clip_image019

6) On VM GR-DC-01 assign the fixed IP address 192.168.1.10 with subnet mask 255.255.255.0 for the “Internal” network adapter

clip_image020

7) On VM GR-DC-02 assign the fixed IP address 192.168.1.11 with subnet mask 255.255.255.0 for the “Internal” network adapter

8) Enable RDP on both VMs

clip_image021

9) If the Windows Firewall is enabled, don’t forget to adjust the necessary Inbound Rules to allow RDP

clip_image023

10) Open mRemoteNG, right click Connections and select “New Connection”. Create two new connections named “GR-DC-01” and “GR-DC-02”. When created fill in all necessary info like shown in the screenshot below (I log in with the local administrator, that’s why I filled in .\ for the domain).

clip_image024

11) Click both connections and you will see that you can use both VMs in a tabbed view by using RDP

clip_image026

clip_image028

That’s all, hope it helps!

Wim Matthyssen (@wmatthyssen)

Run multiple OSs together with Client Hyper-V and use the hosts Wi-Fi adapter for Internet connection

3:10 pm in Client Hyper-V, PowerShell, Wi-Fi, Windows 10, Windows 7, Windows 8.1, Windows XP by Wim Matthyssen

Hi all,

This is a follow up and enhancement to my previous blog post “Use Client Hyper-V and a shared Wi-Fi connection to run Windows 8.1 and Windows 10 Technical Preview simultaneous”, which you can find here: http://scug.be/wim/2015/04/20/use-client-hyper-v-and-a-shared-wi-fi-connection-to-run-windows-8-1-and-windows-10-technical-preview-simultaneous-2/

In this previous post, I set up a Windows 10 virtual machine (VM) on my Dell notebook running Windows 8.1 with Client Hyper-V. But why stop with just two Client Operating System (OS) running together? Therefore, I will show you how to automate an environment in which you can run multiple OSs (Windows 8.1, Windows 10 Technical Preview, Windows 7 with SP1 and finally Windows XP with SP3) using your notebooks Wi-Fi adapter to connect them to the Internet. If you’re an IT Pro or a software developer and need to do some testing, this is an easy way to do it.

I’ve you’re reading this I assume that you have already installed Client Hyper-V and added the necessary virtual networks, if not just follow steps 1 to 9 in my previous post.

Before starting some important remarks and tips:

  • Windows XP isn’t compatible with Hyper-V’s synthetic network adapter. As such, we will also need to do add a legacy network adapter for the sharing network.
  • Windows XP is not supported by Hyper-V’s Dynamic Memory feature, so we’ll need to use static memory instead.
  • Only W10 TP has the necessary Integration Services on board, that’s why after the OS installation, we will need to install them to the W7 and XP VM.
  • Before installation of the Integration Services in the Windows XP VM, you need to release the mouse and keyboard focus from the VM Connection window by pressing CTRL + ALT + LEFT ARROW.
  • The computer name of the W7 and XP VM is added when you install the OS. In my example I used W7-TST and XP-TST.
  • As a final remark, if you’ve installed the Windows 7 VM without SP1 you will receive the below error when trying to install the Integration Services.

clip_image001

1) For the automated built of the 3 VMs run the below PowerShell script. All virtual hardware will be added and configured and the OS ISO’s will be mounted. At the end the VMs will be started up to begin the OS installations. Please be aware that in order to us your shared Wi-Fi connection, the “InternalWifi” virtual switch needs to be attached to a legacy network adapter.

#----------------------------------------

#Author Wim Matthyssen

#Date 06/05/15

#Name BuiltClientOSVMs.ps1

#Usage Built several Client OSs VMs on Client Hyper-V

#Note Change variables were needed to fit your needs

#----------------------------------------

# Variables

$VM1 = "W10-TST" # Name of Windows 10 VM

$VM2 = "W7-TST" # Name of Windows 7 VM

$VM3 = "XP-TST" # Name of Windows XP VM

$VMRAMMIN = 512MB # Minimum RAM assigned to the VM

$VMRAMSTARTUP = 2GB # Startup RAM assigned to the VM

$VMRAMMAX = 4GB # Maximum RAM assigned to the VM

$VHDSIZE = 20GB # Size of fixed VHDX

$VMLOC = "D:\_VM" # Location of the VM and VHDX files

$NetworkSwitch1 = "InternalWifi" # Name of the Network Switch 1

$NetworkSwitch2 = "InternalShare" # Name of the Network Switch 2

$vCPUCOUNT=2 #Number of virtual CPUs

$W10ISO = "D:\Documents\Windows10_TP.iso" # Windows 10 ISO

$W7ISO = "D:\Documents\Windows7_SP1.iso" # Windows 7 with SP1 ISO

$XPISO = "D:\Documents\WindowsXP_SP3.iso" # Windows XP with SP3 ISO


# Create Windows 10 VM - Add Networks - Mount ISO

New-VHD –Path $VMLOC\$VM1\$VM1.vhdx –Fixed –SizeBytes $VHDSIZE

New-VM –Name $VM1 –Path $VMLOC

Add-VMHardDiskDrive -VMName $VM1 -Path $VMLOC\$VM1\$VM1.vhdx

Set-VMMemory $VM1 -DynamicMemoryEnabled $true -MinimumBytes $VMRAMMIN -StartupBytes $VMRAMSTARTUP -MaximumBytes $VMRAMMAX -Priority 80 -Buffer 25

Set-VMProcessor $VM1 –Count $vCPUCOUNT

Get-VMNetworkAdapter $VM1| Connect-VMNetworkAdapter –SwitchName $NetworkSwitch2

Get-VM $VM1 | Add-VMNetworkAdapter -IsLegacy $true -SwitchName $NetworkSwitch1

Set-VMDvdDrive -VMName $VM1 -Path $W10ISO

Start-VM $VM1


# Create Windows 7 VM - Add Networks - Mount ISO

New-VHD –Path $VMLOC\$VM2\$VM2.vhdx –Fixed –SizeBytes $VHDSIZE

New-VM –Name $VM2 –Path $VMLOC

Add-VMHardDiskDrive -VMName $VM2 -Path $VMLOC\$VM2\$VM2.vhdx

Set-VMMemory $VM2 -DynamicMemoryEnabled $true -MinimumBytes $VMRAMMIN -StartupBytes $VMRAMSTARTUP -MaximumBytes $VMRAMMAX -Priority 80 -Buffer 25

Set-VMProcessor $VM2 –Count $vCPUCOUNT

Get-VMNetworkAdapter $VM2| Connect-VMNetworkAdapter –SwitchName $NetworkSwitch2

Get-VM $VM2 | Add-VMNetworkAdapter -IsLegacy $true -SwitchName $NetworkSwitch1

Set-VMDvdDrive -VMName $VM2 -Path $W7ISO

Start-VM $VM2


# Create Windows XP VM - Add Networks - Mount ISO

New-VHD –Path $VMLOC\$VM3\$VM3.vhdx –Fixed –SizeBytes $VHDSIZE

New-VM –Name $VM3 –Path $VMLOC

Add-VMHardDiskDrive -VMName $VM3 -Path $VMLOC\$VM3\$VM3.vhdx

Set-VM -StaticMemory -Name $VM3 -MemoryStartupBytes 2GB

Set-VMProcessor $VM3 –Count $vCPUCOUNT

Remove-VMNetworkAdapter -VMName $VM3

Get-VM $VM3 | Add-VMNetworkAdapter -IsLegacy $true -SwitchName $NetworkSwitch2

Get-VM $VM3 | Add-VMNetworkAdapter -IsLegacy $true -SwitchName $NetworkSwitch1

Set-VMDvdDrive -VMName $VM3 -Path $XPISO

Start-VM $VM3

2) When you’re done installing the guest OSs, logon to your 3 new VMs.

3) Insert the Integration Services Setup disk to the W7 and XP VM.

clip_image003

4) On both VMs, if the installation doesn’t start automatically, open a command prompt and run d:\support\x86\setup.exe and select “Yes” to start the installation. When the Upgrade Hyper-V Integration Services box appears click “OK”. To complete the installation press “Yes” to reboot.

clip_image005

clip_image006

5) To check the version of the Integration Services through Device Manager, expand System Devices, right click Microsoft Hyper-V Virtual Machine Bus, and select Properties. Click the Driver tab and the Driver Version line will show you the version you’re running.

clip_image007

6) To prepare your host to connect to the shared folders and do the rest of the configuration for the W10 VM you can now follow steps 12 to 18 from my previous post.

7) To rename the network adapters for the W7 VM, logon, open a command prompt and run the following commands:

netsh interface set interface name = "Local Area Connection" newname = "WiFi"
netsh interface set interface name = "Local Area Connection 2" newname = "Sharing"

8) Logon to the XP to rename the network adapters. Open a command prompt and run the following commands:

netsh interface set interface name = "Local Area Connection" newname = "Sharing"
netsh interface set interface name = "Local Area Connection 2" newname = "Wifi"

9) On the W7 VM assign the fixed IP Address 33.0.0.3 for the “Sharing” network adapter from the command prompt (requires elevation).

netsh interface ip set address name = "Sharing" static 33.0.0.3 255.255.255.0

clip_image002[4]

10) On the XP VM assign the fixed IP Address 33.0.0.4 for the “Sharing” network adapter from the command prompt.

netsh interface ip set address name = "Sharing" static 33.0.0.4 255.255.255.0

clip_image004[4]

11) To share and to create the Temp folder on the W7 VM open a command prompt and run the following commands (requires elevation):

md C:\Temp
net share Temp=C:\Temp /GRANT:Everyone,Full

clip_image006[4]

12) To share and to create the Temp folder on the XP VM open a command prompt and run the following commands:

net user guest /active:yes
md C:\Temp
net share Temp=C:\Temp /unlimited

clip_image008[4]

13) To map the Temp folders from the 3 VMs on the host to the X, Y and Z-drive run the following commands in PowerShell (do not run PowerShell as an administrator)

New-PSDrive –Name X –PSProvider FileSystem –Root “\\W7-TST\Temp” –Persist -Credential W7-TST\username
New-PSDrive –Name Y –PSProvider FileSystem –Root “\\W10-TST\Temp” –Persist -Credential W10-TST\username
New-PSDrive –Name Z –PSProvider FileSystem –Root “\\xp-tst\Temp” –Persist -Credential XP-TST\username

clip_image010[4]

clip_image011[4]

14) As you can see in the below screenshot I’m able to surf with all OSs and share data between them.

clip_image013[6]

This concludes this blog post. Keep tuned and I’ll be back soon.

Use Client Hyper-V and a shared Wi-Fi connection to run Windows 8.1 and Windows 10 Technical Preview simultaneous

11:22 am in Client Hyper-V, PowerShell, Wi-Fi, Windows 10, Windows 8.1 by Wim Matthyssen

With the official release of Windows 10 in the pipeline somewhere this summer, I wanted to play around with the Windows 10 Technical Preview (WTP). My idea was to use Client Hyper-V on my Dell notebook, running Windows 8.1, and build a virtual machine (VM) with the latest W10 WTP build (9926) on top of it. In this way, I could run both operating systems (OSs) together on the same desktop and see all what is changed.

The above set-up will allow me to test the new Windows 10 features (such as the new browser Project Spartan, Cortana, Continuum, the new start menu and lots of other nice improvements). Upon that, I will still be able to do some productive work on my Windows 8.1

Please note if you want to download the latest W10 WTP you need to join the Windows Insider program. You can become a member via the following link: https://insider.windows.com/. Just press the “Get Started” button and follow the procedure. If everything is filled in and confirmed, you can download the WTP of this bright new OS.

But enough said it’s time to get our fingers wet and get everything up and running. Like mentioned above, I will walk you through the different steps I followed to run both OSs simultaneous. Both of them will be able to access the Internet with use of a Wi-Fi connection and you can share data from your VM to your host and vice versa.

In order to understand the following steps in a good way, please note that with host the Windows 8.1 is meant.

Step 1 is installing Client Hyper-V as this feature is not installed by default. First check if your notebook or desktop meets the necessary hardware and system requirements:

  • Windows 8.1 Pro or Enterprise 64 bit OS
  • 64-bit processor that has Second Level Address Translation (SLAT)
  • 4 GB of RAM
  • BIOS-level Hardware Virtualization support enabled

If all is good you are ready to go.

1) Open up a PowerShell window with administrator permissions on your host and run the following command

enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All

2) Type “Y” to restart your computer

clip_image002

clip_image004

Since I’m working on my notebook I want to use my onboard wireless adapter to get the VM connected to the Internet. Client Hyper-V can’t automatically use your Wi-Fi adapter so you need to use a little workaround to get this working. Therefore I will create two internal virtual switches in the next step. One is to use your wireless card and the other one will be used in a later step to share data between your host and your VM.

3) Open up PowerShell again with administrator permissions and run the following commands:

New-VMSwitch -Name InternalWifi -SwitchType Internal -Notes 'Share Parent Wifi'
New-VMSwitch -Name InternalShare -SwitchType Internal -Notes 'Sharing network'

image

4) You can check if both are created correctly by opening up your Hyper-V Manager and click on Virtual Switch Manager

image

5) Next open Network and Sharing Center on the host and choose Change adapter settings

6) Select the Wi-Fi adapter and choose Properties

clip_image010

7) In the Properties window, click the Sharing tab

8) Check the “Allow other network user to connect through this computer’s Internet connection” box, select “vEthernet (InternalWifi)” and click OK to close the window

clip_image012

9) If all is setup correctly you should see the word Shared beside your wireless connection

clip_image014

10) Run the below PowerShell script for an automated built of the W10 VM with all necessary virtual hardware installed and configured. Also the W10 ISO is connected and the VM will be started up to install the OS. It might be possible that you need the change some variables like the location and name of the ISO while running this script. Please be aware that in order to us your shared Wi-Fi connection, the “InternalWifi” virtual switch needs to be attached to a legacy network adapter.

#-------------------------------------------------------------------
#Author: Wim Matthyssen
#Date: 14/04/15
#Name: BuiltW10VM.ps1
#Version: 1.0
#Note: Change variables were needed to fit your environment
#-------------------------------------------------------------------

# Variables
$VM = "W10-TST" # Name of VM
$VMRAMMIN = 512MB # Minimum RAM assigned to the VM
$VMRAMSTARTUP = 2GB # Startup RAM assigned to the VM
$VMRAMMAX = 4GB # Maximum RAM assigned to the VM
$VHDSIZE = 40GB # Size of fixed VHDX
$VMLOC = "D:\_VM" # Location of the VM and VHDX files
$NetworkSwitch1 = "InternalWifi" # Name of the Network Switch 1
$NetworkSwitch2 = "InternalShare" # Name of the Network Switch 2
$vCPUCOUNT=2 #Number of virtual CPUs
$W10ISO = "D:\Documents\Windows10_TP.iso" # Windows 10 ISO

# Create VM
New-VHD –Path $VMLOC\$VM\$VM.vhdx –Fixed –SizeBytes $VHDSIZE
New-VM –Name $VM –Path $VMLOC
Add-VMHardDiskDrive -VMName $VM -Path $VMLOC\$VM\$VM.vhdx
Set-VMMemory $VM -DynamicMemoryEnabled $true -MinimumBytes $VMRAMMIN -StartupBytes $VMRAMSTARTUP -MaximumBytes $VMRAMMAX -Priority 80 -Buffer 25
Set-VMProcessor $VM –Count $vCPUCOUNT

# Add Networks
Get-VMNetworkAdapter $VM| Connect-VMNetworkAdapter –SwitchName $NetworkSwitch2
Get-VM $VM | Add-VMNetworkAdapter -IsLegacy $true -SwitchName $NetworkSwitch1

# Mount ISO
Set-VMDvdDrive -VMName $VM -Path $W10ISO

Start-VM $VM

image

11) Install the guest OS and if all went good, logon for the first time to your WTP of W10

12) When logged on, rename the computer with the following PowerShell commands (requires admin rights)

Rename-Computer –NewName “W10-TST”
Restart-Computer

13) When the VM is restarted, logon and rename the network adapters via PowerShell (requires admin rights)

Get-NetAdapter -Name Ethernet | Rename-NetAdapter -NewName WiFi –PassThru
Get-NetAdapter -Name “Ethernet 2” | Rename-NetAdapter -NewName Sharing –PassThru

image

14) Assign the fixed IP Address 33.0.0.2 for the “Sharing” network adapter with use of PowerShell (requires admin rights) on the VM

#Retrieve the right network adapter
$netadapter = Get-NetAdapter -Name Sharing

#Disable DHCP
$netadapter | Set-NetIPInterface -DHCP Disabled

# Configure the IP addres
$netadapter | New-NetIPAddress -AddressFamily IPv4 -IPAddress 33.0.0.2 -PrefixLength 24 -Type Unicast

image

15) You can check if the IP Address is set correctly by running ipconfig

image

16) Now on the host, assign the static IP address 33.0.0.100 to the network adapter that was created for the virtual switch “InternalShare”. Open up PowerShell (requires admin rights) and run following commands

#Retrieve the right network adapter
$netadapter = Get-NetAdapter -Name “vEthernet (InternalShare)”

#Disable DHCP
$netadapter | Set-NetIPInterface -DHCP Disabled

# Configure the IP addres
$netadapter | New-NetIPAddress -AddressFamily IPv4 -IPAddress 33.0.0.100 -PrefixLength 24 -Type Unicast

image

17) To share and to create the Temp folder on the VM do the following:

#Create the Temp folder on the C-drive
New-Item -Path C:\Temp -ItemType directory

#Share the Temp folder
New-SmbShare -Name Temp -Path c:\Temp –FullAccess “EVERYONE”

image

18) To map the Temp folder from the VM on the host to the Z-drive run the following command in PowerShell (do not run PowerShell as an administrator)

New-PSDrive –Name Z –PSProvider FileSystem –Root “\\W10-TST\Temp” –Persist -Credential W10-TST\username

image

As you can see in the below screenshot I’m able to surf with both OSs and share data between them.

image

This concludes this blog post. Keep tuned and I’ll be back soon.

Wim Matthyssen (@wmatthyssen)