e***@gmail.com
2017-05-22 14:51:37 UTC
Hello,
I am trying to write a vbs script that configures WMI security. I want to use byte stream example in link below.
https://blogs.msdn.microsoft.com/spatdsg/2007/11/21/set-wmi-namespace-security-via-gpo-script/
I did the same and generated script:
strSD = array(1,0,20,130,192,0,0,0,208,0,0,0,20,0,0,0,64,0,0,0,2,0,44,0,1,0,0,0,2,194,36,0,31,0,6,0,1,5,0,0,0,0,0,5,21,0,0,0,91,16,155,64,69,109,31,3,188,108,130,0,191,80,2,0,2,0,128,0,5,0,0,0,0,2,20,0,19,0,0,0,1,1,0,0,0,0,0,5,11,0,0,0,0,2,20,0,19,0,0,0,1,1,0,0,0,0,0,5,19,0,0,0,0,2,20,0,19,0,0,0,1,1,0,0,0,0,0,5,20,0,0,0,0,2,24,0,63,0,6,0,1,2,0,0,0,0,0,5,32,0,0,0,32,2,0,0,0,2,36,0,63,0,6,0,1,5,0,0,0,0,0,5,21,0,0,0,91,16,155,64,69,109,31,3,188,108,130,0,191,80,2,0,1,2,0,0,0,0,0,5,32,0,0,0,32,2,0,0,1,2,0,0,0,0,0,5,32,0,0,0,32,2,0,0)
set namespace = createobject("wbemscripting.swbemlocator").connectserver(,"root")
set security = namespace.get("__systemsecurity=@")
nStatus = security.setsd(strSD)
I get error below when I run as an admin:
Privilege not held
Line:7
Char:1
Source: SWbemObjectEx
Can you please help me on this?
Any alternative way that you will suggest would also be appreciated.
I am trying to write a vbs script that configures WMI security. I want to use byte stream example in link below.
https://blogs.msdn.microsoft.com/spatdsg/2007/11/21/set-wmi-namespace-security-via-gpo-script/
I did the same and generated script:
strSD = array(1,0,20,130,192,0,0,0,208,0,0,0,20,0,0,0,64,0,0,0,2,0,44,0,1,0,0,0,2,194,36,0,31,0,6,0,1,5,0,0,0,0,0,5,21,0,0,0,91,16,155,64,69,109,31,3,188,108,130,0,191,80,2,0,2,0,128,0,5,0,0,0,0,2,20,0,19,0,0,0,1,1,0,0,0,0,0,5,11,0,0,0,0,2,20,0,19,0,0,0,1,1,0,0,0,0,0,5,19,0,0,0,0,2,20,0,19,0,0,0,1,1,0,0,0,0,0,5,20,0,0,0,0,2,24,0,63,0,6,0,1,2,0,0,0,0,0,5,32,0,0,0,32,2,0,0,0,2,36,0,63,0,6,0,1,5,0,0,0,0,0,5,21,0,0,0,91,16,155,64,69,109,31,3,188,108,130,0,191,80,2,0,1,2,0,0,0,0,0,5,32,0,0,0,32,2,0,0,1,2,0,0,0,0,0,5,32,0,0,0,32,2,0,0)
set namespace = createobject("wbemscripting.swbemlocator").connectserver(,"root")
set security = namespace.get("__systemsecurity=@")
nStatus = security.setsd(strSD)
I get error below when I run as an admin:
Privilege not held
Line:7
Char:1
Source: SWbemObjectEx
Can you please help me on this?
Any alternative way that you will suggest would also be appreciated.