To configure network with PowerShell you need to do:
1) Get the list of network interfaces: Get-NetIPInterface
2) Set address, mask and gateway: new-netipaddress -interfacealias «manage» -ipaddress «192.168.10.2» -prefixlength 21 -defaultgateway 192.168.10.1
3) Set DNS servers: set-dnsclientserveraddress -interfaceindex 30 -ServerAddresses 192.168.10.10,192.168.10.18
To add network adapter to nic teaming:
New-NetLbfoTeam -Name TestTeam -TeamMembers «Ethernet», «Ethernet 2» -WhatIf’
This command will create switchindependent team, with dynamic balancing.
Эта команда создаст switchindependent team, с динамической балансировкой. For convenience, you can rename adapters as well as temporarily disable the firewall and configure it remotely via mmc:
$NetAdapter = $NetAdapter | Rename-NetAdapter -NewName $NIC.NIC -PassThru netsh advfirewall set allprofiles state off

To configure network settings in PowerShell and set up NIC teaming, start by using `Get-NetAdapter` to list network adapters. Use `New-NetLbfoTeam` to create a NIC team, specifying team name and adapters. Configure IP settings with `New-NetIPAddress`. Verify settings with `Get-NetIPConfiguration`. NIC teaming enhances network performance and redundancy by combining multiple network interfaces into a single logical interface.