Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
Add demo script
Browse files Browse the repository at this point in the history
  • Loading branch information
jstangroome committed Feb 22, 2014
1 parent b734aea commit 884e889
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions demo.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[string]
$CollectionUri,

[Parameter(Mandatory=$true)]
[string]
$ProjectName,

[string]
$NewTeamName = 'foo'
)

$PSScriptRoot = Split-Path -Path $MyInvocation.MyCommand.Path

$PSTfsTeamsModulePath = Join-Path -Path $PSScriptRoot -ChildPath src\PSTfsTeams\bin\debug\PSTfsTeams

Import-Module -Name $PSTfsTeamsModulePath

'Module:'
Get-Module -Name PsTfsTeams | Format-List

'Commands:'
Get-Command -Module PsTfsTeams | Format-Table -Property Name

'Teams:'
Get-TfsTeam -CollectionUri $CollectionUri -TeamProject $ProjectName |
Tee-Object -Variable Teams

'Add member:'
Add-TfsTeamMember -CollectionUri $CollectionUri -TeamProject $ProjectName -Team $Teams[0].Name -Member $Env:USERNAME -Verbose

'New team:'
New-TfsTeam -CollectionUri $CollectionUri -TeamProject $ProjectName -Name $NewTeamName -Description "Placeholder description of $NewTeamName"

0 comments on commit 884e889

Please sign in to comment.