This project is read-only.

Add-MemberProject

Introduction

Add-MemberProject cmdlet enables to add people to team project groups. Parameterization can be done in a text file.

Obtain the TFS server using the Get-TFS CmdLet.

Warning : For now, the Add-MemberProject CmdLet does not allow adding to WSS 3.0 and Reports Server.

Parameters

Name Description Example
-tfs TFS server obtained using Get-TFS $tfs = Get-TFS -rul http://address:8080
-projectName Project Name
-userName User name COLMAR\Noham
-roles Roles to give to user Contributors;Project Administrators

Sample with parameters in a text file

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

PsTFS > : $tfs = get-tfs http://colmar:8080

PsTFS > : $content = get-content C:\Users\Administrateur\Desktop\PowerShell\users.txt

PsTFS > : $content
Noham|Contributors
Choulant|Contributors
Antonin|Contributors;Project Administrators
Noham|Project Administrators

PsTFS > : foreach ($line in $content) { $tab = $line.split("|") ; Add-MemberProject -tfs $tfs -ProjectName VSTS.Noham -UserName $tab[0] -Roles $tab[1]
;}
Noham is add in Contributors
Choulant is add in Contributors
Antonin is add in Contributors
Antonin is add in Project Administrators
Noham is add in Project Administrators

PsTFS > :

Last edited Nov 8, 2009 at 10:01 AM by pc152, version 5

Comments

No comments yet.