Windows Server 2003


Active Directory Service - 2


objUser.ConnectClientPrintersAtLogon = [1,0] ObjUser.DefaultToMainPrinter = [1,0]objUser.TerminalServicesInitialProgram = [path to program]objUser.TerminalServicesWorkDirectory = [path to directory]objUser.TerminalServicesProfilePath = [path to directory]objUser.TerminalServicesHomeDirectory = [path to directory]objUser.TerminalServicesHomeDrive = [drive letter:]objUser.AllowLogon = [1,0]objUser.MaxDisconnectionTime = [minutes, 0 for never]objUser.MaxConnectionTime = [minutes, 0 for never]objUser.MaxIdleTime = [minutes, 0 for never]objUser.BrokenConnectionAction = [1,0] 1 = end session, 0 = disconnect the sesionobjUser.ReconnectionAction = [1.,0]      1 = original client only, 0 = any clientobjUser.EnableRemoteControl = [0,1,2,3,4]0 = Disable Remote Control 1 = Enable Notify & Enable Interact 2 = Disable Notify & Enable Interact 3 = Enable Notify & Disable Interact 4 = Disable Notify & Disable Interact

, :

objUser.SetInfo

:

Set objUser = GetObject(LDAP://cn=joe.user,ou=users,dc=example,dc=domain,dc=com) r: Set objUser = GetObject(WinNT://example/joe.user,user)objUser.ConnectClientDrivesAtLogon = 1objUser.ConnectClientPrintersAtLogon = 1 objUser.DefaultToMainPrinter = 1objUser.TerminalServicesInitialProgram = C:\windows\notepad.exeobjUser.TerminalServicesWorkDirectory = c:\windowsobjUser.TerminalServicesProfilePath = \\server\tsprofiles\joe.userobjUser.TerminalServicesHomeDirectory = \\server\home\joe.userobjUser.TerminalServicesHomeDrive = H:objUser.AllowLogon = 1objUser.MaxDisconnectionTime = 15objUser.MaxConnectionTime = 0objUser.MaxIdleTime = 180objUser.BrokenConnectionAction = 0objUser.ReconnectionAction = 0objUser.EnableRemoteControl = 1objUser.SetInfo

, , , ADSI .

Microsoft TechNet Script Center (http://www.microsoft.com/technet/scriptcenter) - . , .