Last updated by at .

  • Hyper-V 2016
    What's new in Hyper-V 2016
  • Microsoft Azure
    Microsoft Azure

Tag: Windows 8

sysprep.exe vm mode

Windows Sysprep for Virtual Machines

For using the same system image for different virtual machines or physical computer, Microsoft created a tool called sysprep.exe. Most people should be already familiar with that tool. If not here is the description:

Sysprep prepares a Windows installation (Windows client and Windows Server) for imaging, allowing you to capture a customized installation. Sysprep removes PC-specific information from a Windows installation, “generalizing” the installation so it can be reused on different PCs. With Sysprep you can configre the PC to boot to audit mode, where you can make additional changes or updates to your image. Or, you can configure Windows to boot to the Out-of-Box Experience (OOBE).

This is great so you can sysprep a virtual machine copy the VHD or VHDX file and use it for the first boot of different VMs. In Windows Server 2012 and Windows 8, Microsoft added an addition to sysprep called the mode switch “/mode:vm”. The mode:vm switch allows you to identify the Windows as a Virtual Machine and sysprep.exe will generalize a Virtual Hard Disk (VHD or VHDX) so that you can deploy the VHD as a VHD on the same Virtual Machine (VM) or hypervisor. You must deploy the VHD on a Virtual Machine (VM) or hypervisor with the same hardware profile. For example, if you created VHD in Microsoft Hyper-V, you can only deploy your VHD to Microsoft Hyper-V VMs with a matching hardware profile, and you can only run VM mode from inside a VM.

This will boost the performance and time for the virtual machine for the first startup and installation. This also work of course with virtual machines running on other hypervisors such as VMware or Xen.

Run the following command inside the Virtual Machine (You find sysprep.exe in the  C:\Windows\System32\Sysprep folder):

Now you can copy the VHD or VHDX file from that virtual machine and use it for other VMs.



Get-NetIPConfiguration

Basic Networking PowerShell cmdlets cheatsheet to replace netsh, ipconfig, nslookup and more

Around 4 years ago I wrote a blog post about how to Replace netsh with Windows PowerShell which includes basic powershell networking cmdlets. After working with Microsoft Azure, Nano Server and Containers, Powershell together with networking becomes more and more important. I created this little cheat sheet so it becomes easy for people to get started.

Basic Networking Information with PowerShell

Get-NetIPConfiguration

Get the IP Configuration (ipconfig with PowerShell)

List all Network Adapters

Get a spesific network adapter by name

Get more information VLAN ID, Speed, Connection status

Get driver information

Get adapter hardware information. This can be really usefull when you need to know the PCI slot of the NIC.

Disable and Enable a Network Adapter

Rename a Network Adapter

IP Configuration using PowerShell

Get-NetIPAddress

Get IP and DNS address information

Get IP address only

Get DNS Server Address information

Set IP Address

or if you want to change a existing IP Address

Remove IP Address

Set DNS Server

Set interface to DHCP

Ping with PowerShell

Test-NetConnection Ping

How to Ping with PowerShell

Get some more details from the Test-NetConnection

Ping multiple IP using PowerShell

Tracert

PowerShell Tracert

Tracert with PowerShell

Portscan with PowerShell

PowerShell Portscan

Use PowerShell to check for open port

NSlookup in PowerShell

PowerShell NSlookup

NSlookup using PowerShell:

Route in PowerShell

PowerShell Route

How to replace Route command with PowerShell

NETSTAT in PowerShell

PowerShell Netstat

How to replace NETSTAT with PowerShell

NIC Teaming PowerShell commands

Create a new NIC Teaming (Network Adapter Team)

SMB Related PowerShell commands

SMB PowerShell SMB Client Configuration

Get SMB Client Configuration

Get SMB Connections

Get SMB Mutlichannel Connections

Get SMB open files

Get SMB Direct (RDMA) adapters

Hyper-V Networking cmdlets

Hyper-V PowerShell Get-VMNetwork Adapter

Get and set Network Adapter VMQ settings

Get VM Network Adapter

Get VM Network Adapter IP Addresses

Get VM Network Adapter Mac Addresses

I hope you enjoyed it and the post was helpful, if you think something important is missing, please add it in the comments.



diskpart fat32 and gpt

How to create Windows Windows Server bootable USB media for deployment on UEFI based systems

When you were create a USB media for PCs, notebooks and servers which were using BIOS you could use several tools to do this. Now most of the tools do not really create a USB media drive which can be used to boot and install Windows or Windows Server on a UEFI based system such a new servers and for example the Surface Pro line. But it is very simple to do this now, just follow this steps:

  • The USB drive has to be formatted in FAT32
  • The USB needs to be GPT and not MBR
  • Copy all files from the ISO to the USB drive

diskpart fat32 and gpt

This is it, and here is how you do it:

First plugin your USB drive to your computer. The USB drive should be bigger than 4GB.

Open a CMD prompt or PowerShell using the Run as Administrator option and open diskpart. Now you can do list all this by using

Select the USB disk, in my case this was disk 1

Clean the disk. Be careful this will remove all files and partitions on the USB media.

Now convert it to GPT

Create a new primary partition. But make sure the partition is not greater than 16GB otherwise it can be formatted with FAT32.

Format the partition with FAT32

Assign a drive letter to the volume

now you can exit the diskpart and copy all files from the Windows or Windows Server to the USB drive and boot it. This works with Windows 8, Windows 8.1, Windows 10, Windows Server 2012, Windows Server 2012 R2 and Windows Server 2016 or even Hyper-V Server in the same editions.

 



Windows 10 Product Familiy

Windows 10 Editions and upgrade paths

Last week Microsoft announced the different editions of Windows 10. As in the past Microsoft offers Windows in different editions that are tailored for various different use cases and scenarios. Windows 10 will power an broad range of devices – everything from PCs, tablets, phones, Xbox One, Microsoft HoloLens and Surface Hub. It will also power the world around us, core to devices making up the Internet of Things, everything from elevators to ATMs to heart rate monitors to wearables.

Editions

The different Windows 10 editions address specific needs of our various customer groups, from consumers to small businesses to the largest enterprises.

  • Windows 10 Home – Windows 10 Home is the consumer-focused desktop edition.
  • Windows 10 Mobile – Windows 10 Mobile is designed to deliver the best user experience on smaller, mobile, touch-centric devices like smartphones and small tablets.
  • Windows 10 Pro – Windows 10 Pro is a desktop edition for PCs, tablets and 2-in-1s. Building upon both the familiar and innovative features of Windows 10 Home, it has many extra features to meet the diverse needs of small businesses. Windows 10 Pro will add some management capabilities to the Windows 10 and also adds Windows Update for Business.
  • Windows 10 Enterprise – Windows 10 Enterprise builds on Windows 10 Pro, adding advanced features designed to meet the demands of medium and large sized organizations. Windows 10 Enterprise will be available to Volume Licensing customers and adds some features such as Direct Access, Branch Cache and Windows Update for Business. With Windows 10 Enterprise customers will also get access to the Long Term Servicing Branch to better control deployment options for future updates.
  • Windows 10 Education – Windows 10 Education builds on Windows 10 Enterprise, and is designed to meet the needs of schools – staff, administrators, teachers and students. This edition will be available through academic Volume Licensing, and there will be paths for schools and students using Windows 10 Home and Windows 10 Pro devices to upgrade to Windows 10 Education.
  • Windows 10 Mobile Enterprise – Windows 10 Mobile Enterprise is designed to deliver the best customer experience to business customers on smartphones and small tablets. It will be available to our Volume Licensing customers. Windows 10 Mobile Enterprise will adds a flexible ways for businesses to manage updates.
  • Windows 10 IoT  – Windows 10 will also be avaialble for different industry devices like ATMs, rteail point of sale, handheld terminals and industrial robotics and as well for IoT (Internet of Things) devices with a Windows 10 IoT Core edition.

Upgrade

As Microsoft  announced in January this year, for the first time ever, Microsoft is offering the full versions of Windows 10 Home, Windows 10 Mobile and Windows 10 Pro as a free and easy upgrade for qualifying Windows 7, Windows 8.1 and Windows Phone 8.1 devices that upgrade in the first year after launch. Once you upgrade, you have Windows 10 for free on that device. In the Microsoft Partner Network Microsoft published some more information about the upgrade paths.

Microsoft will offer a free upgrade to Windows 10 for qualified Windows 7, Windows 8 and Windows Phone 8.1 devices in the first year. After the first year, upgrades will be paid via boxed product and VL Upgrades.

  • Windows 8/8.1 and Windows 7 Home Basic and Home Premium devices upgrade to Windows 10 Home
  • Windows 8/8.1 Pro and Windows 7 Professional and Ultimate devices upgrade to Windows 10 Pro
  • If upgraded within the first 12 months following launch, the device will receive ongoing Windows 10 updates for free for the life of that device
  • Excludes Windows Enterprise and RT devices
  • The free Windows 10 upgrade is delivered through Windows Update; domain-joined machines can manually get the update via Windows Update. The upgrade cannot be deployed through WSUS.

Windows Update for Business

At Ignite, Microsoft  announced the free Windows Update for Business service, available for all Windows Pro and Windows Enterprise devices, designed to help organisations keep their Windows devices always up to date with the latest security and features. In case you missed it, check out the blog, Announcing Windows Update for Business for what the service will provide.



InstantGo powercfg

Troubleshoot Windows InstantGo (Connected Standby)

In Windows 8 Microsoft released a feature called InstantGo (formerly know as Connected Standby) which should bring smartphone like Power Management features to your Windows tablet or notebook. Devices such as the Surface Pro 3 do offer this feature. This post should help you troubleshoot issues with InstantGo or Connected Standby.

InstantGo requires the following:

  • Windows 8.1 Operating System (In Windows 8 this is called Connected Standby)
  • A firmware flag indicating support for the standard
  • The boot volume must run on a SSD disk
  • Support for NDIS 6.30 by all network devices
  • Passive cooling on standby
  • Secure Boot
  • Memory to be soldered to the motherboard
  • The Hyper-V Hypervisor role must be disabled on Windows 8 and Windows 8.1 systems. Windows 10 Hyper-V will allow you to use Hyper-V and InstantGo at the same time.

Check if the hardware supports InstantGo

To check if your hardware supports InstantGo you can run the following command:

InstantGo powercfg

InstantGo Issues / Connected Standby Issues

In some case you can run in some issues where you have your battery draining more than expected during the InstantGo or Connected Standby time. This could be of the following reasons:

  • Drivers – Make sure you have the latest drivers installed
  • Firmware – Make sure you have the latest Firmware (BIOS) installed
  • Mails –  The Windows communication app keeps the broker infrastructure (BI) system active. BI, in turn, keeps the WLAN network up so that the system stays up-to-date with emails. If you get a lot of emails this can end up in a higher power drain.
  • Software –  Some installed legacy Software which does not let you go into the InstantGo modus.
  • VPN Clients – Some older VPN Clients can also cause issues with InstantGo
  • Network Activity – The WLAN device might have a challenging radio environment and the Windows system might not be able to establish a reliable Internet connection. We see how these events affect the WLAN device, which, in turn, impacts the battery.
  • Hyper-V – If you run Hyper-V in Windows 8 or Windows 8.1 you can not run InstantGo, this is solved in Windows 10.

Troubleshooting InstantGo / Troubleshooting Connected Standby

To get some more information about your device and InstantGo or Connected Standby you can use the following tools and reports.

powercfg /SleepStudy

Powercfg SleepStudy

The maybe best way to Troubleshoot Connected Standby or InstantGo issues, is to use the powercfg /SleepStudy command. This will generate a Sleep Study report which allows you to analyze different things about Conncted Standby:

Connected Standby / InstantGo Overview

SleepStudy Report

Connected Standby Transitions

SleepStudy Report Connected Standby Transitions

Connected Standby Sessions

Here you can analyze which application or driver did use battery resources during the Connected Standby session.

SleepStudy Report InstantGo

powercfg /batteryreport

powercfg batteryreport

With powercfg /batteryreport you can generate a report about how your battery is used.

Battery Report

And you can also see what kind of state drained your battery, if this was an active session or a Connected Standby session.

Battery Report Battery Usage

powercfg /energy

PowerCFG Engery

With powercfg /engery you can see not only InstantGo or Connected Standby issues, you can see what other applications, drivers and more does could drain your battery.

Energy Report

I hope this helps you to troubleshoot Connected Standby issues.

Sources

 



CLIXML Export Import

Save PowerShell Object to file for Remote Troubleshooting

This is not something new to the most of you PowerShell guys out there, but still there are a lot of IT Pros which do not know about this. Sometimes we have to do some remote troubleshooting without having access to the system itself. The thing you can do is to let the customer send you some screenshots but that doesn’t really show everything and maybe you have to contact the customer like 100 times to get the right information. A better solution is to let the customer to run a PowerShell command or script and send you the output. But even a text file or screenshot of the PowerShell output is not the best solution. If you get a lot of text in a TXT file it is hard to sort it and maybe there are some information missing because the txt output does not include all information of the PowerShell object.

I have started to use a simple method to export PowerShell objects to a XML file and import the object on another system. This can be done by the PowerShell cmdlets Export-Clixml and Import-Clixml.

What I do is, I tell the customer to run the following command to generate a XML with the PowerShell objects about his disks for example.

After I got this XML file, I can import it here on my local system and can work with it as I would be in front of the customer system.

CLIXML Export Import

As I said, this is nothing new but this can save you and your customer some time. Of course this works with other objects not just disks 😉 For example you can get Cluster Configurations, Hyper-V Virtual Switch Configurations and much more.

Update:

Jeffrey P Snover (Microsoft Technical Fellow and Lead Architect of Windows Server) commented on my blog post and had some great input. If you want to troubleshoot sometimes you often need more information than just one information. To save multiple PowerShell objects into a single file you can use a hashtable to do this:

You can see more information on this topic in Jeffery Snovers comment on this blog.

 



OneNote Overview

This is why OneNote is awesome

Well I know I normally blog more about Microsoft Datacenter and Cloud stuff especially Hyper-V and System Center, but I am a huge fan of Microsoft’s Office Suite. I really live in Outlook and Microsoft OneNote. I organize my private life, my work and university stuff in OneNote. I get often ask by customers or friends how I work and how I get things done. In this case I always show them OneNote, which is maybe one of the best keep secrets inside Microsoft. This post shows you why OneNote is awesome and shows you some of the hidden features you didn’t know about.

If you have more hidden features leave a comment on the post.

OneNote Dock to Desktop

OneNote Dock to Desktop Title

With the Dock to Desktop feature you can keep your notes visible by anchoring an OneNote window to the side of your desktop. Your notes will stay on top of your desktop while you are working in other programs.

Dock to Desktop

Linked Note taking

 

OneNote Linked Note Talking

While you are using the Dock to Desktop mode you can enable Linked Note Taking. This will automatically create a link to the page or office document you have open while you have taken note. This is perfect, while I was write a whitepaper for university and I had to do a lot of research I used this feature. While I was write the document I had to mention the sources as foot notes and sometimes it’s hard to find the source of something you have found on the internet. With linked notes I only had to check my nodes and all the sources and references were linked.

 Visio Integration

OneNote Visio Integration

A lot of other Microsoft products to integrate into OneNote. One of them is Visio, if you have Visio installed on our computer you can add an existing Visio diagram to you notes. You can also directly create a new Visio diagram from OneNote and add it to your notes.