Windows Server Login Script example

By donmc, 20 March, 2012

Found here:
\\domain.local\sysvol\domain.local\Policies\foldername\USER\Scripts\Logon

Login Script example:

Dim WSHELL, SETNETTIME
CONST DOMAINNAME = "myDomain"

Set WSHELL = Wscript.CreateObject("Wscript.Shell")

SETNETTIME = "net time /DOMAIN:" & DOMAINNAME & "/set /y"
'wscript.echo("Syncing workstation time with server time!")

WSHELL.run(SETNETTIME)
wscript.echo("Time has been Set." & vbCrLf & "Other Scripts disabled.")