Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Duplicate mac addresses with different ip addresses on separate DHCP servers

$
0
0

I'm trying to merge split scopes on two dhcp servers into one. The following powershell gives me sort of what I want

Powershell
#Get all the scopes in the Primary Server# Modify $PrimaryDHCPServer to the name of your DHCP server$ListofScopesandTheirReservations=@()$PrimaryDHCPServer="2012-DHCP1"$Scopes=Get-DhcpServerv4Scope-ComputerName$PrimaryDHCPServer#For all scopes in the primary server, get the scope options and add them to $ListofSCopesandTheirReservationsforeach($IndividualScopein$Scopes){$ListofScopesandTheirReservations+=get-DhcpServerv4Reservation-ComputerName$PrimaryDHCPServer-ScopeId$IndividualScope.ScopeId|select*,@{label=DHCPServer;Expression={$PrimaryDHCPServer}}}$PrimaryDHCPServer="2012-DHCP2"$Scopes=Get-DhcpServerv4Scope-ComputerName$PrimaryDHCPServerforeach($IndividualScopein$Scopes){...

Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>