Vscode-powershell: Unapproved verbs warning in latest preview

Created on 10 Apr 2020  路  4Comments  路  Source: PowerShell/vscode-powershell

System Details


System Details Output

### VSCode version: 1.44.0 2aae1f26c72891c399f860409176fe435a154b13 x64

### VSCode extensions:
[email protected]
[email protected]       
[email protected]
[email protected]
[email protected]
[email protected]        
[email protected]
[email protected]    
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]


### PSES version: 2.1.0.0

### PowerShell version:

Name                           Value
----                           -----
PSVersion                      6.2.4
PSEdition                      Core
GitCommitId                    6.2.4
OS                             Microsoft Windows 10.0.19041 
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Issue Description

I see this after update, maybe you renamed something or do not provide the suppress warning switch on load anymore?

WARNING: The names of some imported commands from the module 'PowerShellEditorServices' include unapproved verbs that might make
them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb.

Expected Behaviour

No warnings are output into my console.

Actual Behaviour

A warning is shown.

Attached Logs

Follow the instructions in the troubleshooting docs
about capturing and sending logs.

Resolution-Fixed

All 4 comments

That's from https://github.com/PowerShell/PowerShellEditorServices/pull/1255. Ideally we can either import the module with -DisableNameChecking or hide the command in some other way.

@TylerLeonhardt FYI if you wanted to go with my suggestion from the PR, you could skip all the ALC problems by just resolving the cmdlet type with Type.GetType("CmdletName, HostAssembly"). I think you're already doing similar with PSConsoleReadLine, and it works for non-public types as well.

Ugh

fix out for this

Was this page helpful?
0 / 5 - 0 ratings