SlideShare a Scribd company logo
HOW TO ADD LOCAL USER THROUGH
BATCH FILE WITH TIME RESTRICTION IN
WINDOWS
Suppose your computer is set up in an environment where most people
have access to it. Now, if you are thinking of using parental controls to
help establish the limits, you could be correct at times. Still, parental
controls work fine only with a Microsoft account. While creating user
accounts, you can customize them with permissions; you can set time
limits on any local accounts on your computer. For this, you just have to
make use of the Control Panel window and the interface will guide you
with creating a new user.
Sometimes you may feel to add new users through the command prompt
instead of using the computer's user interface. You have one other
option where you can create a batch file with the command to create a
new user. Once you run the batch file, the user will be created.
ADDING A LOCAL USER THROUGHBATCH FILE:
Open a Notepad file on your computer. Type the command net user
(type your user name) (Password) /add; for example, if you want to
create a user name user1, the command should look like net user user1
pwd /add. Now click File followed by Save as and type the file name as
“user.bat” including the quotes. Hit the Save button by selecting the file
destination. Now, double-click the batch file you just created and this will
open the command prompt window. Also, this will create the user named
user1 with password pwd.
CREATINGUSER WITH TIME RESTRICTION:
Earlier, we saw how to add a user to your computer using a batch file.
Windows provides options using which you can restrict the access time
for any particular user. The time restriction can be added while creating
the user itself. But, if you have already created a user, can you set the
time restrictions? Yes, you can. All you need to do is type a line of code in
the command prompt. In case you want to do this as well using a batch
file, then it is similar to creating a user using a batch file.
Open a text file and type the command net user <username>
/time:<day>,<time> in it. You need to modify this syntax to your
requirements.
ENTERINGTHE REQUIREDDETAILS INSIDE THE TAGS <>:
Type the user name in <username>. Replace the tag <day> with the day
you want to set limits on. You can write the names of the days or use
short names or initials such as the following: Su, M, T, W, Th, F, Sa.
Replace <time> with a 12-hour format or 24-hour format. You have the
limitation of using one-hour increments only, so don’t add any minutes to
the time format as it won't accept. You can restrict a user account to
some time duration, let's say from 9:00 am to 6:00 pm on Sunday. You
can specify the range of days using the following command: net user
user1 /time: M-Th, 9 am-6 pm. If you are using the command but still
leave the blank space in time, this will lead to a temporary lockout to your
account.
The above-discussed procedure can be used to add a local user through a
batch file with time restrictions in Windows.

More Related Content

PDF
tips n tricks
PPTX
Wordpress back up files using dropbox
PPT
MacBook Deployment
PPTX
WORDPRESS MANUAL INSTALL ON GODADDY
PDF
TM 2nd qtr-3ndmeeting(java script-functions)
PPT
Progress Book
PDF
PPT
Training Computer
tips n tricks
Wordpress back up files using dropbox
MacBook Deployment
WORDPRESS MANUAL INSTALL ON GODADDY
TM 2nd qtr-3ndmeeting(java script-functions)
Progress Book
Training Computer

What's hot (12)

DOCX
10 gmail tricks
PPTX
How to Write a Clean HTML Blog Post for your CMS
PPTX
HTML Tutorial
PDF
Debugging the mastery test
PPTX
Canonicalisation
PPTX
Offline blog tools
PDF
4th quarter 17 php & my sql registration page
DOCX
How to use slideshare.net
PDF
Fixed: MS Word the File is Corrupted and Cannot be Opened
PPTX
33 meta
PPT
Java script
PPTX
How to build augmented reality for Single Page Application using browser exte...
10 gmail tricks
How to Write a Clean HTML Blog Post for your CMS
HTML Tutorial
Debugging the mastery test
Canonicalisation
Offline blog tools
4th quarter 17 php & my sql registration page
How to use slideshare.net
Fixed: MS Word the File is Corrupted and Cannot be Opened
33 meta
Java script
How to build augmented reality for Single Page Application using browser exte...
Ad

Similar to How to add local user through batch file with time restriction in windows (20)

PPTX
Batch FIles
PDF
Exchange Outlook 2007 Setup
PDF
Exchange outlook2007setup
PDF
Lession 3 introduction to database
PDF
Create a meteor chat app in 30 minutes
DOCX
Control panel by
PDF
DOCX
Microsoft Word Editing Version 1.0Software Requirement Speci.docx
DOCX
Microsoft Word Editing Version 1.0Software Requirement Speci.docx
PDF
Asc timetables id_p1
PPTX
Getting started with Website Project and Sublime Text 2
PDF
Users guide
DOCX
ASP.NET MVC3 RAD
DOC
Deploying office 2010 via group policy
PPT
MS Access Training
PPT
DocPublisher - How To Install
PPT
Darkroom 2 lightroom and photoshop actions and plugins
PDF
Learning Joomla! In 30 Days
PPTX
DevLearn 2017 - Getting Started with Adapt
PPTX
Odoo 13 Document Management
Batch FIles
Exchange Outlook 2007 Setup
Exchange outlook2007setup
Lession 3 introduction to database
Create a meteor chat app in 30 minutes
Control panel by
Microsoft Word Editing Version 1.0Software Requirement Speci.docx
Microsoft Word Editing Version 1.0Software Requirement Speci.docx
Asc timetables id_p1
Getting started with Website Project and Sublime Text 2
Users guide
ASP.NET MVC3 RAD
Deploying office 2010 via group policy
MS Access Training
DocPublisher - How To Install
Darkroom 2 lightroom and photoshop actions and plugins
Learning Joomla! In 30 Days
DevLearn 2017 - Getting Started with Adapt
Odoo 13 Document Management
Ad

More from How to Setup and Install (20)

PDF
How to Find Printer IP Address
PDF
How To Use HP Envy 4520 Airprint Setup
PDF
How to Print On HP Envy 4510 Printer?
PDF
How to Print From iPhone to HP Envy 4520
PDF
123 HP Printer Reviews on HP Envy, Officejet and etc
PPTX
Mail Stuck In Mac Outbox Guidelines!!!
PPTX
[Solved] iCloud Mail Not Receiving Mails
PPTX
Fix: Gmail Inbox Not Showing All Mail
PPTX
Att net mail settings
DOCX
How to Connect Canon TS3120 Printer to My HP Laptop?
DOC
HP LASERJET MFP M234SDWE UNBOXING SETUP
DOC
HOW TO SETUP CANON PIXMA TR7020 PRINTER?
DOC
Canon selphy cp1200 error messages displayed on the screen
DOC
HOW TO FIX THE GLOBE ICON NO INTERNET CONNECTION IN WINDOWS 10?
DOC
Unable to print amazon return label 2020
DOC
How to schedule a task for system shutdown on windows 10
DOC
How to Schedule Zoom Meeting through Microsoft Outlook 365?
DOC
How to Install R Studio on Ubuntu 20.04? | Simple Guidelines
DOC
HOW TO CONFIGURE OR INSTALL CHROMECAST IN TV
DOC
HOW TO INSTALL OR CONFIGURE THE CANON 1435 PRINTER ON WINDOWS 10?
How to Find Printer IP Address
How To Use HP Envy 4520 Airprint Setup
How to Print On HP Envy 4510 Printer?
How to Print From iPhone to HP Envy 4520
123 HP Printer Reviews on HP Envy, Officejet and etc
Mail Stuck In Mac Outbox Guidelines!!!
[Solved] iCloud Mail Not Receiving Mails
Fix: Gmail Inbox Not Showing All Mail
Att net mail settings
How to Connect Canon TS3120 Printer to My HP Laptop?
HP LASERJET MFP M234SDWE UNBOXING SETUP
HOW TO SETUP CANON PIXMA TR7020 PRINTER?
Canon selphy cp1200 error messages displayed on the screen
HOW TO FIX THE GLOBE ICON NO INTERNET CONNECTION IN WINDOWS 10?
Unable to print amazon return label 2020
How to schedule a task for system shutdown on windows 10
How to Schedule Zoom Meeting through Microsoft Outlook 365?
How to Install R Studio on Ubuntu 20.04? | Simple Guidelines
HOW TO CONFIGURE OR INSTALL CHROMECAST IN TV
HOW TO INSTALL OR CONFIGURE THE CANON 1435 PRINTER ON WINDOWS 10?

Recently uploaded (20)

PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Cell Types and Its function , kingdom of life
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Cell Structure & Organelles in detailed.
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
master seminar digital applications in india
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
O7-L3 Supply Chain Operations - ICLT Program
2.FourierTransform-ShortQuestionswithAnswers.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Microbial diseases, their pathogenesis and prophylaxis
Module 4: Burden of Disease Tutorial Slides S2 2025
Cell Types and Its function , kingdom of life
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Final Presentation General Medicine 03-08-2024.pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
VCE English Exam - Section C Student Revision Booklet
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Anesthesia in Laparoscopic Surgery in India
Cell Structure & Organelles in detailed.
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
GDM (1) (1).pptx small presentation for students
master seminar digital applications in india
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Supply Chain Operations Speaking Notes -ICLT Program

How to add local user through batch file with time restriction in windows

  • 1. HOW TO ADD LOCAL USER THROUGH BATCH FILE WITH TIME RESTRICTION IN WINDOWS Suppose your computer is set up in an environment where most people have access to it. Now, if you are thinking of using parental controls to help establish the limits, you could be correct at times. Still, parental controls work fine only with a Microsoft account. While creating user accounts, you can customize them with permissions; you can set time limits on any local accounts on your computer. For this, you just have to make use of the Control Panel window and the interface will guide you with creating a new user. Sometimes you may feel to add new users through the command prompt instead of using the computer's user interface. You have one other option where you can create a batch file with the command to create a new user. Once you run the batch file, the user will be created. ADDING A LOCAL USER THROUGHBATCH FILE: Open a Notepad file on your computer. Type the command net user (type your user name) (Password) /add; for example, if you want to create a user name user1, the command should look like net user user1 pwd /add. Now click File followed by Save as and type the file name as “user.bat” including the quotes. Hit the Save button by selecting the file destination. Now, double-click the batch file you just created and this will open the command prompt window. Also, this will create the user named user1 with password pwd. CREATINGUSER WITH TIME RESTRICTION: Earlier, we saw how to add a user to your computer using a batch file. Windows provides options using which you can restrict the access time
  • 2. for any particular user. The time restriction can be added while creating the user itself. But, if you have already created a user, can you set the time restrictions? Yes, you can. All you need to do is type a line of code in the command prompt. In case you want to do this as well using a batch file, then it is similar to creating a user using a batch file. Open a text file and type the command net user <username> /time:<day>,<time> in it. You need to modify this syntax to your requirements. ENTERINGTHE REQUIREDDETAILS INSIDE THE TAGS <>: Type the user name in <username>. Replace the tag <day> with the day you want to set limits on. You can write the names of the days or use short names or initials such as the following: Su, M, T, W, Th, F, Sa. Replace <time> with a 12-hour format or 24-hour format. You have the limitation of using one-hour increments only, so don’t add any minutes to the time format as it won't accept. You can restrict a user account to some time duration, let's say from 9:00 am to 6:00 pm on Sunday. You can specify the range of days using the following command: net user user1 /time: M-Th, 9 am-6 pm. If you are using the command but still leave the blank space in time, this will lead to a temporary lockout to your account. The above-discussed procedure can be used to add a local user through a batch file with time restrictions in Windows.