-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Labels
Description
Installed both SecretManagement
and SecretStore
from an elevated prompt. Then registered two SecretStore
vaults, one under and Administrator scope via the elevated prompt, and one as a normal user scope. When attempting to Set-Secret
as the normal user, the exception is :
PS C:\Users\Me> Set-Secret -Name MySecret Secret "TestSecret"
Exception calling "GetInstance" with "0" argument(s): "The type initializer for
'Microsoft.PowerShell.SecretStore.SecureStoreFile' threw an exception."
At C:\Program Files\WindowsPowerShell\Modules\Microsoft.PowerShell.SecretStore\0.5.2\Microsoft.PowerShell.SecretStore.E
xtension\Microsoft.PowerShell.SecretStore.Extension.psm1:123 char:17
+ ... if ([Microsoft.PowerShell.SecretStore.LocalSecretStore]::GetI ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : TypeInitializationException
Exception calling "GetInstance" with "0" argument(s): "The type initializer for
'Microsoft.PowerShell.SecretStore.SecureStoreFile' threw an exception."
At C:\Program Files\WindowsPowerShell\Modules\Microsoft.PowerShell.SecretStore\0.5.2\Microsoft.PowerShell.SecretStore.E
xtension\Microsoft.PowerShell.SecretStore.Extension.psm1:123 char:17
+ ... if ([Microsoft.PowerShell.SecretStore.LocalSecretStore]::GetI ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : TypeInitializationException
Even running Get-SecretStoreConfiguration
under the normal user scope results in:
PS C:\Users\Me> Get-SecretStoreConfiguration
Get-SecretStoreConfiguration : The type initializer for 'Microsoft.PowerShell.SecretStore.SecureStoreFile' threw an
exception.
At line:1 char:1
+ Get-SecretStoreConfiguration
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-SecretStoreConfiguration], TypeInitializationException
+ FullyQualifiedErrorId : System.TypeInitializationException,Microsoft.PowerShell.SecretStore.GetSecretStoreConfig
uration