Files
PSOPNSenseAPI/docs/cmdlets/Remove-OPNSenseDHCPOption.md

2.8 KiB

Remove-OPNSenseDHCPOption

SYNOPSIS

Removes a DHCP option from an OPNSense firewall.

SYNTAX

Remove-OPNSenseDHCPOption -Interface <String> -Number <Int32> [-WhatIf] [-Confirm]

DESCRIPTION

The Remove-OPNSenseDHCPOption cmdlet removes a DHCP option from an OPNSense firewall.

EXAMPLES

Example 1: Remove a DHCP option

Remove-OPNSenseDHCPOption -Interface "lan" -Number 66

This example removes DHCP option 66 (TFTP server name) from the LAN interface.

Example 2: Remove a DHCP option with confirmation

Remove-OPNSenseDHCPOption -Interface "lan" -Number 67 -Confirm

This example prompts for confirmation before removing DHCP option 67 (boot filename) from the LAN interface.

PARAMETERS

-Interface

The interface from which to remove the DHCP option.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-Number

The option number to remove.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

System.Int32

You can pipe strings containing the interface name and integers containing the option number to this cmdlet.

OUTPUTS

System.Object

Returns an object representing the result of the operation.

NOTES

This cmdlet requires a connection to an OPNSense firewall. Use Connect-OPNSense to establish a connection. After removing a DHCP option, the DHCP server service may need to be restarted for the changes to take effect.

Get-OPNSenseDHCPOption New-OPNSenseDHCPOption Set-OPNSenseDHCPOption Get-OPNSenseDHCPServer Set-OPNSenseDHCPServer