Share via


SetByOptionId method of the PS_DhcpServerv4OptionValue class

Sets an IPv4 Option Value at the Server, Scope or Reservation level. Any previously set option value(s) for the specified option id are discarded.

Syntax

uint32 SetByOptionId(
  [in]  string                  PolicyName,
  [in]  boolean                 PassThru,
  [in]  boolean                 Force,
  [in]  string                  VendorClass,
  [in]  string                  Value[],
  [in]  uint32                  OptionId,
  [in]  string                  ReservedIP,
  [in]  string                  ScopeId,
  [in]  string                  UserClass,
  [in]  string                  ComputerName,
  [out] DhcpServerv4OptionValue cmdletOutput
);

Parameters

PolicyName [in]

Name of the policy for which the option value(s) are to be set.

PassThru [in]

Passes the object created by this cmdlet through the pipeline. By default, this cmdlet does not pass any objects through the pipeline.

Force [in]

If specified the DNS server validation will be skipped. This is applicable only if the DNS Server option value is being set.

VendorClass [in]

If specified, sets the option Value for the specified vendor class.

Value [in]

Value(s) to be set for the option. The format that the values will be returned in are as follows: 1) Byte, Word, DWord, DWordDword (these need to be specified as decimal or hexadecimal strings); 2) IPAddress, IPv6Address (these will need to be specified as strings); 3) String (these will need to be specified as strings); 4) BinaryData, EncapsulatedData (these will need to be specified as hexadecimal strings).

OptionId [in]

Numeric identifier of the option for which the value(s) are to be set

ReservedIP [in]

IPv4 address of the reservation for which the option value(s) are to be set

ScopeId [in]

Scope identifier (in IPv4 address format) for which the option value(s) need to be set

UserClass [in]

If specified, sets the option Value for the specified user class

ComputerName [in]

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

cmdletOutput [out]

An embedded instance of the DhcpServerv4OptionValue 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_DhcpServerv4OptionValue