<div data-elementor-type="wp-post" data-elementor-id="647" class="elementor elementor-647" data-elementor-post-type="post">
						<section class="elementor-section elementor-top-section elementor-element elementor-element-3dc0ff1 elementor-section-boxed elementor-section-height-default elementor-section-height-default" data-id="3dc0ff1" data-element_type="section">
						<div class="elementor-container elementor-column-gap-default">
					<div class="elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-c0df8c8" data-id="c0df8c8" data-element_type="column">
			<div class="elementor-widget-wrap elementor-element-populated">
						<div class="elementor-element elementor-element-fc8eaca elementor-widget elementor-widget-heading" data-id="fc8eaca" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Intro</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-bcb0ae8 elementor-widget elementor-widget-text-editor" data-id="bcb0ae8" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Some time ago I was requested by a client to roll out a script so their computers are locked when left unattended, I can certainly understand the importance of this feature as having a computer used by an unauthorised third-party is potentially catastrophic!</p><p>The security risks are endless and imagine if there isn&#8217;t a timeout set at all; the window of opportunity for unauthorised access is also potentially endless.</p><p><strong>This script is designed for a WorkGroup environment</strong>. <strong>If you have a domain environment, I suggest making these changes using GroupPolicy instead.</strong></p>								</div>
				</div>
				<div class="elementor-element elementor-element-13882e3 elementor-widget elementor-widget-heading" data-id="13882e3" data-element_type="widget" data-widget_type="heading.default">
				<div class="elementor-widget-container">
					<h2 class="elementor-heading-title elementor-size-default">Method</h2>				</div>
				</div>
				<div class="elementor-element elementor-element-48c8804 elementor-widget elementor-widget-text-editor" data-id="48c8804" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>We&#8217;re going to firstly going to make some changes via the registry; <span style="font-size: 15px; color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif;">These are CMD commands to be executed with administrator </span><span style="font-size: 15px; font-style: normal; font-weight: 400; color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif;">privileges</span></p><h3><b>Lock the computer when the screensaver is enabled:</b></h3><blockquote><p>REG ADD &#8220;HKLM\SOFTWARE\Policies\Microsoft\Windows\Control Panel\Desktop&#8221; /v ScreenSaverIsSecure /t REG_SZ /d 1</p></blockquote><h3><b> </b></h3><h3><b>Turn on the screensaver after 600 seconds of idleness:</b></h3><blockquote><p>REG ADD &#8220;HKLM\SOFTWARE\Policies\Microsoft\Windows\Control Panel\Desktop&#8221; /v ScreenSaveTimeOut /t REG_SZ /d 600</p></blockquote><p>Next, we are going to adjust the Windows power settings, so that the screen turns off shortly after the screensaver, to save power.<br />These commands are also to be ran in an administrative CMD prompt:</p><p> </p><blockquote><p>powercfg -change -monitor-timeout-ac 11</p></blockquote><blockquote><p>powercfg -change -monitor-timeout-dc 11</p></blockquote>								</div>
				</div>
				<div class="elementor-element elementor-element-3aca081 elementor-widget elementor-widget-text-editor" data-id="3aca081" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Thats it, now as long as all the computers have passwords set for their accounts, you&#8217;ve reduced the attack surface of idle computers in the organisation!</p>								</div>
				</div>
					</div>
		</div>
					</div>
		</section>
				</div>
		
CMD Script to set locking timeout policy on Windows computers
