This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#One liner in which I use Invoke-Restmethod and select only the 4 properties keeping the output as an object for other operations | |
Invoke-RestMethod -Uri "www.telize.com/geoip" | Select-Object -Property longitude,latitude,continent_code,timezone | |
#Advanced function that just calls the above CmdLet | |
Function GetGeoInformation | |
{ | |
Invoke-RestMethod -Uri "www.telize.com/geoip" | |
} | |
#Use the dvanced function by placing the results in a variable |