Edge Browser

Eric 121 Reputation points
2022-10-20T16:53:48.58+00:00

Hello All,

I'm looking for a PowerShell script that will logout of the user profile before a computer reboot/logoff.

All your help is very appreciated

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,205 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,430 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Dillon Silzer 54,926 Reputation points
    2022-10-20T16:59:59.387+00:00

    Hi @enricom911

    I am assuming you are talking about logging them out of their Edge browser websites. You will want to delete the user's cache. Try the following script:

    Simple script to clear temp files and browser cache/history

    https://gist.github.com/mark05e/745afaf5604487b804ede2cdc38a977f

    -----------------------------------

    If this is helpful please accept answer.


  2. Dillon Silzer 54,926 Reputation points
    2022-10-20T18:10:05.4+00:00

    Hi @enricom911

    I believe that Edge ties you to the user account that is logged in (Office 365). You could try what has been suggested in https://techcommunity.microsoft.com/t5/windows-powershell/is-there-any-powershell-script-for-logging-out-office-account/m-p/2262858 (answer by Stefan_ITGuy)

    Write a PowerShell script that edits the registry:

    252623-image.png

    How to Get, Edit, Create and Delete Registry Keys with PowerShell

    https://blog.netwrix.com/2018/09/11/how-to-get-edit-create-and-delete-registry-keys-with-powershell/

    ----------------------------------

    If this is helpful please accept answer.

    0 comments No comments

  3. Limitless Technology 44,046 Reputation points
    2022-10-21T15:28:17.82+00:00

    Hello there,

    Based on your requirement have you tried the Kiosk Mode? Kiosk configurations are based upon either assigned access or shell launcher. There are several kiosk configuration methods that you can choose from https://learn.microsoft.com/en-us/windows/iot/iot-enterprise/kiosk-mode/kiosk-mode

    Do you need to sign off the user profile or close the Edge browser?

    The logoff utility can log off users remotely but requires the extra step of finding a session ID.

    logoff $sessionId /server:DC

    -----------------------------------------------------------------------------------------------------------------------------------------------------

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


  4. Yu Zhou-MSFT 12,541 Reputation points Microsoft Vendor
    2022-10-24T08:09:34.057+00:00

    Hi @enricom911

    I found that there's a group policy ForceEphemeralProfiles which can sign out Edge profile every time you close Edge. I think you can enable this policy in your organization as a workaround. Then when you reboot/logoff the computer, Edge will be closed, and it will sign out the profile. Except this, I don't find other ways to sign out Edge profile when reboot/logoff a computer.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Regards,
    Yu Zhou

    0 comments No comments