Hey,
below is a script to export security settings from GPO, most important for me is filter result to see only "PasswordComplexity" don't care about other security settings,
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\rsop\computer")
Set colItems = objWMIService.ExecQuery("Select * from RSOP_GPO")
For Each objItem in colItems
Wscript.Echo "Name: " & objItem.Name
Wscript.Echo "GUID Name: " & objItem.GUIDName
Wscript.Echo "ID: " & objItem.ID
Wscript.Echo "Access Denied: " & objItem.AccessDenied
Wscript.Echo "Enabled: " & objItem.Enabled
Wscript.Echo "File System path: " & objItem.FileSystemPath
Wscript.Echo "Filter Allowed: " & objItem.FilterAllowed
Wscript.Echo "Filter ID: " & objItem.FilterId
Wscript.Echo "Version: " & objItem.Version
Wscript.Echo
Next
after execution result are one after another :
Key Name: PasswordComplexity
Precedence: 1
Setting: True
Key Name: ClearTextPassword
Precedence: 1
Setting: False
Key Name: ForceLogoffWhenHourExpire
Precedence: 1
Setting: False
Key Name: RequireLogonToChangePassword
Precedence: 1
Setting: False
Key Name: LSAAnonymousNameLookup
Precedence: 1
Setting: False
would be great to have it in this order:
columne 1 columne 2 columne3 columne3
row a: server name key name: Precedence: Setting:
below is a script to export security settings from GPO, most important for me is filter result to see only "PasswordComplexity" don't care about other security settings,
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\rsop\computer")
Set colItems = objWMIService.ExecQuery("Select * from RSOP_GPO")
For Each objItem in colItems
Wscript.Echo "Name: " & objItem.Name
Wscript.Echo "GUID Name: " & objItem.GUIDName
Wscript.Echo "ID: " & objItem.ID
Wscript.Echo "Access Denied: " & objItem.AccessDenied
Wscript.Echo "Enabled: " & objItem.Enabled
Wscript.Echo "File System path: " & objItem.FileSystemPath
Wscript.Echo "Filter Allowed: " & objItem.FilterAllowed
Wscript.Echo "Filter ID: " & objItem.FilterId
Wscript.Echo "Version: " & objItem.Version
Wscript.Echo
Next
after execution result are one after another :
Key Name: PasswordComplexity
Precedence: 1
Setting: True
Key Name: ClearTextPassword
Precedence: 1
Setting: False
Key Name: ForceLogoffWhenHourExpire
Precedence: 1
Setting: False
Key Name: RequireLogonToChangePassword
Precedence: 1
Setting: False
Key Name: LSAAnonymousNameLookup
Precedence: 1
Setting: False
would be great to have it in this order:
columne 1 columne 2 columne3 columne3
row a: server name key name: Precedence: Setting: