OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Launch Powershell ps1 file from RDS RemoteApp

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

Guest
I have a ps1 file I am trying to run from an RDS remote app. I am not sure what the -FilePath parameter should be. New-RDRemoteApp -ConnectionBroker cb -CollectionName Applications -Alias Testing -DisplayName "Testing" -FilePath "C:\pw.ps1" -UserGroups "usergroup\username" -CommandLineSetting Require -RequiredCommandLine "argument1" -IconPath "c:\icon.ico"

I've tried -FilePath "C:\pw.ps1" -FilePath "C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell_ise.exe C:\pw.ps1"

I get the error "Couldn't open this program or file. Either there was a problem with Testing or the file you're trying to open couldn't be accessed. For assistance contact your system administrator".

I am the system administrator :)

I have the ps1 file on all the host servers in the same location and it runs from the host.

If anyone has done this, please let me know the secret.

Thanks.
<p>I have a ps1 file I am trying to run from an RDS remote app. I am not sure what the -FilePath parameter should be.
New-RDRemoteApp -ConnectionBroker cb <code>-CollectionName Applications</code>
-Alias Testing <code>-DisplayName "Testing"</code>
-FilePath "C:\pw.ps1" <code>-UserGroups "usergroup\username"</code>
-CommandLineSetting Require <code>-RequiredCommandLine "argument1"</code>
-IconPath "c:\icon.ico"</p>
<p>I've tried
-FilePath "C:\pw.ps1"
-FilePath "C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell_ise.exe C:\pw.ps1"</p>
<p>I get the error "Couldn't open this program or file. Either there was a problem with Testing or the file you're trying to open couldn't be accessed. For assistance contact your system administrator".</p>
<p>I am the system administrator :)</p>
<p>I have the ps1 file on all the host servers in the same location and it runs from the host.</p>
<p>If anyone has done this, please let me know the secret.</p>
<p>Thanks.</p>
Continue reading...
 

Latest posts

O
Replies
0
Views
1
OrangeRind
O
D
Replies
0
Views
2
Domantas Giedraitis
D
Top