question

AliUrz avatar image
0 Votes"
AliUrz asked XuDongPeng-MSFT commented

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

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-server-powershellwindows-group-policyms-edge
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

XuDongPeng-MSFT avatar image
0 Votes"
XuDongPeng-MSFT answered XuDongPeng-MSFT commented

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

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AliUrz ,

May I know if you have got any chance to check my answer? I am glad to help if you have any other questions.

0 Votes 0 ·
LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

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–

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.