Answer the question
In order to leave comments, you need to log in
Windows 2008R2 limit RDP users to working hours?
Is Windows 2008R2 on which users on RDP come.
It is necessary that each user can enter there only during business hours, for example, from Monday to Friday from 9:00-18:00
Answer the question
In order to leave comments, you need to log in
For such purposes, for terminal servers that are not in the domain, I have two scripts. The first one disables user sessions and makes the user account inactive (the user cannot log in), the second one makes accounts active (the user can log in). List of users in a separate file, scripts are executed through scheduled tasks.
Script #1 (usrs_lock.cmd)
@echo off
for /F "eol=#" %%N in (C:\scripts\users_lock\userslist.txt) do (
net user %%N /active:no
query user %%N >"C:\scripts\users_lock\session.txt"
for /F "skip=1 tokens=3," %%i in (C:\scripts\users_lock\session.txt) do logoff %%i
del session.txt
)
@echo off
for /F "eol=#" %%N in (C:\scripts\users_lock\userslist.txt) do (
net user %%N /active:yes
)
1) Use the
Active Directory domain, set up accounts in it according to the model:
2) At 18:00 kick all users out of the terminal with a script usinglogoff
In general, the task of limiting logon time is a classic and is described in all manuals and tutorials on Windows Server.
But if the system administrator needs a link, then here you go .
First option :
Restrict access in the firewall only to your local network.
Came to work - work in the terminal.
Arrived after business hours - the security guard wouldn't let us in.
Second option :
We use a logon script for all users that launches the desired program, before that checking the time on the server: you can log in
from 8:45 to 18:15 - run the desired program.
At other times - it is impossible, we do logoff.
The third option has already been described below. Affects logging in after business hours and users' PCs.
fourth option :
According to the schedule, we change permissions to access the connection for a group of terminal users, forcibly throwing them out at 18:15. Or we change the membership of users in the group.
fifth option :
Enable or disable the ability to remotely connect to the server on a schedule
In Active Directory users And compters, in the properties of each user there is a Login Time.
All relevant users in your OU, make a Group Policy limit Login Time -> your request is resolved.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question