Hy,

thx, the first part works.
Because its very hard for me to translate the rest of vbs.
This is the secon part i translated, because i get now results.
 Code:
Function procmailboxes($Server, $mailboxname)
$objSession = CreateObject("MAPI.Session") 
$objSession.Logon(,, 0, 1, 1, 1, $Server+@CRLF+$mailboxname)
$objInfoStores = $objSession.InfoStores
$objInfoStore = $objSession.GetInfoStore 

If $objSession.outofoffice.value
$Inbox = $objSession.Inbox
 If $inbox.fields.item(&663A000B).value
  $objMessages = $inbox.HiddenMessages
  For Each $objMessage in $objMessages 
   If $objMessage.type = "IPM.Rule.Message" 
    ;procrule($objMessage, $mailboxname,inbox.fields.item(&6707001E).value)
   EndIf
  Next
 EndIf 
EndIf
				
EndFunction