top of page

PowerShell - 3 part with .bat to clean Teredo, Isatap and 6to4 hidden adapters

  • Writer: Jon Boyette
    Jon Boyette
  • Jan 10, 2022
  • 1 min read

Starting with the bat, save this simple .bat with name of choice, win it runs, it displays the network ID's for you NIC(s), These are in the event you are not using IPV6.



@Echo Off


netsh int ipv4 show interfaces


timeout /t 30 /nobreak


2nd - Save or copy and paste locally on machine and run, this will disable the hidden IPV6 adapters. If you use IPV6, of course this isnt applicable.


Set-NetTeredoConfiguration -Type Disabled

Set-NetIsatapConfiguration -State Disabled

Set-Net6to4Configuration -State disabled


3rd. This is where the ID becomes important, save as a .ps1, or copy and paste, enter the ID that the bat shown is the card in use that needs the edits.


#Set DNS Suffix - Must know Interface Index

$a = Read-Host "Enter Interface ID Number"

$b = Read-Host "Enter Domain FQDN to set DNS Suffix"

Set-DnsClient -InterfaceIndex $a -ConnectionSpecificSuffix $b


Now the IPconfig will not be riddled with hidden adapter "growing" information and a much cleaner and resource friendly IPV4 network as the result.

 
 
 

Recent Posts

See All
PowerShell - List All Domain SPNs

Save as same List_ALL_SPNs.ps1 or similar, this LDap calls the Domain for all Service Principal names and accounts related #Build LDAP...

 
 
 
PowerShell - Start-Monitoring

This is a great script used to Monitor and Email if a server is up or down, once ran, and smtp and from address is set, then run:...

 
 
 

Comments


Post: Blog2 Post
  • Facebook
  • Twitter
  • LinkedIn

©2022 by Boyette Technical Services. Proudly created with Wix.com

bottom of page