Solved

Powershell Script to output IP and MAC from Servers text file

Posted on 2014-12-31
6
279 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
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Requirements: root access via SSH, telnet, or other.. Alternately, access from the server administrator to run a counter-strike server, and the proper access rights to do so. Enough free disk space (and allowed to use this much, eg disk quota): 6…
Patch Management is administrated by page 129 of  the following document:     http://support.dell.com/support/edocs/software/smdmc/11/en/ug/ug.pdf However, there are issues with Patch Management with FTP (for instance, a slow Internet connectio…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

911 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now