Learn How to Publish WVD Remote Apps with PowerShell

0
Publish WVD Remote Apps

I hope you already have a WVD infrastructure setup. You can have more details from Create WVD Tenant and WVD Infra. In this post, you will learn how to publish remote apps with PowerShell command lets (Publish WVD Remote Apps).

I would recommend reading the following posts before publishing the remote apps to host pool.

Prerequisite – Publish WVD Remote Apps

I would recommend going through the following list of prerequisites before publishing WVD remote apps.

  • Build a WVD Host Pool with virtual machine
  • Install Required application on that virtual machine

NOTE! – Windows Virtual Desktop (WVD) has the restriction that within a host pool, a user cannot be assigned to both a desktop app group and a RemoteApp app group.

Install Azure AD, RD PowerShell Module

##Install & Import AzureAD Module
Install-Module -Name AzureAD

Import-Module -Name AzureAD
##Install & Import RD - WVD 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 
Publish WVD Remote Apps - Login to WVD Tenant
Login – Publish WVD Remote Apps
Altaro Office 365 Backup
Advertisement Altaro Office 365 Backup

Set Variables – WVD Remote Apps

#Set the Variable
$hostpoolname ='WVD-A-MS-Apps'#$hostpoolname ='WVD-A-MS-Apps'
$UserPrincipalName='[email protected]'
$NameofappGroup1='LOB Apps'
$NameofappGroup2='officeApps'

List WVD Remote App Groups

#Get the details of WVD Remote App Groups
Get-RdsAppGroup -TenantName $tenant -HostPoolName $hostpoolname
List of Remote apps - Publish WVD Remote Apps
List of WVD RemoteApp Groups – Publish WVD Remote Apps

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 are login to RDS using SPN. Instead, you might need to have appropriate access to Azure AD to list the users in Azure AD Group.

List of WVD RemoteApps  - Publish WVD Remote Apps
List of WVD RemoteApps – Publish WVD Remote Apps

List of Apps Installed on WVD VM

#Get the details the List of WVD 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 New WVD Remote App Group

#Create New WVD Remote App Groups 
New-RdsAppGroup -TenantName $tenant -HostPoolName $hostpoolname -Name $NameofappGroup1 -ResourceType RemoteApp
Create New WVD RemoteApp Group -  Publish WVD Remote Apps
Create New WVD RemoteApp Group – Publish WVD Remote Apps

Publish WVD Remote Apps to RDS Host Pools

Following are the list of PowerShell commands I used to publish remote apps to RDS Host Pools.

Internet Explorer

#Add WVD 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 WVD 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
Publish Microsoft Edge -  Publish WVD Remote Apps
Publish Microsoft Edge – Publish WVD Remote Apps

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 WVD Remote Apps - Microsoft Word App to WVD Host Pool 
New-RdsRemoteApp -TenantName $tenant -HostPoolName $hostpoolname -AppGroupName $NameofappGroup1 -Name "Word" -AppAlias "word"

Microsoft Access

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

Task Manager

#Add WVD Remote Apps - Task Sequence to WVD Host Pool 
New-RdsRemoteApp -TenantName $tenant -HostPoolName $hostpoolname -AppGroupName $NameofappGroup1 -Name "Task Manager" -AppAlias "taskmanager"
Publish Task Manager as RemoteApp -  Publish WVD Remote Apps
Publish Task Manager as RemoteApp – Publish WVD Remote Apps

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 Power Point

 #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 are adding or publishing the remote apps to a user.

#Add users to a RDS Remote App Group
Add-RdsAppGroupUser -TenantName  $tenant -HostPoolName $hostpoolname -AppGroupName $NameofappGroup2 -UserPrincipalName $UserPrincipalName
Add Users to Remote App Group - Publish WVD Remote Apps
Add Users to Remote App Group – Publish WVD Remote Apps

Result

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

Learn How to Publish WVD Remote Apps with PowerShell 1

Resources

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.