Can't install SecretManagement module

3 views
Skip to first unread message

Mike Leone

unread,
Jan 22, 2026, 12:39:11 PMJan 22
to NTPowershell Mailing List
So this is confusing. I'm trying to install the SecretManagement module, so I can more securely pass credentials in my scripts, rather than Import-CLIxml or Convert-SecureString.

So I start up PS v7 as administrator, and try to install the module. And it tells me I need to be an administrator ...

PS C:\Windows\System32> Install-Module -Name Microsoft.PowerShell.SecretManagement

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): y
Install-Package: Administrator rights are required to install or update. Log on to the computer with an account that has Administrator
rights, and then try again, or install by adding "-Scope CurrentUser" to your command. You can also try running the
Windows PowerShell session with elevated rights (Run as Administrator).

So I found this check, to see if I am admin, and it says yes ...

PS C:\Windows\System32>
PS C:\Windows\System32> [bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match "S-1-5-32-544")
True
PS C:\Windows\System32>

So at this point, I can't install that module, but I have no idea why, or where to start poking next.

Any ideas to to go next? In the meantime, I'll use the Import-CLIxml ...




--

Mike. Leone, <mailto:tur...@mike-leone.com>

PGP Fingerprint: 0AA8 DC47 CB63 AE3F C739 6BF9 9AB4 1EF6 5AA5 BCDF
Photo Gallery: <http://www.flickr.com/photos/mikeleonephotos>

Kurt Buff

unread,
Jan 22, 2026, 12:46:35 PMJan 22
to ntpowe...@googlegroups.com
Just one thought:

Have you tried trusting the repository?

Kurt

--
You received this message because you are subscribed to the Google Groups "ntpowershell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntpowershell...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ntpowershell/CAHBr%2B%2BhT_%2B69dRwmF5M_P7qq4Whw2taqhGYn%2BhX5O0NTm7ahGQ%40mail.gmail.com.

Mike Leone

unread,
Jan 22, 2026, 1:02:06 PMJan 22
to ntpowe...@googlegroups.com
On Thu, Jan 22, 2026 at 12:46 PM Kurt Buff <kurt...@gmail.com> wrote:
Just one thought:

Have you tried trusting the repository?

Still doesn't work.

PS C:\Windows\System32> Get-PSRepository

Name                      InstallationPolicy   SourceLocation
----                      ------------------   --------------
PSGallery                 Trusted              https://www.powershellgallery.com/api/v2
PHA Internal PSRepository Trusted              \\DC1FIL020\netadmin\PHA_PS_Internal_Repository

PS C:\Windows\System32> Install-Module Microsoft.PowerShell.SecretManagement

Install-Package: Administrator rights are required to install or update. Log on to the computer with an account that has Administrator
rights, and then try again, or install by adding "-Scope CurrentUser" to your command. You can also try running the
Windows PowerShell session with elevated rights (Run as Administrator).
PS C:\Windows\System32>

 

Michael B. Smith

unread,
Jan 22, 2026, 2:01:21 PMJan 22
to ntpowe...@googlegroups.com

Modules are tied to a particular user anyway. Does it work with ‘-Scope CurrentUser’?

Mike Leone

unread,
Jan 22, 2026, 2:35:04 PMJan 22
to ntpowe...@googlegroups.com
On Thu, Jan 22, 2026 at 2:01 PM Michael B. Smith <mic...@smithcons.com> wrote:

Modules are tied to a particular user anyway. Does it work with ‘-Scope CurrentUser’?


No, doesn't work with or without '-Scope CurrentUser". I only tried that option, because it was a suggestion. Ordinarily, I wouldn't specify a -Scope. I didn't even know you could specify a -Scope ...

 

Michael B. Smith

unread,
Jan 22, 2026, 3:58:32 PMJan 22
to ntpowe...@googlegroups.com
Do you get the same error with scope current user?

Have you tried -verbose and -debug?


From: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com> on behalf of Mike Leone <tur...@mike-leone.com>
Sent: Thursday, January 22, 2026 2:34:51 PM
To: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com>

Mike Leone

unread,
Jan 23, 2026, 9:41:33 AMJan 23
to ntpowe...@googlegroups.com
On Thu, Jan 22, 2026 at 3:58 PM Michael B. Smith <mic...@smithcons.com> wrote:
Do you get the same error with scope current user?

Yes.

PS C:\> Install-Module -Name Microsoft.PowerShell.SecretManagement -Scope CurrentUser

Install-Package: Administrator rights are required to install or update. Log on to the computer with an account that has Administrator rights, and then try again, or install by adding
"-Scope CurrentUser" to your command. You can also try running the Windows PowerShell session with elevated rights (Run as Administrator).
PS C:\>
 

Have you tried -verbose and -debug?

Fails both timers, same message, I don't see any other errors in the expanded output ... 

PS C:\> Install-Module -Name Microsoft.PowerShell.SecretManagement -Scope CurrentUser -Verbose
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: The -Repository parameter was not specified.  PowerShellGet will use all of the registered repositories.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2' and PackageManagementProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.PowerShell.SecretManagement'' for ''.
VERBOSE: Total package yield:'1' for the specified package 'Microsoft.PowerShell.SecretManagement'.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is '\\DC1FIL020\netadmin\PHA_PS_Internal_Repository' and PackageManagementProvider is 'NuGet'.
VERBOSE: Total package yield:'0' for the specified package 'Microsoft.PowerShell.SecretManagement'.
VERBOSE: Performing the operation "Install-Module" on target "Version '1.1.2' of module 'Microsoft.PowerShell.SecretManagement'".
VERBOSE: The installation scope is specified to be 'CurrentUser'.
VERBOSE: The specified module will be installed in '\\nt_san1\users\MJL-Priv\Documents\PowerShell\Modules'.
VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'.
VERBOSE: Downloading module 'Microsoft.PowerShell.SecretManagement' with version '1.1.2' from the repository 'https://www.powershellgallery.com/api/v2'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.PowerShell.SecretManagement'' for ''.
VERBOSE: InstallPackage' - name='Microsoft.PowerShell.SecretManagement', version='1.1.2',destination='C:\Users\MJL-Priv\AppData\Local\Temp\1257583342'
VERBOSE: DownloadPackage' - name='Microsoft.PowerShell.SecretManagement', version='1.1.2',destination='C:\Users\MJL-Priv\AppData\Local\Temp\1257583342\Microsoft.PowerShell.SecretManagement.1.1.2\Microsoft.PowerShell.SecretManagement.1.1.2.nupkg', uri='https://www.powershellgallery.com/api/v2/package/Microsoft.PowerShell.SecretManagement/1.1.2'
VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/Microsoft.PowerShell.SecretManagement/1.1.2'.
VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/Microsoft.PowerShell.SecretManagement/1.1.2'.
VERBOSE: Completed downloading 'Microsoft.PowerShell.SecretManagement'.
VERBOSE: InstallPackageLocal' - name='Microsoft.PowerShell.SecretManagement', version='1.1.2',destination='C:\Users\MJL-Priv\AppData\Local\Temp\1257583342'
VERBOSE: Validating the 'Microsoft.PowerShell.SecretManagement' module contents under 'C:\Users\MJL-Priv\AppData\Local\Temp\1257583342\Microsoft.PowerShell.SecretManagement.1.1.2' path.
VERBOSE: Test-ModuleManifest successfully validated the module manifest file 'C:\Users\MJL-Priv\AppData\Local\Temp\1257583342\Microsoft.PowerShell.SecretManagement.1.1.2'.
VERBOSE: Validating the authenticode signature and publisher of the catalog file or module manifest file of the module 'Microsoft.PowerShell.SecretManagement'.
VERBOSE: Catalog file 'Microsoft.PowerShell.SecretManagement.cat' is not found in the contents of the module 'Microsoft.PowerShell.SecretManagement' being installed.
VERBOSE: Valid authenticode signature found in the file 'Microsoft.PowerShell.SecretManagement.psd1' for the module 'Microsoft.PowerShell.SecretManagement'.
VERBOSE: Checking for possible command collisions for the module 'Microsoft.PowerShell.SecretManagement' commands.

Install-Package: Administrator rights are required to install or update. Log on to the computer with an account that has Administrator rights, and then try again, or install by adding
"-Scope CurrentUser" to your command. You can also try running the Windows PowerShell session with elevated rights (Run as Administrator).
P
 
-Debug

PS C:\> Install-Module -Name Microsoft.PowerShell.SecretManagement -Scope CurrentUser -Debug
DEBUG: 00:00:00.0000013 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.0000234 Name: Microsoft.PowerShell.SecretManagement
DEBUG: 00:00:00.0000350 Debug: True
DEBUG: 00:00:00.0029581 INVOKING PowerShell Fn Get-DynamicOptions with args Provider that has length 1
DEBUG: 00:00:00.0074652 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0249176 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.0415974 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.0416074 Name: Microsoft.PowerShell.SecretManagement
DEBUG: 00:00:00.0416122 Debug: True
DEBUG: 00:00:00.0442707 INVOKING PowerShell Fn Get-DynamicOptions with args Source that has length 1
DEBUG: 00:00:00.0487416 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0720334 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.0884582 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.0884687 Name: Microsoft.PowerShell.SecretManagement
DEBUG: 00:00:00.0884736 Debug: True
DEBUG: 00:00:00.0911725 INVOKING PowerShell Fn Get-DynamicOptions with args Package that has length 1
DEBUG: 00:00:00.0956909 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.1189464 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.1356459 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.1356561 Name: Microsoft.PowerShell.SecretManagement
DEBUG: 00:00:00.1356608 Debug: True
DEBUG: 00:00:00.1387489 INVOKING PowerShell Fn Get-DynamicOptions with args Install that has length 1
DEBUG: 00:00:00.1434553 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.1666208 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.1874732 Calling SearchForPackages. Name='Microsoft.PowerShell.SecretManagement'
VERBOSE: Using the provider 'PowerShellGet' for searching packages.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): A
DEBUG: 00:00:00.1879689 PackageProvider::FindPackage with name Microsoft.PowerShell.SecretManagement
DEBUG: 00:00:00.1905200 Calling SearchForPackages After Select 1
DEBUG: 00:00:04.0893794 Calling New() : MethodName = 'FindPackage'
DEBUG: 00:00:04.0895823 ProviderName: PowerShellGet
DEBUG: 00:00:04.0897196 Type: Module
DEBUG: 00:00:04.0898273 Debug: True
DEBUG: 00:00:04.0899387 Name: Microsoft.PowerShell.SecretManagement
DEBUG: 00:00:04.0900708 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:04.0901936 Scope: CurrentUser
DEBUG: 00:00:04.0936407 INVOKING PowerShell Fn Find-Package with args System.String[], , ,  that has length 4
DEBUG: 00:00:04.0984271 In PowerShellGet Provider - 'Find-Package'.
DEBUG: 00:00:04.0987066 OPTION: ProviderName => PowerShellGet
DEBUG: 00:00:04.0988683 OPTION: Type => Module
DEBUG: 00:00:04.0990027 OPTION: Debug => True
DEBUG: 00:00:04.0991067 OPTION: Name => Microsoft.PowerShell.SecretManagement
DEBUG: 00:00:04.0992288 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:04.0993423 OPTION: Scope => CurrentUser
VERBOSE: The -Repository parameter was not specified.  PowerShellGet will use all of the registered repositories.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2' and PackageManagementProvider is 'NuGet'.
DEBUG: 00:00:04.1016520 PackageProvider::FindPackage with name Microsoft.PowerShell.SecretManagement
DEBUG: 00:00:04.1079013 Calling 'NuGet'::'FindPackage' - name='Microsoft.PowerShell.SecretManagement', requiredVersion='',minimumVersion='', maximumVersion='''.
DEBUG: 00:00:04.1092064 Iterating 'Microsoft.PowerShell.SecretManagement'.
DEBUG: 00:00:04.1154278 There are '0' registered sources in 'NuGet' provider.
DEBUG: 00:00:04.1157802 Source 'https://www.powershellgallery.com/api/v2' is not one of the registered sources in 'NuGet' provider.
DEBUG: 00:00:04.1161987 Source 'https://www.powershellgallery.com/api/v2' is validated.
DEBUG: 00:00:04.1165292 Calling 'NuGetRequest'::'GetPackageById', 'Microsoft.PowerShell.SecretManagement'.
DEBUG: 00:00:04.1168180 Calling 'NuGetPackageRepository'::'FindPackagesById', 'Microsoft.PowerShell.SecretManagement'.
DEBUG: 00:00:04.1171809 Calling 'NuGetPackageFeed2'::'FindPackage', 'Microsoft.PowerShell.SecretManagement'.
DEBUG: 00:00:04.1179262 Calling 'NuGetClient'::'FindPackage'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.PowerShell.SecretManagement'' for ''.
DEBUG: 00:00:04.1185282 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.PowerShell.SecretManagement'&$skip=0&$top=40'.
DEBUG: 00:00:04.1834791 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.PowerShell.SecretManagement'&$skip=0&$top=40'.
DEBUG: 00:00:04.1844513 '16' packages received in the last request.
DEBUG: 00:00:04.1848615 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.PowerShell.SecretManagement'&$skip=0&$top=40'.
DEBUG: 00:00:04.2114491 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.PowerShell.SecretManagement'&$skip=0&$top=40'.
DEBUG: 00:00:04.2122100 '16' packages received in the last request.
VERBOSE: Total package yield:'1' for the specified package 'Microsoft.PowerShell.SecretManagement'.
DEBUG: 00:00:04.2133055 Completed iterating for 'Microsoft.PowerShell.SecretManagement'.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is '\\DC1FIL020\netadmin\PHA_PS_Internal_Repository' and PackageManagementProvider is 'NuGet'.
DEBUG: 00:00:04.2233947 PackageProvider::FindPackage with name Microsoft.PowerShell.SecretManagement
DEBUG: 00:00:04.2270771 Calling 'NuGet'::'FindPackage' - name='Microsoft.PowerShell.SecretManagement', requiredVersion='',minimumVersion='', maximumVersion='''.
DEBUG: 00:00:04.2274053 Iterating 'Microsoft.PowerShell.SecretManagement'.
DEBUG: 00:00:04.2277858 There are '0' registered sources in 'NuGet' provider.
DEBUG: 00:00:04.2280884 Calling 'NuGetRequest'::'GetPackageById', 'Microsoft.PowerShell.SecretManagement'.
DEBUG: 00:00:04.2288615 Calling 'LocalPackageRepository'::'FindPackagesById', 'Microsoft.PowerShell.SecretManagement'.
DEBUG: 00:00:04.2291586 Calling 'LocalPackageRepository'::'GetPackages', 'Microsoft.PowerShell.SecretManagement'.
DEBUG: 00:00:04.2353152 Calling 'LocalPackageRepository'::'GetPackages', 'Microsoft.PowerShell.SecretManagement'.
DEBUG: 00:00:04.2444037 System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.GroupBy[TSource,TKey](IEnumerable`1 source, Func`2 keySelector, IEqualityComparer`1 comparer)
   at Microsoft.PackageManagement.NuGetProvider.NuGetRequest.GetPackageById(PackageSource source, String name, NuGetRequest request, String requiredVersion, String minimumVersion, String maximumVersion, Boolean minInclusive, Boolean maxInclusive, Boolean isDependency)
VERBOSE: Total package yield:'0' for the specified package 'Microsoft.PowerShell.SecretManagement'.
DEBUG: 00:00:04.2469574 Completed iterating for 'Microsoft.PowerShell.SecretManagement'.
DEBUG: 00:00:04.2473026 Calling 'NuGetRequest'::'FindRegisteredSource', '\\DC1FIL020\netadmin\PHA_PS_Internal_Repository'.
DEBUG: 00:00:04.2673095 Done calling powershell «Find-Package» «PSModule»
DEBUG: 00:00:04.2800430 Calling New() : MethodName = 'GetInstalledPackages'
DEBUG: 00:00:04.2803146 ProviderName: PowerShellGet
DEBUG: 00:00:04.2807805 Type: Module
DEBUG: 00:00:04.2809881 Debug: True
DEBUG: 00:00:04.2812960 Name: Microsoft.PowerShell.SecretManagement
DEBUG: 00:00:04.2815649 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:04.2819232 Scope: CurrentUser
DEBUG: 00:00:04.2864784 INVOKING PowerShell Fn Get-InstalledPackage with args Microsoft.PowerShell.SecretManagement, 1.1.2, ,  that has length 4
DEBUG: 00:00:04.2921858 In PowerShellGet Provider - 'Get-InstalledPackage'.
DEBUG: 00:00:04.2924418 OPTION: ProviderName => PowerShellGet
DEBUG: 00:00:04.2927058 OPTION: Type => Module
DEBUG: 00:00:04.2929858 OPTION: Debug => True
DEBUG: 00:00:04.2933659 OPTION: Name => Microsoft.PowerShell.SecretManagement
DEBUG: 00:00:04.2937605 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:04.2940235 OPTION: Scope => CurrentUser
DEBUG: 00:00:04.6961805 PowerShell Script 'PSModule' Function 'Get-InstalledPackage' returns null.
DEBUG: 00:00:04.7061854 Done calling powershell «Get-InstalledPackage» «PSModule»

Confirm
Are you sure you want to perform this action?
Performing the operation "Install-Module" on target "Version '1.1.2' of module 'Microsoft.PowerShell.SecretManagement'".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): A
DEBUG: 00:00:07.1330709 Calling New() : MethodName = 'InstallPackage'
DEBUG: 00:00:07.1334528 ProviderName: PowerShellGet
DEBUG: 00:00:07.1337836 Type: Module
DEBUG: 00:00:07.1340010 Debug: True
DEBUG: 00:00:07.1342201 Name: Microsoft.PowerShell.SecretManagement
DEBUG: 00:00:07.1344034 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:07.1345439 Scope: CurrentUser
DEBUG: 00:00:07.1379711 INVOKING PowerShell Fn Install-Package with args NuGet|Microsoft.PowerShell.SecretManagement|1.1.2|https://www.powershellgallery.com/api/v2|Module that has length 1
DEBUG: 00:00:07.1442665 In PowerShellGet Provider - 'Install-Package'.
DEBUG: 00:00:07.1446318 In PowerShellGet Provider - 'Install-PackageUtility'.
DEBUG: 00:00:07.1448343 The FastPackageReference is 'NuGet|Microsoft.PowerShell.SecretManagement|1.1.2|https://www.powershellgallery.com/api/v2|Module'.
DEBUG: 00:00:07.1453713 OPTION: ProviderName => PowerShellGet
DEBUG: 00:00:07.1456268 OPTION: Type => Module
DEBUG: 00:00:07.1457874 OPTION: Debug => True
DEBUG: 00:00:07.1459870 OPTION: Name => Microsoft.PowerShell.SecretManagement
DEBUG: 00:00:07.1461489 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:07.1463516 OPTION: Scope => CurrentUser
VERBOSE: The installation scope is specified to be 'CurrentUser'.
VERBOSE: The specified module will be installed in '\\nt_san1\users\MJL-Priv\Documents\PowerShell\Modules'.
DEBUG: 00:00:07.1469872 ArtifactType is Module
VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'.
VERBOSE: Downloading module 'Microsoft.PowerShell.SecretManagement' with version '1.1.2' from the repository 'https://www.powershellgallery.com/api/v2'.
DEBUG: 00:00:07.2328956 Calling 'NuGet'::'InstallPackage', '$aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mg==\TWljcm9zb2Z0LlBvd2VyU2hlbGwuU2VjcmV0TWFuYWdlbWVudA==\MS4xLjI=\aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mg==\cG93ZXJzaGVsbGdldA=='.
DEBUG: 00:00:07.2332103 Calling 'NuGetRequest'::'GetPackageByFastpath', '$aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mg==\TWljcm9zb2Z0LlBvd2VyU2hlbGwuU2VjcmV0TWFuYWdlbWVudA==\MS4xLjI=\aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mg==\cG93ZXJzaGVsbGdldA=='.
DEBUG: 00:00:07.2336323 Calling 'NuGetRequest'::'ResolvePackageSource', 'https://www.powershellgallery.com/api/v2'.
DEBUG: 00:00:07.2339065 Calling 'NuGetRequest'::'FindRegisteredSource', 'https://www.powershellgallery.com/api/v2'.
DEBUG: 00:00:07.2340815 Source 'https://www.powershellgallery.com/api/v2' is not one of the registered sources in 'NuGet' provider.
DEBUG: 00:00:07.3273453 Calling 'NuGetPackageRepository'::'FindPackage', 'Microsoft.PowerShell.SecretManagement'.
DEBUG: 00:00:07.3282708 Calling 'NuGetPackageFeed2'::'FindPackage', 'Microsoft.PowerShell.SecretManagement'.
DEBUG: 00:00:07.3287179 Calling 'NuGetClient'::'FindPackage'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.PowerShell.SecretManagement'' for ''.
DEBUG: 00:00:07.3294473 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.PowerShell.SecretManagement'&$skip=0&$top=40'.
DEBUG: 00:00:07.4144974 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.PowerShell.SecretManagement'&$skip=0&$top=40'.
DEBUG: 00:00:07.4155453 '16' packages received in the last request.
DEBUG: 00:00:07.4161545 'Package version' is '1.1.2'.
DEBUG: 00:00:07.4163386 'Request's Destination' is 'C:\Users\MJL-Priv\AppData\Local\Temp\241166888'.
DEBUG: 00:00:07.4165331 Calling 'NuGetPackageRepository'::'InstallPackage'.
DEBUG: 00:00:07.4166924 Calling 'NuGetFilesFeed2'::'InstallPackage'.
DEBUG: 00:00:07.4168883 Calling 'NuGetFilesFeed2'::'InstallPackage', '$aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mg==\TWljcm9zb2Z0LlBvd2VyU2hlbGwuU2VjcmV0TWFuYWdlbWVudA==\MS4xLjI=\aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mg==\cG93ZXJzaGVsbGdldA=='.
DEBUG: 00:00:07.4171098 Calling 'NuGetClient'::'GetPackageDependencies'.
DEBUG: 00:00:07.4173719 Returning the call 'NuGetClient'::'GetPackageDependencies'.
DEBUG: 00:00:07.4182229 Calling 'NuGetClient'::'InstallPackage'.
VERBOSE: InstallPackage' - name='Microsoft.PowerShell.SecretManagement', version='1.1.2',destination='C:\Users\MJL-Priv\AppData\Local\Temp\241166888'
VERBOSE: DownloadPackage' - name='Microsoft.PowerShell.SecretManagement', version='1.1.2',destination='C:\Users\MJL-Priv\AppData\Local\Temp\241166888\Microsoft.PowerShell.SecretManagement.1.1.2\Microsoft.PowerShell.SecretManagement.1.1.2.nupkg', uri='https://www.powershellgallery.com/api/v2/package/Microsoft.PowerShell.SecretManagement/1.1.2'
VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/Microsoft.PowerShell.SecretManagement/1.1.2'.
VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/Microsoft.PowerShell.SecretManagement/1.1.2'.
VERBOSE: Completed downloading 'Microsoft.PowerShell.SecretManagement'.
DEBUG: 00:00:07.5669757 Calling 'NuGetClient'::'InstallPackageLocal'.
VERBOSE: InstallPackageLocal' - name='Microsoft.PowerShell.SecretManagement', version='1.1.2',destination='C:\Users\MJL-Priv\AppData\Local\Temp\241166888'
DEBUG: 00:00:07.5685487 C:\Users\MJL-Priv\AppData\Local\Temp\241166888\Microsoft.PowerShell.SecretManagement.1.1.2\Microsoft.PowerShell.SecretManagement.1.1.2.nupkg
DEBUG: 00:00:07.6649057 Returning the call 'NuGetClient'::'InstallPackageLocal'.
DEBUG: 00:00:07.6726744 Returning the call 'NuGetClient'::'InstallSinglePackage'.
DEBUG: 00:00:07.6729559 Returning the call 'NuGetFilesFeed2'::'InstallPackage'.
VERBOSE: Validating the 'Microsoft.PowerShell.SecretManagement' module contents under 'C:\Users\MJL-Priv\AppData\Local\Temp\241166888\Microsoft.PowerShell.SecretManagement.1.1.2' path.
VERBOSE: Test-ModuleManifest successfully validated the module manifest file 'C:\Users\MJL-Priv\AppData\Local\Temp\241166888\Microsoft.PowerShell.SecretManagement.1.1.2'.
VERBOSE: Validating the authenticode signature and publisher of the catalog file or module manifest file of the module 'Microsoft.PowerShell.SecretManagement'.
VERBOSE: Catalog file 'Microsoft.PowerShell.SecretManagement.cat' is not found in the contents of the module 'Microsoft.PowerShell.SecretManagement' being installed.
DEBUG: 00:00:07.9682327 Using the 'Microsoft.PowerShell.SecretManagement.psd1' file for getting the authenticode signature.
VERBOSE: Valid authenticode signature found in the file 'Microsoft.PowerShell.SecretManagement.psd1' for the module 'Microsoft.PowerShell.SecretManagement'.
DEBUG: 00:00:08.1138512 For publisher validation, current module 'Microsoft.PowerShell.SecretManagement' with version '1.1.2' with publisher name 'CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US' from root certificate authority 'CN=Microsoft Root Certificate Authority 2011, O=Microsoft Corporation, L=Redmond, S=Washington, C=US'. Is this module signed by Microsoft: 'True'.
VERBOSE: Checking for possible command collisions for the module 'Microsoft.PowerShell.SecretManagement' commands.
DEBUG: 00:00:08.7580909 PowerShell Script 'PSModule' Function 'Install-Package' returns null.

Mike Leone

unread,
Jan 23, 2026, 10:39:07 AMJan 23
to ntpowe...@googlegroups.com
AH HA! I tried it again, installing PS v7.5.4 on my non-privileged access workstation (which never had v7), and it worked like a charm ...

PowerShell 7.5.4
PS C:\Users\LeoneM> Install-Module -Name Microsoft.PowerShell.SecretManagement


Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to
install the modules from 'PSGallery'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): y
PS C:\Users\LeoneM> .

So it's definitely something specific to my privileged access VM. Ok, I suppose that narrows it down ... Maybe I'll try uninstalling PS and re-installing, it has been giving me a message about not being able to access parts of the profile ...

I'll keep poking at it ...



Michael B. Smith

unread,
Jan 23, 2026, 4:27:19 PMJan 23
to ntpowe...@googlegroups.com

This is a GPO or secpol issue. Try moving the device TEMPORARILY to an OU without any GPOs, do a “gpupdate /force”. Install the module, and then move it back to the proper OU.

Mike Leone

unread,
Jan 27, 2026, 2:57:49 PMJan 27
to ntpowe...@googlegroups.com
On Fri, Jan 23, 2026 at 4:27 PM Michael B. Smith <mic...@smithcons.com> wrote:

This is a GPO or secpol issue. Try moving the device TEMPORARILY to an OU without any GPOs, do a “gpupdate /force”. Install the module, and then move it back to the proper OU.


I think that was it.  Although a user policy - when I logged in as a user not associated with all the GPOs my account is assigned under, it all Just Worked, to install for all users:

image.png

And now when I log back in with my priv account, I can import it, and play around with it:

PS P:\software\PHA Scripts> import-module Microsoft.Powershell.SecretManagement
PS P:\software\PHA Scripts> get-module -listavailable

    Directory: C:\Program Files\PowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Binary     1.1.2                 Microsoft.PowerShell.SecretManagem… Core      {Register-SecretVault, Unregister-Secre…

So I think I am good to go! Thanks for all the help!

Reply all
Reply to author
Forward
0 new messages