Solved

Disable screen saver with Powershell

Posted on 2013-06-01
5
2,811 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
  • 3
5 Comments
 
LVL 23

Expert Comment

by:tailoreddigital
Comment Utility
0
 
LVL 42

Accepted Solution

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

Open in new window

you will need to reboot the machine to apply changes
0
 

Author Comment

by:LesterJebson
Comment Utility
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
Comment Utility
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
Comment Utility
Thank you!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…
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…

771 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now