Menu
InformatiWeb Pro
  • Index
  • System admin
  • Virtualization

Login

Registration Password lost ?
FR
  • Windows Server
    • WMS 2012
    • WS2012 R2
    • WS2016
  • Citrix
    • Citrix NetScaler Gateway
    • Citrix XenApp / XenDesktop
    • Citrix XenServer
  • VMware
    • VMware ESXi
    • VMware vSphere
    • VMware Workstation
  • Microsoft
    • Hyper-V
  • RAID
    • Adaptec SmartRAID
  • UPS
    • APC Back-UPS Pro
  • InformatiWeb Pro
  • System admin
  • Windows Server
  • Courses
  • Learn how to deploy RDS on WS 2012 and 2012 R2
  • Publish RemoteApp Programs (in command line)
6 / 27
  • Publish RemoteApp Programs (via GUI)
  • Change the properties of RemoteApps
  • Windows Server
  • 25 January 2019 at 09:32 UTC
  • InformatiWeb

Publish RemoteApp programs (from the command line - CLI) from your RDS infrastructure on Windows Server 2012 / 2012 R2 / 2016

Previously, we explained how to publish RemoteApp programs on your RDS infrastructure through the server manager.
Nevertheless, for those who would like to automate the installation of RemoteApp programs and their publications, here is how to do it via the command line (cmd + powershell).

  1. Install RemoteApp programs from the command line
  2. Publishing RemoteApp programs through PowerShell

1. Install RemoteApp programs from the command line

To install RemoteApp programs on a session host server, you must first switch your server to "installation" mode.

Indeed, by default, the server is in "Execute" mode.
To check it, just use this command :

Batch

change user /query

Plain Text

User session is ready to execute applications.

Then, to switch your server to "Install" mode, type this command :

Batch

change user /install

Plain Text

User session is ready to install applications.

Now, you can install whatever you want from this command prompt or through the GUI.

Once you're done, you'll be able to switch your server back to Execute mode.

Batch

change user /execute

Plain Text

User session is ready to execute applications.

2. Publishing RemoteApp programs through PowerShell

Finally, to publish your RemoteApp programs, create the necessary collection (s) through the GUI, and open a PowerShell command prompt.
In this PowerShell prompt, first import the "RemoteDesktop" module.

PowerShell

Import-Module RemoteDesktop

Then, rely on this powershell command to publish them :

PowerShell

New-RDRemoteApp -Alias [the program name without space] -DisplayName "[display name]" -FilePath "[full path of the file to launch]" -ShowInWebAccess 1 -CollectionName [collection name] -ConnectionBroker [broker server FQDN]

Which gives in our case :

PowerShell

New-RDRemoteApp -Alias EXCEL -DisplayName "Excel 2013" -FilePath "C:\Program Files\Microsoft Office\Office15\EXCEL.exe" -ShowInWebAccess 1 -CollectionName Office -ConnectionBroker rds.informatiweb.lan

When you run this command, the "Publish RemoteApp program" message will appear temporarily in the PowerShell console.

Then, this :

Plain Text

CollectionName Alias          DisplayName              FilePath                         ShowIn CommandLin RequiredC Use
                                                                                        WebAcc eSetting   ommandLin rGr
                                                                                        ess               e         oup
                                                                                                                    s
-------------- -----          -----------              --------                         ------ ---------- --------- ---
Office         EXCEL          Excel 2013               C:\Program Files\Microsoft Of... True   DoNotAllow

Once the program(s) are published, you will find them in the collection in which you published them.

And you can also change their properties later, if you wish.

Share this tutorial

Partager
Tweet

To see also

  • WS 2012 / 2012 R2 - RDS - Set up HA on your RDS infrastructure

    Windows Server 6/7/2019

    WS 2012 / 2012 R2 - RDS - Set up HA on your RDS infrastructure

  • WS 2012 / 2012 R2 / 2016 - RDS - Access RemoteApp via a modern application

    Windows Server 3/8/2019

    WS 2012 / 2012 R2 / 2016 - RDS - Access RemoteApp via a modern application

  • WS 2012 / 2012 R2 / 2016 - RDS - Attempt to unblock the session as a user

    Windows Server 4/28/2019

    WS 2012 / 2012 R2 / 2016 - RDS - Attempt to unblock the session as a user

  • WS 2012 / 2012 R2 / 2016 - RDS - Change the properties of RemoteApps

    Windows Server 3/16/2019

    WS 2012 / 2012 R2 / 2016 - RDS - Change the properties of RemoteApps

Comments

You must be logged in to post a comment

Share your opinion

Pinned content

  • Software (System admin)
  • Linux softwares
  • Our programs
  • Terms and conditions
  • Share your opinion

Contact

  • Guest book
  • Technical support
  • Contact

® InformatiWeb-Pro.net - InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.

Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.