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.
This topic is 2 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
israelrr89
Posts: 2
Last visit: Wed Oct 19, 2022 11:46 am

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: 1654
Last visit: Thu Mar 28, 2024 6:54 am
Answers: 39
Been upvoted: 30 times

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

Post by brittneyr »

[Topic moved by moderator to PowerShell Studio forum]
Brittney
SAPIEN Technologies, Inc.
User avatar
brittneyr
Site Admin
Posts: 1654
Last visit: Thu Mar 28, 2024 6:54 am
Answers: 39
Been upvoted: 30 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
SAPIEN Technologies, Inc.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 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: Wed Oct 19, 2022 11:46 am

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: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 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.
This topic is 2 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.