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
Hello - when using SecretManagement/ExtensionModules/CredManStore, it doesn't work in a PowerShell remote session. Should it or is there a way to get it to work in a remote session? If it is not expected to work in a remote session could this be documented? In fact - I would be willing to submit a PR if someone can walk me through it.
Expected behavior
# On a server:PS> Set-Secret -Vault CredMan -Name 'mytestcred1' -Secret (Get-Credential)
# Note: Stores in Windows Credential Manager as "ps:<name>" - worth documenting somewhere?
# Note: CredMan doesn't support metadata - worth documenting somewhere?PS> Get-Secret -Name mytestcred1 -Vault CredManUserName Password-------- --------test1 System.Security.SecureString
# Expecting same behavior in a PowerShell remote session
Actual behavior
# Open a PowerShell remote session into the server:PS> Enter-PSSession -Computer Server01 -Credential $credRPS> Get-Secret -Vault CredMan -Name mytestcred1Get-Secret : Error while retrieving secret from vault CredMan : ERROR_NO_SUCH_LOGON_SESSION + CategoryInfo : InvalidOperation: (Microsoft.Power...etSecretCommand:GetSecretCommand) [Get-Secret], PSInvalidOperationException + FullyQualifiedErrorId : CredManVaultGetError,Microsoft.PowerShell.SecretManagement.GetSecretCommandGet-Secret : The secret mytestcred1 was not found. + CategoryInfo : ObjectNotFound: (Microsoft.Power...etSecretCommand:GetSecretCommand) [Get-Secret], ItemNotFoundException + FullyQualifiedErrorId : GetSecretNotFound,Microsoft.PowerShell.SecretManagement.GetSecretCommand
# Also:RPS> Set-Secret -Vault CredMan -Name 'mytestcred2' -Secret (Get-Credential)Windows PowerShell Credential Request: cmdlet Get-Credential at command pipeline position 1Warning: A script or application on the remote computer IT-SCRIPT-PROD1.DWSD.ORG is requesting your credentials. Enter your credentials only if you trust the remote computer and the application or script that is requesting them.Supply values for the following parameters:Credentialset-secret : Error while writing secret to vault CredMan : ERROR_NO_SUCH_LOGON_SESSIONAt line:1 char:1+ set-secret -vault credman -name mytestcred2 -secret (get-credential)+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Microsoft.Power...etSecretCommand:SetSecretCommand) [Set-Secret], PSInvalidOperationException + FullyQualifiedErrorId : CredManVaultWriteError,Microsoft.PowerShell.SecretManagement.SetSecretCommand
Error details
# Please see actual behavior section - let me know if more details needed/desired
Environment data
# Server 2016 used:
PS>$PSVersionTable
Name Value
---------
PSVersion 5.1.14393.5127
PSEdition Desktop
PSCompatibleVersions {1.0,2.0,3.0,4.0...}
BuildVersion 10.0.14393.5127
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Version
CredManStore 1.0.0
Visuals
No response
The text was updated successfully, but these errors were encountered:
Prerequisites
Steps to reproduce
Hello - when using SecretManagement/ExtensionModules/CredManStore, it doesn't work in a PowerShell remote session. Should it or is there a way to get it to work in a remote session? If it is not expected to work in a remote session could this be documented? In fact - I would be willing to submit a PR if someone can walk me through it.
Expected behavior
Actual behavior
Error details
# Please see actual behavior section - let me know if more details needed/desired
Environment data
Version
CredManStore 1.0.0
Visuals
No response
The text was updated successfully, but these errors were encountered: