Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

get-GPRegistryValue retrieval of screen saver parameters

$
0
0

This is driving me up the wall, and I think that I'm missing something blindingly obvious.

I need to pull a report on the screen saver config - timeout, security, etc. and no matter how I try this, it blows me out.  Here's the code:

Import-Module grouppolicy

foreach ($geePeeOh in (Get-GPO -All)) {

Get-GPRegistryValue -GUID $($geePeeOh.Id) -Key "HKCU\Software\Policies\Microsoft\Windows\Control Panel\Desktop" -ValueName ScreenSaveTimeOut

}

This shouldn't be a big problem - running on a clean install of a2012 AD controller (I've changed the policy so I can run scripts), however ...

Really can't understand the problem with this - I've removed the value, move up the tree, whatever I do it just keeps telling me that it can't finf the registry setting.

Any ideas?

Thanks,

- Andrew


Viewing all articles
Browse latest Browse all 6937

Trending Articles