SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 

share|improve this question
up vote 2 down vote accepted

With the help of this blog I found the answer.





add this function:

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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