Not much to see here. I just had need of simply listing all the server names and IPs for all servers in a farm.

$report = @()

$servers = Get-SPServer | where {$_.role -ne "Invalid"}

$servers | foreach-object {
    $test = Test-Connection -Count 1 $_.Address

    $obj = New-Object System.Object
    $obj | Add-Member -type NoteProperty -Name ServerName -Value $_.Address
    $obj | Add-Member -type NoteProperty -Name IPV4Address -Value $test.IPV4Address
    $report += $obj
}

$report

The script gets all SharePoint application servers in the farm. Then iterates through them and tests if they are live. The test-connection is simply to get the IP address of the server. The name of the server and the IP address are thrown into a custom object. Then the report is called.