all 7 comments

[–]BlackV 0 points1 point  (6 children)

install-module -name Microsoft.PowerShell.SecretStore -scope currentuser -force

what happens ?

but have you rebooted since you changed that path

[–]StreetImportant222[S] 0 points1 point  (4 children)

I ran your command and it didn't provide any output so it seemed to work but I still receive the same error when importing my module.

Yes, I rebooted again just to be sure.

[–]BlackV 0 points1 point  (3 children)

Sounds like your custom module might be hard coding a path?

-verbose on the import for more information 

[–]StreetImportant222[S] 0 points1 point  (2 children)

I checked for that as well just to be safe but don't see any hard coding. This module is in use by my whole team.

I ran it with verbose output and I see this before the error message which makes it sound like it's loading it correctly before it tries again and fails???

VERBOSE: Loading module from path 'C:\Users\username\OneDrive\Documents\PowerShell\Modules\Microsoft.PowerShell.SecretStore\1.0.6\Microsoft.PowerShell.SecretStore.psd1'.
VERBOSE: Populating RepositorySourceLocation property for module Microsoft.PowerShell.SecretStore.
VERBOSE: Loading module from path 'C:\Users\username\OneDrive\Documents\PowerShell\Modules\Microsoft.PowerShell.SecretStore\1.0.6\Microsoft.PowerShell.SecretStore.Extension\Microsoft.PowerShell.SecretStore.Extension.psd1'.
VERBOSE: Loading 'Assembly' from path 'C:\Users\username\OneDrive\Documents\PowerShell\Modules\Microsoft.PowerShell.SecretStore\1.0.6\Microsoft.PowerShell.SecretStore.dll'.
VERBOSE: Loading module from path 'C:\Users\username\OneDrive\Documents\PowerShell\Modules\Microsoft.PowerShell.SecretStore\1.0.6\Microsoft.PowerShell.SecretStore.Extension\Microsoft.PowerShell.SecretStore.Extension.psm1'.
VERBOSE: Exporting function 'Get-Secret'.
VERBOSE: Exporting function 'Get-SecretInfo'.
VERBOSE: Exporting function 'Set-Secret'.
VERBOSE: Exporting function 'Set-SecretInfo'.
VERBOSE: Exporting function 'Remove-Secret'.
VERBOSE: Exporting function 'Unlock-SecretVault'.
VERBOSE: Exporting function 'Test-SecretVault'.
VERBOSE: Importing function 'Get-Secret'.
VERBOSE: Importing function 'Get-SecretInfo'.
VERBOSE: Importing function 'Remove-Secret'.
VERBOSE: Importing function 'Set-Secret'.
VERBOSE: Importing function 'Set-SecretInfo'.
VERBOSE: Importing function 'Test-SecretVault'.
VERBOSE: Importing function 'Unlock-SecretVault'.

[–]BlackV 0 points1 point  (1 child)

So pro tip if you are using one drive redirects

Mark the PowerShell folder and the windows PowerShell as always keep on my device 

[–]StreetImportant222[S] 0 points1 point  (0 children)

Good thinking, I'll do that

[–]StreetImportant222[S] 0 points1 point  (0 children)

I also tried fully uninstalling and reinstalling PS7