Comments (9)
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.92. Please mark this comment with 👍 or 👎 to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
from secretmanagement.
Be sure and uninstall (or just manually remove) any older version of SecretManagement module. SecretStore is compatible only with SecretManagement version 0.5.2-preview3. Get-Module should show only the latest version installed:
Get-Module microsoft.powershell.secretmanagement -list
Directory: C:\Users\user\Documents\PowerShell\Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Binary 0.5.2 preview3 Microsoft.PowerShell.SecretManagem… Core {Register-SecretVault, Unregister-Secre…
from secretmanagement.
@PaulHigin I had uninstalled all previous modules using -AllVersions . But didn't mention this was/is on a Mac. Sorry.
Same command actually works on Windows. So the SecretStore has no '-DefaultVault' on a Mac not even the new .Net Microsoft.PowerShell.SecretStore one? I thought this was now supposed to be cross platform and support this new Vault on all?
from secretmanagement.
Actually I haven't tested this on a Mac yet. I have tested it on Ubuntu 18.04 and all behaviors and tests run as expected.
I'll test on Mac today, but I would be very surprised if it didn't work there. But will let you know.
from secretmanagement.
I have tested this on a Mac and have not been able to repro this issue. I can only think that you may still have an older version of SecretManagement installed. The Mac I tested on didn't have any previous versions and this worked:
Install-Module Microsoft.PowerShell.SecretManagement -AllowPrerelease -Repository PSGallery
Install-Module Microsoft.PowerShell.SecretStore -AllowPrerelease -Repository PSGallery
Register-SecretVault -Name SecretStore -ModuleName Microsoft.PowerShell.SecretStore -DefaultVault
from secretmanagement.
Closing this as answered.
from secretmanagement.
@PaulHigin ok, I retested as well, and even though I had used uninstall-module for both the Store and Management there were still files left over. See my log below ( or is this expected? are those dlls supposed to be leftover on the Mac after an uninstall-module ? ) (they had been installed using -Scope AllUsers - if that makes any diff? )
PS /Users/user> Uninstall-Module Microsoft.Powershell.SecretStore -AllVersions
PS /Users/user> Uninstall-Module Microsoft.Powershell.SecretManagement -AllVersions
PS /Users/user> Get-Module Microsoft.PowerShell.*
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Binary 0.5.2 preview3 Microsoft.PowerShell.SecretManagem… {Get-Secret, Get-SecretInfo, Get-SecretVault, Register-SecretVault…}
Binary 0.5.1 preview1 Microsoft.PowerShell.SecretStore {Get-SecretStoreConfiguration, Reset-SecretStore, Set-SecretStoreConfiguration, Unlock-SecretStore…}
PS /Users/user> Remove-Module Microsoft.PowerShell.SecretManagement -
Force Confirm Debug WarningAction ErrorVariable InformationVariable OutBuffer
WhatIf Verbose ErrorAction InformationAction WarningVariable OutVariable PipelineVariable
PS /Users/user> Remove-Module Microsoft.PowerShell.SecretManagement -Force -Verbose
VERBOSE: Performing the operation "Remove-Module" on target "Microsoft.PowerShell.SecretManagement (Path: '/Users/user/.local/share/powershell/Modules/Microsoft.PowerShell.SecretManagement/0.5.2/Microsoft.PowerShell.SecretManagement.dll')".
PS /Users/user> Remove-Module Microsoft.PowerShell.SecretStore -Force -Verbose
VERBOSE: Performing the operation "Remove-Module" on target "Microsoft.PowerShell.SecretStore.Extension (Path: '/Users/user/.local/share/powershell/Modules/Microsoft.PowerShell.SecretStore/0.5.1/Microsoft.PowerShell.SecretStore.Extension/Microsoft.PowerShell.SecretStore.Extension.psm1')".
VERBOSE: Performing the operation "Remove-Module" on target "Microsoft.PowerShell.SecretStore (Path: '/Users/user/.local/share/powershell/Modules/Microsoft.PowerShell.SecretStore/0.5.1/Microsoft.PowerShell.SecretStore.dll')".
PS /Users/user> Get-Module Microsoft.PowerShell.*
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Now that I used remove-module for Store and Management after having uninstalled those two first I am now re-installing it and it accepts the -DefaultValue
parameter.
from secretmanagement.
@PaulHigin , sorry to come back on this again. I have now redone it and this time I removed all traces again of both modules and then installed it with '-Scope AllUsers'
( like I had done at the very beginning ) and if I install it for all users then it actually tells me that the parameter '-DefaultValue'
does not exist.
Thinking about it, this might even be expected?
from secretmanagement.
I'm sorry you are having so much trouble with this. We know that PowerShellGet (V2 and V3) has trouble with prerelease modules with dependencies. I hope it gets addressed soon. I am guessing it is installing the wrong version.
Try removing the modules again and installing only using the command lines I show above. When I was experimenting before, I ran into different PowerShellGet install issues, but after I found the above command lines worked I didn't look into it any deeper.
If you need to move the module location (for AllUsers access), you can do that manually by simply copying the directories.
Not an ideal situation I agree, but should get you going.
from secretmanagement.
Related Issues (20)
- Test-SecretVault cmdlet failing with "Assembly with same name is already loaded" HOT 2
- Documentation is just the stock help template. HOT 1
- Verbose output for Get-Secret is incorrect
- Get-Secret is Overzealous in SecureString Generation When Returning Hashtables. HOT 8
- CredManStore does not appear to work in a PowerShell remote session
- Provide Password/Passphrase Generator
- Inconsistent behaviour of -Verbose when encountering Throw HOT 1
- While developing an extension: Prevent session restart for reloading the module HOT 2
- AdditionalParameters is providing a CaseSensitive HashTable HOT 1
- Random unexpected secrets appear in vault HOT 1
- Get-SecretInfo : Exception calling "GetInstance" with "0" argument(s): "Padding is invalid and cannot be removed."
- Publish the library as netstandard20
- Secret object type for deeper integration HOT 2
- Binary extension module not returning objects?
- Add ArgumentCompleters
- Creating a Secret HOT 1
- Make secret vaults not require use of PowerShell HOT 1
- Get-SecretInfo: The specified module '...\Microsoft.PowerShell.SecretStore' was not loaded because no valid module file was found in any module directory. HOT 4
- Set/Add/New secret should be separate cmdlets HOT 1
- Set-Secret asks for password to unlock vault that has already been unlocked with Unlock-SecretStore
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from secretmanagement.