Closed SteveL-MSFT closed 6 years ago
The Import-WinModule Microsoft.PowerShell.Management should import new commands but not overwrite existing ones
test wont work as in on windows because it was originally made to work on core where Get-EventLog
is unavailable so it is imported. I think this test should be skipped on Windows Powershell. Microsoft.PowerShell.Management
is in the NeverClobberList
so this test would never import any of the commands as they would clobber.
Compare-WinModule should return a non-null collection of modules
fails because on Windows PowerShell the result will always be null. It is supposed to return modules that are on the Windows PowerShell session that are not available on current sessions. On Windows PowerShell those are the same environment, so they should always match.
Copy-WinModule should copy the specified module to the destination path
fails because line 118
$psd1File = Join-Path $tempDirToUse PnpDevice PnpDevice.psd1
That works on PSCore but not 5.1.
@SteveL-MSFT This module makes no sense under 5.1 and wasn't intended to work there. That's why i set the compatible edition to be core. Why did you change it?
@BrucePay the .Net Windows Compat Pack is absolutely needed for Windows PowerShell if the module is built targeting .Net Std and Windows Compat Pack. Also, rModule can be used against a remote target from Windows PowerShell.
This is no longer relevant
There's no reason this module couldn't work on Windows PowerShell 5.1, however, there's currently 3 test failures: