Analysis - Verify Script shows a missing standard cmdlet

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 1 year and 2 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.
User avatar
dhatlestad
Posts: 11
Last visit: Thu Mar 21, 2024 7:53 am

Analysis - Verify Script shows a missing standard cmdlet

Post by dhatlestad »

To help you better we need some information from you.

*** 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 2022 (64 Bit)
Build: v5.8.213
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.19044.0

*** Please add details and screenshots as needed below. ***

When I run the Verify Script tool from Home/Analysis, I get the error, "Missing Cmdlets: Get-FileHash" and I would like to confirm this will not affect my compiled EXE. Thank you.

*** Tools Output window contents ***
MainForm.psf: -----------------------------------------------
MainForm.psf: Verify Script - MainForm.psf
MainForm.psf: -----------------------------------------------
MainForm.psf: Profile: Local Machine
MainForm.psf: PowerShell V5 (64 Bit)
MainForm.psf:
MainForm.psf: -----------------------------------------------
MainForm.psf: Missing Cmdlets:
MainForm.psf: -----------------------------------------------
MainForm.psf:
MainForm.psf (1498): Get-FileHash
MainForm.psf:

DO NOT POST LICENSES, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
User avatar
brittneyr
Site Admin
Posts: 1654
Last visit: Wed Mar 27, 2024 1:54 pm
Answers: 39
Been upvoted: 30 times

Re: Analysis - Verify Script shows a missing standard cmdlet

Post by brittneyr »

Are you running PowerShell v5 or v7?

Is the cmdlet recognized in the editor when you hover over it?
Brittney
SAPIEN Technologies, Inc.
User avatar
dhatlestad
Posts: 11
Last visit: Thu Mar 21, 2024 7:53 am

Re: Analysis - Verify Script shows a missing standard cmdlet

Post by dhatlestad »

I am using Windows PowerShell 5.1. The editor does not highlight nor recognize Get-FileHash.
User avatar
brittneyr
Site Admin
Posts: 1654
Last visit: Wed Mar 27, 2024 1:54 pm
Answers: 39
Been upvoted: 30 times

Re: Analysis - Verify Script shows a missing standard cmdlet

Post by brittneyr »

This should not affect your executable.

This is an issue with the editor and cache which will be addressed in a future release of PowerShell Studio.
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: Analysis - Verify Script shows a missing standard cmdlet

Post by Alexander Riedel »

It seems that this is a Microsoft PowerShell bug. The cmdlet 'Get-FileHash' is not reported as an exported command.

Try this on your computer in a Windows PowerShell Console:
  1. $Module = Get-Module "Microsoft.PowerShell.Utility"
  2. $cmdlets = Get-Command -Module $Module.Name -CommandType All
  3. $cmdlets.contains('Get-FileHash')
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
dhatlestad
Posts: 11
Last visit: Thu Mar 21, 2024 7:53 am

Re: Analysis - Verify Script shows a missing standard cmdlet

Post by dhatlestad »

Confirmed this is as you described. Get-FileHash is not reported as a cmdlet but thankfully, it seems to be functional.

Thank you.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Analysis - Verify Script shows a missing standard cmdlet

Post by Alexander Riedel »

We have identified the issue here. It is an interaction between PowerShell 7 and its runtime and Windows PowerShell.
We will deploy a workaround in the the next service build.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 1 year and 2 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.