Scenario:
User has csv with hostnames or one or two hostnames. User needs to answer multiple options such as "Do you have CSV or Just a Hostname?" and then depending on the answer more input such as "Please enter a file path for CSV" or "Enter a hostname"
After which I need to use if statements and for each loops to pull the json data from a website. Lastly I need to out-file that data and validate with convertfrom-json.
I have a good Function built called "Get-UserInput. I am stuck on how to pass that input through to scrape the hosts for the json data. Any help is much appreciated as this is my first more complex powershell script.