How create a script or set a group policy to force Microsoft Edge to clear a spesifc website cookies after closing Microsoft Edge?

AliUrz 1 Reputation point
2022-04-20T20:20:16.843+00:00

Hi,

I was able to find a setting in Microsoft Edge settings to clear cookies for a specific website after closing Microsoft Edge, but how I can apply this to few machines using Group Policy (I couldn't find anything in Edge ADMX that can do this) or any kind of scripts?

Thanks

Windows for business Windows Server User experience PowerShell
Windows for business Windows Client for IT Pros User experience Other
Microsoft Edge Microsoft Edge development
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2022-04-21T02:58:34.58+00:00

    Hi @AliUrz ,

    Base on your description, have you tried the policy CookiesSessionOnlyForUrls. I think it should meet your requirement.

    When you enable this policy and configure the required site list, cookies created by websites that match a URL pattern you define are deleted when the session ends (when the window closes).

    For more details, please refer to this doc: Microsoft Edge Policy - CookiesSessionOnlyForUrls.

    By the way, if you haven't installed Microsoft Edge Policy Template, please refer to this tutorial.

    Regards,
    Xudong Peng


  2. Limitless Technology 39,916 Reputation points
    2022-04-26T10:56:58.383+00:00

    Hi there,

    You can use ClearBrowsingDataOnExit to Clear browsing data when Microsoft Edge closes.

    If you enable this policy, all browsing data is deleted each time Microsoft Edge closes. Note that if you enable this policy, it takes precedence over how you configured 'DefaultCookiesSetting' (Configure cookies).

    -Go to HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER
    -Software\Policies\Microsoft\Edge
    -ClearBrowsingDataOnExit
    -REG_DWORD
    Enabled Value 1
    Disabled Value 0

    To exclude cookies from being deleted on exit, configure the 'SaveCookiesOnExit' (Save cookies when Microsoft Edge closes) policy.


    --If the reply is helpful, please Upvote and Accept it as an answer–

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.