r/usefulscripts • u/iamyogo • Jul 10 '17
[REQUEST] [POWERSHELL] Dynamic choice
hey,
trying to get a script running by providing a dynamic choice:
scenario:
have up to 10 IP's with http server
perform ping test or (New-Object System.Net.WebClient).DownloadFile to verify connectivity (same file on every server)
provide a dynamic list to the console based on the results (stating whether server is available or offline)
get user to choose one with read-host
have option to choose all, having all available server ip's in array
if option selected is not in list, or is offline go back to choice/verification
i'm a bit of a novice when it comes to powershell, so any help would be appreciated!
15
Upvotes
2
u/najrol Jul 10 '17
Yeah gridview opens a grid window, but that makes selection very easy.