Skip to content
Learn How to Publish AVD Remote Apps with PowerShell

Learn How to Publish AVD Remote Apps with PowerShell

Written By Anoop C Nair
Last Updated July 11, 2024
Posted In AVD
SHARE

Let’s leasn Learn How to Publish AVD Remote Apps with PowerShell. I hope you already have an AVD infrastructure setup. For more details, see Create AVD Tenant and AVD Infra.

In this post, you will learn how to publish remote apps with PowerShell command lets (Publish AVD Remote Apps).

Azure Virtual Desktop (AVD) restricts a user from being assigned to both a desktop app group and a Remote App group within a host pool.

Before publishing the remote apps to the host pool, I recommend reading the following posts.

Patch My PC
Index
Prerequisite – Publish AVD Remote Apps
Install Azure AD, RD PowerShell Module
Login to RD Account – Authenticate with Azure AD
Set Variables – AVD Remote Apps
List AVD Remote App Groups
List of Remote Apps Published to RemoteApp Group
List of Apps Installed on AVD VM
Create a New AVD Remote App Group
Publish AVD Remote Apps to RDS Host Pools
Internet Explorer
Microsoft Edge
LOB Application
Microsoft Word
Microsoft Access
Task Manager
Resource Monitor
Windows Media Player
Microsoft PowerPoint
Add User to RDS Host Pool
Result
Learn How to Publish AVD Remote Apps with PowerShell – Table.1

Prerequisite – Publish AVD Remote Apps

I recommend reviewing the following prerequisites before publishing AVD remote apps.

  • Build an AVD Host Pool with a virtual machine
  • Install the Required application on that virtual machine

Install Azure AD, RD PowerShell Module

##Install & Import AzureAD Module
Install-Module -Name AzureAD
Import-Module -Name AzureAD
##Install & Import RD - AVD Module
Install-Module -Name Microsoft.RDInfra.RDPowerShell
Import-Module -Name Microsoft.RDInfra.RDPowerShell

Login to RD Account – Authenticate with Azure AD

## Login with Azure AD Account user name and password  
Add-RdsAccount -DeploymentUrl https://rdbroker.wvd.microsoft.com

#Login to RDS account with Service Principle
$aadContext = Connect-AzureAD
$svcPrincipal = New-AzureADApplication -AvailableToOtherTenants $true -DisplayName "Windows Virtual Desktop Svc Principal"
$svcPrincipalCreds = New-AzureADApplicationPasswordCredential -ObjectId $svcPrincipal.ObjectId
$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 
Learn How to Publish AVD Remote Apps with PowerShell - Fig.1
Learn How to Publish AVD Remote Apps with PowerShell – Fig.1

Set Variables – AVD Remote Apps

#Set the Variable
$hostpoolname ='WVD-A-MS-Apps'#$hostpoolname ='WVD-A-MS-Apps'
$UserPrincipalName='ACN@HowToManageDevices.com'
$NameofappGroup1='LOB Apps'
$NameofappGroup2='officeApps'

List AVD Remote App Groups

#Get the details of AVD Remote App Groups
Get-RdsAppGroup -TenantName $tenant -HostPoolName $hostpoolname
Learn How to Publish AVD Remote Apps with PowerShell - Fig.2
Learn How to Publish AVD Remote Apps with PowerShell – Fig.2

List of Remote Apps Published to RemoteApp Group

##List of Remote App Group
Get-RdsAppGroup -TenantName $tenant -HostPoolName $hostpoolname -AppGroupName $NameofappGroup2

##List of Users associated to Remote App Group
Get-RdsAppGroupUser -TenantName $tenant -HostPoolName $hostpoolname -AppGroupName $NameofappGroup2

NOTE—You might not have access to run this query if you log in to RDS using SPN. Instead, you might need to have appropriate access to Azure AD to list the users in the Azure AD Group.

Learn How to Publish AVD Remote Apps with PowerShell - Fig.3
Learn How to Publish AVD Remote Apps with PowerShell – Fig.3

List of Apps Installed on AVD VM

#Get the details the List of AVD Remote Apps from Virtual Machine 
Get-RdsStartMenuApp -TenantName $tenant -HostPoolName $hostpoolname -AppGroupName $NameofappGroup1 Where-Object{$_.friendlyName -like "word"}

Get-RdsStartMenuApp -TenantName $tenant -HostPoolName $hostpoolname -AppGroupName $NameofappGroup1 >> "C:\Users\Anoop C Nair\OneDrive - ACN\DW\WVD -VDI\Work\ListApps1.txt"

Create a New AVD Remote App Group

#Create New WVD Remote App Groups 
New-RdsAppGroup -TenantName $tenant -HostPoolName $hostpoolname -Name $NameofappGroup1 -ResourceType RemoteApp
Learn How to Publish AVD Remote Apps with PowerShell - Fig.4
Learn How to Publish AVD Remote Apps with PowerShell – Fig.4

Publish AVD Remote Apps to RDS Host Pools

The PowerShell commands I used to publish remote apps to RDS Host Pools.

Internet Explorer

#Add AVD Remote Apps - Internet Explorer to WVD Host Pool
New-RdsRemoteApp -TenantName $tenant -HostPoolName $hostpoolname -AppGroupName $NameofappGroup1 -Name "My Apps Web Portal iE" -FilePath "C:\Program Files\internet explorer\iexplore.exe" -FriendlyName "Contoso Web App" -IconPath "C:\Program Files\internet explorer\iexplore.exe"

Microsoft Edge

#Add AVD Remote Apps - Microsoft Edge to WVD Host Pool
New-RdsRemoteApp -TenantName $tenant -HostPoolName $hostpoolname -AppGroupName $NameofappGroup2 -Name "My Apps Web Portal Edge" -FilePath shell:Appsfolder\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge -IconPath C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\Assets\MicrosoftEdgeSquare44x44.targetsize-72_altform-unplated.png
Learn How to Publish AVD Remote Apps with PowerShell - Fig.5
Learn How to Publish AVD Remote Apps with PowerShell – Fig.5

LOB Application

#Add WVD Remote Apps - LOB App to WVD Host Pool
New-RdsRemoteApp -TenantName $tenant -HostPoolName $hostpoolname -AppGroupName $NameofappGroup1 -Name "Session B" -AppAlias "sessionb"

Microsoft Word

#Add AVD Remote Apps - Microsoft Word App to WVD Host Pool 
New-RdsRemoteApp -TenantName $tenant -HostPoolName $hostpoolname -AppGroupName $NameofappGroup1 -Name "Word" -AppAlias "word"

Microsoft Access

#Add AVD Remote Apps - Microsoft Access to WVD Host Pool 
New-RdsRemoteApp -TenantName $tenant -HostPoolName $hostpoolname -AppGroupName $NameofappGroup1 -Name "Access" -AppAlias "Access"

Task Manager

#Add AVD Remote Apps - Task Sequence to WVD Host Pool 
New-RdsRemoteApp -TenantName $tenant -HostPoolName $hostpoolname -AppGroupName $NameofappGroup1 -Name "Task Manager" -AppAlias "taskmanager"
Learn How to Publish AVD Remote Apps with PowerShell - Fig.6
Learn How to Publish AVD Remote Apps with PowerShell – Fig.6

Resource Monitor

#Add WVD Remote Apps - Resource Monitor to WVD Host Pool
New-RdsRemoteApp -TenantName $tenant -HostPoolName $hostpoolname -AppGroupName $NameofappGroup1 -Name "Resource Monitor" -AppAlias "resourcemonitor"

Windows Media Player

#Add Windows Media Player to RDS Host Pool 
New-RdsRemoteApp -TenantName $tenant -HostPoolName $hostpoolname -AppGroupName $NameofappGroup1 -Name "Windows Media Player" -AppAlias "windowsmediaplayer"

Microsoft PowerPoint

 #Add Power Point to RDS Host Pool  
New-RdsRemoteApp -TenantName $tenant -HostPoolName $hostpoolname -AppGroupName $NameofappGroup1 -Name "Power Point" -AppAlias "powerpoint"

Add User to RDS Host Pool

With this command, you add or publish the remote apps to a user.

#Add users to a RDS Remote App Group
Add-RdsAppGroupUser -TenantName  $tenant -HostPoolName $hostpoolname -AppGroupName $NameofappGroup2 -UserPrincipalName $UserPrincipalName
Learn How to Publish AVD Remote Apps with PowerShell - Fig.7
Learn How to Publish AVD Remote Apps with PowerShell – Fig.7

Result

The following are the WVD Remote Apps published to the user profile.

Learn How to Publish AVD Remote Apps with PowerShell - Fig.8
Learn How to Publish AVD Remote Apps with PowerShell – Fig.8

Resources

We are on WhatsApp. To get the latest step-by-step guides and news updates, Join our Channel. Click here –HTMD WhatsApp.

Author

Anoop C Nair is Microsoft MVP! He is a Device Management Admin with more than 20 years of experience (calculation done in 2021) in IT. He is a Blogger, Speaker, and Local User Group HTMD Community leader. His main focus is on Device Management technologies like SCCM 2012, Current Branch, and Intune. He writes about ConfigMgr, Windows 11, Windows 10, Azure AD, Microsoft Intune, Windows 365, AVD, etc.

Written by

Anoop C Nair is Workplace Technology solution architect with 25+ years of experience in global enterprise organizations such as JP Morgan, Capgemini, etc. Microsoft Certified Trainer. Microsoft MVP from 2015 onwards for consecutive 11+ years! He also conducts Intune and modern workplace tech training for enterprise organizations. He is Blogger, Speaker, and Founder of HTMD Community and HTMD Conference. His main focus is on Device Management technologies like Intune, Windows, Cloud PC. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security.

Discussion · 5 comments

Join the discussion

Your email address will not be published. Required fields are marked *

Related guides

AVD

Windows 365 Frontline is Now Windows 365 Flex with No Change to Features or Licensing

Key Takeaways Windows 365 Frontline is Now Windows 365 Flex with No Change to Features or Licensing! Hey, let’s discuss about Windows 365 and Azure Virtual Desktop Expanding Access to Cloud Windows for Every Workstyle. The way people work is evolving, and so are cloud-delivered Windows solutions. From small businesses to enterprises and shift workers, […]

AC Anoop C Nair 4 min read
AVD

How RDP Multipath Improves Azure Virtual Desktop Connectivity Using Dynamic UDP Path Selection

Key Takeaways How RDP Multipath Improves Azure Virtual Desktop Connectivity Using Dynamic UDP Path Selection! RDP Multipath creates multiple connection paths between your device and the remote desktop instead of relying on just one. It continuously checks which path is performing best and automatically switches if one becomes slow or drops. This ensures a smoother […]

AC Anoop C Nair 4 min read
AVD

Resilient Connectivity Architecture with Multiple Service Instances in Azure

Key Takeaways Resilient Connectivity Architecture with Multiple Service Instances in Azure! This architecture helps IT administrators by providing a more reliable and scalable connectivity platform for cloud services. Because multiple service instances run independently within each region, the platform can continue operating even if one component fails. This reduces service disruptions and ensures that users […]

AC Anoop C Nair 3 min read