hello, my problem is this script

 Code:
$remotepcname=@WKSTA

for $counter=0 to 256
 $sid=enumkey("\\"+$remotepcname+"\HKU",$counter)
 if @error
  $counter=256
 else
 $=writevalue("\\"+$remotepcname+"\HKU\"+$sid+"\software\Policies\Microsoft\Internet Explorer\Restrictions" , "NoBrowserOptions","1","REG_DWORD")
 endif
next


All subkeys are written under \HKU\sid. On my workstation are written :
.DEFAULT
S-1-5-18
S-1-5-19
etc.etc..
and subkeys (SID) other domain users logged that should not have this policy

would like to associate the domain user with his sid

Thanks in advance


Edited by Arend_ (2016-09-13 11:16 AM)
Edit Reason: Please use code tags