<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.8.5">Jekyll</generator><link href="https://roeleverink.nl/feed.xml" rel="self" type="application/atom+xml" /><link href="https://roeleverink.nl/" rel="alternate" type="text/html" /><updated>2019-11-27T18:54:45+00:00</updated><id>https://roeleverink.nl/feed.xml</id><title type="html">roeleverink.nl</title><subtitle>Azure blog</subtitle><entry><title type="html">PowerShell Function app behind Azure AD authentication</title><link href="https://roeleverink.nl/selfservice-vmstart/" rel="alternate" type="text/html" title="PowerShell Function app behind Azure AD authentication" /><published>2019-11-27T00:00:00+00:00</published><updated>2019-11-27T00:00:00+00:00</updated><id>https://roeleverink.nl/selfservice-vmstart</id><content type="html" xml:base="https://roeleverink.nl/selfservice-vmstart/">&lt;p&gt;Every year, me and a couple of cousins of mine pick a day, and we game all day. Usually it’s an old game that everybody can play. Like Command &amp;amp; Conquer: Generals.&lt;br /&gt;
Back in the days we all came together and linked our PC’s with a switch, and we were good to go. But these days we’re grown up and living miles apart, so we usually link our PC’s over the internet.
With an old game like that, connecting over the internet doesn’t work that well or isn’t supported at all, it needs a LAN. So I build an pfsense server in Azure that supports Layer 2 broadcast messages over the VPN. This all works really well.&lt;/p&gt;

&lt;p&gt;To reduce my Azure spending I have an auto shutdown schedule configured. It shuts down my VM at 23:30, and it stays that way until turned on.&lt;br /&gt;
Sometimes my cousins want to game while I have to work, or have other stuff to do, and I don’t have time to turn on my Azure VM, and of course, I don’t want to give them access to my subscription either.&lt;/p&gt;

&lt;p&gt;There is a solution for my usecase:&lt;br /&gt;
&lt;strong&gt;Azure Functions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Azure Functions for PowerShell core is now &lt;a href=&quot;https://azure.microsoft.com/en-in/updates/powershell-support-in-azure-functions-is-now-generally-available/&quot; target=&quot;_blank&quot;&gt;General Available&lt;/a&gt;, so its fully supported. And it gives me the opportunity to secure it behind Azure authentication.&lt;/p&gt;

&lt;h1 id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;/h1&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;/selfservice-vmstart/#setup&quot;&gt;Setup&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/selfservice-vmstart/#create-functionapp&quot;&gt;Creating the Function App&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/selfservice-vmstart/#managed-identity&quot;&gt;Creating a Managed Identity&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/selfservice-vmstart/#first-function&quot;&gt;Creating the first function&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/selfservice-vmstart/#second-function&quot;&gt;Creating the second function&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/selfservice-vmstart/#azuread-authentication&quot;&gt;Add AzureAD authentication&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/selfservice-vmstart/#group-based&quot;&gt;Group or user based access&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h1 id=&quot;1-setup-&quot;&gt;1. Setup &lt;a name=&quot;setup&quot;&gt;&lt;/a&gt;&lt;/h1&gt;

&lt;p&gt;For this we will need 2 functions&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;One function will be the main website, it should also show the status of my VM, it will contain a button that will trigger my second function&lt;/li&gt;
  &lt;li&gt;My second function will start my VM. It should also give some status back.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both functions can use the same Function App. They will both have to be secured with Azure AD authentication, so not everyone can start my VM.&lt;/p&gt;

&lt;p&gt;With this setup done, lets start building&lt;/p&gt;

&lt;h1 id=&quot;2-creating-the-function-app-&quot;&gt;2. Creating the Function App &lt;a name=&quot;create-functionapp&quot;&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;We can start by creating a resource group to hold our functions.&lt;/p&gt;

&lt;p&gt;I call my resource group: &lt;em&gt;RG_WEU_SelfServiceFunctions&lt;/em&gt;, as it’s located in West Europe.&lt;/p&gt;

&lt;p&gt;After that we can go to: &lt;strong&gt;+Create a Resource&lt;/strong&gt; -&amp;gt; Search for: &lt;strong&gt;Function App&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Create&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Select a subscription. And select your resource group that you just made. 
Give your function app a name, it should be globally unique&lt;br /&gt;
For Runtime stack choose &lt;em&gt;PowerShell Core&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/selfservice-function/new-functionapp1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;On the next page you can create a new storage account, or choose an existing one.&lt;br /&gt;
For the plan I chose Consumption, depending on your usecase you can also choose another plan.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/selfservice-function/new-functionapp2.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As I don’t need any monitoring I turn application insights off. This is only for my personal use, so I don’t need any monitoring.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/selfservice-function/new-functionapp3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Then on the Review + Create tab. Choose &lt;strong&gt;Create&lt;/strong&gt;&lt;/p&gt;

&lt;h1 id=&quot;3-creating-a-managed-identity-&quot;&gt;3. Creating a Managed Identity &lt;a name=&quot;managed-identity&quot;&gt;&lt;/a&gt;&lt;/h1&gt;

&lt;p&gt;To determine the status I can use the Az PowerShell module, the Az module is supported right out of the box in Azure Functions, so I don’t have to install it first. But I do need an account to authenticate to my subscription.&lt;br /&gt;
For this we can use a managed identity.&lt;/p&gt;

&lt;p&gt;The managed identity is created on the Function App level, so it’s for all our functions in our Function App.
Go to the &lt;strong&gt;function app&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Platform features&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Identity&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/selfservice-function/managed-identity1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Change the status to &lt;strong&gt;On&lt;/strong&gt; and then click &lt;strong&gt;Save&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/selfservice-function/managed-identity2.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Our Function App now has a managed identity, but it doesn’t have any rights in our subscription. For this I assign rights on just the resource group, but depending on your function you can also assign rights on the subscription level.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/selfservice-function/managed-identity3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The managed identity has the same name as your function app. Select it, and click &lt;strong&gt;Save&lt;/strong&gt;&lt;/p&gt;

&lt;h1 id=&quot;4-creating-the-first-function-&quot;&gt;4. Creating the first function &lt;a name=&quot;first-function&quot;&gt;&lt;/a&gt;&lt;/h1&gt;

&lt;p&gt;Once your Function App is ready, and you have your managed identity, you can create a function with the quickstart by clicking on the  &lt;strong&gt;+&lt;/strong&gt; sign next to functions.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/selfservice-function/new-function1.0.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The downside of the quickstart is that it will give your function a standard name. If you want to name your function yourself, click on &lt;strong&gt;Functions&lt;/strong&gt; and then &lt;strong&gt;+ New function&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/selfservice-function/new-function1.1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As my first function will be a website, the trigger is an HTTP trigger, it will be a simple GET request like any website, so click &lt;strong&gt;HTTP Trigger&lt;/strong&gt;&lt;br /&gt;
After that you can give your function a name, and authorization level. I chose Anonymous, as I will add Azure AD authentication later.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/selfservice-function/new-function1.2.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We get thrown into a webeditor to edit our function. As I want to show a webpage, I have to build some HTML code, and insert some status about my VM. As we created a managed identity we can just use Az commandlets, and it will use the managed identity to authenticate.
For the code, it can be found on my &lt;a href=&quot;https://github.com/Everink/SelfService-VMstart/blob/master/web/run.ps1&quot; target=&quot;_blank&quot;&gt;GitHub repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There’s only one more thing to do. Currently my function supports both the GET and POST method. We can disable the POST method.&lt;br /&gt;
This is done on the &lt;strong&gt;Integrate&lt;/strong&gt; section. Deselect &lt;strong&gt;POST&lt;/strong&gt;, and click &lt;strong&gt;Save&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/selfservice-function/new-function1.3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;To test your function, you can go to the webpage. It’s in the form of:&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;https://&amp;lt;functionApp-name&amp;gt;.azurewebsites.net/api/&amp;lt;function-name&amp;gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can also find it in the interface on the following location&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/selfservice-function/new-function1.4.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;5-creating-the-second-function-&quot;&gt;5. Creating the second function &lt;a name=&quot;second-function&quot;&gt;&lt;/a&gt;&lt;/h1&gt;

&lt;p&gt;As you might have noticed, in our first function we call the second function with a &lt;a href=&quot;https://github.com/Everink/SelfService-VMstart/blob/master/web/run.ps1#L45&quot; target=&quot;_blank&quot;&gt;POST method&lt;/a&gt;. It doesn’t really contain any data, but you could build it like that if you would want to (like selecting which VM to start for example).&lt;/p&gt;

&lt;p&gt;The procedure for the second function is the same as the first function. There are a few exceptions:&lt;/p&gt;

&lt;p&gt;We name it &lt;strong&gt;vmstarter&lt;/strong&gt;&lt;br /&gt;
Allowed method is now POST, so we have to &lt;strong&gt;uncheck GET&lt;/strong&gt; under Integrate&lt;/p&gt;

&lt;p&gt;That’s it. It uses the same managed identity as our first function, as they both are using the same function app.&lt;/p&gt;

&lt;p&gt;For the PowerShell code, you can use and edit the code on my &lt;a href=&quot;https://github.com/Everink/SelfService-VMstart/blob/master/vmstarter/run.ps1&quot; target=&quot;_blank&quot;&gt;GitHub repo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now it’s time to test the function and see if the VM will start!&lt;/p&gt;

&lt;h1 id=&quot;6-add-azuread-authentication-&quot;&gt;6. Add AzureAD authentication &lt;a name=&quot;azuread-authentication&quot;&gt;&lt;/a&gt;&lt;/h1&gt;

&lt;p&gt;As I don’t want my functions exposed to the internet I can add Azure AD authentication. This can be enabled on the Function App level.
Go to your &lt;strong&gt;function app&lt;/strong&gt;, and click &lt;strong&gt;Platform features&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Authentication / Authorization&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/selfservice-function/authentication1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Turn &lt;strong&gt;On&lt;/strong&gt; App Service Authentication&lt;br /&gt;
In the dropdown menu, select &lt;strong&gt;Log in with Azure Active Directory&lt;/strong&gt;&lt;br /&gt;
This will deny any unauthenticated request to my functionapp. 
We will have to configure Azure AD, so click on &lt;strong&gt;Azure Active Directory&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/selfservice-function/authentication2.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;For Management mode, click &lt;strong&gt;Express&lt;/strong&gt;, and click &lt;strong&gt;OK&lt;/strong&gt;&lt;br /&gt;
This will create an app registration in Azure AD, called &lt;em&gt;selfservicevm&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/selfservice-function/authentication3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Click &lt;strong&gt;Save&lt;/strong&gt; again.&lt;/p&gt;

&lt;p&gt;This will enable Azure AD authentication. If you login to the function app again, you will be triggered to login. Because our app wants to read the profile, everyone has to give consent, or you can give consent on behalf of your organization with a global admin account.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/selfservice-function/authentication4.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now all users can login to your function app!&lt;/p&gt;

&lt;p&gt;In my case, I can invite my cousins as guest users to my Azure AD, so they can also use this with their own Microsoft accounts.&lt;/p&gt;

&lt;h1 id=&quot;7-group-or-user-based-access-&quot;&gt;7. Group or user based access &lt;a name=&quot;group-based&quot;&gt;&lt;/a&gt;&lt;/h1&gt;

&lt;p&gt;If you want to control access to your application based on group membership or to single users, that is also possible.
The selfservice app can be found under Enterprise Application. In the properties section User assignment required is now set to &lt;strong&gt;No&lt;/strong&gt;. This means everyone in our tenant has access. This can be set to &lt;strong&gt;Yes&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/selfservice-function/group-based-access1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After that go to Users &amp;amp; Groups and select the users or groups that are allowed to access the application.&lt;/p&gt;

&lt;p&gt;You can edit this to your own needs of course. You can let groups of users like your developers select VM’s to start / stop / reboot. Or you can even do complete ARM template deployments from inside your functions.&lt;/p&gt;</content><author><name></name></author><summary type="html">Every year, me and a couple of cousins of mine pick a day, and we game all day. Usually it’s an old game that everybody can play. Like Command &amp;amp; Conquer: Generals. Back in the days we all came together and linked our PC’s with a switch, and we were good to go. But these days we’re grown up and living miles apart, so we usually link our PC’s over the internet. With an old game like that, connecting over the internet doesn’t work that well or isn’t supported at all, it needs a LAN. So I build an pfsense server in Azure that supports Layer 2 broadcast messages over the VPN. This all works really well.</summary></entry><entry><title type="html">Deploy a Shared Image Gallery image to Windows Virtual Desktop</title><link href="https://roeleverink.nl/SIG-and-WVD/" rel="alternate" type="text/html" title="Deploy a Shared Image Gallery image to Windows Virtual Desktop" /><published>2019-11-15T00:00:00+00:00</published><updated>2019-11-15T00:00:00+00:00</updated><id>https://roeleverink.nl/SIG-and-WVD</id><content type="html" xml:base="https://roeleverink.nl/SIG-and-WVD/">&lt;p&gt;In my &lt;a href=&quot;https://roeleverink.nl/Building-WVD-Images/&quot;&gt;previous post&lt;/a&gt; I showed how to create an image with Azure Image Builder. In that post we created a managed image, from which we could deploy a VM, or use in our Windows Virtual Desktop - Hostpool deployment.&lt;/p&gt;

&lt;p&gt;Another thing we can do with Azure Image Builder, is push our image to a Shared Image Gallery.&lt;br /&gt;
Let’s first dig into what a Shared Image Gallery is.
It is a Gallery in which you can define Image Definitions. You can for example have a Definition for each golden image that you use for a hostpool.&lt;br /&gt;
You can have an image definition for your helpdesk staff, with callcenter software and an incident management system, and another image definition for your system administrators with management tools deployed for example.&lt;/p&gt;

&lt;p&gt;And each of your image definitions can have multiple versions. So you can have versioning for your golden images! 
With versioning a rollback to a previous image version will be easy!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/SIG-WVD/shared-image-gallery.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now, the downside is you can’t choose a Shared Image Gallery image version when deploying Windows Virtual Desktop.
So, we have to create that option ourself.&lt;/p&gt;

&lt;p&gt;But first we have to create a Shared Image Gallery, and enable Azure Image Builder to distribute to it.&lt;br /&gt;
Afterwards Azure Image Builder needs rights on the Shared Image Gallery to write to it.&lt;br /&gt;
Then we can distrubute images to the Shared Image Gallery.&lt;br /&gt;
Then comes some ARM editing, as we have to change the original ARM templates to include Shared Image Gallery.&lt;br /&gt;
And the final step will be to do the deployment based on the new ARM templates&lt;/p&gt;

&lt;h1 id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;/h1&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;/SIG-and-WVD/#create-sig&quot;&gt;Create a Shared Image Gallery (SIG)&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/SIG-and-WVD/#assign-aib-rights&quot;&gt;Assign Azure Image Builder rights&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/SIG-and-WVD/#distribute-sig&quot;&gt;Distribute image to Shared Image Gallery&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/SIG-and-WVD/#edit-armfiles&quot;&gt;Edit the ARM template files&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/SIG-and-WVD/#deploy-wvd-from-sig&quot;&gt;Deploying Windows Virtual Desktop VMs from Shared Image Gallery&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h1 id=&quot;create-a-shared-image-gallery-sig-&quot;&gt;Create a Shared Image Gallery (SIG) &lt;a name=&quot;create-sig&quot;&gt;&lt;/a&gt;&lt;/h1&gt;

&lt;p&gt;We start by creating a resource group to hold our Shared Image Gallery. I call it &lt;em&gt;wvd-p-weu-sharedimagegallery-rg&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Then it’s a matter of creating our Shared Image Definition.&lt;/p&gt;

&lt;p&gt;Go to &lt;strong&gt;All services&lt;/strong&gt; and search for Shared Image Gallery. Hover over it, and select &lt;strong&gt;Create&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/SIG-WVD/createSIG1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After that select your new resource group, and give your Shared Image Gallery a name. I name it &lt;em&gt;WVD_SharedImageGallery&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/SIG-WVD/createSIG2.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When your SIG is done deploying you can go ahead and create one, or multiple, &lt;strong&gt;Image Definitions&lt;/strong&gt; inside of it.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/SIG-WVD/createImageDefinition.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When on the Version tab, you can leave everything blank. We won’t be creating a version now. We will let Azure Image Builder do that for us.&lt;br /&gt;
When on the Publishing Options you can decide yourself what you fill in. This is just some metadata for other users who might use your images.&lt;/p&gt;

&lt;p&gt;When done, we can go to the next step, and give Azure Image Builder rights to create images inside our Shared Image Gallery&lt;/p&gt;

&lt;h1 id=&quot;assign-azure-image-builder-rights-&quot;&gt;Assign Azure Image Builder rights &lt;a name=&quot;assign-aib-rights&quot;&gt;&lt;/a&gt;&lt;/h1&gt;

&lt;p&gt;Azure Image Builder uses a service principal to write to locations, as it doesn’t have rights on our SIG, we have to assign those.&lt;/p&gt;

&lt;p&gt;You have to assign the App Id of AIB rights, which is always the following:&lt;br /&gt;
&lt;strong&gt;cf32a0cc-373c-47c9-9156-0db11f6a6dfc&lt;/strong&gt;&lt;br /&gt;
I use PowerShell to assign Contributor rights to the resource group.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nf&quot;&gt;New-AzRoleAssignment&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-RoleDefinitionName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Contributor&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ApplicationId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;cf32a0cc-373c-47c9-9156-0db11f6a6dfc&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceGroupName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;wvd-p-weu-sharedimagegallery-rg&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h1 id=&quot;distribute-image-to-shared-image-gallery-&quot;&gt;Distribute image to Shared Image Gallery &lt;a name=&quot;distribute-sig&quot;&gt;&lt;/a&gt;&lt;/h1&gt;

&lt;p&gt;Now we have our Shared Image Gallery, it’s time to create an image with Azure Image Builder, and let it distribute to our Image Definition.
In my &lt;a href=&quot;https://roeleverink.nl/Building-WVD-Images/&quot;&gt;previous blog&lt;/a&gt; I already showed how to create an image, but distributed it to a regular managed image. Now we just have to edit it, so AIB will distribute to Shared Image Gallery.&lt;/p&gt;

&lt;p&gt;For that we have to edit the following part to the distribute section of our ARM template. You can find a prebuild template on &lt;a href=&quot;https://github.com/Everink/AzureImageBuilder/blob/master/Templates/AzureImageBuilde-SIG.json&quot;&gt;my GitHub page&lt;/a&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-json&quot; data-lang=&quot;json&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;type&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;SharedImage&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;galleryImageId&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;[parameters('SIGImageDefinitionId')]&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;runOutputName&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;SIGimage&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;artifactTags&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;replicationRegions&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
        &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;westeurope&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;For the galleryImageId we have to get the Resource Id of our Image Definition, it can be found under the properties&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/SIG-WVD/ImageDef-ResourceId.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As you can see, I choose &lt;em&gt;westeurope&lt;/em&gt; as replicationregion. If you’re deploying VM’s from this image from multiple locations, you can specify more then one location here, for if you have hostpools in different parts of the world.&lt;/p&gt;

&lt;p&gt;For the deployment I can use a parameter file, which is the preferred method. But for the sake of simplicity I’ll just pass my SIGImageDefinitionId parameter value on the commandline.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;$TemplateUri&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://raw.githubusercontent.com/Everink/AzureImageBuilder/master/Templates/AzureImageBuilde-SIG.json&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$ImageDefinitionId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;/subscriptions/f7e06285-03e5-4c9d-95cd-32d791b2563e/resourceGroups/wvd-p-weu-sharedimagegallery-rg/providers/Microsoft.Compute/galleries/WVD_SharedImageGallery/images/WVD-HostPool1-GoldenImage&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;New-AzResourceGroupDeployment&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceGroupName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;RG_EUS_AzureImageBuilder&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-TemplateUri&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$TemplateUri&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-OutVariable&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Output&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Verbose&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-SIGImageDefinitionId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$ImageDefinitionId&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;After the image metadata has been made, we can start the image build.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;$ImageTemplateName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$Output&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Outputs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;imageTemplateName&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Value&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Invoke-AzResourceAction&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceGroupName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;RG_EUS_AzureImageBuilder&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceType&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Microsoft.VirtualMachineImages/imageTemplates&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$ImageTemplateName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Action&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Run&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;You can check the status of the build with the following command&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Get-AzResource&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceGroupName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;RG_EUS_AzureImageBuilder&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceType&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Microsoft.VirtualMachineImages/imageTemplates&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$ImageTemplateName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Properties&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;lastRunStatus&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The state should go from Building, to Distributing, to Succeeded.
With me it took a total of 1 hour, as can be seen in the screenshots.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/SIG-WVD/AIB-state1.png&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;/images/SIG-WVD/AIB-state2.png&quot; alt=&quot;&quot; /&gt;&lt;br /&gt;
&lt;img src=&quot;/images/SIG-WVD/AIB-state3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you look in the portal afterwards, you should see an Image Version. AIB assigns a random version number, but newer versions should always be a higher version then the previous ones.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/SIG-WVD/SIG-newImage.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h1 id=&quot;edit-the-arm-template-files-&quot;&gt;Edit the ARM template files &lt;a name=&quot;edit-armfiles&quot;&gt;&lt;/a&gt;&lt;/h1&gt;

&lt;blockquote&gt;
  &lt;p&gt;Note: This step is some technical stuff that explains what I changed, you can skip this if you just want to deploy from your Shared Image Gallery using my prebuild ARM template files.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now we have our image in the Shared Image Gallery, we have to edit the templates to deploy a VM from it.&lt;/p&gt;

&lt;p&gt;Normally when you deploy a hostpool from the portal, you get this wizard in which you fill out all configuration data, then some magic happens, and you get a new hostpool with some VM’s in it.&lt;/p&gt;

&lt;p&gt;This magic isn’t really magic at all, because what happens is that in the background an &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-authoring-templates&quot;&gt;ARM template&lt;/a&gt; gets deployed to your WVD resource group. And all that configuration data is inserted as parameters to that template.&lt;/p&gt;

&lt;p&gt;You can find that template on GitHub: &lt;a href=&quot;https://github.com/Azure/RDS-Templates/tree/master/wvd-templates/Create%20and%20provision%20WVD%20host%20pool&quot;&gt;https://github.com/Azure/RDS-Templates/tree/master/wvd-templates/Create%20and%20provision%20WVD%20host%20pool&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The ARM template is actually 1 main template, and a few other nested templates, based on what kind of image source you want. Either a gallery image or managed image for example. And based on that input data, it selects the nested template.&lt;br /&gt;
So what we have to do, is edit the templates a little bit to our needs.&lt;/p&gt;

&lt;p&gt;The main part to edit has to be the imageReference, where normally this references an image from the gallery, now it references an image from our Shared Image Gallery.
Next to that we also add some parameters to determine the resource ID of the Shared Image Gallery.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-json&quot; data-lang=&quot;json&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nl&quot;&gt;&quot;imageReference&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;[resourceId(parameters('SharedImageGalleryResourceGroup'),'Microsoft.Compute/galleries/images/versions',parameters('SharedImageGalleryName'), parameters('SharedImageGalleryDefinitionName'), parameters('SharedImageGalleryVersionName') )]&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;,&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;To summarize the changes that I made:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Add my parameter file: mainTemplate.parameters.json&lt;/li&gt;
  &lt;li&gt;Added a new nested template file for sharedimage gallery deployments: managedDisks-sharedimagegalleryvm.json&lt;/li&gt;
  &lt;li&gt;Added parameters for the SIG resource in the file: mainTemplate.json&lt;/li&gt;
  &lt;li&gt;Added all SIG parameters also to the file: managedDisks-galleryvm.json, for consistency&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To check all the changes, it’s best to look at the &lt;a href=&quot;https://github.com/Everink/RDS-Templates/pull/1/files&quot;&gt;pull request on GitHub&lt;/a&gt;, to see everything that’s added to the original Microsoft template.&lt;/p&gt;

&lt;h1 id=&quot;deploying-windows-virtual-desktop-vms-from-shared-image-gallery-&quot;&gt;Deploying Windows Virtual Desktop VMs from Shared Image Gallery &lt;a name=&quot;deploy-wvd-from-sig&quot;&gt;&lt;/a&gt;&lt;/h1&gt;

&lt;p&gt;Now, this previous step was some in-depth ARM template editing. If you’re not into all that, that’s fine. You are maybe more interested in how to use it, and that’s not too hard.&lt;/p&gt;

&lt;p&gt;First you have to download 2 files from my GitHub account:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/Everink/RDS-Templates/master/wvd-templates/Create%20and%20provision%20WVD%20host%20pool/mainTemplate.json&quot;&gt;mainTemplate.json&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://raw.githubusercontent.com/Everink/RDS-Templates/master/wvd-templates/Create%20and%20provision%20WVD%20host%20pool/mainTemplate.parameters.json&quot;&gt;mainTemplate.parameters.json&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After that you have to edit the parameters file to your environment. It are basically the same parameters that you enter during the portal wizard.&lt;br /&gt;
Some things that are different is that I used a keyvault to store my passwords, so they aren’t in plaintext in my parameter file on the internet. If you only save the files locally on your own pc, you could just use plaintext passwords, but this isn’t recommended for production environments.&lt;/p&gt;

&lt;p&gt;An explanation of the parameters can be found in the mainTemplate.json file, or &lt;a href=&quot;https://github.com/Everink/RDS-Templates/tree/master/wvd-templates/Create%20and%20provision%20WVD%20host%20pool&quot;&gt;my GitHub page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After you are done editing the parameter file, you are ready to deploy the VM’s to your hostpool!&lt;/p&gt;

&lt;p&gt;For that you have to execute the following PowerShell commands&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c&quot;&gt;#Setup variables&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$ResourceGroupName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;WVD resourcegroupname&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$TemplateFile&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;Path to mainTemplate.json&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$TemplateParameterFile&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&amp;lt;Path to mainTemplate.parameters.json&amp;gt;&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;#Install Module if you don't have it yet&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Install-Module&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Az&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Force&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;#Login to Azure RM&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Add-AzAccount&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;#Start the deployment&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;New-AzResourceGroupDeployment&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceGroupName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$ResourceGroupName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-TemplateFile&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$TemplateFile&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-TemplateParameterFile&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$TemplateParameterFile&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Verbose&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;This will take about 15 to 30 minutes to deploy, depending on the amount of servers you deploy.&lt;/p&gt;

&lt;p&gt;Afterwards, you should be able to login, and have your desktop, with all applications and settings like you build it with Azure Image Builder.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/SIG-WVD/hostpool1-finalresult.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If you now want to rollback to a previous image, the only thing you have to do is delete your VM’s from the portal and WVD backend, and do the deployment again, with only changing the version of your image!&lt;/p&gt;</content><author><name></name></author><summary type="html">In my previous post I showed how to create an image with Azure Image Builder. In that post we created a managed image, from which we could deploy a VM, or use in our Windows Virtual Desktop - Hostpool deployment.</summary></entry><entry><title type="html">Building a WVD image the right way</title><link href="https://roeleverink.nl/Building-WVD-Images/" rel="alternate" type="text/html" title="Building a WVD image the right way" /><published>2019-11-10T00:00:00+00:00</published><updated>2019-11-10T00:00:00+00:00</updated><id>https://roeleverink.nl/Building-WVD-Images</id><content type="html" xml:base="https://roeleverink.nl/Building-WVD-Images/">&lt;p&gt;Over the past few months I’ve seen multiple articles about how to create a Windows Virtual Desktop (WVD) image.
They usually login to the VM themselves, install some apps and do some modifications, and sysprep the VM. After that you can optionally make a snapshot of your VM, and then convert it to a managed image which you can use for a WVD deployment.&lt;/p&gt;

&lt;p&gt;Now, this is all good for a POC, demo or small production environment. But when things start to scale out, it just doesn’t cut it anymore.
When building any type of image, you’d want the following things taken care off.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Consistent&lt;/li&gt;
  &lt;li&gt;Automated&lt;/li&gt;
  &lt;li&gt;Rollback procedure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You’d want consistency so you don’t accidental forget something in your golden image&lt;br /&gt;
Preferably you’d have something automate your creation of your image. Installing multiple pieces of software can be a tedious task, that time can be better spend doing something else. It also reduces the change of human error.&lt;br /&gt;
When you make a change to your golden image that breaks it, you’d better remember what you changed, and how to rollback to the previous state.&lt;/p&gt;

&lt;p&gt;All those things can be solved by a single Azure service:&lt;br /&gt;
&lt;a href=&quot;https://docs.microsoft.com/en-us/azure/virtual-machines/windows/image-builder-overview&quot;&gt;&lt;strong&gt;Azure Image Builder&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Azure Image Builder (AIB) allows you to take a source image, which can be any of the following:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;RHEL ISO&lt;/li&gt;
  &lt;li&gt;Marketplace image&lt;/li&gt;
  &lt;li&gt;Managed image&lt;/li&gt;
  &lt;li&gt;Shared Image Gallery image version&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It then can customize that specific image to your needs in an automated way.&lt;br /&gt;
And as a final step AIB can distribute your image to any or multiple of the following:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Managed image&lt;/li&gt;
  &lt;li&gt;Shared Image Gallery&lt;/li&gt;
  &lt;li&gt;VHD in a storage account&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can see the overview in the following picture
&lt;img src=&quot;/images/AIB/AIB-overview.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now, AIB is still in preview, so there are a few limitations to the service.
It is limited to the following locations, but can still distribute outside of these locations.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;East US&lt;/li&gt;
  &lt;li&gt;East US 2&lt;/li&gt;
  &lt;li&gt;West Central US&lt;/li&gt;
  &lt;li&gt;West US&lt;/li&gt;
  &lt;li&gt;West US 2&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is also no GUI (yet?) for Azure Image Builder&lt;br /&gt;
When building the image there is no way to check the progress, other then checking the logs manually, or checking if your image is already present at your distribution location.&lt;/p&gt;

&lt;p&gt;With that bit of background info, lets start creating our own image with AIB!&lt;/p&gt;

&lt;h2 id=&quot;register-the-feature&quot;&gt;Register the feature&lt;/h2&gt;

&lt;p&gt;To use Azure Image Builder during the preview, we have to first enable the service. We do that by registering the feature.
This can be done with PowerShell, so we need to install the Az module within a privileged PowerShell windows, and after that we can login to our subscription&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nf&quot;&gt;Install-Module&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Az&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Force&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Connect-AzAccount&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;When that is done, we can register the AIB feature with the following PowerShell command:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nf&quot;&gt;Register-AzProviderFeature&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ProviderNamespace&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Microsoft.VirtualMachineImages&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-FeatureName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;VirtualMachineTemplatePreview&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;To check the status of the feature, run the following command&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nf&quot;&gt;Get-AzProviderFeature&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ProviderNamespace&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Microsoft.VirtualMachineImages&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-FeatureName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;VirtualMachineTemplatePreview&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;blockquote&gt;
  &lt;p&gt;Note: It can take a while before the registrationstate will change to: &lt;strong&gt;Registered&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After that make sure the following 2 commands also show &lt;strong&gt;Registred&lt;/strong&gt;.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nf&quot;&gt;Get-AzResourceProvider&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ProviderNamespace&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Microsoft.VirtualMachineImages&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Select-Object&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;RegistrationState&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Get-AzResourceProvider&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ProviderNamespace&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Microsoft.Storage&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;|&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Select-Object&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;RegistrationState&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;If there’s something showing &lt;strong&gt;NotRegistered&lt;/strong&gt; run the following commands&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nf&quot;&gt;Register-AzResourceProvider&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ProviderNamespace&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Microsoft.VirtualMachineImages&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Register-AzResourceProvider&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ProviderNamespace&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Microsoft.Storage&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;When everything is done, you are ready for the next step!&lt;/p&gt;

&lt;h2 id=&quot;assign-rights-to-azureimagebuilder&quot;&gt;Assign rights to AzureImageBuilder&lt;/h2&gt;

&lt;p&gt;During the previous step we enabled the feature, one of the things that happend, was that a service principal has been made in our Azure AD.
This service principal (SP) is used to give AIB rights on certian resource (groups). The Application ID of the service principal is always the same:&lt;br /&gt;
&lt;em&gt;cf32a0cc-373c-47c9-9156-0db11f6a6dfc&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This SP needs rights on a resourcegroup that will be used for AIB. We first make this resourcegroup with the command:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nf&quot;&gt;New-AzResourceGroup&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;RG_EUS_AzureImageBuilder&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Location&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;'East US'&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;The location needs to be in one of the supported AIB regions. Here I choose East US.
Then we have to assign the &lt;strong&gt;contributor&lt;/strong&gt; right to our SP for this resource group. You can do this with the portal, or also with the commandline.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nf&quot;&gt;New-AzRoleAssignment&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-RoleDefinitionName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Contributor&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ApplicationId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;cf32a0cc-373c-47c9-9156-0db11f6a6dfc&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceGroupName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;RG_EUS_AzureImageBuilder&quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;img src=&quot;/images/AIB/AIB-RBAC.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;deploying-azureimagebuilder-arm-template&quot;&gt;Deploying AzureImageBuilder ARM template&lt;/h2&gt;

&lt;p&gt;When all permissions are in place it’s time to start with the deployment.
This is done with an &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-authoring-templates&quot;&gt;ARM template&lt;/a&gt;.&lt;br /&gt;
There is currently no portal experience for AIB.&lt;/p&gt;

&lt;p&gt;The demo ARM template from Microsoft can be found &lt;a href=&quot;https://github.com/danielsollondon/azvmimagebuilder/blob/master/quickquickstarts/0_Creating_a_Custom_Windows_Managed_Image/helloImageTemplateWin.json&quot;&gt;on GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you look at the template you can see that on the properties part there are 3 sections&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Source&lt;/li&gt;
  &lt;li&gt;Customize&lt;/li&gt;
  &lt;li&gt;Distribute&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For source the best way to go in my opinion is to pick a marketplace image. These are tested by Microsoft, and are regularly updated to a new version. Of course you have to choose a new version every month or so.&lt;/p&gt;

&lt;p&gt;In the Customize section you can customize your VM with a PowerShell script. This can be an external (publicly available) script, in a storage account or on GitHub. Or it can be an inline script if it’s only a few lines.&lt;/p&gt;

&lt;p&gt;In the Distribute section you can define how and where to distribute your images. The most easy is to just deploy a managed image in the same resourcegroup as your AIB service.&lt;/p&gt;

&lt;p&gt;If you want to use the Microsoft quickstart template, you can download it and edit the following parts:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Replace &amp;lt;subscriptionID&amp;gt; for your subscriptionID&lt;/li&gt;
  &lt;li&gt;Replace &amp;lt;rgName&amp;gt; for your AIB resourcegroupname&lt;/li&gt;
  &lt;li&gt;Replace &amp;lt;region&amp;gt; for a region OR replace it with a function that used the ResourceGroupFunction. That means replacing it for: [resourceGroup().location], including the square brackets&lt;/li&gt;
  &lt;li&gt;Replace &amp;lt;imageName&amp;gt; for a custom managed image name&lt;/li&gt;
  &lt;li&gt;Replace &amp;lt;runOutputName&amp;gt; for aibWindows (or something else you make up)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If however, you want to make use of another ARM template, I have one in &lt;a href=&quot;https://github.com/Everink/AzureImageBuilder/blob/master/Templates/AzureImageBuilder-ManagedImage.json&quot;&gt;my GitHub account&lt;/a&gt; as well, that uses parameters with some default values setup.&lt;/p&gt;

&lt;p&gt;It will use the customize script that’s also in &lt;a href=&quot;https://github.com/Everink/AzureImageBuilder/blob/master/Scripts/AzureImageBuilder.ps1&quot;&gt;my GitHub account&lt;/a&gt;. It will install Visual Studio Code, Teams, Notepad++ and FSLogix.&lt;/p&gt;

&lt;p&gt;To deploy this template use the following PowerShell commands&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;$TemplateUri&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://raw.githubusercontent.com/Everink/AzureImageBuilder/master/Templates/AzureImageBuilder-ManagedImage.json&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;New-AzResourceGroupDeployment&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceGroupName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;RG_EUS_AzureImageBuilder&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-TemplateUri&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$TemplateUri&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-OutVariable&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Output&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Verbose&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;This will create an ImageTemplate package, which is linked to a new ResourceGroup &lt;em&gt;IT_&amp;lt;AIB-resourcegroupname&amp;gt;_&amp;lt;AIB-imagetemplatename&amp;gt;&amp;lt;random GUID&amp;gt;&lt;/em&gt;. In that resourcegroup it will setup all prerequisites, like downloading powershell scripts or files, and checking if AIB has all necessary rights on other resources (like Shared Image Gallery if you want to distribute to that)&lt;br /&gt;
It does not yet start building our image. It can be seen in the portal by selecting &lt;strong&gt;Show hidden items&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/AIB/AIB-imagetemplate.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In our previous PowerShell commandlet we used the output variable “Output”, to capture the name of our AIB imagetemplate. We can see it with&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;$Output&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Outputs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;imageTemplateName&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Value&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;We will use the imagetemplate name to start building our golden image. This can be done by &lt;em&gt;invoking&lt;/em&gt; or &lt;em&gt;executing&lt;/em&gt; the resource.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;$ImageTemplateName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$Output&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Outputs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;imageTemplateName&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Value&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Invoke-AzResourceAction&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceGroupName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;RG_EUS_AzureImageBuilder&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceType&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Microsoft.VirtualMachineImages/imageTemplates&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$ImageTemplateName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Action&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Run&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;This will start building the image.&lt;/p&gt;

&lt;p&gt;To check the build status run the following command&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Get-AzResource&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceGroupName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;RG_EUS_AzureImageBuilder&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ResourceType&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Microsoft.VirtualMachineImages/imageTemplates&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$ImageTemplateName&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Properties&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;lastRunStatus&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;When the build is complete there will be a managed image in our resource group, and we can start deploying VM’s from it!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/AIB/AIB-newImage.png&quot; alt=&quot;&quot; /&gt;
&lt;img src=&quot;/images/AIB/AIB-createVMfromImage.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When we login to the VM, we can see that the C:\temp folder has been populated with all the installers, and applications like team have also been installed to our image, just like we wanted.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/AIB/AIB-InsideVM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You can now create different build templates for your different Windows Virtual Desktop hostpools, or create a default server VM image for your IaaS workloads.&lt;/p&gt;

&lt;p&gt;If you have any questions, feel free to leave a comment below, or find me on LinkedIn.&lt;/p&gt;</content><author><name></name></author><summary type="html">Over the past few months I’ve seen multiple articles about how to create a Windows Virtual Desktop (WVD) image. They usually login to the VM themselves, install some apps and do some modifications, and sysprep the VM. After that you can optionally make a snapshot of your VM, and then convert it to a managed image which you can use for a WVD deployment.</summary></entry><entry><title type="html">My first blog!</title><link href="https://roeleverink.nl/First-Post/" rel="alternate" type="text/html" title="My first blog!" /><published>2019-10-31T00:00:00+00:00</published><updated>2019-10-31T00:00:00+00:00</updated><id>https://roeleverink.nl/First-Post</id><content type="html" xml:base="https://roeleverink.nl/First-Post/">&lt;p&gt;So I’ve been thinking about starting my own blogsite for a while now.
I’ve some great idea’s about how to setup Windows Virtual Desktop, create the golden image for it, and enhance the default configuration.&lt;/p&gt;

&lt;p&gt;Knowing myself, when my blog is online, I usually don’t bother too much with updating and maitenance. Also as it won’t generate a lot of traffic right away I don’t want to spend a lot of money on hosting.
So that brings us to the following requirements&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Low maintance&lt;/li&gt;
  &lt;li&gt;Low cost&lt;/li&gt;
  &lt;li&gt;Simple to setup&lt;/li&gt;
  &lt;li&gt;Scalable for if it will be a success&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At first &lt;a href=&quot;https://wordpress.com&quot;&gt;wordpress.com&lt;/a&gt; seemed like a good choice, untill I found out about Yekyll and github pages.
Github can serve my blog just fine, it’s low maintance as it only serves up plain html, and costs nothing!
It’s also highly scalable, and it gives me the option to checkin my blogs in source control.&lt;/p&gt;

&lt;p&gt;So there you have it. You can find the sourcecode of my website in my &lt;a href=&quot;https://github.com/Everink/everink.github.io&quot;&gt;github account.&lt;/a&gt;&lt;/p&gt;</content><author><name></name></author><summary type="html">So I’ve been thinking about starting my own blogsite for a while now. I’ve some great idea’s about how to setup Windows Virtual Desktop, create the golden image for it, and enhance the default configuration.</summary></entry><entry><title type="html">Azure AD FIDO2 Authentication</title><link href="https://roeleverink.nl/FIDO2-Authentication/" rel="alternate" type="text/html" title="Azure AD FIDO2 Authentication" /><published>2019-07-15T00:00:00+00:00</published><updated>2019-07-15T00:00:00+00:00</updated><id>https://roeleverink.nl/FIDO2-Authentication</id><content type="html" xml:base="https://roeleverink.nl/FIDO2-Authentication/">&lt;p&gt;FIDO2 authentication is the latest method to sign in passwordless on devices and websites.&lt;/p&gt;

&lt;p&gt;It was already possible for a few months to login passwordless with Microsoft accounts with a FIDO2 security key, but recently Azure AD FIDO2 authentication is in public preview.&lt;/p&gt;

&lt;p&gt;In this blog I will show you how to setup your own tenant and device so you can leverage passwordless signin to Azure AD with FIDO2&lt;/p&gt;

&lt;h2 id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;/FIDO2-Authentication/#what-is-fido2&quot;&gt;What is FIDO2&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/FIDO2-Authentication/#downsides-passwords&quot;&gt;Downsides of passwords&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/FIDO2-Authentication/#benefits-passwordless&quot;&gt;Benefits of FIDO2 (password-less)&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/FIDO2-Authentication/#requirements&quot;&gt;Requirements&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/FIDO2-Authentication/#combined-registration-preview&quot;&gt;Enable combined registration preview&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/FIDO2-Authentication/#enable-FIDO2&quot;&gt;Enable FIDO2 authentication&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/FIDO2-Authentication/#userregistration&quot;&gt;User registration and management of security keys&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/FIDO2-Authentication/#login-websites&quot;&gt;Login to websites with a FIDO2 security keys&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/FIDO2-Authentication/#login-windows10&quot;&gt;Login to Windows 10 with a FIDO2 security keys&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;what-is-fido2-&quot;&gt;What is FIDO2 &lt;a name=&quot;what-is-fido2&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;FIDO stands for: Fast Identity Online&lt;/p&gt;

&lt;p&gt;FIDO has been founded by the &lt;a href=&quot;https://fidoalliance.org/overview/&quot;&gt;FIDO Alliance&lt;/a&gt;.
The FIDO Alliance is an open industry association with a focused mission: authentication standards to help reduce the world’s over-reliance on passwords.&lt;/p&gt;

&lt;p&gt;FIDO2 is the overarching term for FIDO Alliance’s newest set of specifications. FIDO2 enables users to leverage common devices to easily authenticate to online services in both mobile and desktop environments. The FIDO2 specifications are the World Wide Web Consortium’s (W3C) &lt;a href=&quot;https://fidoalliance.org/fido2/fido2-web-authentication-webauthn/&quot;&gt;Web Authentication (WebAuthn) specification&lt;/a&gt; and FIDO Alliance’s corresponding &lt;a href=&quot;https://fidoalliance.org/specifications/download/&quot;&gt;Client-to-Authenticator Protocol (CTAP)&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This makes it possible to login to services as Azure AD, or a random website, with a simple USB key, smartcard or even your phone.&lt;/p&gt;

&lt;p&gt;This is based on the device that carries your credentials, combined with something you know or are. Like a PIN or a fingerprint&lt;/p&gt;

&lt;h2 id=&quot;downsides-of-passwords-&quot;&gt;Downsides of passwords &lt;a name=&quot;downsides-passwords&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Passwords are everywhere, because they are so simple to implement. But that simple implementation can also have it downsides!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Passwords are often reused&lt;/strong&gt;&lt;br /&gt;
Because we need so many passwords, they are often recycled for different services. So when 1 password is compromised, multiple services are often at risk because the same password could be used for those as well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vulnerable to database hacks&lt;/strong&gt;&lt;br /&gt;
Passwords are based on a pre-shared key. So the online service has a copy of your password, or a hashed version of your password.
These databases can be compromised, so an attacker can find out your password&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vulnerable to Brute Force attacks&lt;/strong&gt;&lt;br /&gt;
Passwords need to be remembered, so are often easily breached by a brute force or dictionary attack.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vulnerable to social engineering attacks&lt;/strong&gt;&lt;br /&gt;
This could be a simple as watching over someone shoulder as he/she types the password, or by guessing the password based on data found on social media.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vulnerable to keyloggers&lt;/strong&gt;&lt;br /&gt;
Regular passwords are vulnerable for keyloggers, this could be a hardware based keylogger between the PC and keyboard, but also a software keylogger. These record all keystrokes, including your password&lt;/p&gt;

&lt;h2 id=&quot;benefits-of-fido2-password-less-&quot;&gt;Benefits of FIDO2 (password-less) &lt;a name=&quot;#benefits-passwordless&quot;&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;With FIDO2 all downsides of passwords are non-existent. This is because of the following.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Public / private keys&lt;/strong&gt;&lt;br /&gt;
FIDO2 does not use a pre-shared key, but it uses public / private key pairs.&lt;/p&gt;

&lt;p&gt;The public key is handed to the identity provider (like Azure AD), and the private key stays on the device, and will never leave it.
It will only be used to sign a challenge.&lt;/p&gt;

&lt;p&gt;So even if your public key gets stolen it’s no problem, because it’s useless. That’s what makes it a public key after all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Unique keypairs&lt;/strong&gt;&lt;br /&gt;
Where passwords are often reused for different services, that isn’t the case with FIDO2. For every online identity a new key pair is generated. So every identity has its own public and private key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phishing is part of the past&lt;/strong&gt;&lt;br /&gt;
Because your identity and keypair is linked to a login domain (like login.microsoft.com), a challenge from a phishing site won’t be recognized by your FIDO2 key. A phishing site will try to let your login to login.micr0s0ft.com for example, and your FIDO2 key won’t have a keypair for that login domain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Social engineering&lt;/strong&gt;&lt;br /&gt;
You will not be vulnerable to social engineering attacks, as there is nothing to guess. You don’t even know your own private key.
And if you use a FIDO2 key with a fingerprint there is also nothing to see when you login. So no more looking away for your colleagues.&lt;/p&gt;

&lt;h2 id=&quot;requirements-&quot;&gt;Requirements &lt;a name=&quot;requirements&quot;&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;To enable FIDO2 authentication there are a few requirements.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Enable combined registration (preview)&lt;/li&gt;
  &lt;li&gt;Windows 10 1809 or higher met Microsoft Edge&lt;/li&gt;
  &lt;li&gt;Compatible FIDO2 security key&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For Windows sign in:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Azure AD joined Windows 10 1809 or higher&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;enable-combined-registration-preview-&quot;&gt;Enable combined registration preview &lt;a name=&quot;combined-registration-preview&quot;&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;The possibility to register a security key is only available in the new registration portal. That’s why we have to enable this feature first.&lt;/p&gt;

&lt;p&gt;To to this login to &lt;a href=&quot;https://portal.azure.com&quot;&gt;https://portal.azure.com&lt;/a&gt; with a global administrator account.
Go to &lt;strong&gt;User Settings&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Manage user feature preview settings&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/cd639ac5645ac878afecac21680daa72.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Make sure you select &lt;strong&gt;All&lt;/strong&gt; or &lt;strong&gt;Selected&lt;/strong&gt; for the feature:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Users can use preview features for registering and managing security info – enhanced&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you choose &lt;strong&gt;Selected&lt;/strong&gt; you can select a pilot group first.
Then click on &lt;strong&gt;Save&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/aa1030f79f088898c33e116b29735bcf.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;enable-fido2-authentication-&quot;&gt;Enable FIDO2 authentication &lt;a name=&quot;enable-FIDO2&quot;&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;To enable FIDO2 as an authentication method we login to the azure portal with a global administrator account.
Then go to &lt;strong&gt;Azure Active Directory&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Authentication Methods&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Then click on  &lt;strong&gt;FIDO2 Security Key&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/24d2b56d2e8a125e5c9abaca4c9bba54.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;At &lt;strong&gt;ENABLE&lt;/strong&gt; click &lt;strong&gt;Yes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At &lt;strong&gt;TARGET&lt;/strong&gt; I selected &lt;strong&gt;All users&lt;/strong&gt;. It is possible to select a pilot group or user here.
Then click on &lt;strong&gt;Save&lt;/strong&gt;&lt;/p&gt;

&lt;h2 id=&quot;user-registration-and-management-of-security-keys-&quot;&gt;User registration and management of security keys &lt;a name=&quot;userregistration&quot;&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;To register a security key as a user, you can go to the following page:
&lt;a href=&quot;http://aka.ms/setupsecurityinfo&quot;&gt;http://aka.ms/setupsecurityinfo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on &lt;strong&gt;Add method&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/a4f5a8bbf18dbb0bca2686ad224d6c99.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Then choose the option: &lt;strong&gt;Security Key&lt;/strong&gt; and click on &lt;strong&gt;Add&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/0e70e5b1f4a936799356ffe31f15ae5e.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As my FIDO2 key is a USB device, I pick that.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/1178b8cb3d94058b3f35f4f3bd9b497a.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;After that I have to take action on my security key. This is dependent on how your key is configured and which features it supports
I have a Feitian Biopass with a fingerprint reader which is sufficient for me. Sometimes there’s only a single button on it, and you have to enter a PIN as additional verification.&lt;/p&gt;

&lt;p&gt;You can also see that the public / private key pair will be made for login.microsoft.com, so the key pair will only work for this site.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/3b0b9a97ba42bfdf574b9230010464ca.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You can give your security key a descriptive name to identify it more easy.
I call it: FeitianBiopass-Roel&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/5b789b810b93329ac064c3f94d50d40c.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Then the key is ready for use!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/8b74541c02ca33b7c5e875476b35d3b9.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;login-to-websites-with-a-fido2-security-keys-&quot;&gt;Login to websites with a FIDO2 security keys &lt;a name=&quot;login-websites&quot;&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;To login to a website with our key we can go to any Microsoft page where we can login with our Azure AD account. Like &lt;a href=&quot;https://myapps.micosoft.com&quot;&gt;https://myapps.micosoft.com&lt;/a&gt;,
&lt;a href=&quot;https://outlook.office.com&quot;&gt;https://outlook.office.com&lt;/a&gt;, or &lt;a href=&quot;https://office.com&quot;&gt;https://office.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on &lt;strong&gt;Sign-in options&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/c78f37eca418b15ad003ee9fe9a1b312.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And then &lt;strong&gt;Sign in with a security key&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/327b0d5275ff3cebcaf8ab0e2ea3cc9b.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Then follow the instructions to insert your key, and take action.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/f8673b59dee4f167b1b217c6758ea08c.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/61f900710c7ccf1308b0e64787fc9edd.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;And with that we signed in to our account, without using our username or password!&lt;/p&gt;

&lt;h2 id=&quot;login-to-windows-10-with-a-fido2-security-keys-&quot;&gt;Login to Windows 10 with a FIDO2 security keys &lt;a name=&quot;login-windows10&quot;&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;To login to Windows 10 with a security key, we have to enable this feature first.
You can do this in two ways:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;credential provider via Intune&lt;/li&gt;
  &lt;li&gt;credential provider via provisioning package&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I go for option 1, via Intune&lt;/p&gt;

&lt;p&gt;The reason for this is that my device has to be Azure AD joined anyway, and it’s a small effort to do the Intune configuration compared to the provisioning package.
It’s also more scalable with Intune&lt;/p&gt;

&lt;p&gt;Go to the Azure portal, and search for Intune(&lt;a href=&quot;https://portal.azure.com/#blade/Microsoft_Intune_DeviceSettings/ExtensionLandingBlade/overview&quot;&gt;or click here for the direct link&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;Go to &lt;strong&gt;Device configuration&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Profiles&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Create profile&lt;/strong&gt;
And make a profile with the following settings:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Name:&lt;/strong&gt; [profilename]&lt;br /&gt;
&lt;strong&gt;Description:&lt;/strong&gt; [Description of the profile]&lt;br /&gt;
&lt;strong&gt;Platform:&lt;/strong&gt; Windows 10 and later&lt;br /&gt;
&lt;strong&gt;Profile type:&lt;/strong&gt; Custom&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/df40f0b78b5565ba9f089ee0b890f0c9.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You have to add a new OMA-URI at settings.
Click on &lt;strong&gt;Add&lt;/strong&gt;
And fill out the following fields:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Name:&lt;/strong&gt; [Name of the setting]&lt;br /&gt;
&lt;strong&gt;Description:&lt;/strong&gt; [Description of the setting]&lt;br /&gt;
&lt;strong&gt;OMA-URI:&lt;/strong&gt; ./Device/Vendor/MSFT/PassportForWork/SecurityKey/UseSecurityKeyForSignin&lt;br /&gt;
&lt;strong&gt;Data type:&lt;/strong&gt; Integer&lt;br /&gt;
&lt;strong&gt;Value:&lt;/strong&gt; 1&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/1687e9c140e81857cbf2a716db7c4dbd.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Go to &lt;strong&gt;Assignments&lt;/strong&gt;
At &lt;strong&gt;Assign to&lt;/strong&gt; select &lt;strong&gt;All Users &amp;amp; All Devices&lt;/strong&gt;, or optionally select a pilot group or user&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/2573ffee1ed3a7100f24d05303765451.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As soon as these settings are pushed to our device it’s possible to sign in to windows with our FIDO2 security key
For this, click on &lt;strong&gt;Sign-in Options&lt;/strong&gt;, and choose the &lt;strong&gt;USB symbol (FIDO security key)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/1fad81d24b7d2136ea4750a6e97cb66f.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Next we can authenticate on your security key, and we will be signed into Windows, again, without using our username or password!&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/fido2-authentication/fb3236cff94006270af90c6746a863ed.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This completes our full setup. We can now sign in to our device and to web pages with our security key and enjoy the benefits of passwordless authentication!&lt;/p&gt;</content><author><name></name></author><summary type="html">FIDO2 authentication is the latest method to sign in passwordless on devices and websites.</summary></entry><entry><title type="html">Step by step: Windows Virtual Desktop and FSLogix</title><link href="https://roeleverink.nl/WVDandFSLogix/" rel="alternate" type="text/html" title="Step by step: Windows Virtual Desktop and FSLogix" /><published>2019-04-02T00:00:00+00:00</published><updated>2019-04-02T00:00:00+00:00</updated><id>https://roeleverink.nl/WVDandFSLogix</id><content type="html" xml:base="https://roeleverink.nl/WVDandFSLogix/">&lt;p&gt;21 March 2019 the Windows Virtual Desktop preview went live. My colleague &lt;a href=&quot;https://www.linkedin.com/in/jan-bakker/&quot;&gt;Jan Bakker&lt;/a&gt; and myself went straight to all available documentation, and build a test environment together.
In this blogpost we will show you how to setup a Windows Virtual Desktop (WVD) environment, and what to watch out for. As a bonus we will also show how to install and configure FSLogix.
This tutorial will be a step by step guide to setup a complete demo environment from scratch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Windows Virtual Desktop?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Windows Virtual Desktop is a new service from Microsoft and enables you to deliver a virtual desktop from the Azure cloud.
This could be a multi-user Windows 10 desktop, but also Windows 7 (with extended support) is possible.
It also gives you the ability to install Office 365 ProPlus on the virtual desktops.
Windows Virtual Desktop is a scalable service to deploy virtual machines, made possible by Azure resources, storage and advanced networking. 
The back-end like RDS brokers, gateways, web access, databases, and diagnostics are hosted and managed by Microsoft.&lt;/p&gt;

&lt;h1 id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;/h1&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;a href=&quot;/WVDandFSLogix/#Requirements&quot;&gt;Requirements&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/WVDandFSLogix/#create-azure-tenant&quot;&gt;Create azure tenant &amp;amp; subscription&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/WVDandFSLogix/#installing-adds&quot;&gt;Installing Active Directory Domain Services&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/WVDandFSLogix/#installing-azureadconnect&quot;&gt;Installing Azure AD Connect&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/WVDandFSLogix/#configuring-wvd&quot;&gt;Configuring Windows Virtual Desktop&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/WVDandFSLogix/#connecting-wvd&quot;&gt;Connecting to Windows Virtual Desktop&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/WVDandFSLogix/#optional-virtual-desktop&quot;&gt;Optional: Virtual Desktop VM’s &amp;amp; FSLogix&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/WVDandFSLogix/#more-info&quot;&gt;More info&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a name=&quot;Requirements&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1 id=&quot;1-requirements&quot;&gt;1. Requirements&lt;/h1&gt;

&lt;p&gt;To use Windows Virtual Desktop there are some requirements:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Active Directory Domain Services&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;An Azure tenant&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;An Azure subscription with credits.&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The virtual machines that are deployed have to be domain joined, or be hybrid domain joined. Azure AD join is not (yet?) possible. So Windows Virtual Desktop is depending on an Active Directory domain. The VM’s will be joined to this domain, and with the use of AD Connect, you can login with your own Azure AD credentials.
There are 3 options for Active Directory Domain Services:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Install / Enable &lt;strong&gt;Azure Active Directory Domain Services&lt;/strong&gt; in your Azure subscription&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Install the Active Directory Domain Services role on a server in Azure&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Connect your own on-premises network with Active Directory to your Azure tenant with a Site-2-Site VPN
or ExpressRoute connection&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In this blog we choose option 2: We install a Windows Server 2019 VM and install the ADDS role.
&lt;a name=&quot;create-azure-tenant&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1 id=&quot;2-create-azure-tenant--subscription&quot;&gt;2. Create azure tenant &amp;amp; subscription&lt;/h1&gt;

&lt;p&gt;In this blog we start from scratch. We’ll show you how to deploy Windows Virtual desktop in a greenfield environment. So we start with requesting a 30-days Azure trial subscription. 
You can request your trial here:
&lt;a href=&quot;https://azure.microsoft.com/nl-nl/free/&quot;&gt;https://azure.microsoft.com/nl-nl/free/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow the steps to create the trial subscription. You’ll also need a creditcard. No worries, this is only for verification, no actual costs will be charched.&lt;/p&gt;

&lt;p&gt;Because we will need an internet routable domainname, we will add this right away to our Azure AD tenant. This domainname we will also use for our Active Directory domainname.
This isn’t necessary, but it will make sure we have an easier domainname for our Azure AD users.&lt;/p&gt;

&lt;p&gt;We’lll use the domainname: &lt;em&gt;resultaatgroep.eu&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;HINT: You can also use the standard extension: tenantname.onmicrosoft.com
Your own domain is optional.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/dad42e1331444e5d6baa70989996d0d4.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;As soon as we added the custom domainname, we have to create a TXT record in the public DNS console to validate the domain, and after that we can start creating users with the suffix: @resultaatgroep.eu&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/b86bbbc391db5623c6f4a8d5842d08be.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a name=&quot;installing-adds&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1 id=&quot;3-installing-active-directory-domain-services&quot;&gt;3. Installing Active Directory Domain Services&lt;/h1&gt;

&lt;p&gt;To deploy Active Directory we first need a server in our subsciption. We’ll also need a network to which the server can connect to. However, we can create the network during the VM creation wizard.&lt;/p&gt;

&lt;p&gt;To to: “&lt;strong&gt;Virtual Machines&lt;/strong&gt;”, and click on “&lt;strong&gt;+ Add&lt;/strong&gt;”&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/9df79137418769e20dd4ef56d5698ea1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Then follow the steps to deploy a Windows Server 2019 Datacenter VM.&lt;/p&gt;

&lt;p&gt;Create during the wizard also an extra datadisk. We’ll need the disk to create the Active Directory Domain Services database on.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/c6f05f1923d3167eb11af2fcb722eca0.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: we give our VM a &lt;em&gt;public IP adres&lt;/em&gt;, this is not recommended in a production environment.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you do this, make sure you apply a Network Security Group that allows only RDP connections from your own WAN address. You could optionally also create a Point-2-Site VPN connection&lt;/p&gt;

&lt;p&gt;For more information: &lt;a href=&quot;https://docs.microsoft.com/en-us/azure/virtual-machines/windows/quick-create-portal&quot;&gt;https://docs.microsoft.com/en-us/azure/virtual-machines/windows/quick-create-portal&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/580b8606ff6a6a24025db8908e995a5d.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When your VM is done, go to “Virtual Machines” –&amp;gt; [VM naam] and note the private IP address.
By default the vNet in Azure will give give the Azure DNS servers to servers. As we will install Active Directory Domain Services &amp;amp; DNS on our VM, we can change the DNS server of the vNet already to the IP address of our VM.&lt;/p&gt;

&lt;p&gt;Go to &lt;strong&gt;Virtual Networks&lt;/strong&gt; and click on your vNet. At the section DNS servers you can fill out your own DNS server, use the private IP address of your VM that will host the DNS server role.
&lt;img src=&quot;/images/WVDandFSLogix/vnet-dns.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;When this is done, go to your VM again and click on &lt;strong&gt;Connect&lt;/strong&gt; to download the RDP file, and login to your VM&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/05ca1b2cdb4a19a0b9bc0a9ce288bb86.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Next you can install Active Directory Domain Services. In our demo we’ll use PowerShell for this.
As a best-practice, make sure all data is on a datadisk, and not on an OS disk. This also goes for the AD database, log directory and sysvol directory. 
Change the values to your own domain, and check if the datadisk (here with F:\) is visible&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;$securestring&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;ConvertTo-SecureString&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-AsPlainText&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Force&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-String&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*********&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Install-windowsfeature&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;AD-Domain-Services&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-IncludeManagementTools&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$parameterSplat&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;@{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;SysvolPath&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;F:\\SYSVOL&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;LogPath&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;F:\\NTDS&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;DatabasePath&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;F:\\NTDS&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;DomainNetbiosName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;RESULTAATGROEP&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;DomainName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;resultaatgroep.eu&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Force&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$true&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;SafeModeAdministratorPassword&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$securestring&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Install-ADDSForest&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;parameterSplat&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;create-ou-for-the-windows-virtual-desktop-vms&quot;&gt;Create OU for the Windows Virtual Desktop VM’s&lt;/h2&gt;

&lt;p&gt;Now Active Directory has been installed and ready for use we can create a couple of OU’s that will house our WVD servers, and our users.
We will also do this with PowerShell, but you can also do this with the GUI.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nf&quot;&gt;New-ADOrganizationalUnit&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ResultaatGroep&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Path&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;DC=resultaatgroep,DC=eu&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;New-ADOrganizationalUnit&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Groups&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Path&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;OU=ResultaatGroep,DC=resultaatgroep,DC=eu&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;New-ADOrganizationalUnit&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Users&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Path&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;OU=ResultaatGroep,DC=resultaatgroep,DC=eu&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;New-ADOrganizationalUnit&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Servers&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Path&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;OU=ResultaatGroep,DC=resultaatgroep,DC=eu&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;New-ADOrganizationalUnit&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Windows Virtual Desktops&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Path&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;OU=Servers,OU=ResultaatGroep,DC=resultaatgroep,DC=eu&quot;&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;h2 id=&quot;creating-testaccounts&quot;&gt;Creating testaccounts&lt;/h2&gt;

&lt;p&gt;To login at our Virtuele Desktops, we create a couple of testaccounts. You’ll need these before you create the WVD hostpool, as you need to supply users during the wizard.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nv&quot;&gt;$newADUserSplat&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;@{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Path&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;OU=Users,OU=ResultaatGroep,DC=resultaatgroep,DC=eu&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ChangePasswordAtLogon&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$false&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;UserPrincipalName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;jan@resultaatgroep.eu&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;GivenName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Jan&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;AccountPassword&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ConvertTo&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;SecureString&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;AsPlainText&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Force&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;******&quot;&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;SamAccountName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;jan&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;DisplayName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Jan Bakker&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Jan Bakker&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Enabled&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$true&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Surname&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Bakker&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;New-ADUser&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;newADUserSplat&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$newADUserSplat2&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;@{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Path&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;OU=Users,OU=ResultaatGroep,DC=resultaatgroep,DC=eu&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ChangePasswordAtLogon&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$false&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;UserPrincipalName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;roel@resultaatgroep.eu&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;GivenName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Roel&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;AccountPassword&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;ConvertTo&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;SecureString&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;AsPlainText&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Force&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;******&quot;&lt;/span&gt;&lt;span class=&quot;err&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;SamAccountName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;roel&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;DisplayName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Roel Everink&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Roel Everink&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Enabled&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$true&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Surname&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Everink&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;New-ADUser&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;@&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;newADUserSplat2&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/efe3ba3550f1f6d633c26a6d8de05e84.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a name=&quot;installing-azureadconnect&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1 id=&quot;4-installing-azure-ad-connect&quot;&gt;4. Installing Azure AD Connect&lt;/h1&gt;

&lt;p&gt;Next we will install Azure AD Connect to synchronize our Active Directory with Azure Active Directory.&lt;/p&gt;

&lt;p&gt;You can download the install file here:
&lt;a href=&quot;https://www.microsoft.com/en-us/download/details.aspx?id=47594&quot;&gt;https://www.microsoft.com/en-us/download/details.aspx?id=47594&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To save cost, we will install this on our Domain Controller.&lt;/p&gt;

&lt;p&gt;Download the installfile and execute it, wait till the wizard starts.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/774022dd18b627126d7e4f2e9590e4de.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We choose for &lt;strong&gt;“Use express settings”&lt;/strong&gt;. You can pick Customize if needed for OU filtering or other settings. For our demo this isn’t important.&lt;/p&gt;

&lt;p&gt;During the install you will be asked for Azure AD credentials and ADDS credentials&lt;/p&gt;

&lt;p&gt;For Azure AD you’ll need Global Admin rights, and for ADDS you’ll need an Enterprise Administrator.&lt;/p&gt;

&lt;p&gt;After the install the synchronize will start automatically. You can check in your Azure AD tenant if the sync was succesfull.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/2155f10fc34a467c3df7647859931c14.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a name=&quot;configuring-wvd&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1 id=&quot;5-configure-windows-virtual-desktop&quot;&gt;5. Configure Windows Virtual Desktop&lt;/h1&gt;

&lt;p&gt;To use Windows Virtual Desktop (WVD) there are a few steps to be taken to give the back-end service and web client rights to your Azure AD tenant.&lt;/p&gt;

&lt;p&gt;The WVD back-end and client app are multi-tenant enviroments which are managed by Microsoft. That means that, by default, the WVD environment has no rights to our Azure tenant. There is also no WVD tenant for us yet.&lt;/p&gt;

&lt;p&gt;So first we have to create the WVD tenant, and give rights to our Azure tenant.&lt;/p&gt;

&lt;h2 id=&quot;assigning-rights-to-the-wvd-back-end--client-app&quot;&gt;Assigning rights to the WVD back-end &amp;amp; client app&lt;/h2&gt;

&lt;p&gt;to go the site: &lt;a href=&quot;https://rdweb.wvd.microsoft.com/&quot;&gt;https://rdweb.wvd.microsoft.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;first, select here “&lt;strong&gt;Server App&lt;/strong&gt;” and fill in your Tenant ID.&lt;/p&gt;

&lt;p&gt;Then wait about 30 seconds, and select: “&lt;strong&gt;Client App&lt;/strong&gt;” with the same Tenant ID.&lt;/p&gt;

&lt;p&gt;You can find your Tenant ID at the following location:&lt;/p&gt;

&lt;p&gt;“&lt;strong&gt;Azure Active Directory&lt;/strong&gt;” –&amp;gt; “&lt;strong&gt;Properties&lt;/strong&gt;” –&amp;gt; “&lt;strong&gt;Directory ID&lt;/strong&gt;”&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/51b183af0958f2334daf4c1401614297.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/5ed9096e694d192581cb28db97c88e04.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;creating-the-wvd-tenant&quot;&gt;Creating the WVD tenant&lt;/h2&gt;

&lt;p&gt;Creating the tenant is done on the server back-end, which we just gave rights to our Azure tenant.&lt;/p&gt;

&lt;p&gt;We just have to give a user (or service principal) rights to create the actual WVD tenant. Go in the Azure portal to: “&lt;strong&gt;Azure Active Directory&lt;/strong&gt;” –&amp;gt; “&lt;strong&gt;Enterprise Application&lt;/strong&gt;”&lt;/p&gt;

&lt;p&gt;In the list are 2 applications: “Windows Virtual Desktop” &amp;amp; “Windows Virtual
Desktop Client”&lt;/p&gt;

&lt;p&gt;These have been created because we gave them access to our Azure tenant in the previous step.&lt;/p&gt;

&lt;p&gt;Click on:“&lt;strong&gt;Windows Virtual Desktop&lt;/strong&gt;” –&amp;gt; “&lt;strong&gt;Users and groups&lt;/strong&gt;” and click on: “&lt;strong&gt;Add user&lt;/strong&gt;”&lt;/p&gt;

&lt;p&gt;At role there is only one option and its preselected: TenantCreator. Select one or multiple users who can create a tenant. And click on “&lt;strong&gt;Assign&lt;/strong&gt;”&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/725c15d4af3e4d71210fe3a24c5bb4c6.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Create the tenant with the following commands: The AadTenantId we already have from the previous steps&lt;/p&gt;

&lt;p&gt;You can find the subscriptionId in the portal: “&lt;strong&gt;All Services&lt;/strong&gt;” –&amp;gt; “&lt;strong&gt;Subscriptions&lt;/strong&gt;” –&amp;gt; “&lt;strong&gt;Subscription ID&lt;/strong&gt;”&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/39c622efa9dc890fd89619ccb6431951.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Because we will login at the back-end, we can also create a service principal which has rights to create host pools in WVD, and to add servers to the hostpools&lt;/p&gt;

&lt;p&gt;You can use the service principal because later during the WVD wizard you’ll use an account to create the host pools. And MFA enabled accounts aren’t supported.
If you use a regular user account that isn’t MFA enabled you can skip creating the service principal.&lt;/p&gt;

&lt;p&gt;Start PowerShell as administrator (to install modules) and execute the following commands (substitute variables for your environment):&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-powershell&quot; data-lang=&quot;powershell&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nf&quot;&gt;Install-Module&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Microsoft.RDInfra.RDPowerShell&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;AzureAD&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Import-Module&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;Microsoft.RDInfra.RDPowerShell&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;AzureAD&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;#Setup variables, tenantName will be the name of our WVD tenant&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$tenantName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;ResultaatGroep-WVD&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$AadTenantId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;11111111-2222-3333-4444-555555555555&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$subscriptionId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;11111111-2222-3333-4444-555555555555&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;#Login at the WVD back-end (with the account that has TenantCreator rights)&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Add-RdsAccount&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-DeploymentUrl&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;https://rdbroker.wvd.microsoft.com&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;#Creating the RDS tenant&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;New-RdsTenant&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-Name&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$tenantName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-AadTenantId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$AadTenantId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-AzureSubscriptionId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$subscriptionId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;#Login to Azure AD with a global admin account to create a service principal&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$aadContext&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Connect-AzureAD&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;#Creating theservice principal with credentials&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$svcPrincipal&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;New-AzureADApplication&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-AvailableToOtherTenants&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;$true&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-DisplayName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Windows Virtual Desktop Svc Principal&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$svcPrincipalCreds&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;New-AzureADApplicationPasswordCredential&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ObjectId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$svcPrincipal&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;ObjectId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;#Assign rights to the service principal&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;New-RdsRoleAssignment&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-RoleDefinitionName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;RDS Owner&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-ApplicationId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$svcPrincipal&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;AppId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-TenantGroupName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Default Tenant Group&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;-TenantName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$tenantName&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;#Make sure the credentials of the sevice principal are saved, you can see these with:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$svcPrincipal&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;AppId&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$svcPrincipalCreds&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;Value&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;You’ll need the password and AppId in the next step.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The next step is creating the hostpool, if you want to test FSLogix and Office 365 on your VM’s right away, then take the nessicary steps from chapter 7 first. There we will create install scripts for Office and the FSLogix agent, and we’ll configure it with Azure Blob storage. Offcourse, these steps can also be done afterwards.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id=&quot;creating-the-hostpool&quot;&gt;Creating the hostpool&lt;/h2&gt;

&lt;p&gt;And now the creation of the Windows Virtual Desktop Hostpool. This is done from the Azure portal.&lt;/p&gt;

&lt;p&gt;Choose: &lt;strong&gt;+ Create a resource&lt;/strong&gt; and search for Windows Virtual Desktop. Choose for: &lt;strong&gt;Windows Virtual Desktop – Provision a host pool&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/3a8ce9025f83cf55825e2782e212739c.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Then choose for &lt;strong&gt;Create&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/6f4a8279c4b20b2405910bb2f117a3b5.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/8ba3733c121cc22a90901b979ea7971c.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Choose a Poolname, and pick your type. We go for Pooled, but you can also create peronal VM’s&lt;/p&gt;

&lt;p&gt;Then fill in your testusers that you made earlier. These users will be linked to this pool and can use its resources.&lt;/p&gt;

&lt;p&gt;Fill in the Resource Group op. It has to be &lt;strong&gt;empty&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Then you assign the location.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/4eba35378b8b543a4f8b8b0eb1dbb593.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In this windows we will determine the amount and type of VM. You can choose at will, for our test 1 VM of type D2s_v3 will suffice.&lt;/p&gt;

&lt;p&gt;Also fill in the prefix for your VM’s.&lt;/p&gt;

&lt;p&gt;More information about scaling and pricing can be found &lt;a href=&quot;https://azure.microsoft.com/en-us/pricing/details/virtual-desktop/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/021cf3afac111280beca8aef5216b83d.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Here we will determine the OS verion, domain and the vNet&lt;/p&gt;

&lt;p&gt;We choose for the standard Gallery source&lt;strong&gt;Windows 10 Enterprise multi-session&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We also fill in the info to join our VM to the domain: &lt;strong&gt;resultaatgroep.eu&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Note: the vNet you select here has to be able to reach your domain controller&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/a69da8f041fa4489a407c8ed85040762.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In this step you fill out your tenant group name and tenant name. You created this earlier and has to match.&lt;/p&gt;

&lt;p&gt;Also fill out your RDS Owner, this could be a (non MFA enabled) users, but in our case we use the Service Principal that we created earlier.&lt;/p&gt;

&lt;p&gt;We also fill out our Azure AD tenant ID.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/f7fec9917295bacd327a870251d24cd3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In step 5 there’s a validation and summary of our steps, check this one final time and choose &lt;strong&gt;Next&lt;/strong&gt; to finish the wizard&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/29559421e48c419520c2eb055c153731.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You can follow the status of your deployment under &lt;strong&gt;Deployments&lt;/strong&gt; while inside your Resource Group.&lt;/p&gt;

&lt;p&gt;At the moment of writing this, it is not yet possible to give a group rights to a hostpool, only users can be granted rights to a hostpool&lt;/p&gt;

&lt;p&gt;&lt;a name=&quot;connecting-wvd&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1 id=&quot;6-connecting-to-windows-virtual-desktop&quot;&gt;6. Connecting to Windows Virtual Desktop&lt;/h1&gt;

&lt;p&gt;You can connecto to Windows Virtual Desktop in 2 ways, will we show both.&lt;/p&gt;

&lt;h2 id=&quot;html-5-browser&quot;&gt;HTML 5 browser&lt;/h2&gt;

&lt;p&gt;The easiest method is the browser. Go to &lt;a href=&quot;https://rdweb.wvd.microsoft.com/webclient&quot;&gt;https://rdweb.wvd.microsoft.com/webclient&lt;/a&gt; and login with your testuser.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/340018115e59ba74082467c6a1bd8055.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/e1fd395735f5023914334f253d0d2569.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Unfortunatly SSO doesn’t work yet, that means that you have to login to Azure AD first, and after selecting your desktop or application, you have to login to the server.&lt;/p&gt;

&lt;p&gt;With ADFS it is possible to create an SSO experience.&lt;/p&gt;

&lt;h2 id=&quot;windows-client--remote-desktop&quot;&gt;Windows client – Remote Desktop&lt;/h2&gt;

&lt;p&gt;You can also download the Windows client. The benefit is that it performs a bit better, and you get start menu integration.&lt;/p&gt;

&lt;p&gt;You can download the client &lt;a href=&quot;https://go.microsoft.com/fwlink/?linkid=2068602&quot;&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the install you can choose &lt;strong&gt;Subscribe.&lt;/strong&gt; then login with the testuser.
testgebruiker.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/28df9e185348c484b3c9df6810eafaf0.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a name=&quot;optional-virtual-desktop&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1 id=&quot;6-optional-virtual-desktop-vms--fslogix&quot;&gt;6. Optional: Virtual Desktop VM’s &amp;amp; FSLogix&lt;/h1&gt;

&lt;p&gt;We also want to show you how to install and configure FSLogix. This step is optional, but certainly a good thing to do. 
With FSLogix you can store the profile, and with it, the Outlook/OneDrive cache and the searchindex in a separate VHDX that will connect to your session at logon time.&lt;/p&gt;

&lt;p&gt;The VHDX is normally on an SMB fileshare on a server, but FSLogix also supports Azure page block storage! As we dont need a fileserver for the Azure storage that we’ll have to maintain and will incur compute cost, this is the best option for us!
We recommend to first read the &lt;a href=&quot;https://docs.fslogix.com/&quot;&gt;FSLogix documentation&lt;/a&gt; if you’re not yet familiar with it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For all next steps goes: these are for our demo environment, some of these are not recommended for a production environment.&lt;/em&gt;&lt;/p&gt;

&lt;h2 id=&quot;storage-account-for-the-profile-containers&quot;&gt;Storage account for the Profile Containers&lt;/h2&gt;

&lt;p&gt;We start with creating the Azure Storage Account. This will house the FSLogix VHDX files. If you prefer an SMB share that is also possible, then create a fileshare with these instructions: &lt;a href=&quot;https://docs.fslogix.com/display/20170529/Requirements+-+Profile+Containers&quot;&gt;https://docs.fslogix.com/display/20170529/Requirements+-+Profile+Containers&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go to the Azure portal to create the storage account. Click on  “&lt;strong&gt;Create a resource&lt;/strong&gt;” Search for: “&lt;strong&gt;Storage account&lt;/strong&gt;” and click on: “&lt;strong&gt;Create&lt;/strong&gt;”&lt;/p&gt;

&lt;p&gt;Follow the wizard to fill out all fields. We chose for premium storage, so the user experience is as fast as possible&lt;/p&gt;

&lt;p&gt;We also only allow access from the subnet in which our Virtual Desktops will reside. This will also mage sure that a &lt;a href=&quot;https://docs.microsoft.com/nl-nl/azure/virtual-network/virtual-network-service-endpoints-overview&quot;&gt;Storage
Endpoint&lt;/a&gt; will be added to this subnet, so the latency to the storage will be as low as possible.
The full settings are in the screenshot below.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/bdf34c4d1a71d3cc8a546d53f109154a.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;gpo--install-fslogix-agent&quot;&gt;GPO – Install FSLogix Agent&lt;/h2&gt;

&lt;p&gt;To install the FSLogix agent we use a group policy. You can download the software from &lt;a href=&quot;https://go.microsoft.com/fwlink/?linkid=2084562&quot;&gt;https://go.microsoft.com/fwlink/?linkid=2084562&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the ZIP file you’ll need the FSLogixAppsSetup.exe and the TXT file with the licence. We also need the ADMX and ADML files to create the GPO for the agent settings.&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;Update: You don’t need a license anymore to install FSLogix, so that part is obsolete.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Make a new GPO under the OU that we created earlier. Go to Computer Configuration -&amp;gt; Windows Settings -&amp;gt; Scripts -&amp;gt; Startup. Click on &lt;strong&gt;Show Files&lt;/strong&gt; and place the .EXE in the folder.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/f5ad12294b84029a5e33df7c60690bc3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Next click on &lt;strong&gt;Add&lt;/strong&gt; and add the .EXE. In the parameter field fill in: &lt;em&gt;/silent ProductKey=MSFT0-YXKIX-NVQI4-I6WIA-O4TXE&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/7ddeecd1d53aee351fd57af055159b64.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;import-admx-files&quot;&gt;Import ADMX files&lt;/h2&gt;

&lt;p&gt;Copy the file “fslogix.admx” (from theZIP file) to C:\Windows\PolicyDefinitions on your domaincontroller. Copy the file “fslogix.adml” to the C:\Windows\PolicyDefinitions\en-us\ folder.&lt;/p&gt;

&lt;h2 id=&quot;gpo--configure-fslogix-agent&quot;&gt;GPO – Configure FSLogix Agent&lt;/h2&gt;

&lt;p&gt;To configure FSLogix we also make a group policy. Under Computer Configuration -&amp;gt; Policies -&amp;gt; Adminstrative Templates you can find the FSLogix settings.&lt;/p&gt;

&lt;p&gt;Configure at least the following:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Computer Configuration -&amp;gt; Policies -&amp;gt; Administrative Templates -&amp;gt; FSLogix/Profile Containers&lt;/strong&gt;&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Setting&lt;/th&gt;
      &lt;th&gt;Value&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Enabled&lt;/td&gt;
      &lt;td&gt;Enabled&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Size in MB’s&lt;/td&gt;
      &lt;td&gt;25600&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Delete local profile when FSLogix Profile should apply&lt;/td&gt;
      &lt;td&gt;Enabled (be carefull with this setting in production environments)&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;Computer Configuration -&amp;gt; Policies -&amp;gt; Administrative Templates -&amp;gt; FSLogix/Profile Containers/Advanced&lt;/strong&gt;&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Setting&lt;/th&gt;
      &lt;th&gt;Value&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Locked VHD retry count&lt;/td&gt;
      &lt;td&gt;1&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Locked VHD retry interval&lt;/td&gt;
      &lt;td&gt;0&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;Computer Configuration -&amp;gt; Policies -&amp;gt; Administrative Templates -&amp;gt; FSLogix/Profile Containers/Cloud Cache&lt;/strong&gt;&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Setting&lt;/th&gt;
      &lt;th&gt;Value&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Cloud Cache Locations *&lt;/td&gt;
      &lt;td&gt;type=azure,connectionString=”XXXXXXX”&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;&lt;strong&gt;Computer Configuration -&amp;gt; Policies -&amp;gt; Administrative Templates -&amp;gt; FSLogix/Profile Containers/Container and Directory Naming&lt;/strong&gt;&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Setting&lt;/th&gt;
      &lt;th&gt;Value&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;SID directory name matching string&lt;/td&gt;
      &lt;td&gt;%userdomain%-%username%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;SID directory name pattern string&lt;/td&gt;
      &lt;td&gt;%userdomain%-%username%&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Virtual disk type&lt;/td&gt;
      &lt;td&gt;VHDX&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;* Replace the value XXXXXX for your own personal connection string of the storage account that you created earlier&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/ed011d9883f2af177a754cd9046de0c3.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;creating-include-and-exclude-groups-optional&quot;&gt;Creating Include and Exclude Groups (Optional)&lt;/h2&gt;

&lt;p&gt;By default there are 4 local groups so FSLogix is enabled for everyone. To determine who will be enabled for FSLogix Profile Containers and who will be disabled you can create 2 AD groups. We will add these to the groups which FSLogix made locally on the server(s). That way we can disable FSLogix for our domain admins or specific users.&lt;/p&gt;

&lt;p&gt;Make 2 groups in AD:  &lt;strong&gt;FSLogix AD Profile Exclude List&lt;/strong&gt; &amp;amp; &lt;strong&gt;FSLogix AD Profile Include List&lt;/strong&gt;. Make the AD group “Domain Admins” member of the exclude group, and add your testusers to the include group.&lt;/p&gt;

&lt;p&gt;Then make a new GPO and add the AD groups to the local groups. The names of the local groups are:
&lt;strong&gt;FSLogix Profile Include List&lt;/strong&gt; &amp;amp; &lt;strong&gt;FSLogix Profile Exclude List&lt;/strong&gt;. Enable the option to delete all members of the group&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/5b31d32fb7950bdd2196214b1bf20c83.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;office-deployment-tool&quot;&gt;Office Deployment Tool&lt;/h2&gt;

&lt;p&gt;If you have a valid Office 365 license, you can also test with Office 365 ProPlus. For this we create a GPO that will install this during boot. We used the website &lt;a href=&quot;https://config.office.com/&quot;&gt;https://config.office.com/&lt;/a&gt; to create an XML for our install. 
Make sure you enable “Shared Computer Activation”, else the software doesn’t work properly on a multi-user environment. In our config we made a selection of a couple of products. The other applications will not be installed.&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;Configuration&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;ID=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;a02f45f4-6a0e-4215-85af-e2458dabbcf4&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;DeploymentConfigurationID=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;00000000-0000-0000-0000-000000000000&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Add&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;OfficeClientEdition=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;64&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;Channel=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Insiders&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;ForceUpgrade=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;TRUE&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Product&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;ID=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;O365ProPlusRetail&quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;Language&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;ID=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;MatchOS&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;ExcludeApp&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;ID=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Access&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;ExcludeApp&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;ID=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Groove&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;ExcludeApp&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;ID=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Lync&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;ExcludeApp&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;ID=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;OneNote&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;ExcludeApp&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;ID=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Publisher&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/Product&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/Add&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Property&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;Name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;SharedComputerLicensing&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;Value=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;1&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Property&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;Name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;PinIconsToTaskbar&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;Value=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;TRUE&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Property&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;Name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;SCLCacheOverride&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;Value=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;0&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Updates&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;Enabled=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;TRUE&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;RemoveMSI&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;AppSettings&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;nt&quot;&gt;&amp;lt;Setup&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;Name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Company&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;Value=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;ResultaatGroep&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;/AppSettings&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;Display&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;Level=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;Full&quot;&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;AcceptEULA=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;TRUE&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/Configuration&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;To install Office you need the Office Deployment Tool. You can download it from here: &lt;a href=&quot;https://www.microsoft.com/en-us/download/details.aspx?id=49117&quot;&gt;https://www.microsoft.com/en-us/download/details.aspx?id=49117&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Extract the files, you will need the “&lt;strong&gt;setup.exe&lt;/strong&gt;” and the earlier made “&lt;strong&gt;Configuration.xml”&lt;/strong&gt; in the next step.&lt;/p&gt;

&lt;h2 id=&quot;gpo--install-office-365-proplus&quot;&gt;GPO – Install Office 365 ProPlus&lt;/h2&gt;

&lt;p&gt;Make a new GPO. Go to Computer Configuration -&amp;gt; Windows Settings -&amp;gt; Scripts -&amp;gt; Startup and place, like before with the FSLogix agent, now the setup.exe and the configuration.xml in the folder.&lt;/p&gt;

&lt;p&gt;Then click on &lt;strong&gt;Add&lt;/strong&gt; and choose the &lt;strong&gt;setup.exe&lt;/strong&gt; file. And the script parameter field you enter: &lt;em&gt;/Configure Configuration.xml&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Now link the GPO to the OU that you made before for your Windows Virtual Deskop VM’s.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/870078889b390e4849488efe47aa8739.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;office-365-proplus-settings-for-outlook-optional&quot;&gt;Office 365 ProPlus settings for Outlook (Optional)&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;This step is optional. You can also configure the cache manually on the clients&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;To configure the cache we create a GPO based on the Office 365 ProPlus ADMX files. You can download the files from the following link: &lt;a href=&quot;https://www.microsoft.com/en-us/download/details.aspx?id=49030&quot;&gt;https://www.microsoft.com/en-us/download/details.aspx?id=49030&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy at least the ADMX and ADML of Outlook to C:\Windows\PolicyDefinitions on your domain controller.&lt;/p&gt;

&lt;p&gt;Note, this time we use the &lt;strong&gt;User Configuration&lt;/strong&gt; section to force the cache settings&lt;/p&gt;

&lt;p&gt;Make a new GPO and configure as following:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;User Configuration -&amp;gt; Policies -&amp;gt; Administrative Templates -&amp;gt; Microsoft Outlook 2016/Account Settings/Exchange/Cached Exchange Mode&lt;/strong&gt;&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Setting&lt;/th&gt;
      &lt;th&gt;Value&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Cached Exchange Mode Sync Settings&lt;/td&gt;
      &lt;td&gt;Enabled&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Select Cached Exchange Mode sync settings for profiles&lt;/td&gt;
      &lt;td&gt;&lt;em&gt;determine yourself&lt;/em&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Use Cached Exchange Mode for new and existing Outlook profiles&lt;/td&gt;
      &lt;td&gt;Enabled&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&quot;rebooting-servers&quot;&gt;Rebooting Server(s)&lt;/h2&gt;

&lt;p&gt;When all GPO’s have been made, you’ll have to reboot your servers. During booting the FSLogix agent and Office 365 will be installed. This will take a couple minutes ofcourse, but nothing too long, as your VM’s are connected to the Microsoft backbone.&lt;/p&gt;

&lt;p&gt;After this you can login and configure Outlook and OneDrive for use. Offcourse your account needs a valid license for this.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/8737b7f535709504b383f1d598ab2794.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;vhdx-location&quot;&gt;VHDX location&lt;/h2&gt;

&lt;p&gt;Now check the Azure portal if you can see the VHDX. If you did everything correct it will look like this:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/d6feba40c92a80cf26c9ff284fa69f21.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/f049c5973e5d11668637004455a60cf1.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;troubleshoot-profile-containers&quot;&gt;Troubleshoot Profile containers&lt;/h2&gt;

&lt;p&gt;With the FSLogix software a tool will be installed to easily read the FSLogix logging. It’s located on the following location: &lt;strong&gt;“C:\Program Files\FSLogix\Apps\frxtray.exe”&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;TIP: Copy this tool to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp. This will make it start for all users&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;img src=&quot;/images/WVDandFSLogix/ccc9341744562675486835b5e350f706.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a name=&quot;more-info&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1 id=&quot;7-more-info&quot;&gt;7. More info&lt;/h1&gt;

&lt;p&gt;We used the below sources for making this blog.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://docs.fslogix.com/&quot;&gt;FSLogix Documentation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://docs.microsoft.com/nl-nl/azure/virtual-desktop/overview&quot;&gt;Windows Virtual Desktop Documentation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For questions or remarks you can reach us through LinkedIn.&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;a href=&quot;https://www.linkedin.com/in/roeleverink/&quot;&gt;Roel Everink&lt;/a&gt;&lt;/th&gt;
      &lt;th style=&quot;text-align: center&quot;&gt;&lt;a href=&quot;https://www.linkedin.com/in/jan-bakker/&quot;&gt;Jan Bakker&lt;/a&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;/images/WVDandFSLogix/image35.jpg&quot; alt=&quot;&quot; /&gt;&lt;/td&gt;
      &lt;td style=&quot;text-align: center&quot;&gt;&lt;img src=&quot;/images/WVDandFSLogix/image36.jpg&quot; alt=&quot;&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;</content><author><name></name></author><summary type="html">21 March 2019 the Windows Virtual Desktop preview went live. My colleague Jan Bakker and myself went straight to all available documentation, and build a test environment together. In this blogpost we will show you how to setup a Windows Virtual Desktop (WVD) environment, and what to watch out for. As a bonus we will also show how to install and configure FSLogix. This tutorial will be a step by step guide to setup a complete demo environment from scratch.</summary></entry></feed>