hi guys, i'm trying to write a script to configure several group policy items but unable to find their corresponding paths in the registry.the group policy items that i'm trying to configure are:1) computer configuration -> administrative templates -> control panel -> personalization -> do not display the lock screen2) computer configuration -> administrative templates -> system -> power management -> sleep settings -> require a password when a computer wakes (plugged in)3) user configuration -> administrative templates -> system -> power management -> prompt for password on resume from hibernate/suspendi want to use set-itemproperty to configure them in the registry but unable to find them. i did a registry search and found some powersettings keys but they don't seem to contain the values i'm looking for.
I'd really doubt if many would know where these registry settings are off the top of their heads, unless they, themselves mess with them regularly or in some past process / work.
So, discovery is often a matter manual digging and or of monitoring system actions, using say, the MS SysInternals tools https://docs.microsoft.com/en-us/sysinternals …
Process Monitor v3.50
Process Monitor is an advanced monitoring tool for Windows that shows real-time file system, Registry and process/thread activity.
It combines the features of two legacy Sysinternals utilities, Filemon and Regmon, and adds an extensive list of enhancements including rich and non-destructive filtering, comprehensive event properties such session IDs and user names, reliable process information, full thread stacks with integrated symbol support for each operation, simultaneous logging to a file, and much more.
…or other 3rdP thingy, as you make changes using the GPEditor, the saving / exporting those discoveries for later use, automation or manual. Well, that’s not what we are here to do. So, it’s just a matter of:
Remember, we are here to help with issues / errors you are having with your scripts.
This is not a PS issue or error. 8^}
It's a homework assignment, on Windows registry mining to discover what hives / keys are impacted if one does X or Y change / setting. 8^}
Also, remember as you use tools, they are running on the user context, so, changes can end up in the HKCU vs HKLM.
alright then, i didn't know automating windows is this complicated. i thought it was a matter of finding the registry item, set the value and done but i guess they made it more convoluted. job security? there's no reason for it to be this difficult but they had to bury the setting deep in the registry tree and gave it a different name. oh well, it is what it is....thanks for explanation.
Automating virtually any OS is complicated. That is the reason so many tools exists for that effort. Prior to PS, you had WMI/WMIC, VBS to deal with this sort of thing.
Windows being complicated is really not PS's fault of course, as Windows, Linux, Mainframe, etc., have been complicated for decades, that is why 'job security' is always there. Mobile is no better as it is not only impacted by the OS on the device, but the device itself. I have to deal with this craziness daily.
Like you, as dev myself since the mainframe (Fortran, Cobol, Assembler, JCL/CICS, etc..) days thru DBase, Delphi, PowerBuilder, C/C++, Visual Basic / VS.Net, WMI/WMIC, VBA, VBS, Monad/PS, etc., nothing about tech is uncomplicated. It's just different level of complications depending on what you are doing. So, the discovery is a must. I have go deal with all the primary platforms, and all have their own level of complication's to deal with.
I believe you said you were a web developer previously, and you know trying to write a web page to work with all browsers and browser versions on all OS's is a PTA. I been there as well.
The Windows registry is no joke. You have to know what you are doing with / to it or you can really cause undue harm to your system. There is a whole career path and tons of books (just look up Windows registry or Group policy on Amazon) - courseware (just look up the MS Official Training topics), written on the Registry, GPO (there are whole website dedicated to this topic alone. Check out https://www.grouppolicy.biz/), etc.
Thus if you really want to know this registry, GPO, stuff for what you are after, there is a lot to read up on. There are over 4.5K of registry entries by default in just the Administrative Template section. MS provides multi-tab spreadsheets for system admins with virtually all of them and additional tools.
Group Policy Settings Reference for Windows and Windows Server
These spreadsheets list the policy settings for computer and user configurations that are included in the Administrative template files delivered with the Windows operating systems specified. You can configure these policy settings when you edit Group Policy Objects.'microsoft.com/en-us/download/details.aspx?id=25250'
Group Policy settings that apply only to Windows 10 Enterprise and Education Editions'docs.microsoft.com/en-us/windows/client-management/group-policies-for-enterprise-and-education-editions'
LGPO.exe is a new command-line utility to automate the management of local group policy. It replaces the no-longer-maintained LocalGPO tool that shipped with the Security Compliance Manager (SCM), and the Apply_LGPO_Delta and ImportRegPol tools.
This is a good article regarding setting up user experience on a given host, with GPO. 'docs.microsoft.com/en-us/windows/configuration/set-up-shared-or-guest-pc'
yes, cross-browser compatibility is a pain to deal with, but it doesn't have to be if we can get browser makers to agree on a standard. technology could be fun and rewarding to work with but it was artificially made to be more difficult for whatever reasons. in my opinion, making windows easy for scripting is not impossible as something like say light speed traveling. traveling at the speed of light is truely impossible because we're limited by fundamental laws of physics but we have full control of making windows easy for scripting(which is the way it should be) but we're not doing that for some reason. why? oh well, it is what it is, moving on....