Domain Logon Script Location
Is it possible to have a logon script on just a single server which gets executed there regardless of the user who logs on.
Domain logon script location. The default location for logon scripts is the netlogon share of a domain controller. Below you will see the location of my script. Logon scripts that are stored on the local computer apply only to users who log on to the local computer.
The default location for local logon scripts is the systemroot system32 repl imports scripts folder. It can presumably be changes from this default but i ve never met anyone that had a reason to. Powershell scripts and click add to add my script.
In the add a script dialog box do. To find the logon script settings start by clicking edit then navigate to the user configuration expand the windows settings folder scripts and logon. Local logon scripts must be stored in a shared folder that uses the share name of netlogon or be stored in subfolders of the netlogon folder.
Find the logon script container in group policy. To get list of domain controllers programatically see this article. Open the local group policy editor.
In the results pane double click logon. To configure logon script i ll use the group policy management console and edit a gpo called logon. On the server this is located.
My top tip is to copy your logon script into memory so that it is ready to paste. In the console tree click scripts logon logoff. The path is user configuration windows settings scripts logon logoff.