domain scripts




為 User 設定 logon script

Basically, there are two ways to assign Logon scripts.

  • Profile tab of the user properties dialog in the Active Directory Users and Computers (ADUC)
  • Create a new GPO then go to User Configuration > Policies > Windows Settings > Scripts (Logon/Logoff) and then double-click on Logon

Open "Active Directory Users and Computers"

Expand the domain tree, locate the OU where the user is located

Right-click the user object, select Properties.

In the Profile tab, locate the Logon Script box.


Script 的位置



%SystemRoot%\SYSVOL\sysvol\<domain DNS name>\scripts

 * 否則 double click 執行時有 warning, 要求確定



支援的 Script

logon.bat, logon.cmd, logon.vbs, etc.