Created
April 26, 2018 15:05
-
-
Save flagranterror/b981d09823d6d857b46648b2ae3d2841 to your computer and use it in GitHub Desktop.
DHCP cmdlet
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
$wiredeth = get-netadapter -ifindex 10 | |
function set-dhcpme { | |
[CmdletBinding()] | |
param() | |
PROCESS { | |
$wiredeth | remove-netipaddress -confirm:$false | |
$wiredeth | remove-netroute -confirm:$false | |
$wiredeth | set-netipinterface -dhcp enabled | |
$wiredeth | set-dnsclientserveraddress -resetserveraddresses | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment