SharePoint Dragons

Nikander & Margriet on SharePoint

Getting values of SharePoint Hyperlink and Person or Group columns

The next PS script shows how to do it:

$ProjectWeb = Get-SPWeb -Identity $ProjectWebName

foreach ($Item in $ProjectList.Items)
$SiteCollLink = New-Object Microsoft.Sharepoint.SPFieldUrlValue($Item[“SiteCollectionURL”])
$Url = $SiteCollLink.Url

$Owner = New-Object Microsoft.Sharepoint.SPFieldUserValue($ProjectWeb, $Item[“Owner”])
$OwnerName = $Owner.User.LoginName
$OwnerEmail = $Owner.User.Email


Please Note SiteCollectionURL is the name of a Hyperlink column, Owner is the name of a Person or Group column.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: