You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
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)
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 toLegacy
it works.Example
Output
Output
When you switch to
Legacy
mode, the command invocation works.Output
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.The text was updated successfully, but these errors were encountered: