clean up
This commit is contained in:
parent
3b488d3d15
commit
cb20b5739e
8 changed files with 22 additions and 22 deletions
|
@ -86,7 +86,7 @@ function Get-GeoLocation{
|
|||
try {
|
||||
Add-Type -AssemblyName System.Device #Required to access System.Device.Location namespace
|
||||
$GeoWatcher = New-Object System.Device.Location.GeoCoordinateWatcher #Create the required object
|
||||
$GeoWatcher.Start() #Begin resolving current locaton
|
||||
$GeoWatcher.Start() #Begin resolving current location
|
||||
|
||||
while (($GeoWatcher.Status -ne 'Ready') -and ($GeoWatcher.Permission -ne 'Denied')) {
|
||||
Start-Sleep -Milliseconds 100 #Wait for discovery.
|
||||
|
@ -95,7 +95,7 @@ function Get-GeoLocation{
|
|||
if ($GeoWatcher.Permission -eq 'Denied'){
|
||||
Write-Error 'Access Denied for Location Information'
|
||||
} else {
|
||||
$GeoWatcher.Position.Location | Select Latitude,Longitude #Select the relevent results.
|
||||
$GeoWatcher.Position.Location | Select Latitude,Longitude #Select the relevant results.
|
||||
}
|
||||
}
|
||||
# Write Error is just for troubleshooting
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue