Releases: igoravl/TfsCmdlets
Release 2.4.1+2827.1
This release fixes bugs and add improvements to New-TfsWorkItem
and Set-TfsWorkItem
.
Improvements
- Identity fields in
New-TfsWorkItem
andSet-TfsWorkItem
(such as "Assigned To") now support either email addresses or user display names as valid values. Previously, only user display names were supported.
Fixes
- Fix "Set-TfsWorkItem fails with {type} to {type}[] (array) conversion error" (#172)
- Fix a bug in
New-TfsWorkItem
andSet-TfsWorkItem
where changes to the AssignedTo field would not be reflected in the Work Item.
Release 2.4.0+2768.3
This release adds support for interactive logons in PowerShell Core (6+) shells.
Improvements
- All the
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. - Some minor consistency improvements to the way Work Item Query cmdlets
Get-TfsWorkItemQuery
andGet-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.
Fixes
- Under certain circumstances,
Get-TfsWorkItem
would return an invalid ID, due to a change in the response from the WorkItem REST API (fixes #172) - Fix a bug in
New-TfsWorkItemQuery
andNew-TfsWorkItemQueryFolder
, where queries and folders could not be created when their parent did not exist.
Release 2.3.1+2724.1
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.
Fixes
Get-TfsTeam
andGet-TfsTeamProject
were limited to a maximum of 100 results. This has been fixed. Now they will return all results.- Under certain circumstances,
Get-TfsTeamProjectCollection
(and, by extension, Get-TfsOrganization) would throw an error with the message "Invalid or non-existent Collection System.Object[]." (fixes #165) - Fixes a caching bug in the handling of the -Project parameter that could lead to the wrong project being returned.
- Fixes pipelining bugs in several cmdlets (most noticeably
Get-TfsReposity
, which wouldn't work when connected to a pipeline). - Improves the readability of ShouldProcess (Confirm / WhatIf) output in several cmdlets.
Release 2.3.0+2718.3
This release adds initial support for Azure Artifacts and fixes a few bugs related to team membership handling.
New cmdlets
Artifacts
Git
Improvements
- Add
-AreaPaths
argument toNew-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).
Fixes
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.- Fixes a bug introduced in the last version where
Get-TfsTeamMember
andGet-TfsTeamAdmin
would not return group members - Under some circumstances
New-TfsTeam
would not respect-NoDefaultArea
and-NoBacklogIteration
Release 2.2.1+2667.1
This release adds support for the creation of Git forks, and fixes a few bugs.
New cmdlets
N/A
Improvements
- Supports for Git forks.
New-TfsGitRepository
can now fork existing Git repositories, andGet-TfsGitRepository
can retrieve information about the parent (forked) repository.
Fixes
- Error when calling New-TfsWorkItem without specifying area/iteration paths (#158)
- Error when calling New-TfsWorkItem passing backslash to area/iteration paths (#159)
- Error when setting recursive area path value in Set-TfsTeam (#160)
- Error when calling New-TfsTeam with DefaultAreaPath and/or BacklogIteration arguments set to non-existing paths
Release 2.2.0+2661.12
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.
New cmdlets
- Extension Management
Enable-TfsExtension
Disable-TfsExtension
Get-TfsExtension
Install-TfsExtension
Uninstall-TfsExtension
- Git
Get-TfsGitItem
- Identities, Users and Groups
Get-TfsGroup
New-TfsGroup
Remove-TfsGroup
Get-TfsUser
- Pipeline
Get-TfsBuildDefinition
Enable-TfsBuildDefinition
Disable-TfsBuildDefinition
Suspend-TfsBuildDefinition
Resume-TfsBuildDefinition
- Organization
Connect-TfsOrganization
Disconnect-TfsOrganization
Get-TfsOrganization
- Team project
Import-TfsTeamProjectAvatar
Export-TfsTeamProjectAvatar
Remove-TfsTeamProjectAvatar
- Work Items
Enable-TfsWorkItemTag
Disable-TfsWorkItemTag
Undo-TfsWorkItemRemoval
Improvements
Import-TfsWorkItemType
andExport-TfsWorkItemType
now support importing from / exporting to files (and not only to the console)- Add -NoProfile to Enter-TfsShell (#145)
- Most Get-* cmdlets now support retrieving multiple items at once by supplying a list of IDs/names/etc. (e.g.
Get-TfsTeamProject Proj1, Proj2
). That, by consequence, fixes issue #155 - Remove trailing slash from org name in prompt (#148)
- Filter team project by process template (#104)
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.
Fixes
- Fixes a bug in
Set-TfsTeam
where the -IterationPaths argument was ignored, and the sprint iterations were not set. Now sprint iterations are set as expected. - Get-TfsGroupMember does not work with PS Core and Azure DevOps Services (#149)
- New-TfsWorkItem fails when specifying area and iteration without prefixing team project (#147)
- Fixes a bug in
Get-TfsWorkItem
where when using the-Description
an error is thrown. - And many other under-the-hood fixes caught during the development of this release
BREAKING CHANGES
Removed cmdlets
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:
- Administration cmdlets
Start-TfsIdentitySync
- Configuration Server cmdlets
Connect-TfsConfigurationServer
Disconnect-TfsConfigurationServer
Get-TfsConfigurationServer
Get-TfsRegisteredConfigurationServer
- Global List cmdlets
Export-TfsGlobalList
Get-TfsGlobalList
Import-TfsGlobalList
New-TfsGlobalList
Remove-TfsGlobalList
Rename-TfsGlobalList
Set-TfsGlobalList
- Pipeline cmdlets
Start-TfsXamlBuild
- Team Project Collection cmdlets
Dismount-TfsTeamProjectCollection
Mount-TfsTeamProjectCollection
Start-TfsTeamProjectCollection
Stop-TfsTeamProjectCollection
- Work Item cmdlets
Copy-TfsWorkItem
Get-TfsTeamProject -IncludeDetails
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.
Get-TfsWorkItem and max work items per call
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).
Release 2.1.4+2594.1
This release fixes a couple issues in Get-TfsIdentity
and Invoke-TfsRestApi
.
Fixes
-
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.
Release 2.1.3+2589.4
This release fixes issue #152. It also contains an improvement (which happens to be a breaking change).
Fixes
- Error when calling Invoke-TfsRestApi for different hosts in the same session: If you tried to call
Invoke-TfsRestApi
for a certain host (e.g. vsrm.dev.azure.com) and then call another host (e.g. vssps.dev.azure.com) it would fail. Internally, this cmdlet uses a custom VssHttpClientBase implementation called GenericHttpClient. This custom implementation has, among other things, the ability to call APIs hosted in different parts of Azure DevOps such as vsrm.dev.azure.com and vssps.dev.azure.com. However, once an instance of GenericHttpClient is created by a call to VssConnection.GetClient<T>(), it is cached internally by VssConnection and thus cannot be updated to point to another URL. This release fixes it.
Improvements
Invoke-TfsRestApi now unwraps the property "value" in the response (BREAKING)
In previous versions, Invoke-TfsRestApi
would return the JSON response as-is.
In most situations, that would mean that using the code below would result in the following result:
PS> Invoke-TfsRestApi 'GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions?api-version=6.1-preview.4'
count value
----- -----
1 {@{source=userInterface; revision=27; description=; createdBy=; createdOn=2020-10-02T13:20:20.847Z; ...
Notice that the returned JSON response contains two properties, count
and value
. The value
property contains the actual data. To access it, you most likely would have to use the following code:
PS> (Invoke-TfsRestApi 'GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/definitions?api-version=6.1-preview.4').value
source : userInterface
revision : 27
description : This is a sample definition
createdBy : @{displayName=Igor Abade...
That is a very common pattern used by the Azure DevOps APIs. So common, in fact, that it was almost guaranteed that the response would be wrapped in a property called "value" - which means that you're required to unwrap the value
property nearly every time you called an Azure DevOps API.
Now, Invoke-TfsRestApi
automatically expands the "value" property, so that now calls to Invoke-TfsRestApi
will most certainly return the data you were looking for in the first place. However, that means your scripts may break, and you're required to manually fix them if you were using the (Invoke-TfsRestApi '_apis/...').value
pattern.
To fix your scripts, you can either:
- Add the
-NoAutoUnwrap
parameter to the call toInvoke-TfsRestApi
; or - Remove the call to the
Value
property, replacing a code like(Invoke-TfsRestApi '_apis/...').value
withInvoke-TfsRestApi '_apis/...'
.
Release 2.1.2+2513.2
This release fixes issue #124, plus some small refactorings/housekeeping.
Fixes
- Double confirmation in Remove-TfsGitRepository (and others): Many cmdlets (all
Remove-*
ones, and a few others) used to have a ConfirmImpact level set to High. At the same time, some of those also have a Force/ShouldContinue() logic. This meant that the user would be asked for confirmation twice: once when calling ShouldProcess(), and again when calling ShouldContinue(). Now, all cmdlets have their ConfirmImpact set to Medium, and those with potentially destructive actions have a ShouldContinue() call, that can be supressed by the user with the Force parameter.
Misc
- Adds support to automatic WinGet manifest update and PR creation;
- Updates icon URL in the Nuget/Chocolatey manifest to a higher-res version;
- Adds list of exported cmdlets to the module manifest (psd1);
- Nested modules are now being merged during build-time to improve module loading performance.
Release 2.1.1+2511.1
This release fixes a regression in New-TfsArea and New-TfsIteration, that stopped working due to a mishandling of path strings.
Fixes
- Fixes error "
Parent node '\' does not exist. Check the path or use -Force the create any missing parent nodes
" when creating a new area or iteration.