-
Notifications
You must be signed in to change notification settings - Fork 24
Secret Management module will not import on Windows Server 2016 #80
Description
Steps to reproduce
Fresh install of Server 2016, fully patched via Windows Update
Install current PSGet As Administrator:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Install-Module PowerShellGet -RequiredVersion 2.2.4.1 -SkipPublisherCheck
Install current PSSecretMgmt module As Administrator
Restart PS so new PSGet is active
PS C:\Users\Administrator> Install-Module Microsoft.PowerShell.SecretManagement -AllowPrerelease
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\Administrator> Get-SecretVault
Get-SecretVault : The 'Get-SecretVault' command was found in the module 'Microsoft.PowerShell.SecretManagement', but
the module could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.SecretManagement'.
At line:1 char:1
- Get-SecretVault
-
+ CategoryInfo : ObjectNotFound: (Get-SecretVault:String) [], CommandNotFoundException + FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
PS C:\Users\Administrator> Import-Module Microsoft.PowerShell.SecretManagement
Import-Module : Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
At line:1 char:1
- Import-Module Microsoft.PowerShell.SecretManagement
-
+ CategoryInfo : NotSpecified: (:) [Import-Module], FileNotFoundException + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand
Expected behavior
Module can import on WS2016
Actual behavior
Module fails to import
Environment data
This fails on all my 2016 servers
Module version:
PS C:\Users\Administrator> $psversiontable
Name Value
PSVersion 5.1.14393.3471
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.3471
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
PS C:\Users\Administrator> get-module -ListAvailable -Name Microsoft.PowerShell.SecretManagement
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
Binary 0.2.1 Microsoft.PowerShell.SecretManag... {Register-SecretVault, Unregister-SecretVault