I am using a Powershell and CAML query to return items from a list. The list contains a "Group or People" field in which I have not seeing how to get the email and login information of the user. I assume I need to cast it to a SPUser object but have been unsuccessful so far. Anyone have an approach or snippet use?

$spQuery = New-Object Microsoft.SharePoint.SPQuery
$camlQuery = "<Where>...</Where>"
$spQuery.Query = $camlQuery;

$spListItems = $spList.GetItems($spQuery);

$spListItems |  Sort-Object Title | ForEach-Object -Process {

$spListItem[4]; # this returns display name only 


2 Answers 2


With the help of this blog I found the answer. http://codingmode.com/category/uncategorized/





add this function:

function Get-UserEmail([Microsoft.SharePoint.SPFieldUserValue]$SPFieldUserValue)
    $isNull = [String]::IsNullOrEmpty($SPFieldUserValue);
    if($isNull -eq $false){
        return $SPFieldUserValue.User.Email;
    return $isNull;
$personFieldValue = $ListItem["PersonFieldName"].ToString();            
$spFieldUserValue = New-Object Microsoft.SharePoint.SPFieldUserValue($oWeb,$personFieldValue); 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.