Solved

Disable screen saver with Powershell

Posted on 2013-06-01
5
3,032 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
ID: 39213421
0
 
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
0
 

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
No module found pypyodbc, 3 32
Completely eliminate the Repeat Delay when pressing & holding a key in Windows 6 33
OS Selection Menu 1 47
Keyboard / User? 7 23
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
An article on effective troubleshooting
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

809 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