I am a newbie trying to learn PS. I thought an easy learning opportunity would be to create a script to check ARIN’s API for a list of IPs (sourceip.txt) and output the results to a list apioutput.txt. While I worked through all the errors I had been receiving, I cannot get the output to work. Any assistance would be greatly appreciated.
is not helpful at all. What does that mean? If you get error messages you should share them completely (formatted as code, please)
How does you input file look like? And what do you expect your output file to look like? (When you poast sample data format it as code as well, please).
I do not receive any errors or output, using Visual Studio Code. My input file looks like this (though I’ve substituted my IP list with random, private IP for the sake of an example:
10.10.10.0
192.168.4.24
10.240.10.0
I am not getting output to show you, but it would be a json version of this from Arin:
Network
Net Range 142.250.0.0 - 142.251.255.255
CIDR 142.250.0.0/15
Name GOOGLE
Handle NET-142-250-0-0-1
Parent NET142 (NET-142-0-0-0-0)
Net Type Direct Allocation
Origin AS AS15169
Organization Google LLC (GOGL)
Registration Date 2012-05-24
Last Updated 2012-05-24
Comments
RESTful Link https://whois.arin.net/rest/net/NET-142-250-0-0-1
See Also Related POC records.
See Also Related organization's POC records.
See Also Related delegations.