JSI Tip 8391. How do I assign a logoff script to all users in my domain?

Someone asks me the subject question at least once a week, so in self defense:

  • Create a logoff.bat file in the %SystemRoot%\SYSVOL\sysvol\<DomainName>\Policies\<GUID>\USER\Scripts\Logoff folder on your domain controllers. To determine the <GUID>, on your domain controller:

    • Start / Run / dsa.msc / OK.
    • Right-click the domain and press Properties.
    • Select the Group Policy tab.
    • Right-click the Default Domain Policy and press Properties.
    • The <GUID> is in the Unique Name field.

  • Open the Default Domain Policy.

  • Navigate through User Configuration/Windows Settings/Scripts (Logon/Logoff).

  • Double-click Logoff in the right pane.

  • Press Add.

  • Type logoff.bat and press OK.

  • Press Show to confirm it knows where logoff.bat is.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.