Category: Windows 10

Windows Sandbox

How to configure Windows Sandbox

With the latest release of Windows 10 (1903), Microsoft introduced a new feature called Windows Sandbox. Windows Sandbox is based on Hyper-V technology and allows you to spin up an isolated, temporary, desktop environment where you can run untrusted software. In this blog post, I will show you how you can set up and configure Windows Sandbox in Windows 10. I will also cover who you can do an advanced configuration of your Windows Sandbox using Windows Sandbox config files.

The sandbox is great for demos, troubleshooting or if you are dealing with malware. If you close the sandbox, all the software with all its files and state are permanently deleted. It is a Windows 10 virtual machines, with the advantage that it is built into Windows 10, so it leverages the existing OS, which gives you faster startup, less footprint, better efficiency, and easier handling, without losing security.

Dynamic Image

Source: Microsoft

Windows Sandbox is a lightweight virtual machine with an operating system. The significant advantage which makes it so small is the usage of existing files from the host, for data which cannot change. For the files which can change, it uses a dynamically generated image, which is only ~100MB in size.

There are much more exciting things happening with the Windows Sandbox like smart memory management, Integrated kernel scheduler, Snapshot and clone, Graphics virtualization and Battery pass-through. If you want to find out more about the Windows Sandbox, check out the official blog post.

Prerequisites

Windows Sandbox comes with a couple of requirements. How more powerful your machine is, the better the experience will be.

  • Windows 10 (1903) Pro or Enterprise build 18362 or later
  • 64-bit architecture
  • Virtualization capabilities enabled in BIOS
  • At least 4GB of RAM (8GB recommended)
  • 1GB of free disk space (SSD recommended)
  • 2 CPU cores (4 cores with hyperthreading recommended)


PowerShell SSH Remoting Linux to Windows

Setup PowerShell SSH Remoting in PowerShell 6

With PowerShell version 6, Microsoft introduced PowerShell Remoting over SSH, which allows true multiplatform PowerShell remoting between Linux, macOS and Windows. PowerShell SSH Remoting creates a PowerShell host process on the target machine as an SSH subsystem. Normally, PowerShell remoting uses WinRM for connection negotiation and data transport, however WinRM is only available on Windows based machines.

There are also some downsides to it. SSH-based remoting doesn’t currently support remote endpoint configuration and JEA (Just Enough Administration). It is also important to understand, that this is not just another PowerShell SSH client.

Use SSH Transport with PowerShell Remoting

To use PowerShell remoting with SSH you can use the same cmdlets, you know from PowerShell remoting with WinRM.

  • New-PSSession
  • Enter-PSSession
  • Invoke-Command

There are 3 new parameters for these cmdlets, if you are using PowerShell SSH remoting.

  • -HostName (Instead of -Computername, you define the SSH target)
  • -UserName (Instead of -Credentials you use the -UserName parameter)
  • -KeyFilePath (If you are using SSH key authentication you can use the -KeyFilePath parameter to point to the key file)


Install or Update PowerShell 6 on Windows 10

How to Install and Update PowerShell 6

Today Windows 10 and Windows Server 2019 ship with Windows PowerShell 5.1 as the default version. PowerShell Core 6 is a new edition of PowerShell that is cross-platform (Windows, macOS, and Linux), open-source, and built for heterogeneous environments and the hybrid cloud. PowerShell 6 today is a side by side version next to Windows PowerShell 5.1. That means on Windows you cannot just upgrade to PowerShell 6, you will need to install it, same as on Linux and macOS. This blog post shows you how simple you can install PowerShell 6 or update PowerShell 6, if you have already installed it, on Windows 10, Windows Server 2019 or Linux.

One great example of how cross-platform PowerShell can work, check out my blog post: How to set up PowerShell SSH Remoting

Of course, you can find excellent documentation out there on Microsoft Docs. However, Steve Lee (Microsoft Principal Software Engineer Manager in the PowerShell Team) shared some one-liner, which helps you quickly install and update PowerShell 6.

Install PowerShell Core 6

Before showing you the one-liner option to install PowerShell 6, I want to share with you the documentation to install PowerShell Core 6 on different operating systems like Windows, macOS, and Linux.



Windows Server 2019

Which Windows Server 2019 Installation Option should I choose?

Windows Server 2019 will bring several installation options and tuning options for virtual machines, physical servers as well as container images. In this blog post I want to give an overview about the different installation options of Windows Server 2019.

Installation Options for Windows Server 2019 Physical Servers and Virtual Machines

As always, you can install Windows Server 2019 in virtual machines or directly on physical hardware, depending on your needs and requirements. For example you can use Windows Server 2019 as physical hosts for your Hyper-V virtualization server, Container hosts, Hyper-Converged Infrastructure using Hyper-V and Storage Spaces Direct, or as an application server. In virtual machines you can obviously use Windows Server 2019 as an application platform, infrastructure roles or container host. And of course you could also use it as Hyper-V host inside a virtual machine, leveraging the Nested Virtualization feature.

Installation OptionScenario
Windows Server CoreServer Core is the best installation option for production use and with Windows Admin Center remote management is highly improved.
Windows Server Core with Server Core App Compatibility FODWorkloads, and some troubleshooting scenarios, if Server Core doesn’t meet all your compatibility requirements. You can add an optional package to get past these issues. Try the Server Core App Compatibility Feature on Demand (FOD).
Windows Server with Desktop ExperienceWindows Server with Desktop Experience is still an option and still meets like previous releases. However, it is significantly larger than Server Core. This includes larger disk usage, more time to copy and deploy and larger attack surface. However, if Windows Server Core with App Compatibility does not support the App, Scenario or Administrators still need the UI, this is the option to install.


Updated PowerShellGet and PackageManagment

Update PowerShellGet and PackageManagement

Since I am just setting up a new work machine, I wanted to share some information how you can update PowerShellGet and PackageManagement to the latest version. This will give you the usual bug fixes and performance enhancements. Since you don’t get the latest version in Windows PowerShell nor PowerShell Core, you will need to update it manually.

PowerShellGet is a PowerShell module with commands for discovering, installing, updating and publishing the PowerShell artifacts like Modules, DSC Resources, Role Capabilities and Scripts. For example you use PowerShellGet to install the Azure PowerShell module, or other modules.

PowerShellGet module is also integrated with the PackageManagement module as a provider, users can also use the PowerShell PackageManagement cmdlets for discovering, installing and updating the PowerShell artifacts like Modules and Scripts.

(source: GitHub)

How to update PowerShellGet and PackageManagement

Updating to the latest version of PowerShellGet and the PackageManagement module is simple. Since both modules are part of the PowerShell Gallery, you can update them using a couple of simple commands.

You can find both modules in the PowerShell Gallery:

First lets check which versions of the modules you have available. If you use Update-Module, it will automatically load PowerShellGet and PackageManagement and list them as loaded PowerShell modules. Of course you can also use Get-Module -ListAvailable.

PowerShell Modules PowerShellGet and PackageManagement

As you can see, In my default installation, I got PowerShellGet version 1.6.7 and PackageManagement 1.1.7.2. If you have a look at PSGallery, you will see that these are pretty old versions and that there are newer available.

To get the latest version from PowerShell Gallery, you should first install the latest Nuget provider. You will need to run PowerShell as an Administrator for all  the following commands.

If you run PowerShell 5.0 or newer, you can install the latest PowerShellGet using the following command. PowerShell 5.0 is included in Windows 10, Windows Server 2016, Windows Server 2019, any system with WMF 5.0 and 5.1 or a system running PowerShell 6.

Two quick tips, first of, you will need to set the execution policy to RemoteSigned to allow the new module to run. Secondly in some cases you will need to use the -AllowClobber parameter to install the updated version of the module.

You can then use Update-Module to get newer versions:

Updated PowerShellGet and PackageManagment

After that you will see the latest versions of PowerShellGet and PackageMangement available

If you run older versions of PowerShell you can check out the full documention on the PowerShell Docs. I hope this blog post helps you to update PowerShellGet and benefit from the latest versions. If you have any questions, please let me know in the comments.



Hyper-V VM Configuration Version

Hyper-V VM configuration version supported features

A couple of months ago, I wrote an article about the new Microsoft Hyper-V UEFI in Windows Server 2019 and Windows 10 virtual machines. With that version Microsoft also released a new Hyper-V VM configuration version 9.0. This is not unusual, the Hyper-V teams usually bumps up the version number from release to release, since new Hyper-V features are introduced. In the comments, the question came up, what is new in this version of the Hyper-V VM configuration, Since the version was still a preview release of Windows Server and Windows 10, Microsoft didn’t share the full list of features per configuration version. However, now the documentation is ready and you can find the documentation here.

Supported features

The following table shows the minimum virtual machine configuration version required to use some Hyper-V features.

Windows ServerWindows 10VersionFeature
Windows Server 2016 Technical Preview 3Windows 10 15076.2Hot Add/Remove Memory
Windows Server 2016 Technical Preview 3Windows 10 15076.2Secure Boot for Linux VMs
Windows Server 2016 Technical Preview 3Windows 10 15076.2Production Checkpoints
Windows Server 2016 Technical Preview 3Windows 10 15076.2PowerShell Direct
Windows Server 2016 Technical Preview 3Windows 10 15076.2Virtual Machine Grouping
Windows Server 2016 Technical Preview 4 Windows 10 15117.0Virtual Trusted Platform Module (vTPM)
Windows Server 2016 Technical Preview 57.1Virtual machine multi queues (VMMQ)
Windows Server 2016Windows 10 Anniversary Update8.0XSAVE support
Windows Server 2016Windows 10 Anniversary Update8.0Key storage drive
Windows Server 2016Windows 10 Anniversary Update8.0Guest virtualization-based security support (VBS)
Windows Server 2016Windows 10 Anniversary Update8.0Nested virtualization
Windows Server 2016Windows 10 Anniversary Update8.0Virtual processor count
Windows Server 2016Windows 10 Anniversary Update8.0Large memory VMs
Windows Server 1803Windows 10 April 2018 Update8.3Increase the default maximum number for virtual devices to 64 per device (e.g. networking and assigned devices)
Windows Server 2019/1809Windows 10 October 2018 Update9.0Allow additional processor features for Perfmon
Windows Server 2019/1809Windows 10 October 2018 Update9.0Automatically expose simultaneous multithreading configuration for VMs running on hosts using the Core Scheduler
Windows Server 2019/1809Windows 10 October 2018 Update9.0Hibernation support

Source: Microsoft Docs (Thanks to Rene Moergeli for the link)

How to list the supported VM configuration versions

You can list all supported VM configuration versions on your Hyper-V host using the Get-VMHostSupportedVersion cmdlet.

Get-VM Hyper-V VM Configuration Version

If you want to see the version of a Hyper-V virtual machine, you can use Hyper-V Manager or the following PowerShell command:

Full list of Hyper-V VM versions

Here you have a full list of VM configuration versions of Hyper-V VMs together with the operating system.

Windows ClientWindows ServerVersion
Windows Server 20081.0
Windows Server 2008 SP12.0
Windows Server 2008 R23.0
Windows 8Windows Server 20124.0
Windows 8.1Windows Server 2012 R25.0
Windows 10 1507Windows Server 2016 Technical Preview 36.2
Windows 10 1511Windows Server 2016 Technical Preview 47.0
Windows Server 2016 Technical Preview 57.1
Windows 10 Anniversary UpdateWindows Server 20168.0
Windows 10 Creators Update8.1
Windows 10 Fall Creators UpdateWindows Server 17098.2
Windows 10 April 2018 UpdateWindows Server 18038.3
Windows 10 October 2018 UpdateWindows Server 2019 / 18099.0
Windows 10 April 2019 UpdateWindows Server 19039.1
PrereleasePrerelease254.0
ExperimentalExperimental255.0

How to upgrade Hyper-V VM configuration version

Hyper-V vNext Update VM Configuration Version

Upgrading the Hyper-V VM version is pretty straight forward. If the VM is running on a host supporting a newer version of Hyper-V VMs, you can right click the virtual machine in the Hyper-V Manager and click on upgrade or you can run the Update-VMVersion PowerShell cmdlet.

I hope this blog was help full for understanding Hyper-V VM versions, let me know if you have any questions in the comments!



Windows Insider MVP Award 2019

Windows Insider MVP Award

I am proud to share with you today, that I received the Windows Insider MVP Award from Microsoft, for my contributions in the Windows community in the past year. The Windows Insider MVP award is an additional award to the Microsoft MVP award. It was created and announced in 2016, and is focusing on Windows and Devices for consumers. It is an honor to be awarded for my work and contributions in 2018.

Congratulations! Thank you for your contributions to the Windows community, we are excited to welcome you as a Windows Insider MVP. This award is a token of our appreciation, your leadership and passion help make Windows the best yet. We look forward to collaborating with you and all of our Windows Insider MVPs as we continue to strengthen the Windows Insider MVP (WI MVP) Program.

Working with the Windows community to share the latest an greatest about Windows 10 is just a lot of fun. The Windows Insider team as a fantastic job with enganging with the community and work with people all over the world, to make Windows better.