< Back

Edit-HPEOSPWindowsUnattend

Tue Jan 14, 2020 1:48 am

NAME Edit-HPEOSPWindowsUnattend



SYNOPSIS

The Edit-HPEOSPWindowsUnattend cmdlet edits the existing unattended answer file in Windows ISO file.





SYNTAX

Edit-HPEOSPWindowsUnattend [-ImageFile] <String> [-ImageIndex <Int32>] [-DiskPartitionMode <String>]

[-InstallToDiskID <Int32>] [-Password <String>] [-OutputFile <String>] [-KeyboardMethod <String>] [-UserLocale

<String>] [-TimeZone <String>] [-ProductKey <String>] [-SetupLanguage <String>] [-ComputerName <String>]

[-MainPartitionLetter <String>] [-MainPartitionLabel <String>] [<CommonParameters>]





DESCRIPTION

The Edit-HPEOSPWindowsUnattend cmdlet edits the existing unattended answer file in input Windows ISO file. This

cmdlet will either create a new ISO file in OutputFile path or overwrite the input ISO file with unattended answer

file. By default, this overwrites the input ISO file with unattended answer file.





PARAMETERS

-ImageFile <String>

Specifies the Windows ISO file as input. The value must be the Windows local full path.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-ImageIndex [<Int32>]

Specifies the index number of a Windows image to install.



Note:

Use the Get-WindowsImage cmdlet to get information about a Windows image in install.wim file.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName, ByValue)

Accept wildcard characters? false



-DiskPartitionMode [<String>]

Specifies the partition mode to configure the disk for a Unified Extensible Firmware Interface (UEFI) or

legacy BIOS based server. The disk partition structure will be different for UEFI and legacy BIOS based

server. Possible values are UEFI and LegacyBIOS.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-InstallToDiskID [<Int32>]

Specifies the identification number of the disk on which to install Windows. This is a relative 0-based index.

Disks are numbered 0, 1, 2, and so on, in the order they are created.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Password [<String>]

Specifies the password for a LocalAccount created during installation.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-OutputFile [<String>]

Specifies the output file to create a new Windows ISO with updated unattended answer file. The value must be

Windows local full path.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-KeyboardMethod [<String>]

Specifies the input language and the keyboard layout for a Windows installation. This setting is used by

Windows Setup and Windows Deployment Services.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-UserLocale [<String>]

Specifies the language to install that will be used as the default system language to display UI items (such

as menus, dialog boxes, and help files), non-unicode programs, date, time, and currency. This setting is used

by Windows Setup and Windows Deployment Services.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-TimeZone [<String>]

Specifies the time zone for the server.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ProductKey [<String>]

Specifies the product key to apply for each unique installation of the Windows operating system. Use this

ProductKey setting to specify the Windows image to install during Windows Setup. This product key specified by

this setting is stored on the computer after installation. If you choose to activate Windows, this product key

will be used. Product keys are 29 characters in the following format:

xxxxx-xxxxx-xxxxx-xxxxx-xxxxx



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-SetupLanguage [<String>]

Defines the language to use in Windows Setup and Windows Deployment Services. Possible values are Chinese -

China, Chinese - Taiwan, Czech, Dutch, English, Spanish, French, German, Hungarian, Italian, Japanese, Korean,

Polish, Portuguese - Brazil, Portuguese - Portugal, Russian, Swedish, and Turkish.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ComputerName [<String>]

Specifies the computer name used to access the computer from the network. ComputerName is a string with a

maximum length of 15 characters. If you do not specify a value for ComputerName, the value will be empty. If

ComputerName is set to an asterisk (*) or is an empty string, a random computer name will be generated. This

random name has at most eight characters from the RegisteredOwner and/or RegisteredOrganization strings plus

random characters.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-MainPartitionLetter [<String>]

Specifies a drive letter to assign to the partition. Possible values are C through Z.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-MainPartitionLabel [<String>]

Specifies the name that you apply to a partition. Label is a string with a maximum length of 32 characters.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String

System.Int32

System.Management.Automation.SwitchParameter







OUTPUTS

None

When the cmdlet does not execute correctly, output with the error message is produced. Otherwise, this cmdlet

does not generate any output.





NOTES





???? Not supplying OutputFile overwrites the input ISO file.

???? This cmdlet only supports Windows Server 2012 R2 or Windows Server 2016 ISO.

???? An ISO is created with efisys_noprompt.bin which bypasses the "Press any key to boot from CD or DVD ...."

prompt when booting the installer.



EXAMPLE 1



PS C:\\> Edit-HPEOSPWindowsUnattend -ImageFile C:\\TestFolder\\WindowsServer2012R2DataCenter.iso -ImageIndex 4

-DiskPartitionMode UEFI -InstallToDiskID 1 -MainPartitionLetter D -MainPartitionLabel WindowsOS



PS C:\\>



This example shows how to edit the existing unattended answer file in input ISO and overwrites the input image

file.

EXAMPLE 2



PS C:\\> Edit-HPEOSPWindowsUnattend -ImageFile C:\\TestFolder\\WindowsServer2016.iso -KeyboardMethod 'English -

Australia' -UserLocale 'English - Australia' -OutputFile C:\\TestFolder\\NewWin2016.iso



PS C:\\>



This example shows how to edit the existing unattended answer file in input ISO and creates a new ISO in

OutputFile location.



RELATED LINKS

http://www.hpe.com/servers/powershell

Get-HPEOSPWindowsUnattendInfo

Remove-HPEOSPWindowsUnattend

Use-HPEOSPWindowsUnattend