Solved

Powershell Script to output IP and MAC from Servers text file

Posted on 2014-12-31
6
303 Views
Last Modified: 2015-01-02
I need to come up with a script that can output just the IP Address and MAC address of each server to a CSV file.

I have a file that lists all my server hostnames. ex. C:\Scripts\AllServers.txt

Can someone help me with a powershell script that would do this.

TIA!
0
Comment
Question by:DBThomson76
  • 3
  • 3
6 Comments
 
LVL 9

Assisted Solution

by:Sean
Sean earned 100 total points
ID: 40525370
http://techibee.com/powershell/powershell-get-ip-address-subnet-gateway-dns-serves-and-mac-address-details-of-remote-computer/1367

This looks like what you want and a little more. But if you only want IP and MAC address you could use a tool called NetScan. All you need to do is put in a range of IP addresses and it will find all computers that respond and give you the MAC address

https://www.softperfect.com/products/networkscanner/
0
 

Author Comment

by:DBThomson76
ID: 40525391
I need to be able to export the Hostname, IP Address, and MAC Address to a CSV file.
0
 

Accepted Solution

by:
DBThomson76 earned 0 total points
ID: 40525420
I was able to get it to provide the information that I needed by using the following command.

Get-IPDetails.PS1 -ComputerName (get-content c:\temp\servers.txt) | export-csv c:\temp\Name_IP_MAC_output.csv -notypeinformation

Thanks for your help!
0
Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

 

Author Comment

by:DBThomson76
ID: 40525614
I've requested that this question be closed as follows:

Accepted answer: 0 points for DBThomson76's comment #a40525420

for the following reason:

After getting the Get-IPDetails.pl1 powershell script and combining it with the rest of the command line it work as expected.
0
 
LVL 9

Expert Comment

by:Sean
ID: 40525536
Why did you not mark my answer as correct then if your using the link that i sent to you?
0
 
LVL 9

Expert Comment

by:Sean
ID: 40525615
Used link provided to find answer but no credit given
0

Featured Post

Save the day with this special offer from ATEN!

Save 30% on the CV211 using promo code EXPERTS30 now through April 30th. The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Expanding a Partition on OS drive within VM 20 117
Linux KVM - How to create a new VM with a dynamic / thin disk? 16 91
Windows 2008 Server repair 13 67
RAID, not sure what Type ?? 14 148
INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration, of the HP EVA 4400 SAN Storage. The name , IP and the WWN ID’s used here are not the real ones. ABOUT THE STORAGE For most of you reading this, you …
Usually shares are where we want them for our users and we tend to take them for granted. There are times, however, when those shares may disappear causing difficulty for your users. One of the first things to try is searching for files that shou…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question