Jose, you should be able to remove your "for each" loop and build a faster script by assigning the values directly to the spreadsheet cells. "primary_group_id" also seems to be used two times.

Code:

;*************************************************************
; ADD VALUES TO EXCELL SHEET
;*************************************************************
$oXL.Cells(($i+2),1).Value = $UserInfo.name
$oXL.Cells(($i+2),2).Value = $Win32Admin.GetUserGroupFromRID($server,$UserInfo.primary_group_id)
$oXL.Cells(($i+2),3).Value = $UserInfo.full_name
$oXL.Cells(($i+2),4).Value = $UserInfo.profile
$oXL.Cells(($i+2),5).Value = $UserInfo.script_path
$oXL.Cells(($i+2),6).Value = $UserInfo.home_dir_drive
$oXL.Cells(($i+2),7).Value = $UserInfo.home_dir
$oXL.Cells(($i+2),8).Value = $Win32Admin.GetUserGroupFromRID($server,$UserInfo.primary_group_id)
$oXL.Cells(($i+2),9).Value = $UserInfo.comment

_________________________
Home page: http://www.kixhelp.com/hb/