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

parameter name 'StartComponentCleanup' not match on latest script #321

Open
aesirvalor opened this issue Jan 18, 2025 · 9 comments
Open

Comments

@aesirvalor
Copy link

aesirvalor commented Jan 18, 2025

Hi, i run the latest script , so far it run fine,
when about the end at clean up stage , there is an error, the error was

The operation completed successfully.
Cleaning up image...
Repair-WindowsImage : A parameter cannot be found that matches parameter name 'StartComponentCleanup'.
At D:\WIN11-TINY\tiny11builder24h2\tiny11maker.ps1:388 char:51
... owsImage -Path $ScratchDisk\scratchdir -StartComponentCleanup -ResetB ...
~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo : InvalidArgument: (:) [Repair-WindowsImage], ParameterBindingException
FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.Dism.Commands.RepairWindowsImageCommand

the code in line 388 is
Repair-WindowsImage -Path $ScratchDisk\scratchdir -StartComponentCleanup -ResetBase

but the image was created successful, is it ok to ignore the message ?,
and the out iso file size is 5,623,754,752 , its not much different the the input size 5,819,486,208

iam using windows 10 with powershell version:

Name Value

PSVersion 5.1.19041.2364
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.2364
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

@F3NiCy
Copy link

F3NiCy commented Jan 21, 2025

im getting same exact error,did you found a fix for it? idk if i should skip or nah

@gunnarhaslinger
Copy link

Seems Argument "-StartComponentCleanup" is removed from Dism Module Function "Repair-WindowsImage" ... it is not offered in PowerShell 5 and 7 anymore. Documentation still says it should be there.

@Karl-WE
Copy link
Contributor

Karl-WE commented Feb 17, 2025

Image

could it be removed for offline image? for online images (running Windows it still works.

@Karl-WE
Copy link
Contributor

Karl-WE commented Feb 17, 2025

ok it will fail at the end.

Image

@Karl-WE
Copy link
Contributor

Karl-WE commented Feb 17, 2025

@gunnarhaslinger @ntdevlabs ideas?

@gunnarhaslinger
Copy link

To shrink the WIM-File you have to use "Export-WindowsImage" not "Repair-WindowsImage". By using it with Argument "-compressionType max" it will be smallest possible.

@F3NiCy
Copy link

F3NiCy commented Feb 17, 2025

Can someone send screen shot what commands should I put to fix it please, I'm little confused 🙏

@Karl-WE
Copy link
Contributor

Karl-WE commented Feb 17, 2025

@F3NiCy sorry for the wrong pointers.
This should work if you edit your own script.
& 'dism' '/English' "/image:$ScratchDisk\scratchdir" '/Cleanup-Image' '/StartComponentCleanup' '/ResetBase' | Out-Null

@Karl-WE
Copy link
Contributor

Karl-WE commented Feb 17, 2025

@F3NiCy my last comment might be invalid. see I understand your confusion #321 (comment)

I would need some time to test this.

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

4 participants