Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Remote Powershell connect
#1
Hi,
how can i build an external application to connect to a remote Windows Server via powershell?

with the powershell command:

Enter-PSSession -computername servername -credential domain\user  you can connect to a remote server

In external Application I try :
Dateiname: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
Arbeitsverzeichnis:

Argumente: Enter-PSSession -Computername %computername% -credential domain\user

and no option

When i Connect to a server i can type my Credentials but then the Powershell windows Closed

Thank you for your help
Reply
#2
That's nothing that is related to ASG-RD
Regards/Gruss
Oliver
Reply
#3
Sad 
(11-05-2017, 11:23 AM)DevOma Wrote: That's nothing that is related to ASG-RD

Ok.... but that is not really helpful. Thank you for nothing!


So it is not possible to build an external application to connect remotly to a windows server with powershell?

Sad That is poor!

We use ASG-RD serveral years and now more and more Windowsserver run without a gui so the main admin tool goes to powershell. But a naked Powershell is not so comfortable like ASG-RD.

Have you another idea to connect remotly via powershell ?

How do other users here connect to their Servers without a gui?

With best regards Bjoern Schmidt
Reply
#4
I never tried to connect a RDP session via Powershell and so I don't know :-) But if you google for "Powershell connect RDP session" you find a lot of results that may help you.
Regards/Gruss
Oliver
Reply
#5
(11-05-2017, 12:34 PM)DevOma Wrote: I never tried to connect a RDP session via Powershell and so I don't know :-) But if you google for "Powershell connect RDP session" you find a lot of results that may help you.

Hi,
that is not the point. I dont want to connect via rd protocol. I want to connect with powershell like you connect a ssl connection via putty. And this connection should be clickable over ASG-RD. Please look at my screenshots.

powershell1.png  I start my powershell and connect to a server called bremen with domain\user
powershell2.png now i am connected on a remote powershell on server bremen (i can now act as if i am on the server )
powershell3.png  with exit i can disconnect the powershell session to bremen
externalapp.png this is what i tried to do

when i now start the external application the powershell windows comes up and i can sign in but after the sign in the powershell windod closed immediately


Thank you for your help

if you like we can switch to German


Attached Files
.png   powershell1.png (Size: 32.56 KB / Downloads: 5)
.png   powershell2.png (Size: 10.49 KB / Downloads: 5)
.png   powershell3.png (Size: 18.77 KB / Downloads: 5)
.png   externalapp.png (Size: 35.99 KB / Downloads: 8)
Reply
#6
Ok I understand now :-)

Arguments: -noexit "enter-pssession -computername %computername%"

Try that - it's working for me :-) You can also integrate as Tab.
Regards/Gruss
Oliver
Reply
#7
(12-05-2017, 09:45 AM)DevOma Wrote: Ok I understand now :-)

Arguments: -noexit "enter-pssession -computername %computername%"

Try that - it's working for me :-) You can also integrate as Tab.

Perfekt! Big Grin
and the Argument for TAB integration is ?

Thank you
Reply
#8
That's an option in Ext. App. properties
Regards/Gruss
Oliver
Reply
#9
This is a nice addon.. Would be great to have a separate forum for Addon Ideas.
Reply
#10
Sorry , I did not get how to add this as a tab. also is it possible to provide the name of the server as a parameter value ?
Reply
#11
I saw taht teh options all three need to be set . I increzsed the timeout to 3600 seocnds so that i will ahve one hour the tab will be open .

option 1 : wait for exit
option 2 : try to integrate
Option 3 : Stat as a shell process.
Check all these 3 options .
Reply




Users browsing this thread: 1 Guest(s)