Настройка сетевых интерфейсов Windows Server 2019 v1809
Сервер работает на виртуальной машине. Включена виртуализация Hyper-V. Есть несколько созданных виртуальных адаптеров и vSwitch. Пытаюсь выполнить команду:
PS C:\> Set-NetIPInterface -ifIndex 5 -AddressFamily IPv4 -Forwarding Enabled
Set-NetIPInterface : Element not found.
At line:1 char:1
+ Set-NetIPInterface -InterfaceIndex 5 -AddressFamily IPv4 -Forwarding ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (MSFT_NetIPInter...ystemName = ""):ROOT/StandardCimv2/MSFT_NetIPInterface) [Set-NetIPInterface]
, CimException
+ FullyQualifiedErrorId : Windows System Error 1168,Set-NetIPInterface
Хотя:
PS C:\> Get-NetIPInterface -ifIndex 5 -AddressFamily IPv4
ifIndex InterfaceAlias AddressFamily NlMtu(Bytes) InterfaceMetric Dhcp ConnectionState PolicyStore
------- -------------- ------------- ------------ --------------- ---- --------------- -----------
5 vEthernet (Ethernet0) IPv4 1450 15 Disabled Connected ActiveStore
Дополнительно:
PS C:\> Get-NetIPInterface -AddressFamily IPv4 -ifIndex 5 | Select-Object -Property *
Store : ActiveStore
AddressFamily : IPv4
Forwarding : Disabled
ClampMss : Disabled
Advertising : Disabled
NeighborUnreachabilityDetection : Enabled
RouterDiscovery : ControlledByDHCP
NeighborDiscoverySupported : Yes
ManagedAddressConfiguration : Enabled
OtherStatefulConfiguration : Enabled
WeakHostSend : Disabled
WeakHostReceive : Disabled
IgnoreDefaultRoutes : Disabled
AdvertiseDefaultRoute : Disabled
ForceArpNdWolPattern : Disabled
DirectedMacWolPattern : Disabled
EcnMarking : AppDecide
Dhcp : Disabled
ConnectionState : Connected
AutomaticMetric : Enabled
ifIndex : 5
ifAlias : vEthernet (Ethernet0)
Caption :
Description :
ElementName :
InstanceID :
CommunicationStatus :
DetailedStatus :
HealthState :
InstallDate :
Name : ?55<55;
OperatingStatus :
OperationalStatus :
PrimaryStatus :
Status :
StatusDescriptions :
AvailableRequestedStates :
EnabledDefault : 2
EnabledState :
OtherEnabledState :
RequestedState : 12
TimeOfLastStateChange :
TransitioningToState : 12
CreationClassName :
SystemCreationClassName :
SystemName :
NameFormat :
OtherTypeDescription :
ProtocolIFType :
ProtocolType :
AliasAddresses :
GroupAddresses :
LANID :
LANType :
MACAddress :
MaxDataSize :
OtherLANType :
AdvertisedRouterLifetime : 00:30:00
BaseReachableTime : 30000
CompartmentId : 1
CurrentHopLimit : 0
DadRetransmitTime : 1000
DadTransmits : 3
InterfaceAlias : vEthernet (Ethernet0)
InterfaceIndex : 5
InterfaceMetric : 15
IsolationId : 0
LowestIfNetLuid : 1689399800627200
NlMtu : 1450
ReachableTime : 20000
RetransmitTime : 1000
PSComputerName :
CimClass : ROOT/StandardCimv2:MSFT_NetIPInterface
CimInstanceProperties : {Caption, Description, ElementName, InstanceID...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
В чём дело? Куда смотреть?