Get-DhcpServerv4OptionValue

Get-DhcpServerv4OptionValue

Returns the IPv4 option Values for one or more IPv4 options at the server, scope or reservation level.

Sintaxis

Parameter Set: Get0
Get-DhcpServerv4OptionValue [[-OptionId] <UInt32[]> ] [[-ScopeId] <IPAddress> ] [-All] [-AsJob] [-Brief] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-PolicyName <String> ] [-ReservedIP <IPAddress> ] [-ThrottleLimit <Int32> ] [-UserClass <String> ] [-VendorClass <String> ] [ <CommonParameters>]

Descripción detallada

The Get-DhcpServerv4OptionValue cmdlet returns the IPv4 option values for one or more IPv4 options at the server, scope or reservation level. Use the VendorClass and UserClass parameters to get option values for a specific vendor class or for a specific user class. If the OptionId parameter is not specified, then this cmdlet returns the option values for all the options configured at the specified level either the server, the scope, or the reservation level.

If only the ReservedIP parameter is specified, then the option values set at the rReservation level are returned. If only the ScopeId parameter is specified, then the option values set at the scope level are returned. If neither the ScopeId nor the ReservedIP parameter are specified, then option values set at the server level are returned.

If neither the VendorClass nor UserClass parameter is specified, then this cmdlet gets the standard option values set.

The PolicyName and UserClass parameters cannot both be specified.

The PolicyName parameter cannot be specified if the ReservedIP parameter is specified.

Note: The option values for policies only exist for DHCP server services running on Windows Server® 2012. For older versions, only user class based option values exist.

To get legacy user class options, the UserClass parameter must be specified.

Parámetros

-All

Gets the option values for a scope, server, or reservation. Option values can include vendor class, user class, and policy specific.
If only this parameter is specified, then this cmdlet will get all of the option values for a scope, server, or reservation.
If the OptionId parameter and this parameter are specified, then option values for the specified option identifier (ID) for all of the vendor classes, user classes and policies will be returned.
If the VendorClass parameter and this parameter are specified, then all of the option values for the specified vendor class including those for any user class or policy would be returned.
If the UserClass parameter and this parameter are specified, then all of the option values for the specified user class including any vendor specific options would be returned.
If the PolicyName parameter and this parameter are specified, then all of the option values for the specified policy including any vendor specific options would be returned.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-AsJob

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-Brief

Specifies that the name of the option is not returned in the option value object. This parameter improves the performance of this cmdlet by not requesting the name of the option from the DHCP server service. For repeatedly fetching a large number of option values with this cmdlet use of the Brief parameter is recommended.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-CimSession<CimSession[]>

Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.

Alias

Session

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-ComputerName<String>

Specifies the DNS name, or IPv4 or IPv6 address, of the target computer running the Dynamic Host Configuration Protocol (DHCP) server service.

Alias

Cn

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-OptionId<UInt32[]>

Specifies the numerical IDs of the options being requested.

Alias

ninguno

¿Requerido?

false

¿Posición?

2

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-PolicyName<String>

Specifies the name of the policy for which one or more option values are requested.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ReservedIP<IPAddress>

Specifies the IPv4 address of the reservation for which the option values are requested.

Alias

IPAddress

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ScopeId<IPAddress>

Specifies the ID of the scope, in IP address format, for which one or more option values are requested.

Alias

ninguno

¿Requerido?

false

¿Posición?

3

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-ThrottleLimit<Int32>

Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-UserClass<String>

Gets the option values for that user class.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-VendorClass<String>

Gets the option values for that vendor class.

Alias

ninguno

¿Requerido?

false

¿Posición?

named

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

Ejemplos

EXAMPLE 1

This example gets all the standard DHCPv4 option values, or non-class specific, configured at the server level.

PS C:\> Get-DhcpServerv4OptionValue -ComputerName dhcpserver.contoso.com

EXAMPLE 2

This example gets all the standard DHCPv4 option values, or non-class specific, configured for the specified scope.

PS C:\> Get-DhcpServerv4OptionValue -ComputerName dhcpserver.contoso.com -ScopeId 10.10.10.0

EXAMPLE 3

This example gets all of the standard DHCPv4 option values, or non-class specific, configured for the specified reservation.

PS C:\> Get-DhcpServerv4OptionValue -ComputerName dhcpserver.contoso.com -ReservedIP 10.10.10.5

EXAMPLE 4

This example gets all of the vendor class specific DHCPv4 option values configured on the specified scope for the specified vendor class.

PS C:\> Get-DhcpServerv4OptionValue -ComputerName dhcpserver.contoso.com -ScopeId 10.10.10.0 -VendorClass MSUCClient

EXAMPLE 5

This example gets the DHCPv4 option value configured on the specified scope for the specified option ID.

PS C:\> Get-DhcpServerv4OptionValue -ComputerName dhcpserver.contoso.com -ScopeId 10.10.10.0 -OptionId 23

EXAMPLE 6

This example gets all of the DHCPv4 option values, including standard as well as vendor class or user class specific, configured on the specified scope.

PS C:\> Get-DhcpServerv4OptionValue -ComputerName dhcpserver.contoso.com -ScopeId 10.10.10.0 -All

EXAMPLE 7

This example gets all of the standard DHCPv4 option values configured on the specified scope. The object that is returned does not contain the name of the option. The Brief parameter increase the performance by removing the delay required to get the name of the option from the DHCP server service.

PS C:\> Get-DhcpServerv4OptionValue -ComputerName dhcpserver.contoso.com -ScopeId 10.10.10.0 -Brief

EXAMPLE 8

This example gets all of the user class specific DHCPv4 option values configured on the specified scope for the specified user class.

PS C:\> Get-DhcpServerv4OptionValue -ComputerName dhcpserver.contoso.com -ScopeId 10.10.10.0 -UserClass LabComputer

EXAMPLE 9

This example gets all of the standard DHCPv4 option values configured on the specified scope for the specified policy.

PS C:\> Get-DhcpServerv4OptionValue -ComputerName dhcpserver.contoso.com -ScopeId 10.10.10.0 -Policy SmartPhonePolicy

EXAMPLE 10

This example gets all of the standard, or non-class specific, DHCPv4 option values configured on the specified scope for the specified policy and vendor class.

PS C:\> Get-DhcpServerv4OptionValue -ComputerName dhcpserver.contoso.com -ScopeId 10.10.10.0 -Policy SmartPhonePolicy -VendorClass "HTC Phone"

Temas relacionados

Remove-DhcpServerv4OptionValue

Set-DhcpServerv4OptionValue