PowerShell Cmdlets for Azure DevOps and Team Foundation Server
This release fixes a bug in Get-TfsWorkItemQuery
and Get-TfsWorkItemQueryFolder
, and adds two new cmdlets.
Undo-TfsWorkItemQueryRemoval
and Undo-TfsWorkItemQueryFolderRemoval
allow you to undo the deletion of a query or query folder. This is useful when you accidentally delete a query or query folder and want to restore it.To restore a deleted query:
# You can either pipe the deleted query from Get-TfsWorkItemQuery to Undo-TfsWorkItemQueryRemoval...
Get-TfsWorkItemQuery 'My Deleted Query' -Scope Personal -Deleted | Undo-TfsWorkItemQueryRemoval
# ... or you can specify the query directly when calling Undo-TfsWorkItemQueryRemoval
Undo-TfsWorkItemQueryRemoval 'My Deleted Query' -Scope Personal
The same applies to query folders - with the distinction that folder can be restored recursively by specifying the -Recursive
switch. When -Recursive
is omitted, only the folder itself is restored, without any of its contents. You can then restore its contents by issuing further calls to Undo-TfsWorkItemQueryRemoval
and/or Undo-TfsWorkItemQueryFolderRemoval
.
# You can either pipe the deleted folder from Get-TfsWorkItemQueryFolder to Undo-TfsWorkItemQueryFolderRemoval...
Get-TfsWorkItemQueryFolder 'My Deleted Folder' -Scope Personal -Deleted | Undo-TfsWorkItemQueryRemoval -Recursive
# ... or you can specify the folder directly when calling Undo-TfsWorkItemQueryFolderRemoval
Undo-TfsWorkItemQueryFolderRemoval 'My Deleted Folder' -Scope Personal -Recursive
Get-TfsWorkItemQuery
and Get-TfsWorkItemQueryFolder
where the -Deleted
switch was not respected and deleted items would not be returned.This release fixes a bug in New-TfsWorkItem
.
This release introduces new cmdlets and fixes a few bugs.
New-TfsWorkItem
and Set-TfsWorkItem
where IterationPath was not being set.This release fixes bugs and add improvements to New-TfsWorkItem
and Set-TfsWorkItem
.
New-TfsWorkItem
and Set-TfsWorkItem
(such as "Assigned To") now support either email addresses or user display names as valid values. Previously, only user display names were supported.New-TfsWorkItem
and Set-TfsWorkItem
where changes to the AssignedTo field would not be reflected in the Work Item.This release adds support for interactive logons in PowerShell Core (6+) shells.
Connect-*
cmdlets now support interactive (-Interactive
) logon in PowerShell Core (6+) shells. Previously, only Windows PowerShell (5.*) terminals supported interactive authentication. NOTE: Interactive logons in PowerShell Core require Azure DevOps Services. TFS / Azure DevOps Server remain unsupported for interactive logons in PowerShell Core. To connect to an on-premises server in a PowerShell Core shell, you're still required to use either username/password credentials or a personal access token.Get-TfsWorkItemQuery
and Get-TfsWorkItemQueryFolder
handle paths. Additionally, Get-TfsWorkItemQueryFolder
can now return the "root" folders (My Queries and/or Shared Queries) when specifying /
as the folder path. That comes in handy when you want to e.g. use some Security APIs that require the ID of the folders all the way from the beginning of the hierarchy.Get-TfsWorkItem
would return an invalid ID, due to a change in the response from the WorkItem REST API (fixes #172)New-TfsWorkItemQuery
and New-TfsWorkItemQueryFolder
, where queries and folders could not be created when their parent did not exist.This release brings a few minor fixes to Team cmdlets and to pipeline handling. No new features and/or cmdlets have been introduced in this version.
Get-TfsTeam
and Get-TfsTeamProject
were limited to a maximum of 100 results. This has been fixed. Now they will return all results.Get-TfsTeamProjectCollection
(and, by extension, Get-TfsOrganization) would throw an error with the message "Invalid or non-existent Collection System.Object[]." (fixes #165)Get-TfsReposity
, which wouldn't work when connected to a pipeline).This release adds initial support for Azure Artifacts and fixes a few bugs related to team membership handling.
-AreaPaths
argument to New-TfsTeam
so team area paths can be defined at team creation time.Get-TfsWorkItem
supports long result sets again. In the previous release, query results were limited to 200 work items due to a limitation in the Azure DevOps "Get Work Items Batch" API. In this version we added back the original behavior as a fallback logic: to fetch work items one at a time to circumvent the limitation. Though slower, it can fetch any number of work items (fixes #164).Add-TfsTeamAdmin
limited team administrators to users (groups could not be added as admins), even though Azure DevOps supports it. This release lifts this restriction.Get-TfsTeamMember
and Get-TfsTeamAdmin
would not return group membersNew-TfsTeam
would not respect -NoDefaultArea
and -NoBacklogIteration
This release adds support for the creation of Git forks, and fixes a few bugs.
N/A
New-TfsGitRepository
can now fork existing Git repositories, and Get-TfsGitRepository
can retrieve information about the parent (forked) repository.This release marks the adoption of .NET Source Generators as a core part of the TfsCmdlets development process.
Although it is entirely opaque (and mostly irrelevant) to the end-user, we expect that they will allow us to have shorter and more stable releases in the future.
Now, back to the release notes :-) We have new cmdlets, a bunch of improvements and bug fixes, and a few minor breaking changes.
Enable-TfsExtension
Disable-TfsExtension
Get-TfsExtension
Install-TfsExtension
Uninstall-TfsExtension
Get-TfsGitItem
Get-TfsGroup
New-TfsGroup
Remove-TfsGroup
Get-TfsUser
Get-TfsBuildDefinition
Enable-TfsBuildDefinition
Disable-TfsBuildDefinition
Suspend-TfsBuildDefinition
Resume-TfsBuildDefinition
Connect-TfsOrganization
Disconnect-TfsOrganization
Get-TfsOrganization
Import-TfsTeamProjectAvatar
Export-TfsTeamProjectAvatar
Remove-TfsTeamProjectAvatar
Enable-TfsWorkItemTag
Disable-TfsWorkItemTag
Undo-TfsWorkItemRemoval
Import-TfsWorkItemType
and Export-TfsWorkItemType
now support importing from / exporting to files (and not only to the console)Get-TfsTeamProject Proj1, Proj2
). That, by consequence, fixes issue #155
Get-TfsWorkItem
now makes batch API calls to improve performance. The gains are expressive - an order of magnitude in many cases.Invoke-TfsRestApi
can now save the response to a file, via its -Destination
argument. Besides, binary content (such as 'application/octet-stream') is returned as a byte array (instead of a string) when outputting the results to the console.Set-TfsTeam
has new arguments -OverwriteAreaPaths
and -OverwriteIterationPaths
to control its behavior when setting default areas and sprint iterations, respectively. Additionally, both -AreaPaths and -IterationPaths now support wildcards to simplify the addition of multiple items at once.Set-TfsTeam
where the -IterationPaths argument was ignored, and the sprint iterations were not set. Now sprint iterations are set as expected.Get-TfsWorkItem
where when using the -Description
an error is thrown.Some legacy cmdlets (primarily those that rely on the old TFS Client Object Model) have been temporarily removed. They may return in a future release when we determine the best course of action to support legacy cmdlets moving forward.
In the meantime, please consider using a previous release if you need them.
The removed cmdlets are:
Start-TfsIdentitySync
Connect-TfsConfigurationServer
Disconnect-TfsConfigurationServer
Get-TfsConfigurationServer
Get-TfsRegisteredConfigurationServer
Export-TfsGlobalList
Get-TfsGlobalList
Import-TfsGlobalList
New-TfsGlobalList
Remove-TfsGlobalList
Rename-TfsGlobalList
Set-TfsGlobalList
Start-TfsXamlBuild
Dismount-TfsTeamProjectCollection
Mount-TfsTeamProjectCollection
Start-TfsTeamProjectCollection
Stop-TfsTeamProjectCollection
Copy-TfsWorkItem
Every team project returned by Get-TfsTeamProject
used to make a second API call to retrieve the details of the team project, such as its process template. That additional roundtrip meant that the command would take longer to complete. However, those details are rarely needed in most scenarios.
Therefore, to improve performance for the most common situations, Get-TfsTeamProject
no longer includes project details by default.
When needed - the most common scenario is to get the process template name of a given project - you must include the -IncludeDetails
switch.
The change in Get-TfsWorkItem
to use batch calls greatly improved performance, but the downside is that now you're limited to up to 200 work items returned in a single call. That limit is imposed by the backend REST API and can't be circumvented.
We're exploring alternatives for those scenarios when one needs to retrieve more than 200 work items (e.g., when doing an export).
This release fixes a couple issues in Get-TfsIdentity
and Invoke-TfsRestApi
.
Error when using Get-TfsIdentity with Azure DevOps Services: Get-TfsIdentity is a cmdlet that helps to deal with legacy APIs, such as the Azure DevOps Security API. To fetch an identiy, it connected to a configuration server (the "root" of an Azure DevOps installation) and called the required API. However, connecting to a configuration server is not supported when using Azure DevOps Services. Now, when used with Azure DevOps Services, Get-TfsIdentity will use the collection (organization) scope for the API, whereas calls to the on-prem server still target the configuration server.
Error calling Invoke-TfsRestApi for alternate hosts under Windows PowerShell (Desktop): There was a bug in the implementation of Invoke-TfsRestApi that caused it to fail when using alternate hosts in Windows PowerShell. This has been fixed.