0

I'm trying to change the Wmi Security Descriptor of a about 100 hundred Computers with Windows 10 Pro/DC 2012 R2. I found that the following approach can be used in my case : msdn

Executing the steps locally on a Windows 10 machine with the domain admin account didn't give the expected result. The export of the namespace is working as expected but the changing of the descriptor with the script have not effects at all. The export command:

wmic /namespace:\\root\CIMV2  /output:sd.txt path __systemsecurity call getSD

The import script:

arrSD = array(1,0,4,129,148,0,0,0,164,0,0,0,0,0,0,0,20,0,0,0,2,0,128,0,5,0,0,0,0,0,36,0,1,0,0,0,1,5,0,0,0,0,0,5,21,0,0,0,216,37,44,114,11,95,44,7,34,199,223,9,83,4,0,0,0,18,24,0,63,0,6,0,1,2,0,0,0,0,0,5,32,0,0,0,32,2,0,0,0,18,20,0,19,0,0,0,1,1,0,0,0,0,0,5,20,0,0,0,0,18,20,0,19,0,0,0,1,1,0,0,0,0,0,5,19,0,0,0,0,18,20,0,19,0,0,0,1,1,0,0,0,0,0,5,11,0,0,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)

' Connect to WMI and the root namespace.

'

Set objWMI = GetObject("winmgmts:root\CIMV2")


' Get the single __SystemSecurity object in this namespace.

'

Set objSecurity = objWMI.Get("__SystemSecurity=@")


' Change the namespace security.

'

nReturn = objSecurity.SetSD(arrSD)

WScript.Echo "Return value = " & nReturn Any ideas ?

Thanks

isoman
  • 203
  • 3
  • 7

0 Answers0