This commit is contained in:
FalsePhilosopher 2022-08-30 20:24:49 -06:00
parent 3b488d3d15
commit cb20b5739e
8 changed files with 22 additions and 22 deletions

View file

@ -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