Add method of the PS_DhcpServerv4OptionDefinition class

Adds a new DHCPv4 option definition on the server.

Syntax

uint32 Add(
  [in]  string                       ComputerName,
  [in]  string                       Name,
  [in]  string                       Description,
  [in]  uint32                       OptionId,
  [in]  string                       Type,
  [in]  boolean                      MultiValued,
  [in]  string                       VendorClass,
  [in]  string                       DefaultValue[],
  [in]  boolean                      PassThru,
  [out] DhcpServerv4OptionDefinition cmdletOutput
);

Parameters

ComputerName [in]

DNS name or IP address of the target computer running the DHCP server service.

Name [in]

Name of the DHCPv4 option

Description [in]

The description of the option definition being added

OptionId [in]

The numerical identifier of the option [1-255]

Type [in]

The data type of the values for this option. Valid values are {Byte | Word | DWord | DWordDword | IPAddress | String | BinaryData | EncapsulatedData | IPv6Address}

Byte ("Byte")

Word ("Word")

DWord ("DWord")

DWordDWord ("DWordDWord")

IPv4Address ("IPv4Address")

String ("String")

BinaryData ("BinaryData")

EncapsulatedData ("EncapsulatedData")

MultiValued [in]

This true if the option definition allows for multiple values.

VendorClass [in]

If specified, adds the Option Definition for the specified vendor Class

DefaultValue [in]

The default value for the option for which a definition is created. The syntax to specify the default value for the option are as follows: 1) Byte, Word, DWord, DWordDword (these can be specified as decimal or hexadecimal string); 2) IPAddress, IPv6Address (these can be specified as IP address string); 3) String (this can be specified as string); 4) BinaryData, EncapsulatedData (these can be specified as hexadecimal string)

PassThru [in]

If this parameter is specified, the cmdlet returns the PowerShell object which is modified.

cmdletOutput [out]

An embedded instance of the DhcpServerv4OptionDefinition class.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2012
Namespace
Root\Microsoft\Windows\DHCP
MOF
DhcpServerPsProvider.mof
DLL
DhcpServerPsProvider.dll

See also

PS_DhcpServerv4OptionDefinition