Privacy and Security Clear Location Last Accessed History in Windows 11


  • Staff
Location_banner.png

Microsoft operates a location service that helps determine the precise geographic location of your Windows device. The precise location of your device allows apps to give you directions, show shops and restaurants that are near you, and more.

When one or more apps are currently using your device location through the Windows location service, you’ll see the location icon in the notification area of your taskbar. Hover over the icon to see the name of the app or apps using location.

You can also look in Settings > Privacy & security > Location to see which apps are currently using your location or have recently or previously accessed your location. If an app had accessed your location, it will have a last accessed time stamp to let you know when.

See also:

If wanted, you can clear the location last accessed history by Windows apps (Microsoft Store apps) and desktop apps.

This tutorial will show you how to clear the location last accessed history by apps for your account in Windows 11.


EXAMPLE: Location last accessed history by apps

Settings > Privacy & security > Location

Last_accessed_by_Microsoft_Store_apps.png
Last_accessed_by_desktop_apps.png



Here's How:

1 Click/tap on the download button below to download the Clear_location_last_accessed_history_for_current_user.bat file.


(Contents of BAT file for reference)
Code:
@echo off

:: Clear Microsoft Store apps last accessed history
Powershell -Command "Get-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location\* | Remove-ItemProperty -Name LastUsedTimeStart -ErrorAction SilentlyContinue"

Powershell -Command "Get-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location\* | Remove-ItemProperty -Name LastUsedTimeStop -ErrorAction SilentlyContinue"


:: Clear desktop apps last accessed history
Powershell -Command "Get-Item -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location\NonPackaged\* | Remove-Item -Recurse -Force"

2 Save the BAT file to your desktop.

3 Unblock and run the BAT file.

4 You will now see a command prompt quickly flash open and close to run the commands to clear the location last accessed by apps history.

5 You can now delete the BAT file if you like.


That's it,
Shawn Brink


 

Attachments

  • Location.png
    Location.png
    10.4 KB · Views: 12
  • Clear_location_last_accessed_history_for_current_user.bat
    878 bytes · Views: 23

Latest Support Threads

Top Bottom