-1

I would like to write a code in powershell to read a csv file, which would read a list of IP addresses of various servers and search for the attributes: "Managed By", "Owner" of the server. Would this be possible? How would the code look like?

Im not familiar with powershell so I have not tried much yet.

tzebe1
  • 11
  • Welcome as a new user to [SO]. Please take the [tour] and also read [ASK]. SO isn't a free script writing service nor a forum, but a site for programmers helping colleagues who got stuck with a distinct problem. Own research and serious coding attempts are expected. [Edit] the question to include **your** code in a [mcve] accompanied by samples of input and expected output. As PowerShell directly reads/imports `.csv` files, the tag Excel is completely irrelevant. –  Jul 31 '19 at 08:52

1 Answers1

0

I don't expect anyone is going to write this code for you, but it'll be easier for you to find answers if you split it into parts:

  1. Read a CSV file in PowerShell
  2. Get a computer name from an IP address
  3. Search Active Directory for a computer name
Gabriel Luci
  • 38,328
  • 4
  • 55
  • 84
  • Ahh no worries, the code was 10 lines, super simple (got someone on another forum website to explain it to me without down-voting me). lol people be making a huge deal as if this is a full on project.. arrogance is a big issue I see. But thanks for your breakdown :) – tzebe1 Aug 02 '19 at 07:49
  • I'm not the one who downvoted you. But people usually expect that you would give it a try yourself and ask for help if you run into a specific problem. – Gabriel Luci Aug 02 '19 at 12:57