interactive
interactive copied to clipboard
missing SecretStore module install location causes error when accessing secrets
The file C:\Users\USERNAME\AppData\Local\Microsoft\PowerShell\secretmanagement\secretvaultregistry\vaultinfo contains the full path to the SecretStore module. In the case of .NET Interactive, the module is located inside the NuGet package. Here's an example of the contents of vaultinfo:
{
"Vaults": {
"DotnetInteractive": {
"Description": "",
"ModuleName": "Microsoft.PowerShell.SecretStore",
"ModulePath": "C:\\Users\\USERNAME\\.nuget\\packages\\microsoft.dotnet-interactive\\1.0.617403\\tools\\net9.0\\any\\Modules\\Microsoft.PowerShell.SecretStore",
"SetSecretSupportsMetadata": true,
"VaultParameters": {}
}
},
"DefaultVaultName": "DotnetInteractive"
}
If the indicated path doesn't exist on disk, storage and retrieval can fail, sometimes silently and sometimes with an error such as The specified module 'C:\Users\USERNAME\.nuget\packages\microsoft.dotnet-interactive\1.0.617403\tools\net9.0\any\Modules\Microsoft.PowerShell.SecretStore' was not loaded because no valid module file was found in any module directory.