Change logon hours for all users in Active Directory

G

Guest

I need some help to change the logon hours for all users in Active directory.
I have about several thousands accounts in AD, they located under several
different OU. They were created with several different template and they have
several different logon hours permit set. I would like to reset all of these
accounts to a same logon hours, only deny access from 12am to 2 am everyday.
Is there an easy and pain less way to do this? I Google to look for solution
and could not find any thing. Any advice? Thanks in advance.

Eric
 
L

lforbes

Brian Desmond MVP said:
ADModify from PSS should do the trick -
http://www.gotdotnet.com/workspaces/workspace.aspx?id=f5cbbfa9-e46b-4a7a-8ed8-3e44523f32e2

--
--
Brian Desmond
Windows Server MVP
(e-mail address removed)12.il.us

Http://www.briandesmond.com



template and they
have
reset all of
these
to 2 am
everyday.
look for
solution

Hi,

That sounds like a very cool tool. I have created all my own VBScripts
to modify users. I wish I had known about that tool a few years ago.
Luckily I have 2003 now which allows you to do most modifications in
the interface itself which is nice.

I have some scripts in case the tool doesn’t work.
http://www.sd61.bc.ca/windows2000

Cheers,

Lara
 
G

Guest

Hi Brian...Thanks for your suggestion of the ADModify tool...This tool is so
great, it definately a tool I will add to my tool box. However, this tool did
not allow me to modify logon hours, I could not find this anywhere when
running this tool and select all my users. Am I missing something here? Under
account tab, I don't see where I can modify login hours at all. Can you give
me some advice? Thanks Brian.

Eric
 
G

Guest

Hi Lara,

ADmodify Brian suggested is a ver cool tool, you should try it out. However,
it does not have the option to modify logon hours. I checked out your web
site and you have some very useful vbs script, however, I could not find a
script that would modify users logon hours? Do you have a script that would
help me do that? Thanks in advance.

Eric
 
L

lforbes

Derrick3 said:
Hi Lara,

ADmodify Brian suggested is a ver cool tool, you should try it
out. However,
it does not have the option to modify logon hours. I checked
out your web
site and you have some very useful vbs script, however, I
could not find a
script that would modify users logon hours? Do you have a
script that would
help me do that? Thanks in advance.

Eric


 > > ADModify from PSS should do the trick -
 > >
http://www.gotdotnet.com/workspaces/workspace.aspx?id=f5cbbfa9-e46b-4a7a-8ed8-3e44523f32e2
 > >
 > > --
 > > --
 > > Brian Desmond
 > > Windows Server MVP
 > > (e-mail address removed)12.il.us
 > >
 > > Http://www.briandesmond.com
 > >
 > >
 > > "Derrick" <[email protected]>
wrote in message
 > >
  > > > I need some help to change the logon hours
for all users in
 > > Active
 > > directory.
  > > > I have about several thousands accounts in
AD, they located
 > > under several
  > > > different OU. They were created with
several different
 > > template and they
 > > have
  > > > several different logon hours permit set. I
would like to
 > > reset all of
 > > these
  > > > accounts to a same logon hours, only deny
access from 12am
 > > to 2 am
 > > everyday.
  > > > Is there an easy and pain less way to do
this? I Google to
 > > look for
 > > solution
  > > > and could not find any thing. Any advice?
Thanks in advance.
  > > >
  > > > Eric

Hi,

Here is a MS article I found. It says you can set logon hours with the
net use command
http://support.microsoft.com/default.aspx?scid=kb;en-us;179450

Here is how to export and to do more than one user. Basically by
creating a batch file
http://support.microsoft.com/default.aspx?scid=kb;en-us;816666

Sounds easier than writing a script. I have the VBScript options
http://www.sd61.bc.ca/windows2000/Docs/VBScriptDir.doc but you would
have to modify the script to include the Get/put_LoginHours - Gets and
sets the time periods during each day of week indicating valid login
periods.

Cheers,

Lara
 
B

Brian Desmond [MVP]

I didn't actually check to see if ADModify could do this. I would have
expected it could. Since it can't, you're going to need to write a script -
see the other poster's response, as he gave you the pieces you need to do
this.

--
--
Brian Desmond
Windows Server MVP
(e-mail address removed)12.il.us

Http://www.briandesmond.com
 
G

Guest

Hi Lara,

Thanks so much for once again respond to my request message. However, I
can't use either solution links you provided. The first one is only apply to
users in Workgroup but my user is in domain. The second links is for users in
Windows 2003 domain but my user still in Windows 2000 domain.

I wonder any one else have any other suggestion?
 
L

lforbes

Derrick3 said:
Hi Lara,

Thanks so much for once again respond to my request message.
However, I
can't use either solution links you provided. The first one is
only apply to
users in Workgroup but my user is in domain. The second links
is for users in
Windows 2003 domain but my user still in Windows 2000 domain.

I wonder any one else have any other suggestion?


 > > Hi Lara,
 > >
 > > ADmodify Brian suggested is a ver cool tool, you
should try it
 > > out. However,
 > > it does not have the option to modify logon hours.
I checked
 > > out your web
 > > site and you have some very useful vbs script,
however, I
 > > could not find a
 > > script that would modify users logon hours? Do you
have a
 > > script that would
 > > help me do that? Thanks in advance.
 > >
 > > Eric
 > >
 > > "lforbes" wrote:
 > >
  > > > "Brian Desmond MVP" wrote:
  > > > > ADModify from PSS should do the trick -
  > > > >
 > >
http://www.gotdotnet.com/workspaces/workspace.aspx?id=f5cbbfa9-e46b-4a7a-8ed8-3e44523f32e2
  > > > >
  > > > > --
  > > > > --
  > > > > Brian Desmond
  > > > > Windows Server MVP
  > > > > (e-mail address removed)12.il.us
  > > > >
  > > > > Http://www.briandesmond.com
  > > > >
  > > > >
  > > > > "Derrick"
<[email protected]>
 > > wrote in message
  > > > >
 > >
  > > > > > I need some help to change the logon
hours
 > > for all users in
  > > > > Active
  > > > > directory.
  > > > > > I have about several thousands
accounts in
 > > AD, they located
  > > > > under several
  > > > > > different OU. They were created with
 > > several different
  > > > > template and they
  > > > > have
  > > > > > several different logon hours permit
set. I
 > > would like to
  > > > > reset all of
  > > > > these
  > > > > > accounts to a same logon hours, only
deny
 > > access from 12am
  > > > > to 2 am
  > > > > everyday.
  > > > > > Is there an easy and pain less way
to do
 > > this? I Google to
  > > > > look for
  > > > > solution
  > > > > > and could not find any thing. Any
advice?
 > > Thanks in advance.
  > > > > >
  > > > > > Eric
  > > >
  > > > Hi,
  > > >
  > > > That sounds like a very cool tool. I have
created all my own
 > > VBScripts
  > > > to modify users. I wish I had known about
that tool a few
 > > years ago.
  > > > Luckily I have 2003 now which allows you to
do most
 > > modifications in
  > > > the interface itself which is nice.
  > > >
  > > > I have some scripts in case the tool
doesn’t work.
  > > > http://www.sd61.bc.ca/windows2000
  > > >
  > > > Cheers,
  > > >
  > > > Lara
  > > >

Hi,

How about this one. It was listed on the Windows 2003 link. Basically
it really doesn’t matter the OS. The tools are pretty much the same.
Net User was an NT Tool.

http://support.microsoft.com/kb/318714/EN-US/

Cheers,

Lara
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top