Hi,
I’m trying to use PowerShell to add a wim image to the WDS image store. It works with the GUI, but Import-WdsInstallImage throws me an error.
Import-WdsInstallImage -Path D:\sources\install.wim -ImageGroup 2012R2 -SkipVerify
ERROR: Import-WdsInstallImage : A target image name must be specified for this command.
I tried to define a target name with the other parameters, but nothing worked.
My command completetly corresponds to the help file example, so I don’t have a clue, I couldn’t find anything on google either.
Hi Istvan,
The Win2012 R2 WIM contains multiple images which you can discover using below cmdlet:
PS C:\Users\Administrator> Get-WindowsImage -ImagePath D:\sources\install.wim
Index : 1
Name : Windows Server 2012 R2 SERVERSTANDARDCORE
Description : Windows Server 2012 R2 SERVERSTANDARDCORE
Size : 6,902,679,015 bytes
Index : 2
Name : Windows Server 2012 R2 SERVERSTANDARD
Description : Windows Server 2012 R2 SERVERSTANDARD
Size : 12,043,953,358 bytes
Index : 3
Name : Windows Server 2012 R2 SERVERDATACENTERCORE
Description : Windows Server 2012 R2 SERVERDATACENTERCORE
Size : 6,878,790,813 bytes
Index : 4
Name : Windows Server 2012 R2 SERVERDATACENTER
Description : Windows Server 2012 R2 SERVERDATACENTER
Size : 12,059,712,938 bytes
To import one the images you’ll need to specify the image name inside the WIM.
PS C:\Users\Administrator> Import-WdsInstallImage -Path D:\sources\install.wim -ImageGroup 2012R2 -ImageName ‘Windows Server 2012 R2 SERVERSTANDARDCORE’ -SkipVerify
I hope that helps and works for you,
Daniel
Thanks for your reply Daniel!
My next chance to try it is on monday. There may be a bug in the help file, because according to the examples there, you only have to define the Path and ImageGroup parameters.
It should than import all images in the wim file.