Get-MACtoIP.psm1
function Get-MACtoIP { param ( [Parameter(Position = 0, Mandatory = $true)][String]$MACAddress ) # Activate this line below when HDQ-DC1 has been replaced. Has an issue with invoke-command with its FQDN. # $dhcpservers = Get-DhcpServerInDC | select -ExpandProperty DnsName $convertedMAC = $MACAddress -replace ':','-' Invoke-Command hdq-dc1,hdq-dc6 {Get-DhcpServerv4Scope | Get-DhcpServerv4Lease | where ClientId -eq $convertedMAC} } |