logon hours

G

Guest

Guest
Archived from groups: microsoft.public.windowsnt.terminalserver.client (More info?)

Hi,

I have a stand-alone 2003 server with terminal service configured but
without being a member of a domain (also no AD)
Is it possible to create logonhours per user so sessions will be
disconnected or logged of at 11 ?
In AD there is a logon hour setting per user but I can't find it in 2003
standalone.

Thanks a lot

Bernard
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsnt.terminalserver.client (More info?)

No, you can't define logon hours with local accounts.
What you can do is schedule a job on the Terminal Server which
resets all sessions at 11:00.

Something like this:

for /f "tokens=2" %%i in ('qwinsta ^| find /i "listen"') do
echo y | rwinsta %%i


Explanation:
The For command runs the QWinsta command, which shows
all current sessions on your terminal server.

The output of the QWinsta command is then
searched, using the Find command, for the word "listen".
The word "listen" designates which sessions on your
terminal servers are the listeners. If you reset a listener, all
sessions running under that listener will be reset.

The For command then takes the output of
the Find command and looks at the second argument. This
argument is the session number of the listener. The For
command takes the argument and gives it to the RWinsta
command, which will then reset that session (the
listener). The Echo Y command merely says "yes" to
RWinsta asking if you are sure you know what you are doing

After the command resets the session, everyone will
be able to log back on immediately. If you want to avoid that, use
"change logon /disable" and "change logon /enable"

--
Vera Noest
MCSE,CCEA, Microsoft MVP - Terminal Server
http://hem.fyristorg.com/vera/IT
*----------- Please reply in newsgroup -------------*

"Bernard Dijkhuizen" <b.dijkhuizen@jestorkair.nl> wrote on 28 sep
2004:

> Hi,
>
> I have a stand-alone 2003 server with terminal service
> configured but without being a member of a domain (also no AD)
> Is it possible to create logonhours per user so sessions will be
> disconnected or logged of at 11 ?
> In AD there is a logon hour setting per user but I can't find it
> in 2003 standalone.
>
> Thanks a lot
>
> Bernard