Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Add a way to specify a value for $PSNativeCommandArgumentPassing

Aperta
#210 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
powershell
Ambito
cli

Direzione di ricerca

Start by locating the cmdlet-function generation code and its generated function begin block. Add the proposed property so generated functions can assign $PSNativeCommandArgumentPassing before invoking the native command, then verify the setting supports the Windows and Legacy values described in issue 210.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Issue-Enhancement
Summary of the new feature / enhancement

Take for example the Windows native command vaultcmd.exe. That command has parameters that take values that require quotes. When $PSNativeCommandArgumentPassing = 'Windows' (which is the default) the command fails. When set to Legacy it works.

Example

vaultcmd /listcreds:"windows credentials"

Output

Credentials in vault: windows credentials

Credential schema: Windows Domain Password Credential
Resource: Domain:target=mydomain
Identity: COMPUTER\admin
Hidden: No
Roaming: No
Property (schema element id,value): (100,3)
Property (schema element id,value): (101,SspiPfc)

Credential schema: Windows Domain Password Credential
Resource: Domain:target=myotherpc
Identity: [email protected]
Hidden: No
Roaming: No
Property (schema element id,value): (100,3)
Property (schema element id,value): (101,SspiPfc)
$cmd = 'vaultcmd'
$arg = '/listcreds:"windows credentials"'
& $cmd $arg

Output

Invalid vault: Element not found.

When you switch to Legacy mode, the command invocation works.

$PSNativeCommandArgumentPassing = 'Legacy'
& $cmd $arg

Output

Credentials in vault: windows credentials

Credential schema: Windows Domain Password Credential
Resource: Domain:target=mydomain
Identity: COMPUTER\admin
Hidden: No
Roaming: No
Property (schema element id,value): (100,3)
Property (schema element id,value): (101,SspiPfc)

Credential schema: Windows Domain Password Credential
Resource: Domain:target=myotherpc
Identity: [email protected]
Hidden: No
Roaming: No
Property (schema element id,value): (100,3)
Property (schema element id,value): (101,SspiPfc)
Proposed technical implementation details (optional)

Add a property that allows you to set the value of $PSNativeCommandArgumentPassing.

Add the assignment to the begin block of the cmdlet function generated.

Lingua principale
PowerShell
Stelle
437
Fork
49
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PowerShell/Crescendo

Tutte le issue di PowerShell/Crescendo

Issue simili

Altre issue su CLI

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.