Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I cannot access the description of a group like this:

$web = Get-SPWeb "http.//yourUrl"
$web.SiteGroups | %{write-host $_.Name, $_.Description}

According to this, the description value is in fact stored as "About Me" in the DB-table AllUserData.

Using the group web service and $SPService.GetGroupCollectionFromWeb() also retreives groups without description.

How to read the description property of an SPGroup?

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

This holds everything to get the group's description. You need this object:

$text = $web.SiteUserInfoList.Fields[($web.SiteUserInfoList.Fields | ?{$_.InternalName -eq "Notes"})]

You fetch the group item based on id and extract the description with the internal name

$groupItem = $web.SiteUserInfoList.GetItemById($_.Id)
$description = $groupItem[$text.InternalName]

The non-pedagogic version of accessing the description field does not deal with my $text variable, and uses this:

$description = $groupItem["Notes"]

If you are about to display this data you should be aware that this is HTML

share|improve this answer
add comment

Please try the below code, It displays all the group's description.

$web = Get-SPWeb "your site URL"
$groups=$web.SiteGroups 
foreach($group in $groups)
{
write-host $group.Description
}
share|improve this answer
    
No, I just tried, and did so before, and I know this is what M$ probably thinks should work...BTW: where's the key difference to my script? –  StefG Jul 29 '13 at 11:26
add comment

As the same that you have to do by C#. Basically exist a list where SharePoint save this information. Basically this list is the SiteUserInfoList has @StefG wrote.

There are many fancy thing about this list. For more information take a look here: http://salvatoredifaziosharepoint.blogspot.co.uk/2013/08/how-to-retrieve-spgroup-description.html

share|improve this answer
add comment

Your Answer

 
discard

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.