Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConfigMgr/Scripts/Service_WIM/Service_WIM.ps1 #111

Open
scarneol opened this issue Feb 20, 2022 · 0 comments
Open

ConfigMgr/Scripts/Service_WIM/Service_WIM.ps1 #111

scarneol opened this issue Feb 20, 2022 · 0 comments

Comments

@scarneol
Copy link

scarneol commented Feb 20, 2022

I do not believe this script will work with Windows 11? It will not export a single wim using the /Imagename. I changed the code at line 63-66 so it uses the Index of the wim when exporting (line 82).

63 if (!($WinVersion -in (Get-WindowsImage -ImagePath $SourceImage).ImageName)) {
64 Write-Warning "No such image $WinVersion found in $SourceImage"
65 Exit
66 }else {
67 #Get Image Index
68 $ImageIndex = (Get-WindowsImage -ImagePath $SourceImage -Name $WinVersion).ImageIndex
69 Write-Debug "Image Index $ImageIndex has been found in $SourceImage"
70 }

82 $dism_wait = Start-Process $dism -PassThru -ArgumentList "/export-image /SourceImageFile:"$SourceImage" /SourceIndex:"$ImageIndex" /DestinationImageFile:"$SourceDirectory\install-temp.wim""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant