{"id":9009,"date":"2019-05-04T14:46:47","date_gmt":"2019-05-04T09:16:47","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=9009"},"modified":"2023-08-02T20:36:21","modified_gmt":"2023-08-02T15:06:21","slug":"auto-turn-off-monitor-when-lock-computer-workstation","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/auto-turn-off-monitor-when-lock-computer-workstation\/","title":{"rendered":"Automatically Turn off Monitor when you Lock your Computer"},"content":{"rendered":"<p>We saw how to <a href=\"https:\/\/www.winhelponline.com\/blog\/turn-off-monitor-shortcut-command-windows\/\">turn off your monitor<\/a> or <a href=\"https:\/\/www.winhelponline.com\/blog\/windows-sleep-hibernate-mode-command-line\/\">put your computer to sleep mode<\/a> using shortcuts. Also, we explained how to <a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-automatically-login-to-windows-and-then-lock-the-workstation\/\">automatically lock the workstation<\/a> immediately after automatic login to your account.<\/p>\n<p>By default, after you lock your workstation (computer), the display turns off automatically in 1 minute, and the lock screen <a href=\"https:\/\/www.winhelponline.com\/blog\/lock-screen-display-off-timeout-windows-10-8\/\">display off timeout can only be increased<\/a>. For some users, the 1-minute interval is not sufficient, and they need a mechanism to automatically turn off the monitor immediately after the computer is locked.<\/p>\n<p>In this article, we&#8217;ll see how to automatically turn off the monitor automatically when you lock your computer (<kbd>Win<\/kbd> + <kbd>L<\/kbd>). <!--more--><\/p>\n<h2>Automatically Turn off Monitor when you Lock your Computer<\/h2>\n<p>Turning off monitor &amp; locking the workstation can be automated using a <a href=\"#batch\">Windows Batch<\/a> file. But it won&#8217;t help if the computer locks automatically after the screensaver or Sleep timeout. So, we&#8217;ll see how to use Task Scheduler Trigger to accomplish the task.<\/p>\n<p><em><strong>Note:<\/strong> Before proceeding, we&#8217;ll need <strong>NirCmd<\/strong> or <strong>Wizmo<\/strong> utility that can turn off the monitor. Check out the article <a href=\"https:\/\/www.winhelponline.com\/blog\/turn-off-monitor-shortcut-command-windows\/\">How to Turn Off Monitor Using Shortcut or Command-line in Windows<\/a> for a brief overview of these tools and their <strong>download<\/strong> links.<\/em><\/p>\n<h3>Method 1: Using Task Scheduler<\/h3>\n<p>This is the preferred method.<\/p>\n<ol>\n<li>Launch Task Scheduler and click on the <strong>Create Task<\/strong> option.<\/li>\n<li>Assign a name and description for the task.<\/li>\n<li>Click on the Triggers tab, and click New&#8230;<\/li>\n<li>From the dropdown, select <strong>On workstation lock<\/strong>, and click OK.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16804\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/turn-off-monitor-workstation-lock-m1-2.png\" alt=\"turn off monitor when locking computer\" width=\"591\" height=\"516\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16805\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/turn-off-monitor-workstation-lock-m1-1.png\" alt=\"turn off monitor when locking computer\" width=\"632\" height=\"480\" \/>\n<\/li>\n<li>Click on the Actions tab, and click New&#8230;<\/li>\n<li>In the Program\/script: box, type in the path to <code>nircmd.exe<\/code><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16806\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/turn-off-monitor-workstation-lock-m1-3.png\" alt=\"turn off monitor when locking computer\" width=\"454\" height=\"500\" \/><\/li>\n<li>In the arguments box, type <code><strong>monitor off<\/strong><\/code> as the arguments and click OK, OK.<\/li>\n<\/ol>\n<p>A new scheduled task is now created, which triggers <code>nircmd.exe monitor off<\/code> command automatically when you lock the computer.<\/p>\n<hr \/>\n<h3>Method 2: Using Audit &amp; Task Scheduler<\/h3>\n<p>Here is another way to turn off the monitor automatically, but this is not the preferred method. Windows Pro versions have the Local Security Policy Editor which allows you to audit logon events. First, enable auditing of successful account logon events via Security Policy console. After you enable auditing, every login, logoff, lock and unlock workstation events are recorded in the Windows Event log. In Step 2, we&#8217;ll attach a scheduled task for the &#8220;lock workstation&#8221; event.<\/p>\n<h4>Step 1: Enable audit of logon events<\/h4>\n<ol>\n<li>Open the Local Security Policy (<code>secpol.msc<\/code>) console.<\/li>\n<li>Expand Security Settings \u2192 Local Policies \u2192 Audit Policy<\/li>\n<li>Double-click <strong>Audit logon events<br \/>\n<\/strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9020\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/turn-off-monitor-workstation-lock-1.png\" alt=\"automatically turn off monitor when computer is locked\" width=\"417\" height=\"507\" \/><\/li>\n<li>Enable the checkbox for <strong>Success<\/strong>, and click OK.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9019\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/turn-off-monitor-workstation-lock-2.png\" alt=\"automatically turn off monitor when computer is locked\" width=\"699\" height=\"326\" \/><\/li>\n<li>Exit Local Security Policy console.<\/li>\n<\/ol>\n<h4>Step 2: Create an Event Trigger for &#8220;Lock Workstation&#8221; event<\/h4>\n<p>After you enable auditing as in Step 1, workstation lock events are recorded in the Security event log as Event ID: <code>4800<\/code>. (Unlock workstation event has ID <code>4801<\/code>)<\/p>\n<ol>\n<li>Lock the workstation once using <kbd>Winkey<\/kbd> + <kbd>L<\/kbd> and then unlock it.<\/li>\n<li>Open Event Viewer (<code>eventvwr.msc<\/code>)<\/li>\n<li>Expand <strong>Windows logs<\/strong> \u2192 <strong>Security<\/strong><\/li>\n<li>In the middle pane, locate the recent event having the ID <strong>4800<\/strong>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9018\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/turn-off-monitor-workstation-lock-3.png\" alt=\"automatically turn off monitor when computer is locked\" width=\"700\" height=\"537\" \/><\/li>\n<li>Right-click on the event, and click <strong>Attach Task To This Event<\/strong><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9017\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/turn-off-monitor-workstation-lock-4.png\" alt=\"automatically turn off monitor when computer is locked\" width=\"700\" height=\"350\" \/><\/li>\n<li>In the next screen, assign a name for the scheduled task and click Next.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9016\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/turn-off-monitor-workstation-lock-5.png\" alt=\"automatically turn off monitor when computer is locked\" width=\"696\" height=\"488\" \/><\/li>\n<li>In the next screen, the Event ID and source are automatically filled up. Click Next.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9015\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/turn-off-monitor-workstation-lock-6.png\" alt=\"automatically turn off monitor when computer is locked\" width=\"696\" height=\"488\" \/><\/li>\n<li>In the Action window, click <strong>Start a program<\/strong>, and click Next.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9014\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/turn-off-monitor-workstation-lock-7.png\" alt=\"automatically turn off monitor when computer is locked\" width=\"696\" height=\"488\" \/><\/li>\n<li>In the Program\/script: box, type in the path to <code>nircmd.exe<\/code><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9013\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/turn-off-monitor-workstation-lock-8.png\" alt=\"automatically turn off monitor when computer is locked\" width=\"696\" height=\"488\" \/><\/li>\n<li>In the arguments box, type <code><strong>monitor off<\/strong><\/code> as the parameters and click Next.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9012\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/turn-off-monitor-workstation-lock-9.png\" alt=\"automatically turn off monitor when computer is locked\" width=\"696\" height=\"488\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-9011\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/05\/turn-off-monitor-workstation-lock-10.png\" alt=\"automatically turn off monitor when computer is locked\" width=\"410\" height=\"152\" \/><\/li>\n<\/ol>\n<p>A new scheduled task is now created, which will be automatically triggered when you lock the workstation using any method.\u00a0The new task is stored under <strong>Task Scheduler Library<\/strong> \u2192 <strong>Event Viewer Tasks<\/strong> in Task Scheduler. This is because the above task was created via Event Viewer <strong>Attach Task To This Event<\/strong> (a.k.a. <em>Event Trigger<\/em>) option.<\/p>\n<p><em><strong>Editor&#8217;s note:<\/strong> After some time, if you think you no longer want to turn off the monitor when locking the computer, reverse the steps listed under &#8220;Step 1&#8221; so that your <strong>Security<\/strong> event log is not flooded with login\/logoff\/lock\/unlock workstation events. Then, manually delete the scheduled task using Task Scheduler.<\/em><\/p>\n<hr \/>\n<div class=\"qt\">\n<h4><a id=\"batch\"><\/a>Lock Workstation &amp; Turn off Display using Windows Batch file<\/h4>\n<p>You can also use a Windows Batch file to lock your workstation &amp; turn off the monitor in a single click. Again, you&#8217;ll need NirCmd or Wizmo.<\/p>\n<p>Create a Batch file (say, <code>lock-and-turn-off-monitor.bat<\/code>) using Notepad with the following contents:<\/p>\n<pre>RunDll32.exe user32.dll,LockWorkStation\r\nC:\\Windows\\nircmd.exe monitor off<\/pre>\n<p>Running the Batch file will accomplish the task!<\/p>\n<\/div>\n<p>That&#8217;s it! Press <kbd>Winkey<\/kbd> + <kbd>L<\/kbd> to lock the workstation now. It will automatically trigger your &#8220;Turn off monitor&#8221; scheduled task, and your monitor(s) will now turn off automatically!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We saw how to turn off your monitor or put your computer to sleep mode using shortcuts. Also, we explained how to automatically lock the workstation immediately after automatic login to your account. By default, after you lock your workstation (computer), the display turns off automatically in 1 minute, and the lock screen display off &#8230; <a title=\"Automatically Turn off Monitor when you Lock your Computer\" class=\"read-more\" href=\"https:\/\/www.winhelponline.com\/blog\/auto-turn-off-monitor-when-lock-computer-workstation\/\" aria-label=\"Read more about Automatically Turn off Monitor when you Lock your Computer\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[7],"tags":[335,581],"class_list":["post-9009","post","type-post","status-publish","format-standard","hentry","category-windows","tag-nircmd","tag-task-scheduler"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":179,"url":"https:\/\/www.winhelponline.com\/blog\/how-to-automatically-login-to-windows-and-then-lock-the-workstation\/","url_meta":{"origin":9009,"position":0},"title":"How to Automatically Login and Auto-Lock Workstation After Login","author":"Ramesh","date":"April 13, 2008","format":false,"excerpt":"Setting up an automatic login in Windows also comes with a great responsibility to safeguard the user account from unauthorized use. After configuring automatic login to your user account, you may also want to set it to lock the workstation immediately at login. Contents Step 1: Setting up Automatic Login\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"auto login and lock scheduler time delay","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/04\/autolock-pc-scheduler-time-delay.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/04\/autolock-pc-scheduler-time-delay.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/04\/autolock-pc-scheduler-time-delay.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2008\/04\/autolock-pc-scheduler-time-delay.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":8806,"url":"https:\/\/www.winhelponline.com\/blog\/turn-off-monitor-shortcut-command-windows\/","url_meta":{"origin":9009,"position":1},"title":"Turn Off Monitor Using Shortcut or Command-line in Windows","author":"Ramesh","date":"April 23, 2019","format":false,"excerpt":"My new Samsung Curved monitor has the power button on the rear end, perhaps for aesthetic purposes. I have been using monitors that have controls on the front or underneath the bezel all these years. Now, with the new monitor, I find it a little bit inconvenient to reach out\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"controlmymonitor turn off primary monitor using desktop shortcut","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/controlmymonitor.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/controlmymonitor.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2019\/04\/controlmymonitor.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":5004,"url":"https:\/\/www.winhelponline.com\/blog\/lock-screen-display-off-timeout-windows-10-8\/","url_meta":{"origin":9009,"position":2},"title":"Increase Lock Screen Display Off Timeout in Windows 10 and 11","author":"Ramesh","date":"December 28, 2016","format":false,"excerpt":"The lock screen which exists in Windows 8 and higher is an additional screen with a background image. The lock screen, which conceals the login screen, shows the time and date, quick status of running apps and the current Windows Spotlight image details. After 60 seconds of no user activity,\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/lock-screen-header.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/lock-screen-header.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/lock-screen-header.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3693,"url":"https:\/\/www.winhelponline.com\/blog\/disable-lock-screen-in-windows\/","url_meta":{"origin":9009,"position":3},"title":"How to Disable the Lock Screen in Windows 10 and 11","author":"Ramesh","date":"August 5, 2016","format":false,"excerpt":"Do you find the Windows lock screen inconvenient and unnecessary? This post explains how to disable the lock screen in Windows 10 and 11. The lock screen although conceals the login screen with a nice looking wallpaper, it takes an extra mouse click, touch, or keypress to go to the\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"nolockscreen - gpo to disable lock screen","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/nolockscreen-gpo.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/nolockscreen-gpo.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/08\/nolockscreen-gpo.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":18534,"url":"https:\/\/www.winhelponline.com\/blog\/users-must-enter-user-name-and-password-missing\/","url_meta":{"origin":9009,"position":4},"title":"&#8220;Users must enter a user name and password&#8221; option missing","author":"Ramesh","date":"September 12, 2020","format":false,"excerpt":"When you open the User Accounts dialog by running control userpasswords2 or netplwiz.exe to configure automatic login to your user account, the Users must enter a user name and password to use this computer option may be missing in that dialog. As a result, you're unable to configure auto-login to\u2026","rel":"","context":"In &quot;Windows 10&quot;","block_context":{"text":"Windows 10","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-10\/"},"img":{"alt_text":"userpasswords2 password checkbox missing","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/09\/userpasswords2-option-missing-4.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/09\/userpasswords2-option-missing-4.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/09\/userpasswords2-option-missing-4.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/09\/userpasswords2-option-missing-4.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":4502,"url":"https:\/\/www.winhelponline.com\/blog\/new-spotlight-wallpaper-notify-windows-10-lock-screen\/","url_meta":{"origin":9009,"position":5},"title":"Get Notified When Windows 10 Brings a New Spotlight Image Every time [Lock Screen]","author":"Ramesh","date":"November 2, 2016","format":false,"excerpt":"Windows Spotlight brings some amazing wallpapers for the Lock Screen, which you can save and use as your desktop background. By now, I'm pretty sure most users know how to view and store the lock screen images collection from the Assets folder. Then I made a post on how to\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"get notified new spotlight image","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/newfilego-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/newfilego-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/11\/newfilego-1.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/9009","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=9009"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/9009\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=9009"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=9009"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=9009"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}