Get-ProjectMember

Introduction

The Get-ProjectMember CmdLet enables to get a project members list, configured in Team Foundation Server and Windows Sharepoint Services

Obtain the TFS server using the Get-TFS CmdLet.

Parameters

Name Description Example
-tfs TFS server obtained using Get-TFS $tfs = Get-TFS -rul http://address:8080
-ProjectName Project name

Exemple

========================================================
Windows PowerShell
PowerShell for Team System
By Noham Choulant http://choulant.blogspot.com
========================================================

PsTFS > : $tfs = get-tfs colmar

PsTFS > : $listeMembers = Get-ProjectMember -tfs $tfs -ProjectName Test

PsTFS > : $listeMembers


TypeMember        : TFS
AccountName       :
Deleted           : False
Description       : Members of this group can add, modify, and delete items within the team project.
DisplayName       : Contributors
DistinguishedName :
Domain            : vstfs:///Classification/TeamProject/3bbdde19-7b0d-4e35-b966-c1affca981ca
MailAddress       :
MemberOf          : {S-1-9-1551374245-1204400969-2402986413-2179408616-0-0-0-0-3}
SecurityGroup     : True
Sid               : S-1-9-1551374245-1204400969-2402986413-2179408616-1-1704393280-619977283-3200926925-3406433003
SpecialType       : Generic
Type              : ApplicationGroup
Members           : {}

...

Example with list using Format-Table


PsTFS > : $listeMembers | Format-Table

    TypeMember AccountName           Deleted Description    DisplayName    DistinguishedN Domain         MailAddress    MemberOf        SecurityGroup
                                                                           ame
    ---------- -----------           ------- -----------    -----------    -------------- ------         -----------    --------        -------------
           TFS                         False Members of ... Contributors                  vstfs:///Cl...                {S-1-9-1551...           True
           TFS                         False Members of ... Build Services                vstfs:///Cl...                {S-1-9-1551...           True
           TFS                         False Members of ... Project Adm...                vstfs:///Cl...                {S-1-9-1551...           True
           TFS                         False Members of ... Readers                       vstfs:///Cl...                {S-1-9-1551...           True
           Wss Full Control            False Has full co... Full Control                                                                        False
           Wss Design                  False Can view, a... Design                                                                              False
           Wss Contribute              False Can view, a... Contribute                                                                          False
           Wss Read                    False Can view only. Read                                                                                False
           Wss Limited Access          False Can view sp... Limited Access                                                                      False

PsTFS > :

Last edited Nov 8, 2009 at 8:34 AM by pc152, version 3

Comments

zedhex Sep 5, 2011 at 10:10 AM 
I just tried this and I get an error:

Get-ProjectMember : Could not load file or assembly 'Microsoft.SharePoint.Library, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111
e9429c' or one of its dependencies. The system cannot find the file specified.
At line:2 char:29
+ $members = Get-ProjectMember <<<< -tfs $tfs -ProjectName Test
+ CategoryInfo : NotSpecified: (:) [Get-ProjectMember], FileNotFoundException
+ FullyQualifiedErrorId : System.IO.FileNotFoundException,PowerShell.Host.PsTFS.CdmLet.Get_ProjectMember