Convert WindowsImage PS1 File: Difference between revisions
No edit summary |
m Root moved page Convert-WindowsImage.ps1 to Convert WindowsImage PS1 File without leaving a redirect |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 20: | Line 20: | ||
IE, if you're typing... <syntaxhighlight lang="batch"> | IE, if you're typing... <syntaxhighlight lang="batch"> | ||
Convert-WindowsImage -SourcePath "F:\WhatEverNamed.ISO" -VHDFormat VHDX -Edition ServerEnterprise -VHDPartition GPT -Verbose | Convert-WindowsImage -SourcePath "F:\WhatEverNamed.ISO" -VHDFormat VHDX -Edition ServerEnterprise -VHDPartition GPT -Verbose | ||
</syntaxhighlight>...at a command line and it isn't doing anything, then put that same command at the very, very, very, last line end of the Convert-WindowsImage.ps1 file. | </syntaxhighlight>...at a command line and it isn't doing anything, then put that same command at the very, very, very, last line end of the Convert-WindowsImage.ps1 file.T | ||
=== Tip; === | |||
If you don't know what to put for the -Edition switch, just run it once without the -Edition switch and it will of course error out, but, it will also give you a list of the different 'editions' that are on that DVD, so then add that to the script after the -Edition switch. | |||
== Problem #4; The script just stopped during the generation of the VHDX file == | == Problem #4; The script just stopped during the generation of the VHDX file == | ||
| Line 26: | Line 29: | ||
== Can it get worse? YES! == | == Can it get worse? YES! == | ||
OK! Great! I've got my VHDX file and I'm good to go, right? Of course not. After attaching the VHDX file to the Hyper-V VM, it wouldn't start because the VHDX file was still locked, even after terminating the script and checking Task Manager to see if the VHDX file was still in use. Nope, logging | OK! Great! I've got my VHDX file and I'm good to go, right? Of course not. After attaching the VHDX file to the Hyper-V VM, it wouldn't start because the VHDX file was still locked, even after terminating the script and checking Task Manager to see if the VHDX file was still in use. Nope, logging off and logging back on didn't work. Checked what process had the file locked using [https://lockhunter.com/ LockHunter] (I'm not affiliated with this person or company, but it is really useful software so consider contributing to them) and it was locked by a process called System. | ||
=== Tip === | === Tip === | ||