DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Powershell problems  (Read 10,249 times)

soulwanderer

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 9
Powershell problems
« on: September 08, 2021, 12:15 PM »
Hello everybody, I am having a weird problem.

I want to create a list of aliases to use ssh on powershell ( because security reasons, there are systems I need to use via local port tunneled via SSH). The problem is I have quite a few and thougth about ordering them in an alias.

As an example, let's think I wanna run this:
Code
powershell -noExit -Command "ssh"

If I run it (Windows + R, run) it works and shows the screen where ssh informs me that I need to enter some options.
If I open FARR, and type
Code
run powershell -noExit -Command "ssh"
I get a command not found error.... (this also happens on an alias, using shellexec)

Any ideas? I am quite lost with this behaviour....

soulwanderer

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 9
Re: Powershell problems
« Reply #1 on: September 08, 2021, 12:24 PM »
Sooooo yesterday I could not do it and today, five minutes after writing the post, I find a solution.....

I looked for powershell and run it from farr, and it worked, so I rigth clicked to create an alias and added the command afterwards.
It works like a charm!

I just type the solution in case someone finds this problem!

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,175
    • Coding Snacks
    • Participated in NANY Challenge Three Times
    • Plugin Coding Medal
Re: Powershell problems
« Reply #2 on: September 09, 2021, 02:56 PM »
If you have the new Windows Terminal you can also do
Code
C:\Users\<username>\AppData\Local\Microsoft\WindowsApps\wt.exe powershell ssh

soulwanderer

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 9
Re: Powershell problems
« Reply #3 on: September 10, 2021, 09:37 AM »
Thanks!

Original address: https://www.donationcoder.com/forum/index.php?topic=51741.0