Bug with new versions of Powershell

Discuss RoboTask here
Post Reply
DK.Ideagen
Posts: 19
Joined: Wed Mar 09, 2022 10:33 pm

Bug with new versions of Powershell

Post by DK.Ideagen »

If I run a powershell script and set the path to powershell to pwsh ie use powershell core the newest version I get an invocation error despite powershell core working perfectly everywhere else.

I have tried ms store, scoop and direct install types of Powershell version 7.2.6 all fail
Attachments
path to shell
path to shell
RoboTask_IZPsOw0Lh3.png (5.11 KiB) Viewed 128 times
Oleg
Site Admin
Posts: 2793
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Bug with new versions of Powershell

Post by Oleg »

"pwsh" is not a path...
You must specify the full path to installed powershell application
Like this:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Oleg Yershov
Oleg
Site Admin
Posts: 2793
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Bug with new versions of Powershell

Post by Oleg »

Also I think that you have incorrect installation of Powershell application
I tried to download new powershell from MS Store, it works (see screenshot)
pwsh.png
pwsh.png (23.86 KiB) Viewed 97 times
Oleg Yershov
DK.Ideagen
Posts: 19
Joined: Wed Mar 09, 2022 10:33 pm

Re: Bug with new versions of Powershell

Post by DK.Ideagen »

Discovered my problem I had a
cls
command at the top of my $profile
to clear the screen
this ran a function to get the mouse cursor which robotask failed on.
Oleg
Site Admin
Posts: 2793
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Bug with new versions of Powershell

Post by Oleg »

I think that cls command has no sense in Powershell script action, because this action has no UI at running...
Oleg Yershov
DK.Ideagen
Posts: 19
Joined: Wed Mar 09, 2022 10:33 pm

Re: Bug with new versions of Powershell

Post by DK.Ideagen »

You are correct, However the cls command was coming from my $profile script which runs on every powershell session like a .rc file on linux.
This includes RoboTask.

I have removed the offending line from my profile anyway. So problem worked around and debugged. :)
Post Reply