Solved

Disable screen saver with Powershell

Posted on 2013-06-01
5
3,211 Views
Last Modified: 2013-06-02
Is there a way turn off my Windows 7 screen saver using a Powershell script?
0
Comment
Question by:LesterJebson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 42

Accepted Solution

by:
sedgwick earned 400 total points
ID: 39213968
set-item -path 'HKCU:\Control Panel\Desktop\ScreenSaveActive' -value 0

Open in new window

you will need to reboot the machine to apply changes
1
 

Author Comment

by:LesterJebson
ID: 39215140
Sedgwick,

This looks very close but it's giving me an error when I try to run it.  Is the syntax above correct?

Set-Item : The registry key at the specified path does not exist.
At C:\Temp\FixScreenSaver.ps1:1 char:9
+ set-item <<<<  -path 'HKCU:\Control Panel\Desktop\ScreenSaveActive' -value 0
    + CategoryInfo          : InvalidArgument: (HKEY_CURRENT_US...creenSaveActive:String) [Set-Item], ArgumentException
    + FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.SetItemCommand

Thank you
0
 

Author Comment

by:LesterJebson
ID: 39215228
Sedgwick,

Thank you so much!  I slightly modified your example and it worked great.  This Powershell command turns off the screen saver.

set-ItemProperty -path 'HKCU:\Control Panel\Desktop' -name ScreenSaveActive -value 0
0
 

Author Closing Comment

by:LesterJebson
ID: 39215230
Thank you!
0

Featured Post

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question