Remote Desktop Services SxS Network Stack download

Upgrading WVD agent stuck

Hey all,

I have 19 WVD's and 2 of them are stuck on the status "Upgrading". When I click on each from the portal it gives me an error 404. Is there an easy way to fix this?
Thanks,

azure-virtual-desktop

Comment

Comment · Show 1

Comment

5 |1600 characters needed characters left characters exceeded

  • Visible to all users
  • Visible to the original poster & Microsoft
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Visible to all users

Attachments: Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

karishmatiwari-msft · Jun 03, 2021 at 01:03 AM

Please try removing the agent and then reinstalling it and let me know.
There is a similar thread here with potential solutions: https://techcommunity.microsoft.com/t5/windows-virtual-desktop/upgrading-wvd-images/m-p/1565393

0 Votes 0 ·

karishmatiwari-msft answered Jun 3, '21

Error: VMs are stuck in Unavailable or Upgrading state
Open a PowerShell window as an administrator and run the following cmdlet:

Get-AzWvdSessionHost -ResourceGroupName <resourcegroupname> -HostPoolName <hostpoolname> | Select-Object *

If the status listed for the session host or hosts in your host pool always says "Unavailable" or "Upgrading," the agent or stack didn't install successfully.

To resolve this issue, reinstall the side-by-side stack:

  1. Open a command prompt as an administrator.

  2. Enter net stop RDAgentBootLoader.

  3. Go to Control Panel > Programs > Programs and Features.

  4. Uninstall the latest version of the Remote Desktop Services SxS Network Stack or the version listed in HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > Terminal Server > WinStations under ReverseConnectListener.

  5. Open a console window as an administrator and go to Program Files > Microsoft RDInfra.

  6. Select the SxSStack component or run the msiexec /i SxsStack-.msi command to install the MSI.

  7. Restart your VM.

  8. Go back to the command prompt and run the qwinsta command.

  9. Verify that the stack component installed in step 6 says Listen next to it.
    -If so, enter net start RDAgentBootLoader in the command prompt and restart your VM.
    -If not, you will need to re-register your VM and reinstall the agent component.

Reference article: https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/virtual-desktop/troubleshoot-agent.md


Comment

Comment Show 0

Comment

5 |1600 characters needed characters left characters exceeded

  • Visible to all users
  • Visible to the original poster & Microsoft
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Toggle Comment visibility. Current Visibility: Visible to all users

Attachments: Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Troubleshoot common Azure Virtual Desktop Agent issues

The Azure Virtual Desktop Agent can cause connection issues because of multiple factors:

  • An error on the broker that makes the agent stop the service.
  • Problems with updates.
  • Issues with installing during the agent installation, which disrupts connection to the session host.

This article will guide you through solutions to these common scenarios and how to address connection issues.

[!NOTE] For troubleshooting issues related to session connectivity and the Azure Virtual Desktop agent, we recommend you review the event logs in Event Viewer > Windows Logs > Application. Look for events that have one of the following sources to identify your issue:

  • WVD-Agent
  • WVD-Agent-Updater
  • RDAgentBootLoader
  • MsiInstaller

WVD service principal name Powershell

You can also use a service principal name

#############

Set users or Create service principal name

# create the service principal:
$aadContext = Connect-AzureAD
$svcPrincipal = New-AzureADApplication -AvailableToOtherTenants $true -DisplayName “Windows Virtual Desktop Svc Principal”
$svcPrincipalCreds = New-AzureADApplicationPasswordCredential -ObjectId $svcPrincipal.ObjectId

#Here are the three credentials you should write down and the cmdlets you need to run to get them
$svcPrincipalCreds.Value
$aadContext.TenantId.Guid
$svcPrincipal.AppId

#Set Rolassignment
New-RdsRoleAssignment -RoleDefinitionName “RDS Owner” -ApplicationId $svcPrincipal.AppId -TenantName $tenantName

#Sign in with the service principal
$creds = New-Object System.Management.Automation.PSCredential($svcPrincipal.AppId, (ConvertTo-SecureString $svcPrincipalCreds.Value -AsPlainText -Force))
Add-RdsAccount -DeploymentUrl “https://rdbroker.wvd.microsoft.com” -Credential $creds -ServicePrincipal -AadTenantId $aadContext.TenantId.Guid

Remote Desktop Services SxS Network Stack download

This is All perfect But often I noticed that the WVD host where added to the domain but failed in something, the VM was fine and there was a folder with the deployment agent. and this got me thinking what If you install this on what ever OS, You could even use the WVD portal to connect to your own laptop.

Manual ADDING New WVD (Windows virtual desktop) Host to the Pool or a failed on.

The manual add Server to the host pool is also a process when you start with 1 server and add later extra servers to the pool.

but we will need a token to add the WVD host to the pool, like in RDS add the Role not the Role is an agent that is running on the VM

Remote Desktop Services SxS Network Stack download

There are several ways to export the key I like them to capture this in screen and to the clipboard.

$WVDToken = New-RdsRegistrationInfo -TenantName $tenantName -HostPoolName $hostpool -ExpirationHours 2
$WVDToken.Token | Set-Clipboard
##
$WVDToken.Token

#When using the Clipboard then use this.
Export-RdsRegistrationInfo -TenantName $tenantName -HostPoolName $hostpool | Select-Object -ExpandProperty Token | Set-Clipboard

Now we have the key but it is only valid for 2 hours.

Remote Desktop Services SxS Network Stack download

Now I go to my failed Windows 10 host and start the installation of the Agent.

Remote Desktop Services SxS Network Stack download

If you don’t have the Agent installer you can download it. In this case I use a failed WVD host during deployment.

Download and install the Windows Virtual Desktop Agent.

  • Download the Windows Virtual Desktop Agent.

Remote Desktop Services SxS Network Stack download
Remote Desktop Services SxS Network Stack download

Use the Token in the installer

Remote Desktop Services SxS Network Stack download
Remote Desktop Services SxS Network Stack download

The next installer is the bootloader

Download and install the Windows Virtual Desktop Agent Bootloader.

  • Download the Windows Virtual Desktop Agent Bootloader.

Remote Desktop Services SxS Network Stack download

Remote Desktop Services SxS Network Stack download
Remote Desktop Services SxS Network Stack download
Remote Desktop Services SxS Network Stack download
Remote Desktop Services SxS Network Stack download

Now that the Agent and the Bootloader is installed. We need two more steps.

Download the Windows Virtual Desktop side-by-side stack and run the installer.

As a final step – Download this script to activate the side-by-side stack. Save this as powershell script “ps1” or run this directly.

Remote Desktop Services SxS Network Stack download

Remote Desktop Services SxS Network Stack download

After running the SxS components you and use the portal https://rdweb.wvd.microsoft.com/webclient/index.html

Remote Desktop Services SxS Network Stack download

In this setup I used the Full desktop – This is also default –

Remote Desktop Services SxS Network Stack download

Running this in a Window or use the Remote app in your Windows

Remote Desktop Services SxS Network Stack download

  • Download the Remote Desktop client here.
  • Install the client. You don’t need administrator privileges if you are only installing it for your own user account.
  • Open the newly installed Remote Desktop app.
  • On the Let’s get started screen, click Subscribe to subscribe to a feed.

Remote Desktop Services SxS Network Stack download
Remote Desktop Services SxS Network Stack download

Installation source on a failed WVD host

Remote Desktop Services SxS Network Stack download

[!IMPORTANT] To help secure your Windows Virtual Desktop environment in Azure, we recommend you don’t open inbound port 3389 on your VMs. Windows Virtual Desktop doesn’t require an open inbound port 3389 for users to access the host pool’s VMs. If you must open port 3389 for troubleshooting purposes, we recommend you use just-in-time VM access.

Follow Me on Twitter @ClusterMVP

Follow My blog https://robertsmit.wordpress.com

Linkedin Profile Robert Smit MVP Linkedin profile

Google : Robert Smit MVP profile

Rate this:

Share this:

  • Share

  • Tweet
  • Remote Desktop Services SxS Network Stack download

  • Email
  • Print

Like this:

Like Loading...

Author: Robert Smit [MVP]

Robert Smit is Senior Technical Evangelist and is a current Microsoft MVP in Clustering as of 2009. Robert has over 20 years experience in IT with experience in the educational, health-care and finance industries. Robert’s past IT experience in the trenches of IT gives him the knowledge and insight that allows him to communicate effectively with IT professionals who are trying to address real concerns around business continuity, disaster recovery and regulatory compliance issues. Robert holds the following certifications: MCT - Microsoft Certified Trainer, MCTS - Windows Server Virtualization, MCSE, MCSA and MCPS. He is an active participant in the Microsoft newsgroup community and is currently focused on Hyper-V, Failover Clustering, SQL Server, Azure and all things related to Cloud Computing and Infrastructure Optimalization. Follow Robert on Twitter @ClusterMVP Or follow his blog https://robertsmit.wordpress.com Linkedin Profile Http://nl.linkedin.com/in/robertsmit Robert is also capable of transferring his knowledge to others which is a rare feature in the field of IT. He makes a point of not only solving issues but also of giving on the job training of his colleagues. A customer says " Robert has been a big influence on our technical staff and I have to come to know him as a brilliant specialist concerning Microsoft Products. He was Capable with his in-depth knowledge of Microsoft products to troubleshoot problems and develop our infrastructure to a higher level. I would certainly hire him again in the future. " Details of the Recommendation: "I have been coordinating with Robert implementing a very complex system. Although he was primarily a Microsoft infrastructure specialist; he was able to understand and debug .Net based complext Windows applications and websites. His input to improve performance of applications proved very helpful for the success of our project View all posts by Robert Smit [MVP]

Introduction

There could be many ways to perform AVD troubleshooting. However, I’m going to share my experience in this blog. These are random tips to troubleshoot AVD issues. The AVD Error codes are available in Microsoft documentation here.

What are the AVD Troubleshooting Options?

  • Azure Portal – Check whether VMs are up and Running
  • Try to run the Remote commands from Azure Portal -> Virtual Machines -> Operations -> Run Command.
  • Evaluate Group Policies from AD to check whether those policies are blocking access to the AVD Host Pool VM.
  • Confirm whether the user is assigned to appropriate AVD host pool application groups
  • PowerShell, PowerShell, and PowerShell
  • Event Logs – Microsoft-Windows-RemoteDesktopServices-RdpCoreTS/Operational
Remote Desktop Services SxS Network Stack download
Remote Desktop Services SxS Network Stack download
AVD Troubleshooting Options Tips Tricks – Azure Virtual Desktop

Oops, we couldn’t connect to “Session Desktop” – We couldn’t connect to the gateway because of an error. If this keeps happening, ask your admin or tech support for help. Reconnect / Cancel – “Can’t log in to HostPool” AVD Troubleshooting Tips.

Remote Desktop Services SxS Network Stack download
Remote Desktop Services SxS Network Stack download

Migrating your existing WVD Workloads to WVD Spring Update!

So, Windows Virtual Desktop (WVD) Spring Update (Public Preview) is out as of last week! In case you missed it, on the day of the launch I published an article covering my experiences of testing WVD Spring Update in private preview! I talked about the top 10 things that stand out. Catch the article here: The next big innovation in Windows Virtual Desktop is here!

As discussed in the article mentioned above, WVD Spring Update makes deploying and managing Windows Virtual Desktop a lot easier because there now is full integration in the Azure (Resource Manager) Portal! Since the first release of WVD saw the light on September 30 of last year, many organizations have already deployed it and have it running in production. I myself have helped at least a dozen of organizations with architecting and implementing and many of them are using it in production right now. So, the question arises, how can we start to manage existing WVD Workloads with the new WVD Spring Update Azure Portal Integration?

First of all; Microsoft is also working on a set of PowerShell Cmdlets for the Az PowerShell module that can be used to migrate an existing Host pool including hosts from WVD Fall 2019 to WVD Spring 2020 update. I have already seen private preview information on this and it looks very promising! If the Cmdlets become available in public preview I will share it here. In the mean time, this article explains how to migrate your workloads today! Also, it is a good exercise to perform migrations using the steps explained in this article as it allows you to get familiar with the new components, PowerShell Cmdlets, ARM code and so on.

This article talks about migrating your existing WVD Workloads to WVD Spring Update!

Before we start it’s important to realize what WVD Spring Update exactly is. It is not “just” a new Management Console for WVD. It all about making WVD a 1st Party application in Azure and as a result some changes to the WVD Service were needed. Below is a quick summary of the most important changes. Again, for a full list and more detailed information, check my previous article referenced in the first paragraph.

- WVD Backplane components are now ARM Based and manageable and visible in your Azure Portal.

- RBAC for WVD is now based on the Azure RABC model

- PowerShell Cmdlets are now integrated in AZ PowerShell

- The hierarchy of the WVD Backplane components changed

To answer the most important question; Can existing WVD Deployments and resources be instantly managed using the new Spring Update Azure Portal integration? The short answer is no. Does that mean we need to start entirely from scratch? No again! It comes down to migrating your WVD Host Servers from WVD current release to WVD Update Release. This article takes you through these steps.

Migrating to Spring Update (even with the upcoming migration Cmdlets) basically comes down to 4 main steps:

STEP 1 — Duplicating existing WVD backplane configuration into WVD Spring Update In this step we are going to duplicate existing WVD Tenants, Host Pools and Applications Group into the WVD Spring Update. Basically, we are creating a second WVD Deployment fully separated from the existing WVD Deployment. Depending on the size of your existing WVD Deployment you can perform this manually using the WVD blades in the Azure Portal, by using JSON Templates, or by using PowerShell to export and import the configuration. In this article we will use PowerShell to automate the duplication of a Tenant with a Host pool and AppGroup. And we’ll also briefly touch on JSON and VD blades in the Azure Portal.

STEP 2 — Moving your existing WVD Hosts to WVD Spring Update In this step we are moving WVD Hosts from the existing WVD Host pool towards the new Host pool in WVD Spring Update. This step can be performed with a single WVD Host at first to start testing the WVD Spring Update Update, and later additional WVD Hosts can be migrated the same way. We’ll also discuss the option to recreate a new set of WVD Hosts in parallel with the existing environment.

STEP 3 — Assign users and groups In this third step we will assign permissions to the WVD Host pool to allow (a subset of) users to be able to test the new deployment.

STEP 4 — Testing the migrated WVD Deployment We are now ready to test the migrated WVD workload using our WVD Clients and plan for next steps.

Remote Desktop Services SxS Network Stack download

Suspicious RDP ActiveX Client Loadededit

Identifies suspicious Image Loading of the Remote Desktop Services ActiveX Client (mstscax), this may indicate the presence of RDP lateral movement capability.

Rule type: eql

Rule indices:

  • logs-endpoint.events.*
  • winlogbeat-*
  • logs-windows.*

Severity: medium

Risk score: 47

Runs every: 5 minutes

Searches indices from: now-9m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100

References:

Tags:

  • Elastic
  • Host
  • Windows
  • Threat Detection
  • Lateral Movement

Version: 3 (version history)

Added (Elastic Stack release): 7.11.0

Last modified (Elastic Stack release): 7.12.0

Rule authors: Elastic

Rule license: Elastic License v2

library where dll.name : "mstscax.dll" and /* depending on noise in your env add here extra paths */ process.executable : ( "C:\\Windows\\*", "C:\\Users\\Public\\*", "C:\\Users\\Default\\*", "C:\\Intel\\*", "C:\\PerfLogs\\*", "C:\\ProgramData\\*", "\\Device\\Mup\\*", "\\\\*" ) and /* add here FPs */ not process.executable : ("C:\\Windows\\System32\\mstsc.exe", "C:\\Windows\\SysWOW64\\mstsc.exe")

Framework: MITRE ATT&CKTM

Version 3 (7.12.0 release)

  • Updated query, changed from:

    library where file.name == "mstscax.dll" and /* depending on noise in your env add here extra paths */ wildcard(process.executable, "C:\\Windows\\*", "C:\\Users\\Public\\*", "C:\\Users\\Default\\*", "C:\\Intel\\*", "C:\\PerfLogs\\*", "C:\\ProgramData\\*", "\\Device\\Mup\\*", "\\\\*") and /* add here FPs */ not process.executable in ("C:\\Windows\\System32\\mstsc.exe", "C:\\Windows\\SysWOW64\\mstsc.exe")

Version 2 (7.11.2 release)