Hi Guys

I am trying to document what groups are assigned to each user and write this information to a excel spreadsheet.

code:
Break On CLS

$sUser = "Richard.Farthing"

$objUser=GetObject("WinNT://@domain/$sUser,User")

For Each $objGroup In $objUser.Groups
$objGroup.Name ?
Next

That works but instead of displaying each group, I want to set it to a variable.

The excel part is not a problem, but this is.

Could this be done by putting it into an array and using unbound ???.

This part I am well lost.