![]() |
![]() |
|
|||||||
| Register | Forum Rules | Getting Started! - Guide | Blog | Videos | Gallery | Members List | Social Groups | Mark Forums Read |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
about RSOP_SecuritySettingNumeric
i want to write a VBScript to see my RSOP_SecuritySettingNumeric
code: strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & _ "\root\rsop\computer") Set colItems = objWMIService.ExecQuery _ ("Select * from RSOP_SecuritySettingNumeric") For Each objItem in colItems Wscript.Echo "Key Name: " & objItem.KeyName Wscript.Echo "Precedence: " & objItem.Precedence Wscript.Echo "Setting: " & objItem.Setting Wscript.Echo Next but i see NOTHING so i change the code code: strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & _ "\root\rsop\computer") Set colItems = objWMIService.InstancesOf("RSOP_SecuritySettingNum eric") Wscript.Echo "# : " & colItems.Count then i see "# : 0" |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Re: about RSOP_SecuritySettingNumeric
Is the computer you are querying subject to anything other than the local
GPO? That is, do you have domain policies applying to that machine? -- Darren Mar-Elia MS-MVP-Windows Server--Group Policy Script Group Policy Settings with the GPExpert Scripting Toolkit for PowerShell! Find out more at http://www.sdmsoftware.com/products2.php Visit the GPOGUY: http://www.gpoguy.com -- The Windows Group Policy Information Hub: FAQs, Training Videos, Whitepapers and Utilities for all things Group Policy-related "leno" <leno@discussions.microsoft.com> wrote in message news:28C92D09-9ED2-4879-8030-EA1E738C34CB@microsoft.com... >i want to write a VBScript to see my RSOP_SecuritySettingNumeric > code: > strComputer = "." > Set objWMIService = GetObject("winmgmts:\\" & strComputer & _ > "\root\rsop\computer") > Set colItems = objWMIService.ExecQuery _ > ("Select * from RSOP_SecuritySettingNumeric") > For Each objItem in colItems > Wscript.Echo "Key Name: " & objItem.KeyName > Wscript.Echo "Precedence: " & objItem.Precedence > Wscript.Echo "Setting: " & objItem.Setting > Wscript.Echo > Next > > but i see NOTHING > > so i change the code > code: > strComputer = "." > Set objWMIService = GetObject("winmgmts:\\" & strComputer & _ > "\root\rsop\computer") > Set colItems = objWMIService.InstancesOf("RSOP_SecuritySettingNum eric") > Wscript.Echo "# : " & colItems.Count > > then i see "# : 0" |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Re: about RSOP_SecuritySettingNumeric
Sorry I don't understand your mean. My computer is managed by workgroup not
by domain,And is there any other way to get the information of rsop such as account policy? "Darren Mar-Elia" wrote: > Is the computer you are querying subject to anything other than the local > GPO? That is, do you have domain policies applying to that machine? > > > > -- > Darren Mar-Elia > MS-MVP-Windows Server--Group Policy > > Script Group Policy Settings with the GPExpert Scripting Toolkit for > PowerShell! > Find out more at http://www.sdmsoftware.com/products2.php > > Visit the GPOGUY: http://www.gpoguy.com -- The Windows Group Policy > Information Hub: > FAQs, Training Videos, Whitepapers and Utilities for all things Group > Policy-related > > "leno" <leno@discussions.microsoft.com> wrote in message > news:28C92D09-9ED2-4879-8030-EA1E738C34CB@microsoft.com... > >i want to write a VBScript to see my RSOP_SecuritySettingNumeric > > code: > > strComputer = "." > > Set objWMIService = GetObject("winmgmts:\\" & strComputer & _ > > "\root\rsop\computer") > > Set colItems = objWMIService.ExecQuery _ > > ("Select * from RSOP_SecuritySettingNumeric") > > For Each objItem in colItems > > Wscript.Echo "Key Name: " & objItem.KeyName > > Wscript.Echo "Precedence: " & objItem.Precedence > > Wscript.Echo "Setting: " & objItem.Setting > > Wscript.Echo > > Next > > > > but i see NOTHING > > > > so i change the code > > code: > > strComputer = "." > > Set objWMIService = GetObject("winmgmts:\\" & strComputer & _ > > "\root\rsop\computer") > > Set colItems = objWMIService.InstancesOf("RSOP_SecuritySettingNum eric") > > Wscript.Echo "# : " & colItems.Count > > > > then i see "# : 0" > |
|
|
|
#4 |
|
Guest
Posts: n/a
|
Re: about RSOP_SecuritySettingNumeric
Right, that is the issue. This is a known limitation of RSOP--essentially
local security policy does not store its results in WMI. So, if you wanted to query things like account policy, you would need to use "traditional method" such as 'net accounts' -- Darren Mar-Elia MS-MVP-Windows Server--Group Policy Script Group Policy Settings with the GPExpert Scripting Toolkit for PowerShell! Find out more at http://www.sdmsoftware.com/products2.php Visit the GPOGUY: http://www.gpoguy.com -- The Windows Group Policy Information Hub: FAQs, Training Videos, Whitepapers and Utilities for all things Group Policy-related "leno" <leno@discussions.microsoft.com> wrote in message news:E0DAFCA1-D3FC-44D2-82AE-C89A9DFE4C48@microsoft.com... > Sorry I don't understand your mean. My computer is managed by workgroup > not > by domain,And is there any other way to get the information of rsop such > as > account policy? > > "Darren Mar-Elia" wrote: > >> Is the computer you are querying subject to anything other than the local >> GPO? That is, do you have domain policies applying to that machine? >> >> >> >> -- >> Darren Mar-Elia >> MS-MVP-Windows Server--Group Policy >> >> Script Group Policy Settings with the GPExpert Scripting Toolkit for >> PowerShell! >> Find out more at http://www.sdmsoftware.com/products2.php >> >> Visit the GPOGUY: http://www.gpoguy.com -- The Windows Group Policy >> Information Hub: >> FAQs, Training Videos, Whitepapers and Utilities for all things Group >> Policy-related >> >> "leno" <leno@discussions.microsoft.com> wrote in message >> news:28C92D09-9ED2-4879-8030-EA1E738C34CB@microsoft.com... >> >i want to write a VBScript to see my RSOP_SecuritySettingNumeric >> > code: >> > strComputer = "." >> > Set objWMIService = GetObject("winmgmts:\\" & strComputer & _ >> > "\root\rsop\computer") >> > Set colItems = objWMIService.ExecQuery _ >> > ("Select * from RSOP_SecuritySettingNumeric") >> > For Each objItem in colItems >> > Wscript.Echo "Key Name: " & objItem.KeyName >> > Wscript.Echo "Precedence: " & objItem.Precedence >> > Wscript.Echo "Setting: " & objItem.Setting >> > Wscript.Echo >> > Next >> > >> > but i see NOTHING >> > >> > so i change the code >> > code: >> > strComputer = "." >> > Set objWMIService = GetObject("winmgmts:\\" & strComputer & _ >> > "\root\rsop\computer") >> > Set colItems = objWMIService.InstancesOf("RSOP_SecuritySettingNum >> > eric") >> > Wscript.Echo "# : " & colItems.Count >> > >> > then i see "# : 0" >> |
|
|
|
#5 |
|
Guest
Posts: n/a
|
Re: about RSOP_SecuritySettingNumeric
Right, that is the issue. This is a known limitation of RSOP--essentially
local security policy does not store its results in WMI. So, if you wanted to query things like account policy, you would need to use "traditional method" such as 'net accounts' -- Darren Mar-Elia MS-MVP-Windows Server--Group Policy Script Group Policy Settings with the GPExpert Scripting Toolkit for PowerShell! Find out more at http://www.sdmsoftware.com/products2.php Visit the GPOGUY: http://www.gpoguy.com -- The Windows Group Policy Information Hub: FAQs, Training Videos, Whitepapers and Utilities for all things Group Policy-related "leno" <leno@discussions.microsoft.com> wrote in message news:E0DAFCA1-D3FC-44D2-82AE-C89A9DFE4C48@microsoft.com... > Sorry I don't understand your mean. My computer is managed by workgroup > not > by domain,And is there any other way to get the information of rsop such > as > account policy? > > "Darren Mar-Elia" wrote: > >> Is the computer you are querying subject to anything other than the local >> GPO? That is, do you have domain policies applying to that machine? >> >> >> >> -- >> Darren Mar-Elia >> MS-MVP-Windows Server--Group Policy >> >> Script Group Policy Settings with the GPExpert Scripting Toolkit for >> PowerShell! >> Find out more at http://www.sdmsoftware.com/products2.php >> >> Visit the GPOGUY: http://www.gpoguy.com -- The Windows Group Policy >> Information Hub: >> FAQs, Training Videos, Whitepapers and Utilities for all things Group >> Policy-related >> >> "leno" <leno@discussions.microsoft.com> wrote in message >> news:28C92D09-9ED2-4879-8030-EA1E738C34CB@microsoft.com... >> >i want to write a VBScript to see my RSOP_SecuritySettingNumeric >> > code: >> > strComputer = "." >> > Set objWMIService = GetObject("winmgmts:\\" & strComputer & _ >> > "\root\rsop\computer") >> > Set colItems = objWMIService.ExecQuery _ >> > ("Select * from RSOP_SecuritySettingNumeric") >> > For Each objItem in colItems >> > Wscript.Echo "Key Name: " & objItem.KeyName >> > Wscript.Echo "Precedence: " & objItem.Precedence >> > Wscript.Echo "Setting: " & objItem.Setting >> > Wscript.Echo >> > Next >> > >> > but i see NOTHING >> > >> > so i change the code >> > code: >> > strComputer = "." >> > Set objWMIService = GetObject("winmgmts:\\" & strComputer & _ >> > "\root\rsop\computer") >> > Set colItems = objWMIService.InstancesOf("RSOP_SecuritySettingNum >> > eric") >> > Wscript.Echo "# : " & colItems.Count >> > >> > then i see "# : 0" >> |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
< Home - Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |