*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***
Product: PowerShell Studio 2020 (64 Bit)
Build: v5.7.173
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.18362.0
*** Please add details and screenshots as needed below. ***
'Get-Package' is not working properly when run from a Form application.
It IS working when running the selection from the console.
I also tested this by creating a new form and setting the load event to "Get-Command Get-Package" (The only code in the whole form), and it still throws.
Code: Select all
ERROR: Get-Command : The term 'Get-Package' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or
ERROR: if a path was included, verify that the path is correct and try again.
TestForm.psf (3, 2): ERROR: At Line: 3 char: 2
ERROR: + Get-Command Get-Package
ERROR: + ~~~~~~~~~~~~~~~~~~~~~~~
ERROR: + CategoryInfo : ObjectNotFound: (Get-Package:String) [Get-Command], CommandNotFoundException
ERROR: + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetCommandCommand
ERROR: