Convert-WindowsImage
Convert-WindowsImage copied to clipboard
Log output is broken (and there is no screen output)
Previous version had the nice function Write-W2VInfo to output to screen (as well as log).
Current version has loging broken It writes:
Windows PowerShell transcript start
Start time: 20220122091030
Username: SP-P-MEDIA\Administrator
RunAs User: SP-P-MEDIA\Administrator
Machine: SP-P-MEDIA (Microsoft Windows NT 6.3.9600.0)
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Process ID: 136
PSVersion: 5.0.10586.117
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0.10586.117
BuildVersion: 10.0.10586.117
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
**********************
Windows PowerShell transcript end
End time: 20220122092255
**********************
While previous version would give nicely all info: (in log and also on screen)
**********************
Windows PowerShell transcript start
Start time: 20220122084853
Username: SP-P-MEDIA\Administrator
RunAs User: SP-P-MEDIA\Administrator
Machine: SP-P-MEDIA (Microsoft Windows NT 6.3.9600.0)
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Process ID: 8208
PSVersion: 5.0.10586.117
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0.10586.117
BuildVersion: 10.0.10586.117
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
INFO : Looking for the requested Windows image in the WIM file
INFO : Image 2 selected (ServerStandard)...
INFO : Creating VHD disk...
INFO : Attaching VHDX...
INFO : Initializing disk...
INFO : Creating EFI system partition (ESP)...
INFO : Formatting ESP...
INFO : Creating MSR partition...
INFO : Creating windows partition...
INFO : Formatting windows volume...
INFO : Windows path (H:) has been assigned.
INFO : Windows path (H:) took 1 attempts to be assigned.
INFO : System volume location: G:
INFO : Applying image to VHDX. This could take a while...
INFO : Image was applied successfully.
INFO : Making image bootable...
INFO : Drive is bootable. Cleaning up...
INFO : Closing VHDX...
INFO : Closing Windows image...
INFO : Done.
**********************
Windows PowerShell transcript end
End time: 20220122090123
**********************
did you use verbose?
NO, because there is no verbose parameter available (or mentioned at all)
its in the readme.md - Please try -Verbose if you wish to output more Information.
Tried it and got error that such parameter is not valid (unless it matters that order it is in?) Maybe you can add it to the actual code?
I used -Verbose and got the transcript as expected:
VERBOSE: 2022-06-08T08:03:20 [HOSTNAME] Looking for the requested Windows image in the WIM/ESD file...
VERBOSE: 2022-06-08T08:03:24 [HOSTNAME] Image 6 selected "Windows 11 Pro"
VERBOSE: 2022-06-08T08:03:24 [HOSTNAME] Creating sparse disk...
[...]
VERBOSE: 2022-06-08T08:08:13 [HOSTNAME] Dismounting VHDX...
VERBOSE: 2022-06-08T08:08:14 [HOSTNAME] Closing ISO...
VERBOSE: 2022-06-08T08:08:16 [HOSTNAME] Done.
Am I reproducing this wrong?