Sealeopard,

That ReadEventLog() UDF will help for sure. Will dive into it today !! About your question about the code i use the code from the CompPswdAge.kix script. In the function fnCompPswdAge i added some code to check if the Workstation belongs to the same domain as the workstation running the code. If not, i want to connect the workstation with other credentials.
code:
If SubStr($objCom.Name,1,Len($sDomain))=$sDomain
$lblStatus.Text='Enumerating $lCount computer accounts (check values)...'

; workstationname..
$Item=$lvwList.Items.Add($objCom.Name)

; username, als workstation niet in domain zit een connectie opzetten
; met een ander ImpersonationLevel..
If $sDomain<>@Domain
$ObjWBemScripting=GetObject("Wbemscripting.SWbemLocator")
$ObjWBemLocator=$ObjWBemScripting.ConnectServer("$objCom.Name","root\cimv2","$sDomain\SchedAdmin","schedadmin")

$objWMIService=GetObject("winmgmts:\\"+$objCom.Name+"\root\cimv2")
Else
$objWMIService=GetObject("winmgmts:{ImpersonationLevel=impersonate}!\\"+$objCom.Name+"\root\cimv2")
EndIf

$objWMIService=GetObject("winmgmts:{ImpersonationLevel=impersonate}!\\"+$objCom.Name+"\root\cimv2")
If @Error=0
$colItems=$objWMIService.ExecQuery("Select * from Win32_ComputerSystem")
For each $objItem in $colItems
$Item.SubItems(1)=$objItem.UserName
Next

$colItems=$objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
For each $objItem in $colItems
$Item.SubItems(2).Text=$objItem.Caption+' ('+$objItem.Version+')'
Next
Else
$Item.SubItems(2).Text=$sRole
EndIf
EndIf

Radimus: will your code also work from one domain to another ?

[ 19. November 2002, 11:43: Message edited by: Schuliebug ]
_________________________
Kind regards,