Today I released my first PowerShell module to the PowerShell Gallery called VSTeam. VSTeam is a PowerShell module that exposes portions of the REST API for Visual Studio Team Services and Team Foundation Server.
It is written in pure PowerShell and can be used on Mac, Linux or Windows to connect to TFS or VSTS. To install VSTeam you can use the Install-Module cmdlet. Just make sure on Windows you run PowerShell as administrator and on Mac or Linux you sudo your PowerShell session. Then simply issue the following command.
PS> Install-Module -Name VSTeam
Once the module is installed you can view all the provided functions by running Get-Command.
PS>Get-Command -Module VSTeam
CommandType Name Version Source
----------- ---- ------- ------
Function Add-AzureRMServiceEndpoint 0.1.1 Team
Function Add-Build 0.1.1 Team
Function Add-BuildDefinition 0.1.1 Team
Function Add-Project 0.1.1 Team
Function Add-ReleaseDefinition 0.1.1 Team
Function Add-TeamAccount 0.1.1 Team
Function Clear-DefaultProject 0.1.1 Team
Function Get-Build 0.1.1 Team
Function Get-BuildDefinition 0.1.1 Team
Function Get-CloudSubscription 0.1.1 Team
Function Get-Pool 0.1.1 Team
Function Get-Project 0.1.1 Team
Function Get-Queue 0.1.1 Team
Function Get-ReleaseDefinition 0.1.1 Team
Function Get-ServiceEndpoint 0.1.1 Team
Function Get-TeamInfo 0.1.1 Team
Function Remove-Build 0.1.1 Team
Function Remove-BuildDefinition 0.1.1 Team
Function Remove-Project 0.1.1 Team
Function Remove-ReleaseDefinition 0.1.1 Team
Function Remove-ServiceEndpoint 0.1.1 Team
Function Remove-TeamAccount 0.1.1 Team
Function Set-DefaultProject 0.1.1 Team
Function Update-Project 0.1.1 Team
This is just what is there now and more will follow. Once I put a coat of polish on the module I will open source it on GitHub.
To get started with the module make sure and call Add-VSTeamAccount first. This will require your Team Services account name or full TFS URL including collection and a Personal Access Token. VSTeam only supports TFS 2017, TFS 2018 and Team Services.