master-client(-management)

Take Windows Up to 11

Tag: PowerShell

Windows 10 1903 nice to know for IT Pros and Enterprise admins (curated link list)

Latest Update: September 16, 2019

With the release of Windows 10 1903 I want to start a curated link list for every Windows 10 release. A place where I can store interesting articles about new features, settings or bugs. I plan to update with new content as soon as I find it.
If you find something new before me or if I missed anything important please write a comment or send me a message via Twitter.

General

Topic Description Source
What’s new for IT Pros New and Updated Features of interest to IT Pros Link
What’s new in WUfB What’s new in Windows Update for Business in Windows 10 Link
Release Status Known issues and notifications Link

Group Policies

Topic Description Source
New GPOs Group Policy Changes in Windows 10 1903 Preview Link
New GPOs New GPO settings in Windows 10 1903: enforce updates, Storage Sense, and logon Link
Security Baseline (Final) Security Baseline (Final) for Windows 10 1903 Link
Security Baseline 1903 Security Compliance Toolkit Link
WMI Filter Select Version,ProductType from Win32_OperatingSystem WHERE Version LIKE "10.0.18362%" and ProductType = "1" Link
ADMX Download of 1903 ADMX files Link
Start Menu crash Continue experiences on this device Group Policy setting kills the Start Menu Link

Autopilot, OSD, SCCM and MDT

Topic Description Source
WSUS category Windows 10 1903 has ist own WSUS product category, SCCM 1902 required to manage 1903 Link1 Link2
What’s new in ADK Changes to the ADK especially the known issues Windows SIM x64 error Link
Autopilot The latest news on Windows Autopilot Link
Autopilot Companion Example Companion App to change settings during White Glove deployments Link
Autopilot White Glove Windows Autopilot for white glove deployment Link
High CPU SCCM WoL Proxy High CPU consumption of SCCM wake-up proxy due to DHCP data storage changes Link
MBR2GPT PE error MBR2GPT.exe will not run successfully in 1903 PE because ReAgent.dll is missing Link
Autopilot needs longer Why does “Preparing your device for mobile management” take longer with Windows 10 1903? Link
Autopilot ESP Bitlocker Since June 26th update of 1903 Autopilot will wait after OOBE (ESP) to begin encrypting Link
Autopilot Known issues Windows Autopilot known issues in Windows 10 1903 Link

Apps

Topic Description Source
Apps, AppX Windows 10 1903 Built-In Apps: What to Keep Link
Builtin AppX Understand the different apps included in Windows 10 Link

MDM

Topic Description Source
What’s new in MDM What’s new in MDM for Windows 10, version 1903 Link
MSfB Apps not deployed Take Action to Ensure MSfB Apps deployed through Intune Install on Windows 10 1903 Link

Misc

Topic Description Source
Sandbox Enable Windows Sandbox on 1903 with and without PowerShell Link
Sandbox Configuration How to configure Windows Sandbox Link
Sandbox Mapped Folder If you use mapped folder in Windows Sandbox, note that the ReadOnly value should be in lowecase like “true” and not “True” Link
Run in Sandbox Run file in Windows Sandbox from right-click and Context menu Link
Reserved Storage Windows 10 and reserved storage Link
WSL What’s new for WSL in Windows 10 version 1903? Link
Provisioning error on Wi-Fi for AAD Known issue: Provisioning error on Wi-Fi for Azure AD joined Windows 10 version 1903 Link
HV DHCP Default Switch Hyper-V Default Switch not handing out DHCP addresses for VMs or Mobile Hotspot Link
SBS Essentials connector broken Windows 10 1903 feature update breaks the SBS, Essentials client connector Link
Always On VPN RASMAN service issue The Remote Access Connection Manager (RASMAN) service may stop with error “0xc0000005” Link

PowerShell Hyper-V Tags Module

PSHVTag

I have written the PSHVTag Module because I am using many Hyper-V virtual machines in my lab environments. And I have to start and stop the different labs very often. A VM usually needs some time to fully start up before I can start the next one. For example, my Gateway VM has to be up and running before I can start the Domain Controller behind it. And the DC has to be up and running before I can start the ConfigMgr server etc..

Instead of creating a complex database his I wanted to make it very simple to describe a service hierarchy. Therefore, I thought it would be very simple to do this just by adding a simple tag line to the notes filed of every VM in such an environment.

With this module it is very easy to start a complex VM-Service like SCCM with all its dependencies with just a simple PowerShell command.
You can also use the VM Topology object to select virtual machines and use them with any other Hyper-V PowerShell command like Export-VM.

While creating the module I thought it would be nice to have a graph of my lab environments. Consequently, I added a function based on the PSGraph module to it, which allows you to map your environments (see example below).

VMTopology

What is a VM-Topology

A VM-Topology is represented by a custom PowerShell class. An instance is built from all virtual machines of one host with a tag line in their notes field.

It can comprise multiple VM-Environments in which virtual machines can provide VM-Services. The environment also reflects the dependencies between these services.

Example Graph

This graph shows a simple VM-Topology containing one environment, one service provided by one VM and one required service provided by one VM.

VMTopology

The Tag

The Tag, used to create a VM-Topology consists of three elements and is stored as a single line in the notes field of a Hyper-V VM. Only one tag line is allowed per VM.

Elements

Environment

This tag element defines the VM-Environment the virtual machine belongs to. One VM has to belong to one environment and can belong to multiple environments. But it has to provide the same services in all environments and it has to depend on the same services in all environments.

Service

The service element defines the services provided by the VM for the environments it belongs to. A virtual machine can provide one or more services.

DependsOn

The DependsOn element includes all services a VM requires to be up in running before it can fully operate. For example, an Azure AD Connect server depends on the domain and internet access.

Syntax

The syntax is similar to HTML tags. The tag element name (Env, Service, DependsOn) is put between angle brackets to indicate the start of the tag and is closed by the tag element name prefixed with a / between angle brackets.

Multiple instances of an element are separated by a comma.

A tag line looks like the example below.

<Env>Environment1,Environment</Env><Service>Service1,Service2</Service><DependsOn>RequiredService1,RequiredService2</DependsOn>

You can create a tag by using the Set-VMTag command.

Start a VM-Service with all dependencies

The main reason for me writing this module was starting virtual machines in a dedicated order. Therefore, I wrote the function Start-VMService.

For instance to start the DefGateway01, DomainController01, DomainController02, AzureADConnect01 and AzureADConnect02 virtual machines from the example topology in the picture at the beginning of this article on the localhost in this order you can use the following command:

Stop a VM-Service

It is also possible to stop a VM-Service and all its dependencies with the Stop-VMService function.

For examplem in order to stop the five virtual machines for AzureAD, Domain and Gateway you can use the following command:

How to use a VM-Topology with other commands

You can use the VM-Topology to select virtual machines by VM-Service or VM-Environment and use them with commands like Export-VM.

For example, in order to export all virtual machines from the VM-Environment LAB on the localhost use the following:

Installing the Module

The module is available in the PowerShell Gallery or on GitHub.

Inspect

Install

Future Updates

  • When I started this module I wanted to create a GUI which shows the state of the different objects in real time and allows you to start and stop services with a click on a button. I think this will be one of the next additions to this module.
  • I am also planning to add functions to manipulate single tag items instead of setting or replacing the whole tag at once.
  • Furthermore, I want to add support for multiple Hyper-V hosts to allow spanning VM-Topologies over several hosts.

Feedback

Hopefully some of you will find this module as useful as I do. And maybe you will have some good ideas for new features. Please let me know and use the project page on Github for feedback.