Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
This script will remove all IP information from the system
For more info please visit
#Requires -Version 3
#Requires -RunAsAdministrator
$Items = @('DhcpDefaultGateway','DhcpDomain','DhcpIPAddress','DhcpNameServer','DhcpServer','DhcpSubnetMask','DhcpSubnetMaskOpt')
Foreach ($Item in $Items){
Get-ChildItem -Path HKLM:\SYSTEM -Recurse -ErrorAction SilentlyContinue | Where-Object {$_.Property -eq $Item } | Get-ItemProperty -Name $Item | Set-ItemProperty -Name $Item -Value $null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.