Key Points
- Add a Location Toggle to Windows 11: Use registry edits to create a context menu item that toggles Location Services.
- Remove the Location Toggle Cleanly: Delete custom registry keys and supporting scripts to revert to the default context menu.
- Toggle Location via PowerShell: Deploy a script that modifies the Geolocation Service registry values to enable or disable Location Services.
- Verify Settings Changes in Windows 11: Check system Settings, app behavior, and registry values to confirm the toggle function works.
- Troubleshoot Registry and Script Issues: Fix toggle failures caused by execution policy blocks, incorrect paths, or policy conflicts.
The Location Services feature allows apps to track a device’s geographical location for accurate directions, relevant ads, and more. Enterprises seeking a streamlined workflow can add Location Services in the context menu (Windows 11), or remove it altogether for a cleaner look.
Control when apps access your precise location. This article explains how to add or remove the Location Services item in the context menu.
Remove or add location services in the context menu for Windows 11
Location Services uses Wi-Fi, IP address, and other device sensors to enable Windows features like Find my device and your Global Positioning Service (GPS), and modern tools allow IT experts to centrally manage its availability.
📌 Prerequisites:
- Windows 11 with administrative privileges
- Access to Registry Editor for HKCR and HKLM paths
- Basic understanding of location service behavior
- Optional RMM, Intune, or GPO environment for deployment
- Ability to run elevated commands if required
📌 Recommended deployment strategies:
Click to Choose a Method | 💻 Best for Individual Users | 💻💻💻 Best for Enterprises |
| Method 1: Check Current Location Services Status | ✓ | |
| Method 2: Add a Location Services Toggle to the Context Menu | ✓ | |
| Method 3: Use Group Policy to Enable or Disable Location Services Dynamically | ✓ | ✓ |
| Method 4: Remove the Context Menu Entry | ✓ | |
| Method 5: Validate location services after using the context menu | ✓ | ✓ |
Method 1: Check the current location services status
First, get a grasp of how Location Services is configured on your Windows 11 system before making any changes. Doing this helps avoid any complications with your OS while maintaining functionality with any business-critical tools. Here’s how:
📌 Use Cases: To check Location Services default settings.
- Press Win + I to open Settings.
- In the sidebar, click Privacy & security.
- Under App permissions, select Location.
- Check how Location Services is configured.
- This page lets you know if Location Services is enabled or disabled, which apps use Location Services, and which apps last used it.
Method 2: Add a location services toggle to the context menu
Adding the option to toggle Location Services from your right-click menu helps streamline routines when its features are relevant in your workflows.
📌 Use Cases: To add Location Services to the context menu via .reg file.
📌 Prerequisites: Administrative privileges, Windows 11 Pro and Enterprise.
- Press Win + I, type Notepad, and press Enter.
- Paste the following:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location]
"Icon"="taskbarcpl.dll,-9"
"MUIVerb"="Location Services"
"Position"="Bottom"
"SubCommands"=""
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location\Shell\001flyout]
"MUIVerb"="Turn On for Device"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location\Shell\001flyout\command]
@="PowerShell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/s,/c, Reg Add HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location /v Value /t REG_SZ /d \"Allow\" /f' -Verb runAs\""
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location\Shell\002flyout]
"MUIVerb"="Turn Off for Device"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location\Shell\002flyout\command]
@="PowerShell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/s,/c, Reg Add HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location /v Value /t REG_SZ /d \"Deny\" /f' -Verb runAs\""
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location\Shell\003flyout]
"MUIVerb"="Turn On for Apps"
"CommandFlags"=dword:00000020
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location\Shell\003flyout\command]
@="cmd /s /c \"Reg Add HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location /v Value /t REG_SZ /d \"Allow\" /f\""
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location\Shell\004flyout]
"MUIVerb"="Turn Off for Apps"
[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location\Shell\004flyout\command]
@="cmd /s /c \"Reg Add HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\CapabilityAccessManager\\ConsentStore\\location /v Value /t REG_SZ /d \"Deny\" /f\""
- Press Ctrl + S to save the file.
- Name it with the .reg extension.
- Select “All files” from the dropdown menu.
- Press Save.
- Run the file to merge it.
- When prompted by UAC, click Yes.
- Right-click the desktop to validate your changes.
Method 3: Use Group Policy to enable or disable location services dynamically
Using Group Policy Objects (GPO) allows administrators to enable or disable Location Services globally or for specific departments (OUs), ensuring compliance with privacy standards like GDPR or HIPAA.
📌 Use Cases: Centrally enforcing privacy zones or preventing sensitive location data from being broadcast by corporate laptops in high-security environments.
📌 Prerequisites: Administrative privileges; Windows 11 Pro, Enterprise, or Education; access to the Group Policy Editor.
- Open Group Policy Editor: Press Win + R, type gpedit.msc, and press Enter.
- For domain-wide changes, use the Group Policy Management Console (GPMC) on your Domain Controller.
- Navigate to Location Settings: In the left-hand sidebar, follow this path:
Computer Configuration > Administrative Templates > Windows Components > Location and Sensors - Configure “Turn off location”: * Double-click on the policy named Turn off location.
- To Disable Location: Select Enabled. (This prevents apps and the OS from accessing location data).
- To Allow Location: Select Not Configured or Disabled.
- Apply Changes: Click Apply, then OK.
- Force Update: To apply the policy immediately without a restart, open Command Prompt as Admin and type: gpupdate /force
Method 4: Remove the context menu entry
Here’s how to remove the Location Services toggle from your Windows 11 right-click menu:
📌 Use Cases: To remove the Location Services context menu from Windows 11 via scripts.
📌 Prerequisites: Administrative privileges, Windows 11 Pro and Enterprise.
Automated removal
- Open Notepad: Press Win + S, type Notepad, and press Enter.
- Paste the Removal Script:
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\DesktopBackground\Shell\Location]
- Save the File: Go to File > Save As. Name it RemoveLocation.reg and ensure “Save as type” is set to All Files.
- Execute: Double-click the RemoveLocation.reg file and click Yes on all prompts.
Manual removal
- Press Win + R, type regedit, and press Ctrl + Shift + Enter.
- If prompted by UAC, click Yes.
- Navigate to the following:
HKEY_CLASSES_ROOT\DesktopBackground\Shell\
- Right-click on the key used to toggle Location Services (e.g., LocationToggle), and choose Delete.
- Use File Explorer to browse for any .ps1 files you might have implemented to toggle Location Services and delete them.
- If you created a .ps1 script (as mentioned in Method 3), navigate to its folder (e.g., C:\Tools\) and delete the file to maintain a clean filesystem.
- Check your context menu from the desktop to confirm your changes were successful.
Method 5: Validate location services after using the context menu
Modifying low-level settings can sometimes produce invisible errors, making validation a must.
📌 Use Cases: To verify your changes while monitoring Location Services health.
📌 Prerequisites: Administrative privileges, Windows 11 Pro and Enterprise.
- Open your context menu and confirm if Location Services appears.
- Check your Settings.
- Press Win + I and go to Privacy & security > Location to check if your toggle works.
- Test apps that use location services.
- Services like Windows Maps or eCommerce platforms use your GPS to tailor your ads and provide accurate directions.
- Confirm Registry values.
- Open Registry Editor
- Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration
- Confirm Status
- Enabled = 1
- Disabled = 0
- Confirm any policy locks or admin configurations.
- If options appear unavailable or certain values are missing, your organization may have a policy that restricts any changes.
Troubleshooting Windows 11 location services
Small errors can cause far-reaching issues when it comes to editing Registry values and applying advanced scripts. Here’s how to fix the most common issues when you add “Location Services” in the context menu for Windows 11.
Toggle does not work
Users may encounter an unresponsive “Toggle Location Services” option when they click on it from their context menu. This usually happens because the PowerShell script that toggles the feature isn’t working properly. To fix this, do the following:
- Run the script manually.
- Revalidate the script under the \Shell\LocationToggle\command key
- Double-check the registry path and the exact command string for any typos.
Entry to add Location Services context menu in Windows 11 does not appear
The Location Services item can be hidden behind the “Show more options” context menu option, which tucks the legacy right-click menu away for a sleeker UI. To check, either click “Show more options”, or press Shift + right-click anywhere on your desktop.
Location resets after reboot
If Location Services can be successfully toggled, but reverts back to its previous state after a reboot or sign-in, it’s typically due to Group Policy, a Mobile Device Manager (MDM), or registry-enforced immutability. Review your domain’s policies to find any contradictions, and check the status of your Geolocation Service.
Script errors appear
If this happens to you, your PowerShell script likely has errors running in the background. To avoid guesswork, run an elevated command-line shell to see “path not found” error messages, denied access, or syntax errors. Afterward, apply any fixes and run your script by hand.
Multi-user devices not updating
Improper scope and deployment can cause inconsistent context menu behavior across your enterprise, even when your script is sound. To fix this, package the registry edits, push your settings through RMM or Group Policy Objects (GPOs), and test it with multiple user profiles to check for consistency.
Configure the Windows 11 location toggle to streamline routines
Controlling the Location Services shortcut in your enterprise’s right-click menu helps you streamline routine tasks or prioritize minimal UI. Built-in tools alone enable IT teams to perform context menu checks, Group Policy changes, packaged scripts, and validation workflows—while the right RMM centralizes your effort in one tool.
Related topics: