15 lines
841 B
PowerShell

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