11 lines
633 B
PowerShell

$ethernetPortSettingsRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_EthernetPortSettings WHERE InstanceID='Intel(r) AMT Ethernet Port Settings 0'")
$ethernetPortSettingsInstance = $ethernetPortSettingsRef.Get()
$ethernetPortSettingsInstance.SetProperty("DHCPEnabled", "false")
$ethernetPortSettingsInstance.SetProperty("IPAddress", "192.168.0.1")
$ethernetPortSettingsInstance.SetProperty("SubnetMask", "255.255.255.0")
$fwVersion = GetCoreVersion
if($fwVersion.ToString() -lt "4.0")
{
$ethernetPortSettingsInstance.SetProperty("SharedMAC", "false")
}
$ethernetPortSettingsRef.Put($ethernetPortSettingsInstance)