|
Currently, I am using a packaged executable file of the script via KiXscripts Editor. Would you break it out into a local Kix32.exe and a .kix file on the domain netlogon share? Additionally, what if I need to cache domain group info more often than 30 days? Through some testing, a vbs script responded with group information in 18-20 seconds. The KiX script can take less time (anywhere from 8 to 13 seconds), but it can also take much longer (over three minutes in one case). I suspect that it is the network server that is causing this latency, but why would the KiX script be so inconsistent? Is it because it's requesting from a particular domain controller, whereas the vbs script is querying the AD?
Here's the vbs: domain = "mydomain.net" Set nuser = wscript.CreateObject("Wscript.network") username = nuser.username Set oUsr = getobject("WinNT://" & domain & "/" & username & ",user") Set Grp = oUsr.Groups GrpID = oUsr.PrimaryGroupID
For Each Item In Grp NT4Name = replace(Item.ADsPath,"WinNT://","") tempArray = Split(nt4Name,"/") NT4Name = tempArray(1) QueryFilter = QueryFilter & NT4Name & ", " Next wscript.echo QueryFilter
Here's the KiX (running "kix32.exe script.kix /f") ? "Retrieving domain group information." If(InGroup("Domain Users")) ? "Group membership has been cached." EndIf
Times were: vbs- :38, :18, :18, :18, :17, :17, :20 kix- 3:32, :48, :13, :13, :13, :13, 1:41
Thanks.
|