i have 50 servers names, i need a script which has to give output of 50 servers ip addresses , if i give servers names.
can any one help me this script.
Have you tried anything? A quick Google search "Powershell IP Lookup" produced link: http://blogs.msdn.com/b/powershell/archive/2006/06/26/647318.aspx
It tells you it can be done with a one-liner:
Using Get-Content (get names from a list) and a foreach loop will provide the data you are looking for from DNS. See if you can put the pieces together and learn.
If you need actual adapter IP's, like if you are doing NIC teaming and need all IP's, then you will need to look at Win32_NetworkAdapter and Win32_NetworkAdapterConfiguration.
You must be logged in to reply to this topic.