Copy Allowed Logon Hours from One Account to Another

Copies the allowed logon hours from a template account (userTemplate) and assigns them to the MyerKen Active Directory user account. The MyerKen account will thus have the same logon hour restrictions as those assigned to the userTemplate account.

VBScript Code

On Error Resume Next

Set objUserTemplate = _
arrLogonHours = objUserTemplate.Get("logonHours")
Set objUser = _
objUser.Put "logonHours", arrLogonHours