Skip to content

Instantly share code, notes, and snippets.

View Mukesh05's full-sized avatar

Mukesh Kumar Mukesh05

  • Bangalore, India
View GitHub Profile
@Mukesh05
Mukesh05 / ScriptingGamesAug15Soln.ps1
Last active August 29, 2015 14:26
Use of WebClient Class
#Use of WebClient Class
$webClient = New-Object System.Net.WebClient
$webClient.DownloadString("http://www.telize.com/geoip")| ConvertFrom-Json | Select-Object longitude,latitude,country_code,timezone | Format-Table -AutoSize
#This is a simple function to wrap the above
$webClient = New-Object System.Net.WebClient
$url="http://www.telize.com/geoip"
function Get-GeoInformation
{
[CmdletBinding()]
param
gwmi win32_OperatingSystem -cn localhost|select P*me,*j*,V*,@{N=’BIOSSERIAL';E={(gwmi -cn $_.pscomputername win32_bios).serialnumber}}