This topic contains 2 replies, has 3 voices, and was last updated by
September 2, 2014 at 10:15 pm #18466ParticipantTopics: 3Replies: 2Points: 0Rank: Member
in Windows server 2008 r2 , for this manual process
open run >gpedit.msc > computer configuration > windows templates > windows update > specify intranet microsoft update service location > https://www.10.101.10.10.com and also state should be enabled.
May i know how to do this from powershell script.
Thanks in Advance
September 3, 2014 at 6:28 am #18471KeymasterTopics: 13Replies: 4872Points: 1,811Rank: Community Hero
Those settings are entirely in the registry. You could probably open the ADM/ADMX file to see specifically where in the registry, and you could certainly use PowerShell's registry drives (HKCU: and HKLM:) to modify the appropriate registry keys. I don't personally know where those settings are in the registry – you would need to research that. http://technet.microsoft.com/en-us/library/dd939844(v=ws.10).aspx would be a good place to start – I believe it lists the keys you are looking for.
September 3, 2014 at 6:55 am #18476MemberTopics: 9Replies: 2322Points: 0Rank: Member
When you modify a setting that's under "Administrative Templates" in the group policy editor, it gets stored in a file called registry.pol in the GPO's folder. Assigning those settings directly in the registry has a similar effect as far as the system's behavior is concerned, but you won't see the changes in the Group Policy console.
There's no built-in way to modify these registry.pol files from a script or command line in a local GPO, but I wrote some C# code to work with them a while back: http://gallery.technet.microsoft.com/scriptcenter/Read-or-modify-Registrypol-778fed6e . (Fair warning: it's kind of ugly, but it works. I didn't have much experience with C# or PowerShell when I wrote it.)
The topic ‘Configure Local GPE state from Powershell script’ is closed to new replies.