Created
July 18, 2016 13:08
-
-
Save Stephanevg/6ec21b070dea3a406aa57e057783ef74 to your computer and use it in GitHub Desktop.
Manage-SurfaceNetworkAdapter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Get-CMSurfaceNetworkAdapter { | |
Param( | |
[string]$Add, | |
[string]$Remove, | |
[switch]$ListSurfaceAdapters | |
) | |
#Based on following technet article: https://blogs.technet.microsoft.com/system_center_configuration_manager_operating_system_deployment_support_blog/2015/08/27/reusing-the-same-nic-for-multiple-pxe-initiated-deployments-in-system-center-configuration-manger-osd/ | |
$Root = 'HKLM:\SOFTWARE\Microsoft\SMS\Components\SMS_DISCOVERY_DATA_MANAGER' | |
$Item = 'ExcludeMACAddress' | |
if ($ListSurfaceAdapters){ | |
Get-NetAdapter | ? {$_.ifDesc -eq 'Surface Ethernet Adapter'} | |
}elseif($Add){ | |
#Too add | |
elseif($Remove){ | |
#Too Add | |
} | |
}else{ | |
(Get-ItemProperty -Path $Root -Name $Item).$Item | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment