Got bored – wrote this little thing to output FQDN and IPaddress for all Windows and UnixLinux agents in my lab environment.
Could be useful for some people maybe.
ipmo operationsmanager $nixservers = get-scomclass -name "Microsoft.Unix.Computer" | Get-SCOMMonitoringObject $winservers = Get-SCOMClass -name "Microsoft.Windows.Computer" | Get-SCOMMonitoringObject Write-host "-----------------------------------------------------------------" write-host "-------------------- Unix Computers and IPs ---------------------" Write-host "-----------------------------------------------------------------" foreach ($nix in $nixservers) { write-host ([System.Net.Dns]::GetHostAddresses($nix) | foreach {echo $nix - $_.IpAddressToString}) } Write-host "-----------------------------------------------------------------" write-host "------------------- Windooze Computers and IPs ------------------" Write-host "-----------------------------------------------------------------" foreach ($win in $winservers) { write-host ([System.Net.Dns]::GetHostAddresses($win) | foreach {echo $win - $_.IpAddressToString}) }
Thank god it’s Friday…
-F