Show-Command does not work in Sapien Powershell Studio 2021

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
israelrr89
Posts: 2
Last visit: Thu Nov 25, 2021 9:26 pm

Show-Command does not work in Sapien Powershell Studio 2021

Post by israelrr89 »

Event:
$buttonSearch_Click={
#SearchGrid
Show-Command get-acl
}

error:--------------------------------------------

>> Running (test.psf) Script...
>> Platform: V5 64Bit (STA) (Forced)
ERROR: Show-Command : Object reference not set to an instance of an object.
test.psf (269, 2): ERROR: At Line: 269 char: 2
ERROR: + Show-Command get-acl
ERROR: + ~~~~~~~~~~~~~~~~~~~~
ERROR: + CategoryInfo : InvalidOperation: (get-acl:String) [Show-Command], NullReferenceException
ERROR: + FullyQualifiedErrorId : CannotProcessRecordForOneCommand,Microsoft.PowerShell.Commands.ShowCommandCommand
ERROR:

User avatar
brittneyr
Site Admin
Posts: 917
Last visit: Tue Nov 30, 2021 7:16 am
Answers: 21
Been upvoted: 17 times

Re: Show-Command does not work in Sapien Powershell Studio 2021

Post by brittneyr »

[Topic moved by moderator to PowerShell Studio forum]
Brittney Ryn
SAPIEN Technologies, Inc.

User avatar
brittneyr
Site Admin
Posts: 917
Last visit: Tue Nov 30, 2021 7:16 am
Answers: 21
Been upvoted: 17 times

Re: Show-Command does not work in Sapien Powershell Studio 2021

Post by brittneyr »

We are looking into this and will get back to you soon.
Brittney Ryn
SAPIEN Technologies, Inc.

User avatar
Alexander Riedel
Posts: 7806
Last visit: Sun Nov 28, 2021 12:34 pm
Answers: 6
Been upvoted: 12 times

Re: Show-Command does not work in Sapien Powershell Studio 2021

Post by Alexander Riedel »

The Show-Command is a learning tool cmdlet specifically designed for typing in a console. It was not designed for use in a GUI environment.
Since GUI processes normally do not have a console, this is not compatible.
Alexander Riedel
SAPIEN Technologies, Inc.

israelrr89
Posts: 2
Last visit: Thu Nov 25, 2021 9:26 pm

Re: Show-Command does not work in Sapien Powershell Studio 2021

Post by israelrr89 »

I noticed that Sapien Engines are not compatible, but this command is a Windows PowerShell cmdlet. Can you find a solution? I created an executable using the Script Engine/Windows Powershell/Microsoft Windows Powershell(Command line), but it will not work with any of the Sapien Script Engines. Can you make an Engine compatible with this? The problem with the Windows Engine is that it will open a command line in the background, and it will create a file with all the scripts.

User avatar
Alexander Riedel
Posts: 7806
Last visit: Sun Nov 28, 2021 12:34 pm
Answers: 6
Been upvoted: 12 times

Re: Show-Command does not work in Sapien Powershell Studio 2021

Post by Alexander Riedel »

You want a Microsoft cmdlet designed to require a console to work without having a console. You see how that does not go together?
Why don't we take a step back and you elaborate as to what you try to accomplish?
Alexander Riedel
SAPIEN Technologies, Inc.