Open codaamok opened 4 years ago
So, this turned out to be really easy to fix.
For the Dismount-DiskImage
and -PassThru
thing, just search and replace Dismount-DiskImage
and remove -PassThru
in the Convert-WindowsImage
module (only 3 lines):
Get-Module Convert-WindowsImage -ListAvailable | Select-Object -ExpandProperty Path
As for Pester, if you're like me and on 1809 or newer, following the Pester docs, just rip out the module and reinstall to grab the latest:
$module = "C:\Program Files\WindowsPowerShell\Modules\Pester"
takeown /F $module /A /R
icacls $module /reset
icacls $module /grant Administrators:'F' /inheritance:d /T
Remove-Item -Path $Module -Recurse -Force -Confirm:$false
Install-Module -Name Pester -Force
The issue is in the source of the Convert-WindowsImage module. I've submitted a PR for it here:
https://github.com/MicrosoftDocs/Virtualization-Documentation/pull/1260
Doesn't look like anyone cares - but you can pull my version of the module if that helps.
Hey, this looks awesome and I can't wait to start using it.
The
Convert-WindowsImage
module usesDismount-DiskImage
with the-PassThru
parameter. TheDismount-DiskImage
cmdlet has changed behaviour in 1809 onwards where the-PassThru
parameter doesn't exist. Microsoft docs are yet to be updated on this, I've left feedback.As a result a lot goes wrong. I know it's out of your hands but I'm just sharing this as an FYI. The
Convert-WindowsImage
module hasn't been updated for a while, I'm not sure if it will get fixed. Regardless I created an issue in the repo where the module lives and on the doc page for theDismount-DiskImage
function.Maybe for your own interest, the below is what's printed to console in this scenario (note I also have a Pester issue where
-Show
doesn't exist, but I'll check that out tomorrow..):