When working with Windows 8 Tablets, like the Venue 11 Pro, geolocation can be difficult.  I developed a script to determine how to get an approximate location into the K1000 as a custom inventory field.

First create a PowerShell script called location.ps1

================== Contents of Location.ps1  ============================
$MyPublicIP = (Invoke-WebRequest 'http://myip.dnsomatic.com' -UseBasicParsing).Content
$html = Invoke-WebRequest -Uri "http://freegeoip.net/xml/$myPublicIP" -UseBasicParsing 
$content = [xml]$html.Content
$content.response  | Out-File C:\Temp\location.txt

This will dump location data into C:\Temp in a file called location.txt

Next we need to create a custom inventory field to capture that data.  I called mine Location and used the following Custom Inventory Rule:

ShellCommandTextReturn(type C:\temp\location.txt)

Lastly, create a script to run the PowerShell command and gather the inventory.  Upload the location.ps1 as a dependency of the script.

In a task add an action that will run a batch file with the following contents:

powershell.exe -nologo -executionpolicy bypass -WindowStyle hidden -noprofile -file "location.ps1"

Add another action after that action that launches a program which starts in the $(KACE_INSTALL) directory and launches kdeploy.exe with the paramters -custominventory

Run this script on your machines and the custom inventory will look something like this:

Ip :
CountryCode : US
CountryName : United States
RegionCode : FL
RegionName : Florida
City : Tampa
ZipCode : 33626
Latitude : 28.0898
Longitude : -82.576
MetroCode : 539
AreaCode : 813