r/PowerShell • • Mar 24 '20

Script Sharing Windows Virtual Desktop - deployment tutorial

If you need to set up WVD (Windows Virtual Desktop) on Azure for your remote workers and want to do it with ease this may help you:

https://www.mczerniawski.pl/azure/wvd-how-to/

This is not another 'demo' tutorial (all global admins), but looks how to do it in real production. You'll be able to set it up, configure basic monitoring and finally clean it up, all with PowerShell

153 Upvotes

21 comments sorted by

10

u/[deleted] Mar 24 '20

This is exactly what I need. Thank you. Everything I've seen is using GA instead of doing it properly with service principals.

3

u/Arcontar Mar 24 '20

Glad you like it.Let me know if you'll have any questions/issues

1

u/excalibur44v Mar 24 '20

same! even i was looking for this!

4

u/darkguardian823 Mar 24 '20

You are a god sir

3

u/Arcontar Mar 24 '20

Thanks ;) glad you liked it

3

u/biacz Mar 24 '20

ill publish a script soon that can also do shared image gallery WVD deployments across multiple regions/subscriptions including and directly from powershell. took me a while to figure out the necessary ARM templates but yeah. its possible and its pretty cool.

4

u/Arcontar Mar 24 '20

Looking forward into it;) We needed just plain jump hosts, but having custom image will be great ;)

2

u/dreadpiratewombat Mar 25 '20

Any reason you didn't use Bastion instead of making jump hosts?

2

u/Arcontar Mar 25 '20

We required something to be able to jump in to on-prem environment . Haven't used bastion before - so used something I knew. No other reason

2

u/biacz Mar 24 '20

we have a custom image as well that we brought from on-prem. was quite a journey, i can tell you :D but using shared image galleries that replicate across regions, its AWESOME.

0

u/[deleted] Mar 24 '20

[deleted]

1

u/RemindMeBot Mar 25 '20 edited Mar 25 '20

Defaulted to one day.

I will be messaging you on 2020-03-25 23:46:45 UTC to remind you of this link

1 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


InfoCustomYour RemindersFeedback

3

u/biacz Mar 24 '20

good job btw

1

u/biacz Mar 30 '20

hey everyone, promised to publish a script that can do shared image gallery provisioning of wvd host pools across subscriptions. ITS NOT FINAL as i am still in firefighting mode and my coding probably isnt super beautiful but it already does the job for us if we quickly have to deploy and dont want to go through the GUI every time. feel free to use it and make it better :-)

https://github.com/biacz/wvd_deployment

1

u/biacz Mar 30 '20

at the moment it still accesses the nested template from markhooks81 on his repository. trying to combine both arm templates into one right now and get the artifacts off to my azure storage account but yeah. already managing over 1000 desktops in azure is stealing most of my time and didnt figure out the internal cross-charge process yet :p

2

u/ShadeXeRO Mar 24 '20

Great write up! We're using WVD as our Business Continuity environment right now. The gateway is a bit more latency sensitive than our previous RDS build out, but the Windows 10 Multi-session image is awesome. We used it as a template and customized it with our Enterprise applications.

The management UX has a long way to go.

We're using storage accounts connected with On-Prem AD for our FSLogix profile container and no complaints except for the lack of documentation around using that configuration.

2

u/theconfigmgrguy Mar 24 '20

If I’m not mistaken, Microsoft is intending on releasing a V2 of WVD that adds a nice blade within the Azure Portal. They demo’d it a bit at the Ignite conferences, but they haven’t given any specific dates around the release.

But at least it’s on the way ha

For today, I know Microsoft made a Github template to deploy a management web portal for WVD, available here (though I agree it’s pretty basic) - https://docs.microsoft.com/en-us/azure/virtual-desktop/manage-resources-using-ui

2

u/ShadeXeRO Mar 24 '20

Correct, that's the WVD Management UX bundle we deployed. They had a sneak preview of the new Azure Blade during this webinar I believe.

Definitely looking forward to a more intuitive workflow for management of AppAttach volumes (like VMWare Horizon).

0

u/[deleted] Mar 24 '20

[deleted]

2

u/Arcontar Mar 24 '20

No, we're not redirecting profiles. This is just a backup, plain jump host solution. So no advanced configuration required.

2

u/theconfigmgrguy Mar 24 '20

It’s actually not too difficult to set this up, though the docs are a bit vague on the details... :)

Mainly the steps are:

  • install the FSLogix agent (if you bring in your own customized VHD, install the agent on your gold image)

  • determine whether you’ll have computer authentication, or user authentication

  • configure the settings of the agent in Regedit (I configured mine with connecting to an Azure File Share), along with the authentication method decided earlier

That’s really it — it took a while to figure out the first time, but once you’ve got it, it takes like 10 mins to setup initially.

2

u/sleeplessone Mar 25 '20

I set it up for our deployment I was working on this week. Basically spun up an additional lightweight VM and set it up as a file server. Then installed the agent on each session host and set the registry keys per their docs. Worked like a charm.

Went with a file server VM because it was simple and it turned out we needed a cloud file share to use with Azure Files Sync anyway so I would have needed one anyway.

1

u/[deleted] Mar 24 '20

Apparently they bought FSLogix for this purpose when they were developing it. I can see that.

If you combine it with Azure Files instead of an old fashioned file server, you get a work bonus :)