ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Disable Screensaver and User Lockout with PowerShell

    IT Discussion
    powershell windows windows 10 screensaver
    7
    17
    12.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • gjacobseG
      gjacobse @Mike Davis
      last edited by gjacobse

      @mike-davis said in Disable Screensaver and User Lockout with PowerShell:

      @gjacobse Your quotes got messed up in translation.

      I saw that too,.. and I used Notepad to confirm the copy / paste... still did the same thing.

      powershell Set-ItemProperty -Path ‘HKCU:\Software\Policies\Microsoft\Windows\Control Panel\Desktop\’ -Name ScreenSaveTimeOut -Value 0
      

      straight from NotePad

      Mike DavisM 1 Reply Last reply Reply Quote 0
      • Mike DavisM
        Mike Davis @gjacobse
        last edited by

        @gjacobse try typing it out and using the quote next to the enter key.

        gjacobseG 1 Reply Last reply Reply Quote 0
        • gjacobseG
          gjacobse @Mike Davis
          last edited by

          @mike-davis said in Disable Screensaver and User Lockout with PowerShell:

          @gjacobse try typing it out and using the quote next to the enter key.

          so this not the above:

          powershell Set-ItemProperty -Path "HKCU:\Software\Policies\Microsoft\Windows\Control Panel\Desktop\" -Name ScreenSaveTimeOut -Value 0
          
          Mike DavisM 1 Reply Last reply Reply Quote 0
          • Mike DavisM
            Mike Davis @gjacobse
            last edited by

            @gjacobse close. Try the single quote.

            1 Reply Last reply Reply Quote 0
            • gjacobseG
              gjacobse
              last edited by gjacobse

              Oh

              <redacted>

              1 Reply Last reply Reply Quote 0
              • gjacobseG
                gjacobse
                last edited by

                C:\Windows\system32>powershell Set-ItemProperty -Path 'HKCU:\Software\Policies\Microsoft\Windows\Control Panel\Desktop\' -Name ScreenSaveTimeOut -Value 0 
                Set-ItemProperty : Cannot find path 'HKCU:\Software\Policies\Microsoft\Windows\
                Control Panel\Desktop\' because it does not exist.
                At line:1 char:17
                + Set-ItemProperty <<<<  -Path 'HKCU:\Software\Policies\Microsoft\Windows\Contr
                ol Panel\Desktop\' -Name ScreenSaveTimeOut -Value 0
                    + CategoryInfo          : ObjectNotFound: (HKCU:\Software\... Panel\Deskto 
                   p\:String) [Set-ItemProperty], ItemNotFoundException
                    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetIt 
                   emPropertyCommand
                
                
                1 Reply Last reply Reply Quote 0
                • travisdh1T
                  travisdh1
                  last edited by

                  I'm resurrecting this old ghost today.

                  I've got a couple of police computers that they want the screensaver password turned off for. Our remote registry editor doesn't have HKCU available of course, and Powershell is giving me the same sort of errors it was for @gjacobse. Did anyone ever get it figured out, or am I stuck waiting for them to call me back?

                  dbeatoD T 2 Replies Last reply Reply Quote 0
                  • dbeatoD
                    dbeato @travisdh1
                    last edited by

                    @travisdh1 said in Disable Screensaver and User Lockout with PowerShell:

                    I'm resurrecting this old ghost today.

                    I've got a couple of police computers that they want the screensaver password turned off for. Our remote registry editor doesn't have HKCU available of course, and Powershell is giving me the same sort of errors it was for @gjacobse. Did anyone ever get it figured out, or am I stuck waiting for them to call me back?

                    Can you do this?

                    New-Item -Path Registry::HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\"Control Panel"\Desktop -Force
                    
                    

                    Then create it as the original post.

                    Set-ItemProperty -Path ‘HKCU:\Software\Policies\Microsoft\Windows\Control Panel\Desktop\’ -Name ScreenSaveTimeOut -Value 0
                    Set-ItemProperty -Path ‘HKCU:\Software\Policies\Microsoft\Windows\Control Panel\Desktop\’ -Name ScreenSaveActive -Value 0
                    Set-ItemProperty -Path ‘HKCU:\Software\Policies\Microsoft\Windows\Control Panel\Desktop\’ -Name ScreenSaverIsSecure -Value 0
                    
                    1 Reply Last reply Reply Quote 0
                    • T
                      thecreaitvone91
                      last edited by thecreaitvone91

                      This is how I do it, I think it's only on Windows 10 and newer so if you have older OSes it will not work. We have one that sets it to 900 seconds (15min) for every computer, then this one that removes it filtered to an AD Security Group I have the desktop guys add computer accounts too that shouldn't get the lock. The screensaver method is the older way before windows 10.

                      alt text

                      1 Reply Last reply Reply Quote 1
                      • T
                        thecreaitvone91 @travisdh1
                        last edited by thecreaitvone91

                        @travisdh1 said in Disable Screensaver and User Lockout with PowerShell:

                        I'm resurrecting this old ghost today.

                        I've got a couple of police computers that they want the screensaver password turned off for. Our remote registry editor doesn't have HKCU available of course, and Powershell is giving me the same sort of errors it was for @gjacobse. Did anyone ever get it figured out, or am I stuck waiting for them to call me back?

                        You can always browse to the HKEY_Users then the SID for the current user that is loggged in using remote registry, this is the same thing as HKCU.

                        Tip: if you don't want to look up the SID using powershell just right click on the SID and check the security settings, it should give you hints to who is who unless it's been customized.

                        1 Reply Last reply Reply Quote 1
                        • 1 / 1
                        • First post
                          Last post