Skip to content

Instantly share code, notes, and snippets.

@PrateekKumarSingh
Created February 5, 2018 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PrateekKumarSingh/73862be686b5803ad29c06dc5f714a87 to your computer and use it in GitHub Desktop.
Save PrateekKumarSingh/73862be686b5803ad29c06dc5f714a87 to your computer and use it in GitHub Desktop.
Foreach($server in Get-Content C:\temp\servers.txt){
Test-Connection ($server.ToString()+'ilo') -Count 1 -ErrorAction SilentlyContinue |`
Select-Object @{l='Server Name';e={($_.address -split "ilo")[0]}},
@{l='iLO Ip Address';e={$_.ipv4address}}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment