# Configure Network Adapter

> Configures the IPv4 settings of a network adapter.

Source: https://docs.capaone.com/capaone/application-manager/powerbricks/bricks/configure-network-adapter/  
Product: CapaOne — a separate CapaSystems product; do not apply this page to any other.

Configures the IPv4 settings of a network adapter. Set the DNS servers on their own, switch an adapter to DHCP, or give it a static IP address, subnet, default gateway and DNS servers.\\n\\nThe brick changes only what you actually ask for. Addressing Mode and Register This Connection In DNS both have an Unchanged option, and both are Unchanged to begin with, so the most common fleet wide job - give every machine the same DNS servers and leave everything else exactly as it is - is a matter of filling in the DNS Servers field and nothing else.\\n\\nThe whole configuration is checked before anything is changed, and the address change is applied as the very last step, so a device is never left half configured. If the adapter already has the requested settings, nothing is changed.\\n\\nOnly IPv4 is configured. The IPv6 settings of the adapter are left untouched.\\n\\nBe aware that changing the address of the adapter a device uses to reach the network will interrupt its connection until the new settings work. Leaving Addressing Mode on Unchanged cannot cause that interruption.\\n\\nTip - one address per device: a static IP address typed in here is given to every device the workflow runs on, which is almost never what you want. When each device needs its own address, gateway or DNS servers, place an Execute PowerShell Snippet brick earlier in the same workflow, let it work out the correct values for the device it is running on, and let this brick use that result instead of a fixed value.

## Parameters

#### Adapter Selection
*Required* — Default: `Primary Adapter (Carries The Default Route)`

Selects which network adapter to configure.\\n\\nPrimary adapter picks the adapter that currently carries the default route, which is the adapter the device uses to reach the network. Use this when the adapter name is not known up front.\\n\\nSpecific adapter by name lets you point at one adapter using the name Windows shows for it. Allowed values: `Primary Adapter (Carries The Default Route)`, `Specific Adapter By Name`.

#### Adapter Name
*Optional*

The name of the adapter to configure, exactly as it is shown in Windows network connections. Example: Ethernet\\n\\nOnly used when Adapter Selection is set to Specific Adapter By Name. The brick stops with an error if no adapter with that name exists.

#### Addressing Mode
*Required* — Default: `Unchanged`

Decides how the adapter gets its IPv4 address.\\n\\nUnchanged leaves the address, subnet and gateway of the adapter exactly as they are and changes nothing about them. Use this when you only want to set the DNS servers, which is the most common reason to use this brick across a whole fleet. A device that has a static address keeps it, and a device on DHCP stays on DHCP.\\n\\nDHCP lets the network hand out the address automatically and removes any static address, gateway and DNS servers that were set before.\\n\\nStatic uses the IP Address, Subnet Prefix Length and Default Gateway below. The old address is replaced, not added to. If the adapter already has more than one IPv4 address the brick stops with an error instead of removing the extra ones.\\n\\nUnchanged is the default because it is the only option that cannot disturb a device that is already working on the network. Allowed values: `Unchanged`, `DHCP (Automatic)`, `Static`.

#### IP Address
*Optional*

The static IPv4 address to give the adapter. Example: 192.168.10.50\\n\\nRequired when Addressing Mode is Static and ignored when it is DHCP. Leave it empty when Addressing Mode is Unchanged - a value typed here together with Unchanged would never be applied, so the brick stops with an error instead of ignoring it quietly.\\n\\nLoopback, link local, multicast and broadcast addresses are rejected, and so is the network or broadcast address of the subnet.

#### Subnet Prefix Length
*Optional*

The size of the subnet written as the number of network bits. Example: 24 means the subnet mask 255.255.255.0\\n\\nRequired together with the IP Address when Addressing Mode is Static. Allowed values are 1 to 32. Ask whoever runs the network which value to use - a wrong subnet size lets a device talk to some addresses and not others, which is far harder to spot than no connection at all.\\n\\nLeave it empty when Addressing Mode is Unchanged or DHCP. A value typed here together with Unchanged would never be applied, so the brick stops with an error instead of ignoring it quietly.

#### Default Gateway
*Optional*

The IPv4 address of the router the device should use to reach other networks. Example: 192.168.10.1\\n\\nUsed when Addressing Mode is Static. The gateway must be inside the subnet described by the IP Address and Subnet Prefix Length, otherwise the brick stops before changing anything. Leave empty to configure the adapter without a gateway.\\n\\nLeave it empty when Addressing Mode is Unchanged - a value typed here together with Unchanged would never be applied, so the brick stops with an error instead of ignoring it quietly.

#### DNS Servers
*Optional*

The IPv4 DNS servers the adapter should use, in the order they should be tried. Put one server on each line, or separate them with a comma or a semicolon.\\n\\nExample:\\n192.168.10.10\\n192.168.10.11\\n\\nThis is the one field that is usually the same for every device, so filling in only this field and leaving Addressing Mode on Unchanged is the safest way to point a whole fleet at new DNS servers.\\n\\nLeave empty to keep the DNS servers the adapter already has when Addressing Mode is Unchanged or Static. When Addressing Mode is DHCP, leaving this empty resets DNS back to the servers handed out by DHCP.

#### Register This Connection In DNS
*Required* — Default: `Unchanged`

Enable to let the device register its address for this adapter in DNS, so it can be found by name. Disable for adapters that should not appear in DNS, such as an isolated management network.\\n\\nChoose Unchanged to leave this setting exactly as it is on the device. Unchanged is the default, so this brick does not quietly change how a device is registered in DNS when you only came to set the DNS servers. Allowed values: `Unchanged`, `Enabled`, `Disabled`.

## Details

- **Category:** Provisioning
- **Brick ID:** `Network-Configure`

## Raw JSON definition

```json
{
  "category": "provisioning",
  "description": "Configures the IPv4 settings of a network adapter. Set the DNS servers on their own, switch an adapter to DHCP, or give it a static IP address, subnet, default gateway and DNS servers.\\n\\nThe brick changes only what you actually ask for. Addressing Mode and Register This Connection In DNS both have an Unchanged option, and both are Unchanged to begin with, so the most common fleet wide job - give every machine the same DNS servers and leave everything else exactly as it is - is a matter of filling in the DNS Servers field and nothing else.\\n\\nThe whole configuration is checked before anything is changed, and the address change is applied as the very last step, so a device is never left half configured. If the adapter already has the requested settings, nothing is changed.\\n\\nOnly IPv4 is configured. The IPv6 settings of the adapter are left untouched.\\n\\nBe aware that changing the address of the adapter a device uses to reach the network will interrupt its connection until the new settings work. Leaving Addressing Mode on Unchanged cannot cause that interruption.\\n\\nTip - one address per device: a static IP address typed in here is given to every device the workflow runs on, which is almost never what you want. When each device needs its own address, gateway or DNS servers, place an Execute PowerShell Snippet brick earlier in the same workflow, let it work out the correct values for the device it is running on, and let this brick use that result instead of a fixed value.",
  "developerVendor": "CapaSystems A/S",
  "displayName": null,
  "id": "Network-Configure",
  "name": "Configure Network Adapter",
  "parameters": [
    {
      "allowManualInput": false,
      "defaultValue": null,
      "defaultValueObject": {
        "id": "PrimaryAdapter",
        "name": "Primary Adapter (Carries The Default Route)"
      },
      "description": "Selects which network adapter to configure.\\n\\nPrimary adapter picks the adapter that currently carries the default route, which is the adapter the device uses to reach the network. Use this when the adapter name is not known up front.\\n\\nSpecific adapter by name lets you point at one adapter using the name Windows shows for it.",
      "id": "AdapterSelection",
      "name": "Adapter Selection",
      "regExValidation": "",
      "required": true,
      "type": "ComboBox",
      "value": null,
      "values": [],
      "valuesObject": [
        {
          "id": "PrimaryAdapter",
          "name": "Primary Adapter (Carries The Default Route)"
        },
        {
          "id": "InterfaceAlias",
          "name": "Specific Adapter By Name"
        }
      ]
    },
    {
      "allowManualInput": false,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "The name of the adapter to configure, exactly as it is shown in Windows network connections. Example: Ethernet\\n\\nOnly used when Adapter Selection is set to Specific Adapter By Name. The brick stops with an error if no adapter with that name exists.",
      "id": "InterfaceAlias",
      "name": "Adapter Name",
      "regExValidation": "",
      "required": false,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": false,
      "defaultValue": null,
      "defaultValueObject": {
        "id": "Unchanged",
        "name": "Unchanged"
      },
      "description": "Decides how the adapter gets its IPv4 address.\\n\\nUnchanged leaves the address, subnet and gateway of the adapter exactly as they are and changes nothing about them. Use this when you only want to set the DNS servers, which is the most common reason to use this brick across a whole fleet. A device that has a static address keeps it, and a device on DHCP stays on DHCP.\\n\\nDHCP lets the network hand out the address automatically and removes any static address, gateway and DNS servers that were set before.\\n\\nStatic uses the IP Address, Subnet Prefix Length and Default Gateway below. The old address is replaced, not added to. If the adapter already has more than one IPv4 address the brick stops with an error instead of removing the extra ones.\\n\\nUnchanged is the default because it is the only option that cannot disturb a device that is already working on the network.",
      "id": "AddressingMode",
      "name": "Addressing Mode",
      "regExValidation": "",
      "required": true,
      "type": "ComboBox",
      "value": null,
      "values": [],
      "valuesObject": [
        {
          "id": "Unchanged",
          "name": "Unchanged"
        },
        {
          "id": "DHCP",
          "name": "DHCP (Automatic)"
        },
        {
          "id": "Static",
          "name": "Static"
        }
      ]
    },
    {
      "allowManualInput": false,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "The static IPv4 address to give the adapter. Example: 192.168.10.50\\n\\nRequired when Addressing Mode is Static and ignored when it is DHCP. Leave it empty when Addressing Mode is Unchanged - a value typed here together with Unchanged would never be applied, so the brick stops with an error instead of ignoring it quietly.\\n\\nLoopback, link local, multicast and broadcast addresses are rejected, and so is the network or broadcast address of the subnet.",
      "id": "IPAddress",
      "name": "IP Address",
      "regExValidation": "^\\s*$|^\\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(\\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}\\s*$",
      "required": false,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": false,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "The size of the subnet written as the number of network bits. Example: 24 means the subnet mask 255.255.255.0\\n\\nRequired together with the IP Address when Addressing Mode is Static. Allowed values are 1 to 32. Ask whoever runs the network which value to use - a wrong subnet size lets a device talk to some addresses and not others, which is far harder to spot than no connection at all.\\n\\nLeave it empty when Addressing Mode is Unchanged or DHCP. A value typed here together with Unchanged would never be applied, so the brick stops with an error instead of ignoring it quietly.",
      "id": "PrefixLength",
      "name": "Subnet Prefix Length",
      "regExValidation": "",
      "required": false,
      "type": "Integer",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": false,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "The IPv4 address of the router the device should use to reach other networks. Example: 192.168.10.1\\n\\nUsed when Addressing Mode is Static. The gateway must be inside the subnet described by the IP Address and Subnet Prefix Length, otherwise the brick stops before changing anything. Leave empty to configure the adapter without a gateway.\\n\\nLeave it empty when Addressing Mode is Unchanged - a value typed here together with Unchanged would never be applied, so the brick stops with an error instead of ignoring it quietly.",
      "id": "DefaultGateway",
      "name": "Default Gateway",
      "regExValidation": "^\\s*$|^\\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(\\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}\\s*$",
      "required": false,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": false,
      "defaultValue": "",
      "defaultValueObject": null,
      "description": "The IPv4 DNS servers the adapter should use, in the order they should be tried. Put one server on each line, or separate them with a comma or a semicolon.\\n\\nExample:\\n192.168.10.10\\n192.168.10.11\\n\\nThis is the one field that is usually the same for every device, so filling in only this field and leaving Addressing Mode on Unchanged is the safest way to point a whole fleet at new DNS servers.\\n\\nLeave empty to keep the DNS servers the adapter already has when Addressing Mode is Unchanged or Static. When Addressing Mode is DHCP, leaving this empty resets DNS back to the servers handed out by DHCP.",
      "id": "DnsServers",
      "name": "DNS Servers",
      "regExValidation": "^\\s*$|^\\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(\\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}([,;\\s]+(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(\\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3})*\\s*$",
      "required": false,
      "type": "TextBox",
      "value": null,
      "values": [],
      "valuesObject": null
    },
    {
      "allowManualInput": false,
      "defaultValue": null,
      "defaultValueObject": {
        "id": "Unchanged",
        "name": "Unchanged"
      },
      "description": "Enable to let the device register its address for this adapter in DNS, so it can be found by name. Disable for adapters that should not appear in DNS, such as an isolated management network.\\n\\nChoose Unchanged to leave this setting exactly as it is on the device. Unchanged is the default, so this brick does not quietly change how a device is registered in DNS when you only came to set the DNS servers.",
      "id": "RegisterInDns",
      "name": "Register This Connection In DNS",
      "regExValidation": "",
      "required": true,
      "type": "ComboBox",
      "value": null,
      "values": [],
      "valuesObject": [
        {
          "id": "Unchanged",
          "name": "Unchanged"
        },
        {
          "id": "Enabled",
          "name": "Enabled"
        },
        {
          "id": "Disabled",
          "name": "Disabled"
        }
      ]
    }
  ],
  "powershell": {
    "base64Encoded": true,
    "function": "ZnVuY3Rpb2..."
  },
  "type": "powerbrick",
  "version": "2026.10.8.1"
}
```
