diff --git a/.docs/Add-VSTeamTaskGroup.md b/.docs/Add-VSTeamTaskGroup.md
new file mode 100644
index 000000000..ceb57ccff
--- /dev/null
+++ b/.docs/Add-VSTeamTaskGroup.md
@@ -0,0 +1,109 @@
+
+
+# Add-VSTeamTaskGroup
+
+## SYNOPSIS
+
+
+
+## SYNTAX
+
+## DESCRIPTION
+
+
+
+## EXAMPLES
+
+### -------------------------- EXAMPLE 1 --------------------------
+
+```powershell
+
+$taskGroup = Get-VSTeamTaskGroup -Name "taskGroupName" -ProjectName "sourceProjectName"
+
+# Set the ID and revision to null, so AzD is happy.
+$taskGroup.id = $null
+$taskGroup.revision = $null
+
+$taskGroupJson = ConvertTo-Json -InputObject $taskGroup -Depth 10
+
+Add-VSTeamTaskGroup -Body $taskGroupJson -ProjectName "destinationProjectName"
+```
+
+This example is useful for when one wants to copy an existing task group in one project into another project.
+
+## PARAMETERS
+
+### -ProjectName
+
+
+
+### -WhatIf
+
+Shows what would happen if the cmdlet runs.
+The cmdlet is not run.
+
+```yaml
+Type: SwitchParameter
+Aliases: wi
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -InFile
+
+The path to the json file that represents the task group
+
+```yaml
+Type: String
+Parameter Sets: ByFile
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### -Body
+
+The json that represents the task group as a string
+
+```yaml
+Type: String
+Parameter Sets: ByBody
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### CommonParameters
+
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorTask, -InformationAction, -InformationTask, -OutTask, -OutBuffer, -PipelineTask, -Verbose, -WarningAction, and -WarningTask.
+For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
+
+## INPUTS
+
+### System.String
+
+## OUTPUTS
+
+### System.Object
+
+## NOTES
+
+## RELATED LINKS
+
+[Update-VSTeamTaskGroup](Update-VSTeamTaskGroup.md)
+
+[Get-VSTeamTaskGroup](Get-VSTeamTaskGroup.md)
+
+[Remove-VSTeamTaskGroup](Remove-VSTeamTaskGroup.md)
diff --git a/.docs/Add-VSTeamVariableGroup.md b/.docs/Add-VSTeamVariableGroup.md
index e5e9d74fa..f1fc55c0b 100644
--- a/.docs/Add-VSTeamVariableGroup.md
+++ b/.docs/Add-VSTeamVariableGroup.md
@@ -63,6 +63,27 @@ $methodParameters = @{
Add-VSTeamVariableGroup @methodParameters
```
+### -------------------------- EXAMPLE 3 --------------------------
+
+```powershell
+# Copy variable group varGroupName from project sourceProjectName to project targetProjectName. If varGroupName already exists, we'll update it; else, we'll add it.
+
+$Name = "varGroupName"
+$FromProject = "sourceProjectName"
+$ToProject = "targetProjectName"
+
+$FromVariableGroupObject = Get-VSTeamVariableGroup -Name $Name -ProjectName $FromProject
+$body = ConvertTo-Json -InputObject $FromVariableGroupObject -Depth 100 -Compress
+$toVariableGroupObject = Get-VSTeamVariableGroup -Name $Name -ProjectName $ToProject
+if ($toVariableGroupObject) {
+ Update-VSTeamVariableGroup -Body $body -ProjectName $ToProject -Id $toVariableGroupObject.id
+}
+else {
+ Add-VSTeamVariableGroup -Body $body -ProjectName $ToProject
+}
+
+```
+
## PARAMETERS
@@ -73,6 +94,7 @@ The variable group description
```yaml
Type: String
+Parameter Sets: ByHashtable
Aliases:
Required: True
@@ -88,6 +110,7 @@ The variable group name
```yaml
Type: String
+Parameter Sets: ByHashtable
Aliases:
Required: True
@@ -103,6 +126,7 @@ The variable group ProviderData. This parameter is not available in TFS2017. Th
```yaml
Type: Hashtable
+Parameter Sets: ByHashtable
Aliases:
Required: False
@@ -118,6 +142,7 @@ The variable group type. This parameter is not available in TFS2017; all variab
```yaml
Type: String
+Parameter Sets: ByHashtable
Aliases:
Accepted values: Vsts, AzureKeyVault
@@ -134,6 +159,23 @@ The variable group variables.
```yaml
Type: Hashtable
+Parameter Sets: ByHashtable
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### -Body
+
+The json that represents the variable group as a string
+
+```yaml
+Type: String
+Parameter Sets: ByBody
Aliases:
Required: True
diff --git a/.docs/Get-VSTeamTaskGroup.md b/.docs/Get-VSTeamTaskGroup.md
new file mode 100644
index 000000000..ceb02bd37
--- /dev/null
+++ b/.docs/Get-VSTeamTaskGroup.md
@@ -0,0 +1,111 @@
+
+
+# Get-VSTeamTaskGroup
+
+## SYNOPSIS
+
+
+
+## SYNTAX
+
+## DESCRIPTION
+
+
+
+## EXAMPLES
+
+### -------------------------- EXAMPLE 1 --------------------------
+
+```powershell
+
+$methodParameters = @{
+ ProjectName = "some_project_name"
+}
+
+Get-VSTeamTaskGroup @methodParameters
+```
+
+Get all the task groups for the some_project_name project. Here we are splatting the parameter, but it may also be directly specified. See a non-splatting example below.
+
+### -------------------------- EXAMPLE 2 --------------------------
+
+```powershell
+Get-VSTeamTaskGroup -ProjectName "some_project_name" -Id "Task_group_id"
+```
+
+Get a task group when the ID is already known.
+
+### -------------------------- EXAMPLE 3 --------------------------
+
+```powershell
+
+$methodParameters = @{
+ ProjectName = "some_project_name"
+ Name = "Task_group_name"
+}
+
+Get-VSTeamTaskGroup @methodParameters
+```
+
+Get a task group by name, when the ID is not known. Here we are splatting the parameters, but they may also be directly specified. Getting by ID is preferred, as it's more efficient; but getting by name is, of course, handy.
+
+## PARAMETERS
+
+### -ProjectName
+
+
+
+### -Id
+
+ID of the existing task group
+
+```yaml
+Type: String
+Parameter Sets: ByID
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### -Name
+
+Name of the existing task group
+
+```yaml
+Type: String
+Parameter Sets: ByName
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### CommonParameters
+
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorTask, -InformationAction, -InformationTask, -OutTask, -OutBuffer, -PipelineTask, -Verbose, -WarningAction, and -WarningTask.
+For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
+
+## INPUTS
+
+### System.String
+
+## OUTPUTS
+
+### System.Object
+
+## NOTES
+
+## RELATED LINKS
+
+[Add-VSTeamTaskGroup](Add-VSTeamTaskGroup.md)
+
+[Update-VSTeamTaskGroup](Update-VSTeamTaskGroup.md)
+
+[Remove-VSTeamTaskGroup](Remove-VSTeamTaskGroup.md)
\ No newline at end of file
diff --git a/.docs/Get-VSTeamWorkItem.md b/.docs/Get-VSTeamWorkItem.md
index 2dbd377a1..28392b8b5 100644
--- a/.docs/Get-VSTeamWorkItem.md
+++ b/.docs/Get-VSTeamWorkItem.md
@@ -17,7 +17,7 @@
### -------------------------- EXAMPLE 1 --------------------------
```PowerShell
-PS C:\> Get-VSTeamWorkItem -Ids 47,48
+PS C:\> Get-VSTeamWorkItem -Id 47,48
```
This command gets work items with IDs 47 and 48 by using the IDs parameter.
@@ -26,18 +26,7 @@ This command gets work items with IDs 47 and 48 by using the IDs parameter.
### -Id
-The id of the work item.
-
-```yaml
-Type: Int32
-Parameter Sets: ByID
-Required: True
-Accept pipeline input: true (ByPropertyName, ByValue)
-```
-
-### -Ids
-
-The id of the work item.
+The id of one or more work items.
```yaml
Type: Int32[]
@@ -57,7 +46,7 @@ The flag to control error policy in a bulk get work items request. The acceptab
Type: String
Parameter Sets: List
Required: True
-Default value: Fail
+Default value: omit
```
### -Fields
diff --git a/.docs/Remove-VSTeamTaskGroup.md b/.docs/Remove-VSTeamTaskGroup.md
new file mode 100644
index 000000000..ea1852786
--- /dev/null
+++ b/.docs/Remove-VSTeamTaskGroup.md
@@ -0,0 +1,123 @@
+
+
+# Remove-VSTeamTaskGroup
+
+## SYNOPSIS
+
+
+
+## SYNTAX
+
+## DESCRIPTION
+
+
+
+## EXAMPLES
+
+### -------------------------- EXAMPLE 1 --------------------------
+
+```powershell
+
+$projectName = "some_project_name"
+$taskGroup = Get-VSTeamTaskGroup -Name "taskName" -ProjectName $projectName
+
+$methodParameters = @{
+ Id = $taskGroup.id
+ ProjectName = $projectName
+ Force = $true
+}
+
+Remove-VSTeamTaskGroup @methodParameters
+```
+
+## PARAMETERS
+
+### -Confirm
+
+Prompts you for confirmation before running the cmdlet.
+
+```yaml
+Type: SwitchParameter
+Aliases: cf
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Force
+
+Does not prompt
+
+```yaml
+Type: SwitchParameter
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -ProjectName
+
+
+
+### -WhatIf
+
+Shows what would happen if the cmdlet runs.
+The cmdlet is not run.
+
+```yaml
+Type: SwitchParameter
+Aliases: wi
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Id
+
+ID of the existing task group
+
+```yaml
+Type: String
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### CommonParameters
+
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorTask, -InformationAction, -InformationTask, -OutTask, -OutBuffer, -PipelineTask, -Verbose, -WarningAction, and -WarningTask.
+For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
+
+## INPUTS
+
+### System.String[]
+
+System.String
+
+## OUTPUTS
+
+### System.Object
+
+## NOTES
+
+## RELATED LINKS
+
+[Add-VSTeamTaskGroup](Add-VSTeamTaskGroup.md)
+
+[Get-VSTeamTaskGroup](Get-VSTeamTaskGroup.md)
+
+[Update-VSTeamTaskGroup](Update-VSTeamTaskGroup.md)
diff --git a/.docs/Remove-VSTeamVariableGroup.md b/.docs/Remove-VSTeamVariableGroup.md
index 2157ca50b..fe98ed935 100644
--- a/.docs/Remove-VSTeamVariableGroup.md
+++ b/.docs/Remove-VSTeamVariableGroup.md
@@ -44,55 +44,13 @@ Remove-VSTeamVariableGroup @methodParameters
## PARAMETERS
-### -Confirm
-
-Prompts you for confirmation before running the cmdlet.
-
-```yaml
-Type: SwitchParameter
-Aliases: cf
-
-Required: False
-Position: Named
-Default value: None
-Accept pipeline input: False
-Accept wildcard characters: False
-```
-
-### -Force
-
-Does not prompt
-
-```yaml
-Type: SwitchParameter
-Aliases:
-
-Required: False
-Position: Named
-Default value: None
-Accept pipeline input: False
-Accept wildcard characters: False
-```
-
-### -ProjectName
-
-### -WhatIf
+
-Shows what would happen if the cmdlet runs.
-The cmdlet is not run.
+
-```yaml
-Type: SwitchParameter
-Aliases: wi
-
-Required: False
-Position: Named
-Default value: None
-Accept pipeline input: False
-Accept wildcard characters: False
-```
+
### -Id
diff --git a/.docs/Remove-VSTeamWorkItem.md b/.docs/Remove-VSTeamWorkItem.md
new file mode 100644
index 000000000..ea286a76c
--- /dev/null
+++ b/.docs/Remove-VSTeamWorkItem.md
@@ -0,0 +1,80 @@
+
+
+# Remove-VSTeamWorkItem
+
+## SYNOPSIS
+
+
+
+## SYNTAX
+
+## DESCRIPTION
+
+
+
+## EXAMPLES
+
+### -------------------------- EXAMPLE 1 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamWorkItem -Id 47,48 -Force
+```
+
+This command deletes work items with IDs 47 and 48 by using the IDs parameter.
+
+### -------------------------- EXAMPLE 2 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamWorkItem -Id 47
+```
+
+This command deletes the work item with ID 47 by using the ID parameter.
+
+### -------------------------- EXAMPLE 3 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamWorkItem -Id 47 -Destroy -Force
+```
+
+This command deletes work item with IDs 47 **permanently** by using the Destroy parameter.
+
+## PARAMETERS
+
+### -Id
+
+The id of one or more work items.
+
+```yaml
+Type: Int32[]
+Parameter Sets: List
+Required: True
+Accept pipeline input: true (ByPropertyName, ByValue)
+```
+
+### -Destroy
+
+Optional parameter, if set to true, the work item is deleted permanently. **Please note: the destroy action is PERMANENT and cannot be undone.**
+
+```yaml
+Type: Switch
+```
+
+
+
+
+
+
+
+## INPUTS
+
+### System.String
+
+ProjectName
+
+## OUTPUTS
+
+## NOTES
+
+If you do not set the default project by called Set-VSTeamDefaultProject before calling Get-VSTeamWorkItem you will have to type in the names.
+
+## RELATED LINKS
diff --git a/.docs/Update-VSTeamTaskGroup.md b/.docs/Update-VSTeamTaskGroup.md
new file mode 100644
index 000000000..d26bc8129
--- /dev/null
+++ b/.docs/Update-VSTeamTaskGroup.md
@@ -0,0 +1,153 @@
+
+
+# Update-VSTeamTaskGroup
+
+## SYNOPSIS
+
+
+
+## SYNTAX
+
+## DESCRIPTION
+
+
+
+## EXAMPLES
+
+### -------------------------- EXAMPLE 1 --------------------------
+
+```powershell
+
+$projectName = "projectName"
+
+$taskGroup = Get-VSTeamTaskGroup -Name "taskGroupName" -ProjectName $projectName
+
+# Make some change, e.g.
+$taskGroup.description = "new description"
+
+$taskGroupJson = ConvertTo-Json -InputObject $taskGroup -Depth 10
+
+Update-VSTeamTaskGroup -ProjectName $projectName -Id $taskGroup.id -Body $taskGroupJson
+```
+
+## PARAMETERS
+
+### -Confirm
+
+Prompts you for confirmation before running the cmdlet.
+
+```yaml
+Type: SwitchParameter
+Aliases: cf
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Force
+
+Does not prompt
+
+```yaml
+Type: SwitchParameter
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -ProjectName
+
+
+
+### -WhatIf
+
+Shows what would happen if the cmdlet runs.
+The cmdlet is not run.
+
+```yaml
+Type: SwitchParameter
+Aliases: wi
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Id
+
+ID of the existing task group
+
+```yaml
+Type: String
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### -InFile
+
+The path to the json file that represents the task group
+
+```yaml
+Type: String
+Parameter Sets: ByFile
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### -Body
+
+The json that represents the task group as a string
+
+```yaml
+Type: String
+Parameter Sets: ByBody
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### CommonParameters
+
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorTask, -InformationAction, -InformationTask, -OutTask, -OutBuffer, -PipelineTask, -Verbose, -WarningAction, and -WarningTask.
+For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
+
+## INPUTS
+
+### System.String
+
+## OUTPUTS
+
+### System.Object
+
+## NOTES
+
+## RELATED LINKS
+
+[Add-VSTeamTaskGroup](Add-VSTeamTaskGroup.md)
+
+[Get-VSTeamTaskGroup](Get-VSTeamTaskGroup.md)
+
+[Remove-VSTeamTaskGroup](Remove-VSTeamTaskGroup.md)
diff --git a/.docs/Update-VSTeamVariableGroup.md b/.docs/Update-VSTeamVariableGroup.md
index f5f523030..442dfc647 100644
--- a/.docs/Update-VSTeamVariableGroup.md
+++ b/.docs/Update-VSTeamVariableGroup.md
@@ -56,6 +56,27 @@ $methodParameters = @{
Update-VSTeamVariableGroup @methodParameters
```
+### -------------------------- EXAMPLE 2 --------------------------
+
+```powershell
+# Copy variable group varGroupName from project sourceProjectName to project targetProjectName. If varGroupName already exists, we'll update it; else, we'll add it.
+
+$Name = "varGroupName"
+$FromProject = "sourceProjectName"
+$ToProject = "targetProjectName"
+
+$FromVariableGroupObject = Get-VSTeamVariableGroup -Name $Name -ProjectName $FromProject
+$body = ConvertTo-Json -InputObject $FromVariableGroupObject -Depth 100 -Compress
+$toVariableGroupObject = Get-VSTeamVariableGroup -Name $Name -ProjectName $ToProject
+if ($toVariableGroupObject) {
+ Update-VSTeamVariableGroup -Body $body -ProjectName $ToProject -Id $toVariableGroupObject.id
+}
+else {
+ Add-VSTeamVariableGroup -Body $body -ProjectName $ToProject
+}
+
+```
+
## PARAMETERS
### -Confirm
@@ -129,6 +150,7 @@ The variable group description
```yaml
Type: String
+Parameter Sets: ByHashtable
Aliases:
Required: True
@@ -144,6 +166,7 @@ The variable group name
```yaml
Type: String
+Parameter Sets: ByHashtable
Aliases:
Required: True
@@ -159,6 +182,7 @@ The variable group ProviderData. This parameter is not available in TFS2017. Th
```yaml
Type: Hashtable
+Parameter Sets: ByHashtable
Aliases:
Required: False
@@ -174,6 +198,7 @@ The variable group type. This parameter is not available in TFS2017; all variab
```yaml
Type: String
+Parameter Sets: ByHashtable
Aliases:
Accepted values: Vsts, AzureKeyVault
@@ -190,6 +215,23 @@ The variable group variables.
```yaml
Type: Hashtable
+Parameter Sets: ByHashtable
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### -Body
+
+The json that represents the task group as a string
+
+```yaml
+Type: String
+Parameter Sets: ByBody
Aliases:
Required: True
diff --git a/.docs/synopsis/Add-VSTeamTaskGroup.md b/.docs/synopsis/Add-VSTeamTaskGroup.md
new file mode 100644
index 000000000..04dda4b23
--- /dev/null
+++ b/.docs/synopsis/Add-VSTeamTaskGroup.md
@@ -0,0 +1 @@
+Adds a task group.
\ No newline at end of file
diff --git a/.docs/synopsis/Get-VSTeamTaskGroup.md b/.docs/synopsis/Get-VSTeamTaskGroup.md
new file mode 100644
index 000000000..951a97a0f
--- /dev/null
+++ b/.docs/synopsis/Get-VSTeamTaskGroup.md
@@ -0,0 +1 @@
+Gets a task group
\ No newline at end of file
diff --git a/.docs/synopsis/Remove-VSTeamTaskGroup.md b/.docs/synopsis/Remove-VSTeamTaskGroup.md
new file mode 100644
index 000000000..607957ad7
--- /dev/null
+++ b/.docs/synopsis/Remove-VSTeamTaskGroup.md
@@ -0,0 +1 @@
+Removes a task group
\ No newline at end of file
diff --git a/.docs/synopsis/Remove-VSTeamWorkItem.md b/.docs/synopsis/Remove-VSTeamWorkItem.md
new file mode 100644
index 000000000..988f2c6da
--- /dev/null
+++ b/.docs/synopsis/Remove-VSTeamWorkItem.md
@@ -0,0 +1 @@
+Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution.
\ No newline at end of file
diff --git a/.docs/synopsis/Update-VSTeamTaskGroup.md b/.docs/synopsis/Update-VSTeamTaskGroup.md
new file mode 100644
index 000000000..8b7e24925
--- /dev/null
+++ b/.docs/synopsis/Update-VSTeamTaskGroup.md
@@ -0,0 +1 @@
+Updates an existing task group
\ No newline at end of file
diff --git a/Build-Module.ps1 b/Build-Module.ps1
index 413d1efce..897f4433e 100644
--- a/Build-Module.ps1
+++ b/Build-Module.ps1
@@ -53,7 +53,7 @@ if ($buildHelp.IsPresent) {
Pop-Location
}
-Write-Output 'Publishing help files'
+Write-Output 'Publishing about help files'
Copy-Item -Path ./Source/en-US -Destination "$output/" -Recurse -Force
Copy-Item -Path ./Source/VSTeam.psm1 -Destination "$output/VSTeam.psm1" -Force
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b186123bc..71efeb75c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,9 +2,24 @@
## 6.4.0
+Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/214) from [Louis Tourtellotte](https://github.com/quintessential5) which included the following:
+
+Add/Update Var Group: Support for Body Param, so that json can be directly provided rather than a hashtable of variables. See the example in the documentation for more use case details.
+
+Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/213) from [Louis Tourtellotte](https://github.com/quintessential5) which included the following:
+
+Get-VSTeamVariableGroup fixes
+
+Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/212) from [Louis Tourtellotte](https://github.com/quintessential5) which included the following:
+
+Support for task groups
+
Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/211) from [Dick van de Meulengraaf](https://github.com/dickvdm) which included the following:
AzD2019 configuration, being Azure DevOps Server (on-prem) 2019 (17.143.28912.1)
+Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/209) from [Sebastian Schütze](https://github.com/SebastianSchuetze) which included the following:
+
+Added Remove-VSTeamWorkItem to delete work items
Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/204) from [Jeroen Janssen](https://github.com/japj) which included the following:
@@ -14,6 +29,10 @@ Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/205) from [Se
Get-VSTeamWiql to get work items via [WIQL](https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/wiql?view=azure-devops-rest-5.1) and also to expand the returned work items with all fields selected.
+**Breaking changes**:
+
+Changed signature of Get-VSTeamWorkItem to only have Id of type int[] instead of Id and Ids.
+
## 6.3.6
Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/200) from [Chris Gardner](https://github.com/ChrisLGardner) which included the following:
@@ -39,7 +58,7 @@ VSTS --> AzD
## 6.3.3
-Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/191) from [quintessential5](https://github.com/quintessential5) which included the following:
+Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/191) from [Louis Tourtellotte](https://github.com/quintessential5) which included the following:
Get-VSTeamVariableGroup: support for getting by name as well as by ID.
diff --git a/Source/Classes/VSTeamVersions.ps1 b/Source/Classes/VSTeamVersions.ps1
index 1213c423c..95580b2ec 100644
--- a/Source/Classes/VSTeamVersions.ps1
+++ b/Source/Classes/VSTeamVersions.ps1
@@ -1,13 +1,14 @@
class VSTeamVersions {
static [string] $Account = $env:TEAM_ACCT
static [string] $DefaultProject = $env:TEAM_PROJECT
- static [string] $Version = $(If ($env:TEAM_VERSION) {$env:TEAM_VERSION} Else {"TFS2017"})
+ static [string] $Version = $(If ($env:TEAM_VERSION) { $env:TEAM_VERSION } Else { "TFS2017" })
static [string] $Build = '3.0'
static [string] $Release = '3.0-preview'
static [string] $Core = '3.0'
static [string] $Git = '3.0'
static [string] $DistributedTask = '3.0-preview'
static [string] $VariableGroups = '3.2-preview.1'
+ static [string] $TaskGroups = '3.2-preview.1'
static [string] $Tfvc = '3.0'
static [string] $Packaging = ''
static [string] $MemberEntitlementManagement = ''
diff --git a/Source/Public/Add-VSTeamTaskGroup.ps1 b/Source/Public/Add-VSTeamTaskGroup.ps1
new file mode 100644
index 000000000..5fbc0d475
--- /dev/null
+++ b/Source/Public/Add-VSTeamTaskGroup.ps1
@@ -0,0 +1,28 @@
+function Add-VSTeamTaskGroup {
+ [CmdletBinding()]
+ param(
+ [Parameter(ParameterSetName = 'ByFile', Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
+ [string] $InFile,
+
+ [Parameter(ParameterSetName = 'ByBody', Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
+ [string] $Body
+ )
+
+ DynamicParam {
+ _buildProjectNameDynamicParam
+ }
+
+ process {
+ # Bind the parameter to a friendly variable
+ $ProjectName = $PSBoundParameters["ProjectName"]
+
+ if ($InFile) {
+ $resp = _callAPI -Method Post -ProjectName $ProjectName -Area distributedtask -Resource taskgroups -Version $([VSTeamVersions]::TaskGroups) -InFile $InFile -ContentType 'application/json'
+ }
+ else {
+ $resp = _callAPI -Method Post -ProjectName $ProjectName -Area distributedtask -Resource taskgroups -Version $([VSTeamVersions]::TaskGroups) -ContentType 'application/json' -Body $Body
+ }
+
+ return $resp
+ }
+}
\ No newline at end of file
diff --git a/Source/Public/Add-VSTeamVariableGroup.ps1 b/Source/Public/Add-VSTeamVariableGroup.ps1
index 0a6e4be1e..08ac987fc 100644
--- a/Source/Public/Add-VSTeamVariableGroup.ps1
+++ b/Source/Public/Add-VSTeamVariableGroup.ps1
@@ -1,19 +1,22 @@
function Add-VSTeamVariableGroup {
param(
- [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
+ [Parameter(ParameterSetName = 'ByHashtable', Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
[string] $Name,
- [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
+ [Parameter(ParameterSetName = 'ByHashtable', Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
[string] $Description,
- [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
- [hashtable] $Variables
+ [Parameter(ParameterSetName = 'ByHashtable', Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
+ [hashtable] $Variables,
+
+ [Parameter(ParameterSetName = 'ByBody', Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
+ [string] $Body
)
DynamicParam {
$dp = _buildProjectNameDynamicParam
- if ([VSTeamVersions]::Version -ne "TFS2017") {
+ if ([VSTeamVersions]::Version -ne "TFS2017" -and $PSCmdlet.ParameterSetName -eq "ByHashtable") {
$ParameterName = 'Type'
$rp = _buildDynamicParam -ParameterName $ParameterName -arrSet ('Vsts', 'AzureKeyVault') -Mandatory $true
$dp.Add($ParameterName, $rp)
@@ -30,22 +33,25 @@ function Add-VSTeamVariableGroup {
# Bind the parameter to a friendly variable
$ProjectName = $PSBoundParameters["ProjectName"]
- $body = @{
+ if ([string]::IsNullOrWhiteSpace($Body))
+ {
+ $bodyAsHashtable = @{
name = $Name
description = $Description
variables = $Variables
}
if ([VSTeamVersions]::Version -ne "TFS2017") {
$Type = $PSBoundParameters['Type']
- $body.Add("type", $Type)
+ $bodyAsHashtable.Add("type", $Type)
$ProviderData = $PSBoundParameters['ProviderData']
if ($null -ne $ProviderData) {
- $body.Add("providerData", $ProviderData)
+ $bodyAsHashtable.Add("providerData", $ProviderData)
}
}
- $body = $body | ConvertTo-Json
+ $body = $bodyAsHashtable | ConvertTo-Json
+ }
# Call the REST API
$resp = _callAPI -ProjectName $projectName -Area 'distributedtask' -Resource 'variablegroups' `
@@ -53,4 +59,4 @@ function Add-VSTeamVariableGroup {
return Get-VSTeamVariableGroup -ProjectName $ProjectName -id $resp.id
}
-}
+}
\ No newline at end of file
diff --git a/Source/Public/Get-VSTeamAPIVersion.ps1 b/Source/Public/Get-VSTeamAPIVersion.ps1
index a7b23b5e0..e84066996 100644
--- a/Source/Public/Get-VSTeamAPIVersion.ps1
+++ b/Source/Public/Get-VSTeamAPIVersion.ps1
@@ -1,6 +1,6 @@
function Get-VSTeamAPIVersion {
[CmdletBinding()]
- [OutputType([System.Collections.Hashtable])]
+ [OutputType([System.Collections.Hashtable])]
param()
return @{
@@ -13,6 +13,7 @@ function Get-VSTeamAPIVersion {
VariableGroups = $([VSTeamVersions]::VariableGroups)
Tfvc = $([VSTeamVersions]::Tfvc)
Packaging = $([VSTeamVersions]::Packaging)
+ TaskGroups = $([VSTeamVersions]::TaskGroups)
MemberEntitlementManagement = $([VSTeamVersions]::MemberEntitlementManagement)
ExtensionsManagement = $([VSTeamVersions]::ExtensionsManagement)
ServiceFabricEndpoint = $([VSTeamVersions]::ServiceFabricEndpoint)
diff --git a/Source/Public/Get-VSTeamTaskGroup.ps1 b/Source/Public/Get-VSTeamTaskGroup.ps1
new file mode 100644
index 000000000..6f37aaa2e
--- /dev/null
+++ b/Source/Public/Get-VSTeamTaskGroup.ps1
@@ -0,0 +1,50 @@
+
+function Get-VSTeamTaskGroup {
+ [CmdletBinding(DefaultParameterSetName = 'List')]
+ param(
+ [Parameter(ParameterSetName = 'ByID', Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
+ [string] $Id,
+
+ [Parameter(ParameterSetName = 'ByName', Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
+ [string] $Name
+ )
+
+ DynamicParam {
+ _buildProjectNameDynamicParam
+ }
+
+ process {
+ # Bind the parameter to a friendly variable
+ $ProjectName = $PSBoundParameters["ProjectName"]
+
+ if ($Id) {
+ $resp = _callAPI -ProjectName $ProjectName -Area distributedtask -Resource taskgroups -Version $([VSTeamVersions]::TaskGroups) -Id $Id -Method Get
+
+ Write-Output $resp.value
+ }
+ else {
+ $resp = _callAPI -ProjectName $ProjectName -Area distributedtask -Resource taskgroups -Version $([VSTeamVersions]::TaskGroups) -Method Get
+
+ if ($Name) {
+ if ($resp.value) {
+ foreach ($item in $resp.value) {
+ if ($item.PSObject.Properties.name -contains "name") {
+ if ($Name -eq $item.name) {
+ return $item
+ }
+ }
+ }
+ return $null
+ }
+ else {
+ return $null
+ }
+ }
+ else {
+ foreach ($item in $resp.value) {
+ Write-Output $item
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/Public/Get-VSTeamVariableGroup.ps1 b/Source/Public/Get-VSTeamVariableGroup.ps1
index 68af57f76..33643f8c2 100644
--- a/Source/Public/Get-VSTeamVariableGroup.ps1
+++ b/Source/Public/Get-VSTeamVariableGroup.ps1
@@ -30,7 +30,9 @@ function Get-VSTeamVariableGroup {
$resp = _callAPI -ProjectName $ProjectName -Area 'distributedtask' -Resource 'variablegroups' -Version $([VSTeamVersions]::VariableGroups) -Method Get `
-QueryString @{groupName = $Name}
- Write-Output $resp
+ _applyTypesToVariableGroup -item $resp.value
+
+ Write-Output $resp.value
}
else {
# Call the REST API
diff --git a/Source/Public/Get-VSTeamWiql.ps1 b/Source/Public/Get-VSTeamWiql.ps1
index c0b5b24ca..3603a018d 100644
--- a/Source/Public/Get-VSTeamWiql.ps1
+++ b/Source/Public/Get-VSTeamWiql.ps1
@@ -18,11 +18,11 @@ function Get-VSTeamWiql {
)
DynamicParam {
#$arrSet = Get-VSTeamProject | Select-Object -ExpandProperty Name
- _buildProjectNameDynamicParam -mandatory $true #-arrSet $arrSet
+ _buildProjectNameDynamicParam -mandatory $true #-arrSet $arrSet
}
Process {
-
+
# Bind the parameter to a friendly variable
$ProjectName = $PSBoundParameters["ProjectName"]
@@ -51,27 +51,26 @@ function Get-VSTeamWiql {
}
if ($Expand) {
-
+
[array]$Ids = $resp.workItems.id
$Fields = $resp.columns.referenceName
-
+
$resp.workItems = @()
- #splitting id array by 200, since a maximum of 200 ids are allowed per call
- $countIds = $Ids.Count
+ #splitting id array by 200, since a maximum of 200 ids are allowed per call
+ $countIds = $Ids.Count
$resp.workItems = for ($beginRange = 0; $beginRange -lt $countIds; $beginRange += 200) {
$endRange = ($beginRange + 199)
-
+
if ($endRange -gt $countIds) {
$idArray = $Ids[$beginRange..($countIds - 1)]
}
else {
$idArray = $Ids[$beginRange..($endRange)]
}
-
- (Get-VSTeamWorkItem -Fields $Fields -Ids $idArray).value
+
+ (Get-VSTeamWorkItem -Fields $Fields -Id $idArray).value
}
-
}
_applyTypesToWiql -item $resp
diff --git a/Source/Public/Get-VSTeamWorkItem.ps1 b/Source/Public/Get-VSTeamWorkItem.ps1
index 02a9789bc..2bcae76b6 100644
--- a/Source/Public/Get-VSTeamWorkItem.ps1
+++ b/Source/Public/Get-VSTeamWorkItem.ps1
@@ -1,15 +1,12 @@
function Get-VSTeamWorkItem {
[CmdletBinding(DefaultParameterSetName = 'ByID')]
param(
- [Parameter(ParameterSetName = 'ByID', Mandatory = $true, ValueFromPipeline = $true, Position = 0)]
- [int] $Id,
-
- [Parameter(ParameterSetName = 'List', Mandatory = $true, ValueFromPipeline = $true, Position = 0)]
- [int[]] $Ids,
+ [Parameter(Mandatory = $true, ValueFromPipeline = $true, Position = 0)]
+ [int[]] $Id,
[Parameter(ParameterSetName = 'List')]
- [ValidateSet('Fail', 'Omit')]
- [string] $ErrorPolicy = 'Fail',
+ [ValidateSet('fail', 'omit')]
+ [string] $ErrorPolicy = 'omit',
[ValidateSet('None', 'Relations', 'Fields', 'Links', 'All')]
[string] $Expand = 'None',
@@ -19,22 +16,24 @@ function Get-VSTeamWorkItem {
Process {
# Call the REST API
- if ($Ids) {
+ if ($Id.Length -gt 1) {
$resp = _callAPI -Area 'wit' -Resource 'workitems' `
-Version $([VSTeamVersions]::Core) `
-Querystring @{
'$Expand' = $Expand
fields = ($Fields -join ',')
errorPolicy = $ErrorPolicy
- ids = ($ids -join ',')
+ ids = ($Id -join ',')
}
foreach ($item in $resp.value) {
_applyTypesToWorkItem -item $item
}
+
+ return $resp.value
}
else {
- $a = $id[0]
+ $a = $Id[0]
$resp = _callAPI -Area 'wit' -Resource 'workitems' `
-Version $([VSTeamVersions]::Core) -id "$a" `
-Querystring @{
@@ -43,8 +42,8 @@ function Get-VSTeamWorkItem {
}
_applyTypesToWorkItem -item $resp
- }
- return $resp
+ return $resp
+ }
}
}
\ No newline at end of file
diff --git a/Source/Public/Remove-VSTeamTaskGroup.ps1 b/Source/Public/Remove-VSTeamTaskGroup.ps1
new file mode 100644
index 000000000..4cf4321fc
--- /dev/null
+++ b/Source/Public/Remove-VSTeamTaskGroup.ps1
@@ -0,0 +1,27 @@
+function Remove-VSTeamTaskGroup {
+ [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
+ param(
+ [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
+ [string[]] $Id,
+
+ [switch] $Force
+ )
+
+ DynamicParam {
+ _buildProjectNameDynamicParam
+ }
+
+ process {
+ # Bind the parameter to a friendly variable
+ $ProjectName = $PSBoundParameters["ProjectName"]
+
+ foreach ($item in $Id) {
+ if ($Force -or $pscmdlet.ShouldProcess($item, "Delete Task Group")) {
+ # Call the REST API
+ _callAPI -Method Delete -ProjectName $ProjectName -Area distributedtask -Resource taskgroups -Version $([VSTeamVersions]::TaskGroups) -Id $item | Out-Null
+
+ Write-Output "Deleted task group $item"
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/Public/Remove-VSTeamWorkItem.ps1 b/Source/Public/Remove-VSTeamWorkItem.ps1
new file mode 100644
index 000000000..e2b73cc7f
--- /dev/null
+++ b/Source/Public/Remove-VSTeamWorkItem.ps1
@@ -0,0 +1,31 @@
+function Remove-VSTeamWorkItem {
+ [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "High", DefaultParameterSetName = 'ByID')]
+ param(
+ [Parameter(Mandatory = $true, ValueFromPipeline = $true, Position = 0)]
+ [int[]] $Id,
+
+ [switch] $Destroy,
+
+ [switch] $Force
+ )
+
+ Process {
+ # Call the REST API
+ foreach ($item in $Id) {
+ if ($Force -or $pscmdlet.ShouldProcess($item, "Delete Work Item")) {
+ try {
+ _callAPI -Method Delete -Area wit -Resource workitems `
+ -Version $([VSTeamVersions]::Core) -id $item `
+ -Querystring @{
+ destroy = $Destroy
+ } | Out-Null
+
+ Write-Output "Deleted Work item with ID $item"
+ }
+ catch {
+ _handleException $_
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/Public/Set-VSTeamAPIVersion.ps1 b/Source/Public/Set-VSTeamAPIVersion.ps1
index 73409ad20..f85052d16 100644
--- a/Source/Public/Set-VSTeamAPIVersion.ps1
+++ b/Source/Public/Set-VSTeamAPIVersion.ps1
@@ -6,7 +6,7 @@ function Set-VSTeamAPIVersion {
[string] $Target = 'TFS2017',
[parameter(ParameterSetName = 'Service', Mandatory = $true, Position = 0)]
- [ValidateSet('Build', 'Release', 'Core', 'Git', 'DistributedTask', 'VariableGroups', 'Tfvc', 'Packaging', 'MemberEntitlementManagement', 'ExtensionsManagement', 'ServiceFabricEndpoint', 'Graph')]
+ [ValidateSet('Build', 'Release', 'Core', 'Git', 'DistributedTask', 'VariableGroups', 'Tfvc', 'Packaging', 'MemberEntitlementManagement', 'ExtensionsManagement', 'ServiceFabricEndpoint', 'Graph', 'TaskGroups')]
[string] $Service,
[parameter(ParameterSetName = 'Service', Mandatory = $true, Position = 1)]
@@ -54,6 +54,9 @@ function Set-VSTeamAPIVersion {
'Graph' {
[VSTeamVersions]::Graph = $Version
}
+ 'TaskGroups' {
+ [VSTeamVersions]::TaskGroups = $Version
+ }
}
}
else {
@@ -83,6 +86,7 @@ function Set-VSTeamAPIVersion {
[VSTeamVersions]::VariableGroups = '4.0-preview'
[VSTeamVersions]::Tfvc = '3.2'
[VSTeamVersions]::Packaging = ''
+ [VSTeamVersions]::TaskGroups = '4.0-preview'
[VSTeamVersions]::MemberEntitlementManagement = ''
[VSTeamVersions]::ServiceFabricEndpoint = '3.2'
[VSTeamVersions]::ExtensionsManagement = '3.2-preview'
@@ -98,6 +102,7 @@ function Set-VSTeamAPIVersion {
[VSTeamVersions]::VariableGroups = '3.2-preview.1'
[VSTeamVersions]::Tfvc = '3.0'
[VSTeamVersions]::Packaging = ''
+ [VSTeamVersions]::TaskGroups = '3.2-preview.1'
[VSTeamVersions]::MemberEntitlementManagement = ''
[VSTeamVersions]::ServiceFabricEndpoint = ''
[VSTeamVersions]::ExtensionsManagement = '3.0-preview'
@@ -113,6 +118,7 @@ function Set-VSTeamAPIVersion {
[VSTeamVersions]::VariableGroups = '5.0-preview.1'
[VSTeamVersions]::Tfvc = '5.0'
[VSTeamVersions]::Packaging = '5.1-preview'
+ [VSTeamVersions]::TaskGroups = '5.1-preview.1'
[VSTeamVersions]::MemberEntitlementManagement = '5.1-preview'
# This version is never passed to the API but is used to evaluate
# if Service Fabric is enabled for the account. Just set it to
@@ -134,6 +140,7 @@ function Set-VSTeamAPIVersion {
Write-Verbose "VariableGroups: $([VSTeamVersions]::VariableGroups)"
Write-Verbose "Tfvc: $([VSTeamVersions]::Tfvc)"
Write-Verbose "Packaging: $([VSTeamVersions]::Packaging)"
+ Write-Verbose "TaskGroups: $([VSTeamVersions]::TaskGroups)"
Write-Verbose "MemberEntitlementManagement: $([VSTeamVersions]::MemberEntitlementManagement)"
Write-Verbose "ServiceFabricEndpoint: $([VSTeamVersions]::ServiceFabricEndpoint)"
Write-Verbose "ExtensionsManagement: $([VSTeamVersions]::ExtensionsManagement)"
diff --git a/Source/Public/Set-VSTeamAlias.ps1 b/Source/Public/Set-VSTeamAlias.ps1
index 01bc89524..aad4ae0e0 100644
--- a/Source/Public/Set-VSTeamAlias.ps1
+++ b/Source/Public/Set-VSTeamAlias.ps1
@@ -87,6 +87,7 @@ function Set-VSTeamAlias {
New-Alias Get-WorkItemType Get-VSTeamWorkItemType -Scope Global
New-Alias Add-WorkItem Add-VSTeamWorkItem -Scope Global
New-Alias Get-WorkItem Get-VSTeamWorkItem -Scope Global
+ New-Alias Remove-WorkItem Remove-VSTeamWorkItem -Scope Global
New-Alias Show-WorkItem Show-VSTeamWorkItem -Scope Global
New-Alias Get-Policy Get-VSTeamPolicy -Scope Global
New-Alias Get-PolicyType Get-VSTeamPolicyType -Scope Global
diff --git a/Source/Public/Update-VSTeamTaskGroup.ps1 b/Source/Public/Update-VSTeamTaskGroup.ps1
new file mode 100644
index 000000000..236105f90
--- /dev/null
+++ b/Source/Public/Update-VSTeamTaskGroup.ps1
@@ -0,0 +1,35 @@
+function Update-VSTeamTaskGroup {
+ [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "Low")]
+ param(
+ [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
+ [string] $Id,
+
+ [Parameter(ParameterSetName = 'ByFile', Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
+ [string] $InFile,
+
+ [Parameter(ParameterSetName = 'ByBody', Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
+ [string] $Body,
+
+ [switch] $Force
+ )
+
+ DynamicParam {
+ _buildProjectNameDynamicParam
+ }
+
+ process {
+ # Bind the parameter to a friendly variable
+ $ProjectName = $PSBoundParameters["ProjectName"]
+
+ if ($Force -or $pscmdlet.ShouldProcess("Update Task Group")) {
+ if ($InFile) {
+ $resp = _callAPI -Method Put -ProjectName $ProjectName -Area distributedtask -Resource taskgroups -Version $([VSTeamVersions]::TaskGroups) -InFile $InFile -ContentType 'application/json' -Id $Id
+ }
+ else {
+ $resp = _callAPI -Method Put -ProjectName $ProjectName -Area distributedtask -Resource taskgroups -Version $([VSTeamVersions]::TaskGroups) -Body $Body -ContentType 'application/json' -Id $Id
+ }
+ }
+
+ return $resp
+ }
+}
diff --git a/Source/Public/Update-VSTeamVariableGroup.ps1 b/Source/Public/Update-VSTeamVariableGroup.ps1
index e14f0dd34..83a3d3709 100644
--- a/Source/Public/Update-VSTeamVariableGroup.ps1
+++ b/Source/Public/Update-VSTeamVariableGroup.ps1
@@ -4,22 +4,25 @@ function Update-VSTeamVariableGroup {
[Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
[string] $Id,
- [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
+ [Parameter(ParameterSetName = 'ByHashtable', Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
[string] $Name,
- [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
+ [Parameter(ParameterSetName = 'ByHashtable', Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
[string] $Description,
- [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
+ [Parameter(ParameterSetName = 'ByHashtable', Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
[hashtable] $Variables,
+ [Parameter(ParameterSetName = 'ByBody', Mandatory = $true, ValueFromPipelineByPropertyName = $true)]
+ [string] $Body,
+
[switch] $Force
)
DynamicParam {
$dp = _buildProjectNameDynamicParam
- if ([VSTeamVersions]::Version -ne "TFS2017") {
+ if ([VSTeamVersions]::Version -ne "TFS2017" -and $PSCmdlet.ParameterSetName -eq "ByHashtable") {
$ParameterName = 'Type'
$rp = _buildDynamicParam -ParameterName $ParameterName -arrSet ('Vsts', 'AzureKeyVault') -Mandatory $true
$dp.Add($ParameterName, $rp)
@@ -36,22 +39,26 @@ function Update-VSTeamVariableGroup {
# Bind the parameter to a friendly variable
$ProjectName = $PSBoundParameters["ProjectName"]
- $body = @{
+
+ if ([string]::IsNullOrWhiteSpace($Body))
+ {
+ $bodyAsHashtable = @{
name = $Name
description = $Description
variables = $Variables
}
if ([VSTeamVersions]::Version -ne "TFS2017") {
$Type = $PSBoundParameters['Type']
- $body.Add("type", $Type)
+ $bodyAsHashtable.Add("type", $Type)
$ProviderData = $PSBoundParameters['ProviderData']
if ($null -ne $ProviderData) {
- $body.Add("providerData", $ProviderData)
+ $bodyAsHashtable.Add("providerData", $ProviderData)
}
}
- $body = $body | ConvertTo-Json
+ $body = $bodyAsHashtable | ConvertTo-Json
+ }
if ($Force -or $pscmdlet.ShouldProcess($Id, "Update Variable Group")) {
# Call the REST API
@@ -63,4 +70,4 @@ function Update-VSTeamVariableGroup {
return Get-VSTeamVariableGroup -ProjectName $ProjectName -Id $Id
}
}
-}
+}
\ No newline at end of file
diff --git a/Source/en-US/VSTeam-Help.xml b/Source/en-US/VSTeam-Help.xml
index baff83b7a..4896aab59 100644
--- a/Source/en-US/VSTeam-Help.xml
+++ b/Source/en-US/VSTeam-Help.xml
@@ -2925,11 +2925,11 @@ PS C:\> Add-NuGetEndpoint -EndpointName 'PowerShell Gallery' -NuGetUrl 'https
Specifies the version to use. The acceptable values for this parameter are:- TFS2017- TFS2018
- - AzD2019
+ - AzD2019- VSTS- AzD
- If you are on AzD it will default to AzD otherwise it will default to TFS2017
+ If you are on AzD it will default to Azd otherwise it will default to TFS2017String
@@ -3009,7 +3009,7 @@ PS C:\> Add-NuGetEndpoint -EndpointName 'PowerShell Gallery' -NuGetUrl 'https
Specifies the version to use. The acceptable values for this parameter are:- TFS2017- TFS2018
- - AzD2019
+ - AzD2019- VSTS- AzD
@@ -3067,7 +3067,7 @@ PS C:\> Add-NuGetEndpoint -EndpointName 'PowerShell Gallery' -NuGetUrl 'https
Specifies the version to use. The acceptable values for this parameter are:- TFS2017- TFS2018
- - AzD2019
+ - AzD2019- VSTS- AzD
@@ -3175,7 +3175,7 @@ PS C:\> Add-NuGetEndpoint -EndpointName 'PowerShell Gallery' -NuGetUrl 'https
Specifies the version to use. The acceptable values for this parameter are:- TFS2017- TFS2018
- - AzD2019
+ - AzD2019- VSTS- AzD
@@ -4801,6 +4801,221 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
+
+
+ Add-VSTeamTaskGroup
+ Add
+ VSTeamTaskGroup
+
+ Adds a task group.
+
+
+
+ Adds a task group.
+
+
+
+ Add-VSTeamTaskGroup
+
+ ProjectName
+
+ Specifies the team project for which this function operates.
+ You can tab complete from a list of available projects.
+ You can use Set-VSTeamDefaultProject to set a default project so you do not have to pass the ProjectName with each call.
+
+ String
+
+ String
+
+
+ None
+
+
+ WhatIf
+
+ Shows what would happen if the cmdlet runs. The cmdlet is not run.
+
+
+ SwitchParameter
+
+
+ False
+
+
+ InFile
+
+ The path to the json file that represents the task group
+
+ String
+
+ String
+
+
+ None
+
+
+
+ Add-VSTeamTaskGroup
+
+ ProjectName
+
+ Specifies the team project for which this function operates.
+ You can tab complete from a list of available projects.
+ You can use Set-VSTeamDefaultProject to set a default project so you do not have to pass the ProjectName with each call.
+
+ String
+
+ String
+
+
+ None
+
+
+ WhatIf
+
+ Shows what would happen if the cmdlet runs. The cmdlet is not run.
+
+
+ SwitchParameter
+
+
+ False
+
+
+ Body
+
+ The json that represents the task group as a string
+
+ String
+
+ String
+
+
+ None
+
+
+
+
+
+ ProjectName
+
+
+
+
+
+
+
+
+ None
+
+
+ ProjectName
+
+ Specifies the team project for which this function operates.
+ You can tab complete from a list of available projects.
+ You can use Set-VSTeamDefaultProject to set a default project so you do not have to pass the ProjectName with each call.
+
+ String
+
+ String
+
+
+ None
+
+
+ WhatIf
+
+ Shows what would happen if the cmdlet runs. The cmdlet is not run.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ InFile
+
+ The path to the json file that represents the task group
+
+ String
+
+ String
+
+
+ None
+
+
+ Body
+
+ The json that represents the task group as a string
+
+ String
+
+ String
+
+
+ None
+
+
+
+
+
+ System.String
+
+
+
+
+
+
+
+
+
+ System.Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ $taskGroup = Get-VSTeamTaskGroup -Name "taskGroupName" -ProjectName "sourceProjectName"
+
+# Set the ID and revision to null, so AzD is happy.
+$taskGroup.id = $null
+$taskGroup.revision = $null
+
+$taskGroupJson = ConvertTo-Json -InputObject $taskGroup -Depth 10
+
+Add-VSTeamTaskGroup -Body $taskGroupJson -ProjectName "destinationProjectName"
+
+ This example is useful for when one wants to copy an existing task group in one project into another project.
+
+
+
+
+
+ Update-VSTeamTaskGroup
+
+
+
+ Get-VSTeamTaskGroup
+
+
+
+ Remove-VSTeamTaskGroup
+
+
+
+ Add-VSTeamUserEntitlement
@@ -5031,6 +5246,35 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
None
+
+ Add-VSTeamVariableGroup
+
+ ProjectName
+
+ Specifies the team project for which this function operates.
+ You can tab complete from a list of available projects.
+ You can use Set-VSTeamDefaultProject to set a default project so you do not have to pass the ProjectName with each call.
+
+ String
+
+ String
+
+
+ None
+
+
+ Body
+
+ The json that represents the variable group as a string
+
+ String
+
+ String
+
+
+ None
+
+
@@ -5107,6 +5351,18 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
None
+
+ Body
+
+ The json that represents the variable group as a string
+
+ String
+
+ String
+
+
+ None
+
@@ -5183,6 +5439,27 @@ Add-VSTeamVariableGroup @methodParameters
+
+ -------------------------- EXAMPLE 3 --------------------------
+ # Copy variable group varGroupName from project sourceProjectName to project targetProjectName. If varGroupName already exists, we'll update it; else, we'll add it.
+
+$Name = "varGroupName"
+$FromProject = "sourceProjectName"
+$ToProject = "targetProjectName"
+
+$FromVariableGroupObject = Get-VSTeamVariableGroup -Name $Name -ProjectName $FromProject
+$body = ConvertTo-Json -InputObject $FromVariableGroupObject -Depth 100 -Compress
+$toVariableGroupObject = Get-VSTeamVariableGroup -Name $Name -ProjectName $ToProject
+if ($toVariableGroupObject) {
+ Update-VSTeamVariableGroup -Body $body -ProjectName $ToProject -Id $toVariableGroupObject.id
+}
+else {
+ Add-VSTeamVariableGroup -Body $body -ProjectName $ToProject
+}
+
+
+
+
@@ -11566,25 +11843,221 @@ ID Title Status
- Get-VSTeamTfvcBranch
+ Get-VSTeamTaskGroupGet
- VSTeamTfvcBranch
+ VSTeamTaskGroup
- Gets a branch for a given path from TFVC source control.
+ Gets a task group
- Get-VSTeamTfvcBranch gets a branch for a given path from TFVC source control.
+ Gets a task group
- Get-VSTeamTfvcBranch
-
- Path
+ Get-VSTeamTaskGroup
+
+ ProjectName
- Full path to the branch.
-
- String[]
+ Specifies the team project for which this function operates.
+ You can tab complete from a list of available projects.
+ You can use Set-VSTeamDefaultProject to set a default project so you do not have to pass the ProjectName with each call.
+
+ String
+
+ String
+
+
+ None
+
+
+ Id
+
+ ID of the existing task group
+
+ String
+
+ String
+
+
+ None
+
+
+
+ Get-VSTeamTaskGroup
+
+ ProjectName
+
+ Specifies the team project for which this function operates.
+ You can tab complete from a list of available projects.
+ You can use Set-VSTeamDefaultProject to set a default project so you do not have to pass the ProjectName with each call.
+
+ String
+
+ String
+
+
+ None
+
+
+ Name
+
+ Name of the existing task group
+
+ String
+
+ String
+
+
+ None
+
+
+
+
+
+ ProjectName
+
+
+
+
+
+
+
+
+ None
+
+
+ ProjectName
+
+ Specifies the team project for which this function operates.
+ You can tab complete from a list of available projects.
+ You can use Set-VSTeamDefaultProject to set a default project so you do not have to pass the ProjectName with each call.
+
+ String
+
+ String
+
+
+ None
+
+
+ Id
+
+ ID of the existing task group
+
+ String
+
+ String
+
+
+ None
+
+
+ Name
+
+ Name of the existing task group
+
+ String
+
+ String
+
+
+ None
+
+
+
+
+
+ System.String
+
+
+
+
+
+
+
+
+
+ System.Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ $methodParameters = @{
+ ProjectName = "some_project_name"
+}
+
+Get-VSTeamTaskGroup @methodParameters
+
+ Get all the task groups for the some_project_name project. Here we are splatting the parameter, but it may also be directly specified. See a non-splatting example below.
+
+
+
+ -------------------------- EXAMPLE 2 --------------------------
+ Get-VSTeamTaskGroup -ProjectName "some_project_name" -Id "Task_group_id"
+
+ Get a task group when the ID is already known.
+
+
+
+ -------------------------- EXAMPLE 3 --------------------------
+ $methodParameters = @{
+ ProjectName = "some_project_name"
+ Name = "Task_group_name"
+}
+
+Get-VSTeamTaskGroup @methodParameters
+
+ Get a task group by name, when the ID is not known. Here we are splatting the parameters, but they may also be directly specified. Getting by ID is preferred, as it's more efficient; but getting by name is, of course, handy.
+
+
+
+
+
+ Add-VSTeamTaskGroup
+
+
+
+ Update-VSTeamTaskGroup
+
+
+
+ Remove-VSTeamTaskGroup
+
+
+
+
+
+
+ Get-VSTeamTfvcBranch
+ Get
+ VSTeamTfvcBranch
+
+ Gets a branch for a given path from TFVC source control.
+
+
+
+ Get-VSTeamTfvcBranch gets a branch for a given path from TFVC source control.
+
+
+
+ Get-VSTeamTfvcBranch
+
+ Path
+
+ Full path to the branch.
+
+ String[]String[]
@@ -12518,7 +12991,7 @@ Get-VSTeamVariableGroup @methodParameters
String
- Fail
+ OmitFields
@@ -12600,7 +13073,7 @@ Get-VSTeamVariableGroup @methodParameters
String
- Fail
+ OmitFields
@@ -15200,25 +15673,25 @@ PS C:\> Remove-VSTeamMembership -MemberDescriptor $user.Descriptor -Container
- Remove-VSTeamUserEntitlement
+ Remove-VSTeamTaskGroupRemove
- VSTeamUserEntitlement
+ VSTeamTaskGroup
- Delete a user from the account.
- The delete operation includes unassigning Extensions and Licenses and removing the user from all project memberships. The user would continue to have access to the account if she is member of an AAD group, that is added directly to the account.
+ Removes a task group
- Delete a user from the account.
- The delete operation includes unassigning Extensions and Licenses and removing the user from all project memberships. The user would continue to have access to the account if she is member of an AAD group, that is added directly to the account.
+ Removes a task group
- Remove-VSTeamUserEntitlement
-
- UserId
+ Remove-VSTeamTaskGroup
+
+ ProjectName
- The id of the user to remove.
+ Specifies the team project for which this function operates.
+ You can tab complete from a list of available projects.
+ You can use Set-VSTeamDefaultProject to set a default project so you do not have to pass the ProjectName with each call.String
@@ -15227,10 +15700,10 @@ PS C:\> Remove-VSTeamMembership -MemberDescriptor $user.Descriptor -Container
None
-
+ Confirm
- Prompts you for confirmation before running the function.
+ Prompts you for confirmation before running the cmdlet.SwitchParameter
@@ -15238,10 +15711,10 @@ PS C:\> Remove-VSTeamMembership -MemberDescriptor $user.Descriptor -Container
False
-
+ Force
- Forces the function without confirmation
+ Does not promptSwitchParameter
@@ -15249,10 +15722,10 @@ PS C:\> Remove-VSTeamMembership -MemberDescriptor $user.Descriptor -Container
False
-
+ WhatIf
- Shows what would happen if the function runs. The function is not run.
+ Shows what would happen if the cmdlet runs. The cmdlet is not run.SwitchParameter
@@ -15260,13 +15733,10 @@ PS C:\> Remove-VSTeamMembership -MemberDescriptor $user.Descriptor -Container
False
-
-
- Remove-VSTeamUserEntitlement
-
- Email
+
+ Id
- The email of the user to remove.
+ ID of the existing task groupString
@@ -15275,46 +15745,259 @@ PS C:\> Remove-VSTeamMembership -MemberDescriptor $user.Descriptor -Container
None
-
- Confirm
-
- Prompts you for confirmation before running the function.
-
-
- SwitchParameter
-
-
- False
-
-
- Force
-
- Forces the function without confirmation
-
-
- SwitchParameter
-
-
- False
-
-
- WhatIf
-
- Shows what would happen if the function runs. The function is not run.
-
-
- SwitchParameter
-
-
- False
-
-
+ Confirm
- Prompts you for confirmation before running the function.
+ Prompts you for confirmation before running the cmdlet.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ Force
+
+ Does not prompt
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ ProjectName
+
+
+
+
+
+
+
+
+ None
+
+
+ ProjectName
+
+ Specifies the team project for which this function operates.
+ You can tab complete from a list of available projects.
+ You can use Set-VSTeamDefaultProject to set a default project so you do not have to pass the ProjectName with each call.
+
+ String
+
+ String
+
+
+ None
+
+
+ WhatIf
+
+ Shows what would happen if the cmdlet runs. The cmdlet is not run.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ Id
+
+ ID of the existing task group
+
+ String
+
+ String
+
+
+ None
+
+
+
+
+
+ System.String[]
+
+
+ System.String
+
+
+
+
+
+
+ System.Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ $projectName = "some_project_name"
+$taskGroup = Get-VSTeamTaskGroup -Name "taskName" -ProjectName $projectName
+
+$methodParameters = @{
+ Id = $taskGroup.id
+ ProjectName = $projectName
+ Force = $true
+}
+
+Remove-VSTeamTaskGroup @methodParameters
+
+
+
+
+
+
+
+ Add-VSTeamTaskGroup
+
+
+
+ Get-VSTeamTaskGroup
+
+
+
+ Update-VSTeamTaskGroup
+
+
+
+
+
+
+ Remove-VSTeamUserEntitlement
+ Remove
+ VSTeamUserEntitlement
+
+ Delete a user from the account.
+ The delete operation includes unassigning Extensions and Licenses and removing the user from all project memberships. The user would continue to have access to the account if she is member of an AAD group, that is added directly to the account.
+
+
+
+ Delete a user from the account.
+ The delete operation includes unassigning Extensions and Licenses and removing the user from all project memberships. The user would continue to have access to the account if she is member of an AAD group, that is added directly to the account.
+
+
+
+ Remove-VSTeamUserEntitlement
+
+ UserId
+
+ The id of the user to remove.
+
+ String
+
+ String
+
+
+ None
+
+
+ Confirm
+
+ Prompts you for confirmation before running the function.
+
+
+ SwitchParameter
+
+
+ False
+
+
+ Force
+
+ Forces the function without confirmation
+
+
+ SwitchParameter
+
+
+ False
+
+
+ WhatIf
+
+ Shows what would happen if the function runs. The function is not run.
+
+
+ SwitchParameter
+
+
+ False
+
+
+
+ Remove-VSTeamUserEntitlement
+
+ Email
+
+ The email of the user to remove.
+
+ String
+
+ String
+
+
+ None
+
+
+ Confirm
+
+ Prompts you for confirmation before running the function.
+
+
+ SwitchParameter
+
+
+ False
+
+
+ Force
+
+ Forces the function without confirmation
+
+
+ SwitchParameter
+
+
+ False
+
+
+ WhatIf
+
+ Shows what would happen if the function runs. The function is not run.
+
+
+ SwitchParameter
+
+
+ False
+
+
+
+
+
+ Confirm
+
+ Prompts you for confirmation before running the function.SwitchParameter
@@ -15624,28 +16307,173 @@ Remove-VSTeamVariableGroup @methodParameters
- Set-VSTeamAccount
- Set
- VSTeamAccount
+ Remove-VSTeamWorkItem
+ Remove
+ VSTeamWorkItem
- Stores your account name and personal access token for use with the other functions in this module.
+ Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution.
- On Windows you have to option to store the information at the process, user or machine (you must be running PowerShell as administrator to store at the machine level) level.
- On Linux and Mac you can only store at the process level.
- Calling Set-VSTeamAccount will clear any default project.
+ Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution.
- Set-VSTeamAccount
-
- Account
+ Remove-VSTeamWorkItem
+
+ Id
- The Azure DevOps (AzD) account name to use. DO NOT enter the entire URL.
- Just the portion after dev.azure.com. For example in the following url mydemos is the account name. <https://dev.azure.com/mydemos> or The full Team Foundation Server (TFS) url including the collection. <http://localhost:8080/tfs/DefaultCollection>
+ The id of the work item.
- String
+ Int32
+
+ Int32
+
+
+ None
+
+
+ Destroy
+
+ Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone.
+
+
+ SwitchParameter
+
+
+ False
+
+
+
+ Remove-VSTeamWorkItem
+
+ Ids
+
+ The id of the work item.
+
+ Int32[]
+
+ Int32[]
+
+
+ None
+
+
+ Destroy
+
+ Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone.
+
+
+ SwitchParameter
+
+
+ False
+
+
+
+
+
+ Id
+
+ The id of the work item.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ Ids
+
+ The id of the work item.
+
+ Int32[]
+
+ Int32[]
+
+
+ None
+
+
+ Destroy
+
+ Optional parameter, if set to true, the work item is deleted permanently. Please note: the destroy action is PERMANENT and cannot be undone.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+
+
+
+ System.String
+
+
+ ProjectName
+
+
+
+
+
+
+ If you do not set the default project by called Set-VSTeamDefaultProject before calling Get-VSTeamWorkItem you will have to type in the names.
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ PS C:\> Remove-VSTeamWorkItem -Ids 47,48
+
+ This command deletes work items with IDs 47 and 48 by using the IDs parameter.
+
+
+
+ -------------------------- EXAMPLE 2 --------------------------
+ PS C:\> Remove-VSTeamWorkItem -Id 47
+
+ This command deletes the work item with ID 47 by using the ID parameter.
+
+
+
+ -------------------------- EXAMPLE 3 --------------------------
+ PS C:\> Remove-VSTeamWorkItem -Ids 47 -Destroy
+
+ This command deletes work item with IDs 47 permanently by using the Destroy parameter.
+
+
+
+
+
+
+
+ Set-VSTeamAccount
+ Set
+ VSTeamAccount
+
+ Stores your account name and personal access token for use with the other functions in this module.
+
+
+
+ On Windows you have to option to store the information at the process, user or machine (you must be running PowerShell as administrator to store at the machine level) level.
+ On Linux and Mac you can only store at the process level.
+ Calling Set-VSTeamAccount will clear any default project.
+
+
+
+ Set-VSTeamAccount
+
+ Account
+
+ The Azure DevOps (AzD) account name to use. DO NOT enter the entire URL.
+ Just the portion after dev.azure.com. For example in the following url mydemos is the account name. <https://dev.azure.com/mydemos> or The full Team Foundation Server (TFS) url including the collection. <http://localhost:8080/tfs/DefaultCollection>
+
+ StringString
@@ -15658,7 +16486,7 @@ Remove-VSTeamVariableGroup @methodParameters
Specifies the version to use. The acceptable values for this parameter are:- TFS2017- TFS2018
- - AzD2019
+ - AzD2019- VSTS- AzD
@@ -15766,7 +16594,7 @@ Remove-VSTeamVariableGroup @methodParameters
Specifies the version to use. The acceptable values for this parameter are:- TFS2017- TFS2018
- - AzD2019
+ - AzD2019- VSTS- AzD
@@ -15848,7 +16676,7 @@ Remove-VSTeamVariableGroup @methodParameters
Specifies the version to use. The acceptable values for this parameter are:- TFS2017- TFS2018
- - AzD2019
+ - AzD2019- VSTS- AzD
@@ -16043,7 +16871,7 @@ Remove-VSTeamVariableGroup @methodParameters
Specifies the version to use. The acceptable values for this parameter are:- TFS2017- TFS2018
- - AzD2019
+ - AzD2019- VSTS- AzD
@@ -16237,7 +17065,7 @@ PS demo:\> Get-ChildItem
SetVSTeamAPIVersion
- Sets the API versions to support either TFS2017, TFS2018 or AzD.
+ Sets the API versions to support either TFS2017, TFS2018, AzD2019 or AzD.
@@ -16252,7 +17080,7 @@ PS demo:\> Get-ChildItem
Specifies the version to use. The acceptable values for this parameter are:- TFS2017- TFS2018
- - AzD2019
+ - AzD2019- VSTS- AzD
@@ -16331,7 +17159,7 @@ PS demo:\> Get-ChildItem
Specifies the version to use. The acceptable values for this parameter are:- TFS2017- TFS2018
- - AzD2019
+ - AzD2019- VSTS- AzD
@@ -20087,55 +20915,357 @@ PS C:\> Update-VSTeamReleaseDefinition -ProjectName Demo -ReleaseDefinition $
ProjectName
- Specifies the team project for which this function operates.
- You can tab complete from a list of available projects.
- You can use Set-VSTeamDefaultProject to set a default project so you do not have to pass the ProjectName with each call.
+ Specifies the team project for which this function operates.
+ You can tab complete from a list of available projects.
+ You can use Set-VSTeamDefaultProject to set a default project so you do not have to pass the ProjectName with each call.
+
+ String
+
+ String
+
+
+ None
+
+
+ Id
+
+ UUID of existing services endpoint from AzD
+
+ String
+
+ String
+
+
+ None
+
+
+ Object
+
+ Hashtable of payload for REST call
+
+ Hashtable
+
+ Hashtable
+
+
+ None
+
+
+ Force
+
+ Forces the function without confirmation
+
+
+ SwitchParameter
+
+
+ False
+
+
+
+
+
+ ProjectName
+
+ Specifies the team project for which this function operates.
+ You can tab complete from a list of available projects.
+ You can use Set-VSTeamDefaultProject to set a default project so you do not have to pass the ProjectName with each call.
+
+ String
+
+ String
+
+
+ None
+
+
+ Id
+
+ UUID of existing services endpoint from AzD
+
+ String
+
+ String
+
+
+ None
+
+
+ Object
+
+ Hashtable of payload for REST call
+
+ Hashtable
+
+ Hashtable
+
+
+ None
+
+
+ Force
+
+ Forces the function without confirmation
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+
+
+
+
+ Team.ServiceEndpoint
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Add-VSTeamServiceEndpoint
+
+
+
+ Add-VSTeamServiceFabricEndpoint
+
+
+
+ Add-VSTeamSonarQubeEndpoint
+
+
+
+ Add-VSTeamKubernetesEndpoint
+
+
+
+ Add-VSTeamAzureRMServiceEndpoint
+
+
+
+ Get-VSTeamServiceEndpoint
+
+
+
+ Get-VSTeamServiceEndpointType
+
+
+
+ Remove-VSTeamServiceEndpoint
+
+
+
+
+
+
+ Update-VSTeamTaskGroup
+ Update
+ VSTeamTaskGroup
+
+ Updates an existing task group
+
+
+
+ Updates an existing task group
+
+
+
+ Update-VSTeamTaskGroup
+
+ ProjectName
+
+ Specifies the team project for which this function operates.
+ You can tab complete from a list of available projects.
+ You can use Set-VSTeamDefaultProject to set a default project so you do not have to pass the ProjectName with each call.
+
+ String
+
+ String
+
+
+ None
+
+
+ Confirm
+
+ Prompts you for confirmation before running the cmdlet.
+
+
+ SwitchParameter
+
+
+ False
+
+
+ Force
+
+ Does not prompt
+
+
+ SwitchParameter
+
+
+ False
+
+
+ WhatIf
+
+ Shows what would happen if the cmdlet runs. The cmdlet is not run.
+
+
+ SwitchParameter
+
+
+ False
+
+
+ Id
+
+ ID of the existing task group
+
+ String
+
+ String
+
+
+ None
+
+
+ InFile
+
+ The path to the json file that represents the task group
+
+ String
+
+ String
+
+
+ None
+
+
+
+ Update-VSTeamTaskGroup
+
+ ProjectName
+
+ Specifies the team project for which this function operates.
+ You can tab complete from a list of available projects.
+ You can use Set-VSTeamDefaultProject to set a default project so you do not have to pass the ProjectName with each call.
+
+ String
+
+ String
+
+
+ None
+
+
+ Confirm
+
+ Prompts you for confirmation before running the cmdlet.
+
+
+ SwitchParameter
+
+
+ False
+
+
+ Force
+
+ Does not prompt
- String
- String
+ SwitchParameter
- None
+ False
-
- Id
+
+ WhatIf
- UUID of existing services endpoint from AzD
+ Shows what would happen if the cmdlet runs. The cmdlet is not run.
- String
- String
+ SwitchParameter
- None
+ False
-
- Object
+
+ Id
- Hashtable of payload for REST call
+ ID of the existing task group
- Hashtable
+ String
- Hashtable
+ StringNone
-
- Force
+
+ Body
- Forces the function without confirmation
+ The json that represents the task group as a string
+ String
- SwitchParameter
+ String
- False
+ None
+
+ Confirm
+
+ Prompts you for confirmation before running the cmdlet.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ Force
+
+ Does not prompt
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ ProjectName
+
+
+
+
+
+
+
+
+ None
+ ProjectName
@@ -20150,10 +21280,22 @@ PS C:\> Update-VSTeamReleaseDefinition -ProjectName Demo -ReleaseDefinition $
None
-
+
+ WhatIf
+
+ Shows what would happen if the cmdlet runs. The cmdlet is not run.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+ Id
- UUID of existing services endpoint from AzD
+ ID of the existing task groupString
@@ -20162,36 +21304,45 @@ PS C:\> Update-VSTeamReleaseDefinition -ProjectName Demo -ReleaseDefinition $
None
-
- Object
+
+ InFile
- Hashtable of payload for REST call
+ The path to the json file that represents the task group
- Hashtable
+ String
- Hashtable
+ StringNone
-
- Force
+
+ Body
- Forces the function without confirmation
+ The json that represents the task group as a string
- SwitchParameter
+ String
- SwitchParameter
+ String
- False
+ None
-
+
+
+
+ System.String
+
+
+
+
+
+
- Team.ServiceEndpoint
+ System.Object
@@ -20203,38 +21354,35 @@ PS C:\> Update-VSTeamReleaseDefinition -ProjectName Demo -ReleaseDefinition $
-
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ $projectName = "projectName"
+
+$taskGroup = Get-VSTeamTaskGroup -Name "taskGroupName" -ProjectName $projectName
+
+# Make some change, e.g.
+$taskGroup.description = "new description"
+
+$taskGroupJson = ConvertTo-Json -InputObject $taskGroup -Depth 10
+
+Update-VSTeamTaskGroup -ProjectName $projectName -Id $taskGroup.id -Body $taskGroupJson
+
+
+
+
+
- Add-VSTeamServiceEndpoint
-
-
-
- Add-VSTeamServiceFabricEndpoint
-
-
-
- Add-VSTeamSonarQubeEndpoint
-
-
-
- Add-VSTeamKubernetesEndpoint
-
-
-
- Add-VSTeamAzureRMServiceEndpoint
-
-
-
- Get-VSTeamServiceEndpoint
+ Add-VSTeamTaskGroup
- Get-VSTeamServiceEndpointType
+ Get-VSTeamTaskGroup
- Remove-VSTeamServiceEndpoint
+ Remove-VSTeamTaskGroup
@@ -20551,6 +21699,80 @@ PS C:\> Update-VSTeamReleaseDefinition -ProjectName Demo -ReleaseDefinition $
None
+
+ Update-VSTeamVariableGroup
+
+ ProjectName
+
+ Specifies the team project for which this function operates.
+ You can tab complete from a list of available projects.
+ You can use Set-VSTeamDefaultProject to set a default project so you do not have to pass the ProjectName with each call.
+
+ String
+
+ String
+
+
+ None
+
+
+ Confirm
+
+ Prompts you for confirmation before running the cmdlet.
+
+
+ SwitchParameter
+
+
+ False
+
+
+ Force
+
+ Does not prompt
+
+
+ SwitchParameter
+
+
+ False
+
+
+ WhatIf
+
+ Shows what would happen if the cmdlet runs. The cmdlet is not run.
+
+
+ SwitchParameter
+
+
+ False
+
+
+ Id
+
+ ID of the existing variable group
+
+ String
+
+ String
+
+
+ None
+
+
+ Body
+
+ The json that represents the task group as a string
+
+ String
+
+ String
+
+
+ None
+
+
@@ -20687,6 +21909,18 @@ PS C:\> Update-VSTeamReleaseDefinition -ProjectName Demo -ReleaseDefinition $
None
+
+ Body
+
+ The json that represents the task group as a string
+
+ String
+
+ String
+
+
+ None
+
@@ -20756,6 +21990,27 @@ Update-VSTeamVariableGroup @methodParameters
+
+ -------------------------- EXAMPLE 2 --------------------------
+ # Copy variable group varGroupName from project sourceProjectName to project targetProjectName. If varGroupName already exists, we'll update it; else, we'll add it.
+
+$Name = "varGroupName"
+$FromProject = "sourceProjectName"
+$ToProject = "targetProjectName"
+
+$FromVariableGroupObject = Get-VSTeamVariableGroup -Name $Name -ProjectName $FromProject
+$body = ConvertTo-Json -InputObject $FromVariableGroupObject -Depth 100 -Compress
+$toVariableGroupObject = Get-VSTeamVariableGroup -Name $Name -ProjectName $ToProject
+if ($toVariableGroupObject) {
+ Update-VSTeamVariableGroup -Body $body -ProjectName $ToProject -Id $toVariableGroupObject.id
+}
+else {
+ Add-VSTeamVariableGroup -Body $body -ProjectName $ToProject
+}
+
+
+
+
diff --git a/Source/formats/Team.WorkItemDeleted.ListView.ps1xml b/Source/formats/Team.WorkItemDeleted.ListView.ps1xml
new file mode 100644
index 000000000..a21e0c9d3
--- /dev/null
+++ b/Source/formats/Team.WorkItemDeleted.ListView.ps1xml
@@ -0,0 +1,34 @@
+
+
+
+
+ Team.WorkItemDeleted.ListView
+
+ Team.WorkItemDeleted
+
+
+
+
+
+
+ id
+
+
+ name
+
+
+ deletedBy
+
+
+ deletedDate
+
+
+ code
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/formats/Team.WorkItemDeleted.TableView.ps1xml b/Source/formats/Team.WorkItemDeleted.TableView.ps1xml
new file mode 100644
index 000000000..16b92770a
--- /dev/null
+++ b/Source/formats/Team.WorkItemDeleted.TableView.ps1xml
@@ -0,0 +1,51 @@
+
+
+
+
+ Team.WorkItemDeleted.TableView
+
+ Team.WorkItemDeleted
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id
+
+
+ name
+
+
+ deletedBy
+
+
+ deletedDate
+
+
+ code
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/formats/_formats.json b/Source/formats/_formats.json
index c965e5393..f4f6ff1eb 100644
--- a/Source/formats/_formats.json
+++ b/Source/formats/_formats.json
@@ -93,6 +93,8 @@
"Team.Wiql.ListView.ps1xml",
"Team.WorkItem.TableView.ps1xml",
"Team.WorkItem.ListView.ps1xml",
+ "Team.WorkItemDeleted.TableView.ps1xml",
+ "Team.WorkItemDeleted.ListView.ps1xml",
"Team.JobRequest.TableView.ps1xml"
]
}
\ No newline at end of file
diff --git a/Source/types/Team.WorkItemDeleted.ps1xml b/Source/types/Team.WorkItemDeleted.ps1xml
new file mode 100644
index 000000000..17254712a
--- /dev/null
+++ b/Source/types/Team.WorkItemDeleted.ps1xml
@@ -0,0 +1,59 @@
+
+
+
+ Team.WorkItemDeleted
+
+
+ Name
+ $this.fields.PSObject.Properties['name'].Value
+
+
+ Project
+ $this.fields.PSObject.Properties['project'].Value
+
+
+ Type
+ $this.fields.PSObject.Properties['type'].Value
+
+
+ Id
+ $this.fields.PSObject.Properties['id'].Value
+
+
+ Resource
+ $this.fields.PSObject.Properties['resource'].Value
+
+
+ DeletedBy
+ $this.fields.PSObject.Properties['deletedBy'].Value
+
+
+ DeletedDate
+ $this.fields.PSObject.Properties['deletedDate'].Value
+
+
+ Code
+ $this.fields.PSObject.Properties['code'].Value
+
+
+ Url
+ $this.fields.PSObject.Properties['url'].Value
+
+
+ PSStandardMembers
+
+
+ DefaultDisplayPropertySet
+
+ id
+ name
+ deletedBy
+ deletedDate
+ code
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/Add-VSTeamProfile.md b/docs/Add-VSTeamProfile.md
index 66db6f6c4..22d060595 100644
--- a/docs/Add-VSTeamProfile.md
+++ b/docs/Add-VSTeamProfile.md
@@ -119,7 +119,7 @@ Specifies the version to use. The acceptable values for this parameter are:
- TFS2017
- TFS2018
-- AzD2019
+- AzD2019
- VSTS
- AzD
diff --git a/docs/Add-VSTeamTaskGroup.md b/docs/Add-VSTeamTaskGroup.md
new file mode 100644
index 000000000..f8c2833f9
--- /dev/null
+++ b/docs/Add-VSTeamTaskGroup.md
@@ -0,0 +1,125 @@
+
+
+
+# Add-VSTeamTaskGroup
+
+## SYNOPSIS
+
+Adds a task group.
+
+## SYNTAX
+
+## DESCRIPTION
+
+Adds a task group.
+
+## EXAMPLES
+
+### -------------------------- EXAMPLE 1 --------------------------
+
+```powershell
+
+$taskGroup = Get-VSTeamTaskGroup -Name "taskGroupName" -ProjectName "sourceProjectName"
+
+# Set the ID and revision to null, so AzD is happy.
+$taskGroup.id = $null
+$taskGroup.revision = $null
+
+$taskGroupJson = ConvertTo-Json -InputObject $taskGroup -Depth 10
+
+Add-VSTeamTaskGroup -Body $taskGroupJson -ProjectName "destinationProjectName"
+```
+
+This example is useful for when one wants to copy an existing task group in one project into another project.
+
+## PARAMETERS
+
+### -ProjectName
+
+### -ProjectName
+
+Specifies the team project for which this function operates.
+
+You can tab complete from a list of available projects.
+
+You can use Set-VSTeamDefaultProject to set a default project so
+you do not have to pass the ProjectName with each call.
+
+```yaml
+Type: String
+Position: 0
+Required: True
+Accept pipeline input: true (ByPropertyName)
+```
+
+### -WhatIf
+
+Shows what would happen if the cmdlet runs.
+The cmdlet is not run.
+
+```yaml
+Type: SwitchParameter
+Aliases: wi
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -InFile
+
+The path to the json file that represents the task group
+
+```yaml
+Type: String
+Parameter Sets: ByFile
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### -Body
+
+The json that represents the task group as a string
+
+```yaml
+Type: String
+Parameter Sets: ByBody
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### CommonParameters
+
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorTask, -InformationAction, -InformationTask, -OutTask, -OutBuffer, -PipelineTask, -Verbose, -WarningAction, and -WarningTask.
+For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
+
+## INPUTS
+
+### System.String
+
+## OUTPUTS
+
+### System.Object
+
+## NOTES
+
+## RELATED LINKS
+
+[Update-VSTeamTaskGroup](Update-VSTeamTaskGroup.md)
+
+[Get-VSTeamTaskGroup](Get-VSTeamTaskGroup.md)
+
+[Remove-VSTeamTaskGroup](Remove-VSTeamTaskGroup.md)
+
diff --git a/docs/Add-VSTeamVariableGroup.md b/docs/Add-VSTeamVariableGroup.md
index 2d23933aa..881c37ad6 100644
--- a/docs/Add-VSTeamVariableGroup.md
+++ b/docs/Add-VSTeamVariableGroup.md
@@ -64,6 +64,27 @@ $methodParameters = @{
Add-VSTeamVariableGroup @methodParameters
```
+### -------------------------- EXAMPLE 3 --------------------------
+
+```powershell
+# Copy variable group varGroupName from project sourceProjectName to project targetProjectName. If varGroupName already exists, we'll update it; else, we'll add it.
+
+$Name = "varGroupName"
+$FromProject = "sourceProjectName"
+$ToProject = "targetProjectName"
+
+$FromVariableGroupObject = Get-VSTeamVariableGroup -Name $Name -ProjectName $FromProject
+$body = ConvertTo-Json -InputObject $FromVariableGroupObject -Depth 100 -Compress
+$toVariableGroupObject = Get-VSTeamVariableGroup -Name $Name -ProjectName $ToProject
+if ($toVariableGroupObject) {
+ Update-VSTeamVariableGroup -Body $body -ProjectName $ToProject -Id $toVariableGroupObject.id
+}
+else {
+ Add-VSTeamVariableGroup -Body $body -ProjectName $ToProject
+}
+
+```
+
## PARAMETERS
### -ProjectName
@@ -88,6 +109,7 @@ The variable group description
```yaml
Type: String
+Parameter Sets: ByHashtable
Aliases:
Required: True
@@ -103,6 +125,7 @@ The variable group name
```yaml
Type: String
+Parameter Sets: ByHashtable
Aliases:
Required: True
@@ -118,6 +141,7 @@ The variable group ProviderData. This parameter is not available in TFS2017. Th
```yaml
Type: Hashtable
+Parameter Sets: ByHashtable
Aliases:
Required: False
@@ -133,6 +157,7 @@ The variable group type. This parameter is not available in TFS2017; all variab
```yaml
Type: String
+Parameter Sets: ByHashtable
Aliases:
Accepted values: Vsts, AzureKeyVault
@@ -149,6 +174,23 @@ The variable group variables.
```yaml
Type: Hashtable
+Parameter Sets: ByHashtable
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### -Body
+
+The json that represents the variable group as a string
+
+```yaml
+Type: String
+Parameter Sets: ByBody
Aliases:
Required: True
diff --git a/docs/Get-VSTeamTaskGroup.md b/docs/Get-VSTeamTaskGroup.md
new file mode 100644
index 000000000..901bf6311
--- /dev/null
+++ b/docs/Get-VSTeamTaskGroup.md
@@ -0,0 +1,126 @@
+
+
+
+# Get-VSTeamTaskGroup
+
+## SYNOPSIS
+
+Gets a task group
+
+## SYNTAX
+
+## DESCRIPTION
+
+Gets a task group
+
+## EXAMPLES
+
+### -------------------------- EXAMPLE 1 --------------------------
+
+```powershell
+
+$methodParameters = @{
+ ProjectName = "some_project_name"
+}
+
+Get-VSTeamTaskGroup @methodParameters
+```
+
+Get all the task groups for the some_project_name project. Here we are splatting the parameter, but it may also be directly specified. See a non-splatting example below.
+
+### -------------------------- EXAMPLE 2 --------------------------
+
+```powershell
+Get-VSTeamTaskGroup -ProjectName "some_project_name" -Id "Task_group_id"
+```
+
+Get a task group when the ID is already known.
+
+### -------------------------- EXAMPLE 3 --------------------------
+
+```powershell
+
+$methodParameters = @{
+ ProjectName = "some_project_name"
+ Name = "Task_group_name"
+}
+
+Get-VSTeamTaskGroup @methodParameters
+```
+
+Get a task group by name, when the ID is not known. Here we are splatting the parameters, but they may also be directly specified. Getting by ID is preferred, as it's more efficient; but getting by name is, of course, handy.
+
+## PARAMETERS
+
+### -ProjectName
+
+### -ProjectName
+
+Specifies the team project for which this function operates.
+
+You can tab complete from a list of available projects.
+
+You can use Set-VSTeamDefaultProject to set a default project so
+you do not have to pass the ProjectName with each call.
+
+```yaml
+Type: String
+Position: 0
+Required: True
+Accept pipeline input: true (ByPropertyName)
+```
+
+### -Id
+
+ID of the existing task group
+
+```yaml
+Type: String
+Parameter Sets: ByID
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### -Name
+
+Name of the existing task group
+
+```yaml
+Type: String
+Parameter Sets: ByName
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### CommonParameters
+
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorTask, -InformationAction, -InformationTask, -OutTask, -OutBuffer, -PipelineTask, -Verbose, -WarningAction, and -WarningTask.
+For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
+
+## INPUTS
+
+### System.String
+
+## OUTPUTS
+
+### System.Object
+
+## NOTES
+
+## RELATED LINKS
+
+[Add-VSTeamTaskGroup](Add-VSTeamTaskGroup.md)
+
+[Update-VSTeamTaskGroup](Update-VSTeamTaskGroup.md)
+
+[Remove-VSTeamTaskGroup](Remove-VSTeamTaskGroup.md)
diff --git a/docs/Get-VSTeamWorkItem.md b/docs/Get-VSTeamWorkItem.md
index 105071f92..269760cc0 100644
--- a/docs/Get-VSTeamWorkItem.md
+++ b/docs/Get-VSTeamWorkItem.md
@@ -58,7 +58,7 @@ The flag to control error policy in a bulk get work items request. The acceptab
Type: String
Parameter Sets: List
Required: True
-Default value: Fail
+Default value: Omit
```
### -Fields
diff --git a/docs/Remove-VSTeamTaskGroup.md b/docs/Remove-VSTeamTaskGroup.md
new file mode 100644
index 000000000..fe4a6979a
--- /dev/null
+++ b/docs/Remove-VSTeamTaskGroup.md
@@ -0,0 +1,139 @@
+
+
+
+# Remove-VSTeamTaskGroup
+
+## SYNOPSIS
+
+Removes a task group
+
+## SYNTAX
+
+## DESCRIPTION
+
+Removes a task group
+
+## EXAMPLES
+
+### -------------------------- EXAMPLE 1 --------------------------
+
+```powershell
+
+$projectName = "some_project_name"
+$taskGroup = Get-VSTeamTaskGroup -Name "taskName" -ProjectName $projectName
+
+$methodParameters = @{
+ Id = $taskGroup.id
+ ProjectName = $projectName
+ Force = $true
+}
+
+Remove-VSTeamTaskGroup @methodParameters
+```
+
+## PARAMETERS
+
+### -Confirm
+
+Prompts you for confirmation before running the cmdlet.
+
+```yaml
+Type: SwitchParameter
+Aliases: cf
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Force
+
+Does not prompt
+
+```yaml
+Type: SwitchParameter
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -ProjectName
+
+### -ProjectName
+
+Specifies the team project for which this function operates.
+
+You can tab complete from a list of available projects.
+
+You can use Set-VSTeamDefaultProject to set a default project so
+you do not have to pass the ProjectName with each call.
+
+```yaml
+Type: String
+Position: 0
+Required: True
+Accept pipeline input: true (ByPropertyName)
+```
+
+### -WhatIf
+
+Shows what would happen if the cmdlet runs.
+The cmdlet is not run.
+
+```yaml
+Type: SwitchParameter
+Aliases: wi
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Id
+
+ID of the existing task group
+
+```yaml
+Type: String
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### CommonParameters
+
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorTask, -InformationAction, -InformationTask, -OutTask, -OutBuffer, -PipelineTask, -Verbose, -WarningAction, and -WarningTask.
+For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
+
+## INPUTS
+
+### System.String[]
+
+System.String
+
+## OUTPUTS
+
+### System.Object
+
+## NOTES
+
+## RELATED LINKS
+
+[Add-VSTeamTaskGroup](Add-VSTeamTaskGroup.md)
+
+[Get-VSTeamTaskGroup](Get-VSTeamTaskGroup.md)
+
+[Update-VSTeamTaskGroup](Update-VSTeamTaskGroup.md)
+
diff --git a/docs/Remove-VSTeamWorkItem.md b/docs/Remove-VSTeamWorkItem.md
new file mode 100644
index 000000000..5320f90a6
--- /dev/null
+++ b/docs/Remove-VSTeamWorkItem.md
@@ -0,0 +1,87 @@
+
+
+
+# Remove-VSTeamWorkItem
+
+## SYNOPSIS
+
+Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution.
+
+## SYNTAX
+
+## DESCRIPTION
+
+Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution.
+
+## EXAMPLES
+
+### -------------------------- EXAMPLE 1 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamWorkItem -Ids 47,48
+```
+
+This command deletes work items with IDs 47 and 48 by using the IDs parameter.
+
+### -------------------------- EXAMPLE 2 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamWorkItem -Id 47
+```
+
+This command deletes the work item with ID 47 by using the ID parameter.
+
+### -------------------------- EXAMPLE 3 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamWorkItem -Ids 47 -Destroy
+```
+
+This command deletes work item with IDs 47 **permanently** by using the Destroy parameter.
+
+## PARAMETERS
+
+### -Id
+
+The id of the work item.
+
+```yaml
+Type: Int32
+Parameter Sets: ByID
+Required: True
+Accept pipeline input: true (ByPropertyName, ByValue)
+```
+
+### -Ids
+
+The id of the work item.
+
+```yaml
+Type: Int32[]
+Parameter Sets: List
+Required: True
+Accept pipeline input: true (ByPropertyName, ByValue)
+```
+
+### -Destroy
+
+Optional parameter, if set to true, the work item is deleted permanently. **Please note: the destroy action is PERMANENT and cannot be undone.**
+
+```yaml
+Type: Switch
+```
+
+## INPUTS
+
+### System.String
+
+ProjectName
+
+## OUTPUTS
+
+## NOTES
+
+If you do not set the default project by called Set-VSTeamDefaultProject before calling Get-VSTeamWorkItem you will have to type in the names.
+
+## RELATED LINKS
+
diff --git a/docs/Set-VSTeamAPIVersion.md b/docs/Set-VSTeamAPIVersion.md
index 841c15ba0..c3dd23ade 100644
--- a/docs/Set-VSTeamAPIVersion.md
+++ b/docs/Set-VSTeamAPIVersion.md
@@ -1,4 +1,4 @@
-
+
# Set-VSTeamAPIVersion
@@ -101,4 +101,4 @@ Parameter Sets: (All)
## NOTES
## RELATED LINKS
-
+
diff --git a/docs/Set-VSTeamAccount.md b/docs/Set-VSTeamAccount.md
index 8ac249a69..f63a6a64b 100644
--- a/docs/Set-VSTeamAccount.md
+++ b/docs/Set-VSTeamAccount.md
@@ -173,7 +173,7 @@ Required: True
Specifies the version to use. The acceptable values for this parameter are:
- TFS2017
-- TFS2018
+- TFS2018
- AzD2019
- VSTS
- AzD
diff --git a/docs/Team.md b/docs/Team.md
index fa3203622..78999d17a 100644
--- a/docs/Team.md
+++ b/docs/Team.md
@@ -13,516 +13,536 @@ Welcome to VSTeam. VSTeam is a [PowerShell module](https://www.powershellgallery
## VSTeam Functions
-### [Add-VSTeam](Add-VSTeam.md)
-
-Adds a team to a team project.
-
-### [Add-VSTeamAccessControlEntry](Add-VSTeamAccessControlEntry.md)
-
+### [Add-VSTeam](Add-VSTeam.md)
+
+Adds a team to a team project.
+
+### [Add-VSTeamAccessControlEntry](Add-VSTeamAccessControlEntry.md)
+
Add or update ACEs in the ACL for the provided token. The request contains the target token, a list of ACEs and a optional merge parameter. In the case of a collision (by identity descriptor) with an existing ACE in the ACL, the "merge" parameter determines the behavior. If set, the existing ACE has its allow and deny merged with the incoming ACE's allow and deny. If unset, the existing ACE is displaced.
-Note: This is a low-level function. You should really use a high level function (Add-VSTeam*Permission / Set-VSTeam*Permission / Get-VSTeam*Permission) unless you know what you are doing.
-
-### [Add-VSTeamAzureRMServiceEndpoint](Add-VSTeamAzureRMServiceEndpoint.md)
-
-Adds a new Azure Resource Manager service endpoint.
-
-### [Add-VSTeamBuild](Add-VSTeamBuild.md)
-
-Queues a new build.
-
-### [Add-VSTeamBuildDefinition](Add-VSTeamBuildDefinition.md)
-
-Creates a new build definition from a JSON file.
-
-### [Add-VSTeamBuildTag](Add-VSTeamBuildTag.md)
-
-Adds a tag to a build.
-
-### [Add-VSTeamExtension](Add-VSTeamExtension.md)
-
-Install the specified extension into the account / project collection.
-
-### [Add-VSTeamFeed](Add-VSTeamFeed.md)
-
-Adds a new feed to package management.
-
-### [Add-VSTeamGitRepository](Add-VSTeamGitRepository.md)
-
-Adds a Git repository to your Azure DevOps or Team Foundation Server account.
-
-### [Add-VSTeamGitRepositoryPermission](Add-VSTeamGitRepositoryPermission.md)
-
-Add permissions to a git repository, all repositories in a project, or a specific branch
-
-### [Add-VSTeamKubernetesEndpoint](Add-VSTeamKubernetesEndpoint.md)
-
-Adds connections to Kubernetes clusters
-
-### [Add-VSTeamMembership](Add-VSTeamMembership.md)
-
-Adds a membership to a container.
-
-### [Add-VSTeamNuGetEndpoint](Add-VSTeamNuGetEndpoint.md)
-
-Adds a new NuGet service endpoint.
-
-### [Add-VSTeamPolicy](Add-VSTeamPolicy.md)
-
-Adds a new policy to the specified project.
-
-### [Add-VSTeamProfile](Add-VSTeamProfile.md)
-
+Note: This is a low-level function. You should really use a high level function (Add-VSTeam*Permission / Set-VSTeam*Permission / Get-VSTeam*Permission) unless you know what you are doing.
+
+### [Add-VSTeamAzureRMServiceEndpoint](Add-VSTeamAzureRMServiceEndpoint.md)
+
+Adds a new Azure Resource Manager service endpoint.
+
+### [Add-VSTeamBuild](Add-VSTeamBuild.md)
+
+Queues a new build.
+
+### [Add-VSTeamBuildDefinition](Add-VSTeamBuildDefinition.md)
+
+Creates a new build definition from a JSON file.
+
+### [Add-VSTeamBuildTag](Add-VSTeamBuildTag.md)
+
+Adds a tag to a build.
+
+### [Add-VSTeamExtension](Add-VSTeamExtension.md)
+
+Install the specified extension into the account / project collection.
+
+### [Add-VSTeamFeed](Add-VSTeamFeed.md)
+
+Adds a new feed to package management.
+
+### [Add-VSTeamGitRepository](Add-VSTeamGitRepository.md)
+
+Adds a Git repository to your Azure DevOps or Team Foundation Server account.
+
+### [Add-VSTeamGitRepositoryPermission](Add-VSTeamGitRepositoryPermission.md)
+
+Add permissions to a git repository, all repositories in a project, or a specific branch
+
+### [Add-VSTeamKubernetesEndpoint](Add-VSTeamKubernetesEndpoint.md)
+
+Adds connections to Kubernetes clusters
+
+### [Add-VSTeamMembership](Add-VSTeamMembership.md)
+
+Adds a membership to a container.
+
+### [Add-VSTeamNuGetEndpoint](Add-VSTeamNuGetEndpoint.md)
+
+Adds a new NuGet service endpoint.
+
+### [Add-VSTeamPolicy](Add-VSTeamPolicy.md)
+
+Adds a new policy to the specified project.
+
+### [Add-VSTeamProfile](Add-VSTeamProfile.md)
+
Stores your account name and personal access token as a profile for use with
-the Add-TeamAccount function in this module.
-
-### [Add-VSTeamProject](Add-VSTeamProject.md)
-
-Adds a Team Project to your account.
-
-### [Add-VSTeamProjectPermission](Add-VSTeamProjectPermission.md)
-
-Add Permissions on Project Level
-
-### [Add-VSTeamRelease](Add-VSTeamRelease.md)
-
-Queues a new release
-
-### [Add-VSTeamReleaseDefinition](Add-VSTeamReleaseDefinition.md)
-
-Creates a new release definition from a JSON file.
-
-### [Add-VSTeamServiceEndpoint](Add-VSTeamServiceEndpoint.md)
-
-Adds a generic service connection
-
-### [Add-VSTeamServiceFabricEndpoint](Add-VSTeamServiceFabricEndpoint.md)
-
-Adds a new Service Fabric service endpoint.
-
-### [Add-VSTeamSonarQubeEndpoint](Add-VSTeamSonarQubeEndpoint.md)
-
-Adds a new SonarQube service endpoint.
-
-### [Add-VSTeamUserEntitlement](Add-VSTeamUserEntitlement.md)
-
-Add a user, assign license and extensions and make them a member of a project group in an account.
-
-### [Add-VSTeamVariableGroup](Add-VSTeamVariableGroup.md)
-
-Adds a variable group.
-
-### [Add-VSTeamWorkItem](Add-VSTeamWorkItem.md)
-
-Adds a work item to your project.
-
-### [Add-VSTeamWorkItemAreaPermission](Add-VSTeamWorkItemAreaPermission.md)
-
-Add Permissions to a Work Item Area
-
-### [Add-VSTeamWorkItemIterationPermission](Add-VSTeamWorkItemIterationPermission.md)
-
-Add Permissions to an Iteration
-
-### [Clear-VSTeamDefaultProject](Clear-VSTeamDefaultProject.md)
-
-Clears the value stored in the default project parameter value.
-
-### [Disable-VSTeamAgent](Disable-VSTeamAgent.md)
-
-Disables an agent in a pool.
-
-### [Enable-VSTeamAgent](Enable-VSTeamAgent.md)
-
-Enables an agent in a pool.
-
-### [Get-VSTeam](Get-VSTeam.md)
-
-Returns a team.
-
-### [Get-VSTeamAccessControlList](Get-VSTeamAccessControlList.md)
-
-Return a list of access control lists for the specified security namespace and token. All ACLs in the security namespace will be retrieved if no optional parameters are provided.
-
-### [Get-VSTeamAgent](Get-VSTeamAgent.md)
-
-Returns the agents in a pool.
-
-### [Get-VSTeamApproval](Get-VSTeamApproval.md)
-
-Gets a list of approvals for all releases for a team project.
-
-### [Get-VSTeamBuild](Get-VSTeamBuild.md)
-
-Gets the builds for a team project.
-
-### [Get-VSTeamBuildArtifact](Get-VSTeamBuildArtifact.md)
-
-Returns the artifacts of a build.
-
-### [Get-VSTeamBuildDefinition](Get-VSTeamBuildDefinition.md)
-
-Gets the build definitions for a team project.
-
-### [Get-VSTeamBuildLog](Get-VSTeamBuildLog.md)
-
-Displays the logs for the build.
-
-### [Get-VSTeamBuildTag](Get-VSTeamBuildTag.md)
-
-Returns all the tags of a build.
-
-### [Get-VSTeamClassificationNode](Get-VSTeamClassificationNode.md)
-
-Gets the classification node for a given node path.
-
-### [Get-VSTeamCloudSubscription](Get-VSTeamCloudSubscription.md)
-
-Gets the Azure subscriptions associated with the Team Services account.
-
-### [Get-VSTeamDescriptor](Get-VSTeamDescriptor.md)
-
-Resolve a storage key to a descriptor.
-
-### [Get-VSTeamExtension](Get-VSTeamExtension.md)
-
-Get the installed extensions in the specified Azure DevOps or Team Foundation Server project.
-
-### [Get-VSTeamFeed](Get-VSTeamFeed.md)
-
-Returns a list of package feeds for the account.
-
-### [Get-VSTeamGitRef](Get-VSTeamGitRef.md)
-
-Queries the provided repository for its refs and returns them.
-
-### [Get-VSTeamGitRepository](Get-VSTeamGitRepository.md)
-
-Get all the repositories in your Azure DevOps or Team Foundation Server account, or a specific project.
-
-### [Get-VSTeamGroup](Get-VSTeamGroup.md)
-
-Returns a Group or List of Groups.
-
-### [Get-VSTeamInfo](Get-VSTeamInfo.md)
-
-Displays your current account and default project.
-
-### [Get-VSTeamJobRequest](Get-VSTeamJobRequest.md)
-
-Returns all the job requests of an agent.
-
-### [Get-VSTeamMember](Get-VSTeamMember.md)
-
-Returns a team member.
-
-### [Get-VSTeamMembership](Get-VSTeamMembership.md)
-
-Gets a memberships for a container or member.
-
-### [Get-VSTeamOption](Get-VSTeamOption.md)
-
-Returns all the versions of supported APIs of your TFS or AzD.
-
-### [Get-VSTeamPolicy](Get-VSTeamPolicy.md)
-
-Get the code policies in the specified Azure DevOps or Team Foundation Server project.
-
-### [Get-VSTeamPolicyType](Get-VSTeamPolicyType.md)
-
-Get the policy types in the specified Azure DevOps or Team Foundation Server project.
-
-### [Get-VSTeamPool](Get-VSTeamPool.md)
-
-Returns the agent pools.
-
-### [Get-VSTeamProcess](Get-VSTeamProcess.md)
-
-Returns a list of process templates in the Team Services or Team Foundation Server account.
-
-### [Get-VSTeamProfile](Get-VSTeamProfile.md)
-
-Returns the saved profiles.
-
-### [Get-VSTeamProject](Get-VSTeamProject.md)
-
-Returns a list of projects in the Team Services or Team Foundation Server account.
-
-### [Get-VSTeamPullRequest](Get-VSTeamPullRequest.md)
-
-Returns one or more open pull requests from your team, project, or Id.
-
-### [Get-VSTeamQueue](Get-VSTeamQueue.md)
-
-Gets a agent queue.
-
-### [Get-VSTeamRelease](Get-VSTeamRelease.md)
-
-Gets the releases for a team project.
-
-### [Get-VSTeamReleaseDefinition](Get-VSTeamReleaseDefinition.md)
-
-Gets the release definitions for a team project.
-
-### [Get-VSTeamResourceArea](Get-VSTeamResourceArea.md)
-
-List all the areas supported by this instance of TFS/VSTS.
-
-### [Get-VSTeamSecurityNamespace](Get-VSTeamSecurityNamespace.md)
-
-List all security namespaces or just the specified namespace.
-
-### [Get-VSTeamServiceEndpoint](Get-VSTeamServiceEndpoint.md)
-
-Gets a service endpoint.
-
-### [Get-VSTeamServiceEndpointType](Get-VSTeamServiceEndpointType.md)
-
-Get service endpoint types.
-
-### [Get-VSTeamTfvcBranch](Get-VSTeamTfvcBranch.md)
-
-Gets a branch for a given path from TFVC source control.
-
-### [Get-VSTeamTfvcRootBranch](Get-VSTeamTfvcRootBranch.md)
-
-Gets root branches for all projects with TFVC source control.
-
-### [Get-VSTeamUser](Get-VSTeamUser.md)
-
-Returns a list of users for the account.
-
-### [Get-VSTeamUserEntitlement](Get-VSTeamUserEntitlement.md)
-
-Get User Entitlement for a user.
-
-### [Get-VSTeamVariableGroup](Get-VSTeamVariableGroup.md)
-
-Gets a variable group
-
-### [Get-VSTeamWiql](Get-VSTeamWiql.md)
-
-Returns work items from the given WIQL query or a saved query by ID from your projects team.
-
-### [Get-VSTeamWorkItem](Get-VSTeamWorkItem.md)
-
-Returns one or more a work items from your project.
-
-### [Get-VSTeamWorkItemType](Get-VSTeamWorkItemType.md)
-
-Gets a list of all Work Item Types or a single work item type.
-
-### [Invoke-VSTeamRequest](Invoke-VSTeamRequest.md)
-
-Allows you to call any TFS/AzD REST API. All the Auth and Route Structure is taken care of for you. Just provide the parts of the API call you need. If you need to send a non-standard URL use the -Url parameter. If the -Url is used the Url is not changed but the header and UserAgent are added for you.
-
-### [Remove-VSTeam](Remove-VSTeam.md)
-
-Removes a team from a project.
-
-### [Remove-VSTeamAccessControlList](Remove-VSTeamAccessControlList.md)
-
-Remove access control lists under the specified security namespace.
-
-### [Remove-VSTeamAccount](Remove-VSTeamAccount.md)
-
-Clears your default project, account name and personal access token.
-
-### [Remove-VSTeamAgent](Remove-VSTeamAgent.md)
-
-Removes an agent from a pool.
-
-### [Remove-VSTeamBuild](Remove-VSTeamBuild.md)
-
-Deletes the build.
-
-### [Remove-VSTeamBuildDefinition](Remove-VSTeamBuildDefinition.md)
-
-Removes the build definitions for a team project.
-
-### [Remove-VSTeamBuildTag](Remove-VSTeamBuildTag.md)
-
-Removes the tag from a build.
-
-### [Remove-VSTeamExtension](Remove-VSTeamExtension.md)
-
-Uninstall the specified extension from the account / project collection.
-
-### [Remove-VSTeamFeed](Remove-VSTeamFeed.md)
-
-Removes a package feed from the account.
-
-### [Remove-VSTeamGitRepository](Remove-VSTeamGitRepository.md)
-
-Removes the Git repository from your Azure DevOps or Team Foundation Server account.
-
-### [Remove-VSTeamMembership](Remove-VSTeamMembership.md)
-
-Removes a membership to a container.
-
-### [Remove-VSTeamPolicy](Remove-VSTeamPolicy.md)
-
-Removes the specified policy from the specified project.
-
-### [Remove-VSTeamProfile](Remove-VSTeamProfile.md)
-
-Removes the profile.
-
-### [Remove-VSTeamProject](Remove-VSTeamProject.md)
-
-Deletes the Team Project from your Team Services account.
-
-### [Remove-VSTeamRelease](Remove-VSTeamRelease.md)
-
-Removes the releases for a team project.
-
-### [Remove-VSTeamReleaseDefinition](Remove-VSTeamReleaseDefinition.md)
-
-Removes the release definitions for a team project.
-
-### [Remove-VSTeamServiceEndpoint](Remove-VSTeamServiceEndpoint.md)
-
-Removes a service endpoint.
-
-### [Remove-VSTeamUserEntitlement](Remove-VSTeamUserEntitlement.md)
-
+the Add-TeamAccount function in this module.
+
+### [Add-VSTeamProject](Add-VSTeamProject.md)
+
+Adds a Team Project to your account.
+
+### [Add-VSTeamProjectPermission](Add-VSTeamProjectPermission.md)
+
+Add Permissions on Project Level
+
+### [Add-VSTeamRelease](Add-VSTeamRelease.md)
+
+Queues a new release
+
+### [Add-VSTeamReleaseDefinition](Add-VSTeamReleaseDefinition.md)
+
+Creates a new release definition from a JSON file.
+
+### [Add-VSTeamServiceEndpoint](Add-VSTeamServiceEndpoint.md)
+
+Adds a generic service connection
+
+### [Add-VSTeamServiceFabricEndpoint](Add-VSTeamServiceFabricEndpoint.md)
+
+Adds a new Service Fabric service endpoint.
+
+### [Add-VSTeamSonarQubeEndpoint](Add-VSTeamSonarQubeEndpoint.md)
+
+Adds a new SonarQube service endpoint.
+
+### [Add-VSTeamTaskGroup](Add-VSTeamTaskGroup.md)
+
+Adds a task group.
+
+### [Add-VSTeamUserEntitlement](Add-VSTeamUserEntitlement.md)
+
+Add a user, assign license and extensions and make them a member of a project group in an account.
+
+### [Add-VSTeamVariableGroup](Add-VSTeamVariableGroup.md)
+
+Adds a variable group.
+
+### [Add-VSTeamWorkItem](Add-VSTeamWorkItem.md)
+
+Adds a work item to your project.
+
+### [Add-VSTeamWorkItemAreaPermission](Add-VSTeamWorkItemAreaPermission.md)
+
+Add Permissions to a Work Item Area
+
+### [Add-VSTeamWorkItemIterationPermission](Add-VSTeamWorkItemIterationPermission.md)
+
+Add Permissions to an Iteration
+
+### [Clear-VSTeamDefaultProject](Clear-VSTeamDefaultProject.md)
+
+Clears the value stored in the default project parameter value.
+
+### [Disable-VSTeamAgent](Disable-VSTeamAgent.md)
+
+Disables an agent in a pool.
+
+### [Enable-VSTeamAgent](Enable-VSTeamAgent.md)
+
+Enables an agent in a pool.
+
+### [Get-VSTeam](Get-VSTeam.md)
+
+Returns a team.
+
+### [Get-VSTeamAccessControlList](Get-VSTeamAccessControlList.md)
+
+Return a list of access control lists for the specified security namespace and token. All ACLs in the security namespace will be retrieved if no optional parameters are provided.
+
+### [Get-VSTeamAgent](Get-VSTeamAgent.md)
+
+Returns the agents in a pool.
+
+### [Get-VSTeamApproval](Get-VSTeamApproval.md)
+
+Gets a list of approvals for all releases for a team project.
+
+### [Get-VSTeamBuild](Get-VSTeamBuild.md)
+
+Gets the builds for a team project.
+
+### [Get-VSTeamBuildArtifact](Get-VSTeamBuildArtifact.md)
+
+Returns the artifacts of a build.
+
+### [Get-VSTeamBuildDefinition](Get-VSTeamBuildDefinition.md)
+
+Gets the build definitions for a team project.
+
+### [Get-VSTeamBuildLog](Get-VSTeamBuildLog.md)
+
+Displays the logs for the build.
+
+### [Get-VSTeamBuildTag](Get-VSTeamBuildTag.md)
+
+Returns all the tags of a build.
+
+### [Get-VSTeamClassificationNode](Get-VSTeamClassificationNode.md)
+
+Gets the classification node for a given node path.
+
+### [Get-VSTeamCloudSubscription](Get-VSTeamCloudSubscription.md)
+
+Gets the Azure subscriptions associated with the Team Services account.
+
+### [Get-VSTeamDescriptor](Get-VSTeamDescriptor.md)
+
+Resolve a storage key to a descriptor.
+
+### [Get-VSTeamExtension](Get-VSTeamExtension.md)
+
+Get the installed extensions in the specified Azure DevOps or Team Foundation Server project.
+
+### [Get-VSTeamFeed](Get-VSTeamFeed.md)
+
+Returns a list of package feeds for the account.
+
+### [Get-VSTeamGitRef](Get-VSTeamGitRef.md)
+
+Queries the provided repository for its refs and returns them.
+
+### [Get-VSTeamGitRepository](Get-VSTeamGitRepository.md)
+
+Get all the repositories in your Azure DevOps or Team Foundation Server account, or a specific project.
+
+### [Get-VSTeamGroup](Get-VSTeamGroup.md)
+
+Returns a Group or List of Groups.
+
+### [Get-VSTeamInfo](Get-VSTeamInfo.md)
+
+Displays your current account and default project.
+
+### [Get-VSTeamJobRequest](Get-VSTeamJobRequest.md)
+
+Returns all the job requests of an agent.
+
+### [Get-VSTeamMember](Get-VSTeamMember.md)
+
+Returns a team member.
+
+### [Get-VSTeamMembership](Get-VSTeamMembership.md)
+
+Gets a memberships for a container or member.
+
+### [Get-VSTeamOption](Get-VSTeamOption.md)
+
+Returns all the versions of supported APIs of your TFS or AzD.
+
+### [Get-VSTeamPolicy](Get-VSTeamPolicy.md)
+
+Get the code policies in the specified Azure DevOps or Team Foundation Server project.
+
+### [Get-VSTeamPolicyType](Get-VSTeamPolicyType.md)
+
+Get the policy types in the specified Azure DevOps or Team Foundation Server project.
+
+### [Get-VSTeamPool](Get-VSTeamPool.md)
+
+Returns the agent pools.
+
+### [Get-VSTeamProcess](Get-VSTeamProcess.md)
+
+Returns a list of process templates in the Team Services or Team Foundation Server account.
+
+### [Get-VSTeamProfile](Get-VSTeamProfile.md)
+
+Returns the saved profiles.
+
+### [Get-VSTeamProject](Get-VSTeamProject.md)
+
+Returns a list of projects in the Team Services or Team Foundation Server account.
+
+### [Get-VSTeamPullRequest](Get-VSTeamPullRequest.md)
+
+Returns one or more open pull requests from your team, project, or Id.
+
+### [Get-VSTeamQueue](Get-VSTeamQueue.md)
+
+Gets a agent queue.
+
+### [Get-VSTeamRelease](Get-VSTeamRelease.md)
+
+Gets the releases for a team project.
+
+### [Get-VSTeamReleaseDefinition](Get-VSTeamReleaseDefinition.md)
+
+Gets the release definitions for a team project.
+
+### [Get-VSTeamResourceArea](Get-VSTeamResourceArea.md)
+
+List all the areas supported by this instance of TFS/VSTS.
+
+### [Get-VSTeamSecurityNamespace](Get-VSTeamSecurityNamespace.md)
+
+List all security namespaces or just the specified namespace.
+
+### [Get-VSTeamServiceEndpoint](Get-VSTeamServiceEndpoint.md)
+
+Gets a service endpoint.
+
+### [Get-VSTeamServiceEndpointType](Get-VSTeamServiceEndpointType.md)
+
+Get service endpoint types.
+
+### [Get-VSTeamTaskGroup](Get-VSTeamTaskGroup.md)
+
+Gets a task group
+
+### [Get-VSTeamTfvcBranch](Get-VSTeamTfvcBranch.md)
+
+Gets a branch for a given path from TFVC source control.
+
+### [Get-VSTeamTfvcRootBranch](Get-VSTeamTfvcRootBranch.md)
+
+Gets root branches for all projects with TFVC source control.
+
+### [Get-VSTeamUser](Get-VSTeamUser.md)
+
+Returns a list of users for the account.
+
+### [Get-VSTeamUserEntitlement](Get-VSTeamUserEntitlement.md)
+
+Get User Entitlement for a user.
+
+### [Get-VSTeamVariableGroup](Get-VSTeamVariableGroup.md)
+
+Gets a variable group
+
+### [Get-VSTeamWiql](Get-VSTeamWiql.md)
+
+Returns work items from the given WIQL query or a saved query by ID from your projects team.
+
+### [Get-VSTeamWorkItem](Get-VSTeamWorkItem.md)
+
+Returns one or more a work items from your project.
+
+### [Get-VSTeamWorkItemType](Get-VSTeamWorkItemType.md)
+
+Gets a list of all Work Item Types or a single work item type.
+
+### [Invoke-VSTeamRequest](Invoke-VSTeamRequest.md)
+
+Allows you to call any TFS/AzD REST API. All the Auth and Route Structure is taken care of for you. Just provide the parts of the API call you need. If you need to send a non-standard URL use the -Url parameter. If the -Url is used the Url is not changed but the header and UserAgent are added for you.
+
+### [Remove-VSTeam](Remove-VSTeam.md)
+
+Removes a team from a project.
+
+### [Remove-VSTeamAccessControlList](Remove-VSTeamAccessControlList.md)
+
+Remove access control lists under the specified security namespace.
+
+### [Remove-VSTeamAccount](Remove-VSTeamAccount.md)
+
+Clears your default project, account name and personal access token.
+
+### [Remove-VSTeamAgent](Remove-VSTeamAgent.md)
+
+Removes an agent from a pool.
+
+### [Remove-VSTeamBuild](Remove-VSTeamBuild.md)
+
+Deletes the build.
+
+### [Remove-VSTeamBuildDefinition](Remove-VSTeamBuildDefinition.md)
+
+Removes the build definitions for a team project.
+
+### [Remove-VSTeamBuildTag](Remove-VSTeamBuildTag.md)
+
+Removes the tag from a build.
+
+### [Remove-VSTeamExtension](Remove-VSTeamExtension.md)
+
+Uninstall the specified extension from the account / project collection.
+
+### [Remove-VSTeamFeed](Remove-VSTeamFeed.md)
+
+Removes a package feed from the account.
+
+### [Remove-VSTeamGitRepository](Remove-VSTeamGitRepository.md)
+
+Removes the Git repository from your Azure DevOps or Team Foundation Server account.
+
+### [Remove-VSTeamMembership](Remove-VSTeamMembership.md)
+
+Removes a membership to a container.
+
+### [Remove-VSTeamPolicy](Remove-VSTeamPolicy.md)
+
+Removes the specified policy from the specified project.
+
+### [Remove-VSTeamProfile](Remove-VSTeamProfile.md)
+
+Removes the profile.
+
+### [Remove-VSTeamProject](Remove-VSTeamProject.md)
+
+Deletes the Team Project from your Team Services account.
+
+### [Remove-VSTeamRelease](Remove-VSTeamRelease.md)
+
+Removes the releases for a team project.
+
+### [Remove-VSTeamReleaseDefinition](Remove-VSTeamReleaseDefinition.md)
+
+Removes the release definitions for a team project.
+
+### [Remove-VSTeamServiceEndpoint](Remove-VSTeamServiceEndpoint.md)
+
+Removes a service endpoint.
+
+### [Remove-VSTeamTaskGroup](Remove-VSTeamTaskGroup.md)
+
+Removes a task group
+
+### [Remove-VSTeamUserEntitlement](Remove-VSTeamUserEntitlement.md)
+
Delete a user from the account.
-The delete operation includes unassigning Extensions and Licenses and removing the user from all project memberships. The user would continue to have access to the account if she is member of an AAD group, that is added directly to the account.
-
-### [Remove-VSTeamVariableGroup](Remove-VSTeamVariableGroup.md)
-
-Removes a variable group
-
-### [Set-VSTeamAccount](Set-VSTeamAccount.md)
-
+The delete operation includes unassigning Extensions and Licenses and removing the user from all project memberships. The user would continue to have access to the account if she is member of an AAD group, that is added directly to the account.
+
+### [Remove-VSTeamVariableGroup](Remove-VSTeamVariableGroup.md)
+
+Removes a variable group
+
+### [Remove-VSTeamWorkItem](Remove-VSTeamWorkItem.md)
+
+Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution.
+
+### [Set-VSTeamAccount](Set-VSTeamAccount.md)
+
Stores your account name and personal access token for use with the other
-functions in this module.
-
-### [Set-VSTeamAlias](Set-VSTeamAlias.md)
-
-In version 6.0 the default aliases were removed to prevent conflicts with other modules. If you want to use the original aliases you can run this function to restore them.
-
-### [Set-VSTeamAPIVersion](Set-VSTeamAPIVersion.md)
-
-Sets the API versions to support either TFS2017, TFS2018, AzD2019 or AzD.
-
-### [Set-VSTeamApproval](Set-VSTeamApproval.md)
-
-Sets the status of approval to Approved, Rejected, Pending, or ReAssigned.
-
-### [Set-VSTeamDefaultProject](Set-VSTeamDefaultProject.md)
-
-Sets the default project to be used with other calls in the module.
-
-### [Set-VSTeamEnvironmentStatus](Set-VSTeamEnvironmentStatus.md)
-
-Sets the status of a environment to canceled, inProgress, notStarted, partiallySucceeded, queued, rejected, scheduled, succeeded or undefined.
-
-### [Set-VSTeamReleaseStatus](Set-VSTeamReleaseStatus.md)
-
-Sets the status of a release to Active or Abandoned.
-
-### [Show-VSTeam](Show-VSTeam.md)
-
-Opens TFS or AzD site in the default browser.
-
-### [Show-VSTeamApproval](Show-VSTeamApproval.md)
-
-Opens the release associated with the waiting approval in the default browser.
-
-### [Show-VSTeamBuild](Show-VSTeamBuild.md)
-
-Opens the build summary in the default browser.
-
-### [Show-VSTeamBuildDefinition](Show-VSTeamBuildDefinition.md)
-
-Opens the build definition in the default browser.
-
-### [Show-VSTeamFeed](Show-VSTeamFeed.md)
-
-Opens the feed in the default browser.
-
-### [Show-VSTeamGitRepository](Show-VSTeamGitRepository.md)
-
-Opens the Git repository in the default browser.
-
-### [Show-VSTeamProject](Show-VSTeamProject.md)
-
-Opens the project in the default browser.
-
-### [Show-VSTeamPullRequest](Show-VSTeamPullRequest.md)
-
-Opens the pull request in the default browser.
-
-### [Show-VSTeamRelease](Show-VSTeamRelease.md)
-
-Opens the release summary in the default browser.
-
-### [Show-VSTeamReleaseDefinition](Show-VSTeamReleaseDefinition.md)
-
-Opens the release definitions for a team project in the default browser.
-
-### [Show-VSTeamWorkItem](Show-VSTeamWorkItem.md)
-
-Opens the work item in the default browser.
-
-### [Test-VSTeamMembership](Test-VSTeamMembership.md)
-
-Tests the membership in a container.
-
-### [Update-VSTeam](Update-VSTeam.md)
-
-Updates the team name, description or both.
-
-### [Update-VSTeamBuild](Update-VSTeamBuild.md)
-
-Allows you to set the keep forever flag and build number.
-
-### [Update-VSTeamBuildDefinition](Update-VSTeamBuildDefinition.md)
-
-Updates a build definition for a team project.
-
-### [Update-VSTeamExtension](Update-VSTeamExtension.md)
-
-Update an installed extension. Typically this API is used to enable or disable an extension.
-
-### [Update-VSTeamPolicy](Update-VSTeamPolicy.md)
-
-Updates an existing policy in the specified project.
-
-### [Update-VSTeamProfile](Update-VSTeamProfile.md)
-
-Allows you to update the Personal Access Token for your profile.
-
-### [Update-VSTeamProject](Update-VSTeamProject.md)
-
-Updates the project name, description or both.
-
-### [Update-VSTeamRelease](Update-VSTeamRelease.md)
-
-Allows you to update release variables for future stages to read.
-
-### [Update-VSTeamReleaseDefinition](Update-VSTeamReleaseDefinition.md)
-
-Updates a build definition for a team project.
-
-### [Update-VSTeamServiceEndpoint](Update-VSTeamServiceEndpoint.md)
-
-Updates an existing service connection
-
-### [Update-VSTeamUserEntitlement](Update-VSTeamUserEntitlement.md)
-
-Edit the entitlements (License, Extensions, Projects, Teams etc) for a user.
-
-### [Update-VSTeamVariableGroup](Update-VSTeamVariableGroup.md)
-
-Updates an existing variable group
-
-### [Update-VSTeamWorkItem](Update-VSTeamWorkItem.md)
-
-Update a work item in your project.
-
-
-
-
+functions in this module.
+
+### [Set-VSTeamAlias](Set-VSTeamAlias.md)
+
+In version 6.0 the default aliases were removed to prevent conflicts with other modules. If you want to use the original aliases you can run this function to restore them.
+
+### [Set-VSTeamAPIVersion](Set-VSTeamAPIVersion.md)
+
+Sets the API versions to support either TFS2017, TFS2018, AzD2019 or AzD.
+
+### [Set-VSTeamApproval](Set-VSTeamApproval.md)
+
+Sets the status of approval to Approved, Rejected, Pending, or ReAssigned.
+
+### [Set-VSTeamDefaultProject](Set-VSTeamDefaultProject.md)
+
+Sets the default project to be used with other calls in the module.
+
+### [Set-VSTeamEnvironmentStatus](Set-VSTeamEnvironmentStatus.md)
+
+Sets the status of a environment to canceled, inProgress, notStarted, partiallySucceeded, queued, rejected, scheduled, succeeded or undefined.
+
+### [Set-VSTeamReleaseStatus](Set-VSTeamReleaseStatus.md)
+
+Sets the status of a release to Active or Abandoned.
+
+### [Show-VSTeam](Show-VSTeam.md)
+
+Opens TFS or AzD site in the default browser.
+
+### [Show-VSTeamApproval](Show-VSTeamApproval.md)
+
+Opens the release associated with the waiting approval in the default browser.
+
+### [Show-VSTeamBuild](Show-VSTeamBuild.md)
+
+Opens the build summary in the default browser.
+
+### [Show-VSTeamBuildDefinition](Show-VSTeamBuildDefinition.md)
+
+Opens the build definition in the default browser.
+
+### [Show-VSTeamFeed](Show-VSTeamFeed.md)
+
+Opens the feed in the default browser.
+
+### [Show-VSTeamGitRepository](Show-VSTeamGitRepository.md)
+
+Opens the Git repository in the default browser.
+
+### [Show-VSTeamProject](Show-VSTeamProject.md)
+
+Opens the project in the default browser.
+
+### [Show-VSTeamPullRequest](Show-VSTeamPullRequest.md)
+
+Opens the pull request in the default browser.
+
+### [Show-VSTeamRelease](Show-VSTeamRelease.md)
+
+Opens the release summary in the default browser.
+
+### [Show-VSTeamReleaseDefinition](Show-VSTeamReleaseDefinition.md)
+
+Opens the release definitions for a team project in the default browser.
+
+### [Show-VSTeamWorkItem](Show-VSTeamWorkItem.md)
+
+Opens the work item in the default browser.
+
+### [Test-VSTeamMembership](Test-VSTeamMembership.md)
+
+Tests the membership in a container.
+
+### [Update-VSTeam](Update-VSTeam.md)
+
+Updates the team name, description or both.
+
+### [Update-VSTeamBuild](Update-VSTeamBuild.md)
+
+Allows you to set the keep forever flag and build number.
+
+### [Update-VSTeamBuildDefinition](Update-VSTeamBuildDefinition.md)
+
+Updates a build definition for a team project.
+
+### [Update-VSTeamExtension](Update-VSTeamExtension.md)
+
+Update an installed extension. Typically this API is used to enable or disable an extension.
+
+### [Update-VSTeamPolicy](Update-VSTeamPolicy.md)
+
+Updates an existing policy in the specified project.
+
+### [Update-VSTeamProfile](Update-VSTeamProfile.md)
+
+Allows you to update the Personal Access Token for your profile.
+
+### [Update-VSTeamProject](Update-VSTeamProject.md)
+
+Updates the project name, description or both.
+
+### [Update-VSTeamRelease](Update-VSTeamRelease.md)
+
+Allows you to update release variables for future stages to read.
+
+### [Update-VSTeamReleaseDefinition](Update-VSTeamReleaseDefinition.md)
+
+Updates a build definition for a team project.
+
+### [Update-VSTeamServiceEndpoint](Update-VSTeamServiceEndpoint.md)
+
+Updates an existing service connection
+
+### [Update-VSTeamTaskGroup](Update-VSTeamTaskGroup.md)
+
+Updates an existing task group
+
+### [Update-VSTeamUserEntitlement](Update-VSTeamUserEntitlement.md)
+
+Edit the entitlements (License, Extensions, Projects, Teams etc) for a user.
+
+### [Update-VSTeamVariableGroup](Update-VSTeamVariableGroup.md)
+
+Updates an existing variable group
+
+### [Update-VSTeamWorkItem](Update-VSTeamWorkItem.md)
+
+Update a work item in your project.
+
+
+
+
diff --git a/docs/Update-VSTeamTaskGroup.md b/docs/Update-VSTeamTaskGroup.md
new file mode 100644
index 000000000..036284b7f
--- /dev/null
+++ b/docs/Update-VSTeamTaskGroup.md
@@ -0,0 +1,169 @@
+
+
+
+# Update-VSTeamTaskGroup
+
+## SYNOPSIS
+
+Updates an existing task group
+
+## SYNTAX
+
+## DESCRIPTION
+
+Updates an existing task group
+
+## EXAMPLES
+
+### -------------------------- EXAMPLE 1 --------------------------
+
+```powershell
+
+$projectName = "projectName"
+
+$taskGroup = Get-VSTeamTaskGroup -Name "taskGroupName" -ProjectName $projectName
+
+# Make some change, e.g.
+$taskGroup.description = "new description"
+
+$taskGroupJson = ConvertTo-Json -InputObject $taskGroup -Depth 10
+
+Update-VSTeamTaskGroup -ProjectName $projectName -Id $taskGroup.id -Body $taskGroupJson
+```
+
+## PARAMETERS
+
+### -Confirm
+
+Prompts you for confirmation before running the cmdlet.
+
+```yaml
+Type: SwitchParameter
+Aliases: cf
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Force
+
+Does not prompt
+
+```yaml
+Type: SwitchParameter
+Aliases:
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -ProjectName
+
+### -ProjectName
+
+Specifies the team project for which this function operates.
+
+You can tab complete from a list of available projects.
+
+You can use Set-VSTeamDefaultProject to set a default project so
+you do not have to pass the ProjectName with each call.
+
+```yaml
+Type: String
+Position: 0
+Required: True
+Accept pipeline input: true (ByPropertyName)
+```
+
+### -WhatIf
+
+Shows what would happen if the cmdlet runs.
+The cmdlet is not run.
+
+```yaml
+Type: SwitchParameter
+Aliases: wi
+
+Required: False
+Position: Named
+Default value: None
+Accept pipeline input: False
+Accept wildcard characters: False
+```
+
+### -Id
+
+ID of the existing task group
+
+```yaml
+Type: String
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### -InFile
+
+The path to the json file that represents the task group
+
+```yaml
+Type: String
+Parameter Sets: ByFile
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### -Body
+
+The json that represents the task group as a string
+
+```yaml
+Type: String
+Parameter Sets: ByBody
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### CommonParameters
+
+This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorTask, -InformationAction, -InformationTask, -OutTask, -OutBuffer, -PipelineTask, -Verbose, -WarningAction, and -WarningTask.
+For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
+
+## INPUTS
+
+### System.String
+
+## OUTPUTS
+
+### System.Object
+
+## NOTES
+
+## RELATED LINKS
+
+[Add-VSTeamTaskGroup](Add-VSTeamTaskGroup.md)
+
+[Get-VSTeamTaskGroup](Get-VSTeamTaskGroup.md)
+
+[Remove-VSTeamTaskGroup](Remove-VSTeamTaskGroup.md)
+
diff --git a/docs/Update-VSTeamVariableGroup.md b/docs/Update-VSTeamVariableGroup.md
index 388a15885..6bd4b5e80 100644
--- a/docs/Update-VSTeamVariableGroup.md
+++ b/docs/Update-VSTeamVariableGroup.md
@@ -57,6 +57,27 @@ $methodParameters = @{
Update-VSTeamVariableGroup @methodParameters
```
+### -------------------------- EXAMPLE 2 --------------------------
+
+```powershell
+# Copy variable group varGroupName from project sourceProjectName to project targetProjectName. If varGroupName already exists, we'll update it; else, we'll add it.
+
+$Name = "varGroupName"
+$FromProject = "sourceProjectName"
+$ToProject = "targetProjectName"
+
+$FromVariableGroupObject = Get-VSTeamVariableGroup -Name $Name -ProjectName $FromProject
+$body = ConvertTo-Json -InputObject $FromVariableGroupObject -Depth 100 -Compress
+$toVariableGroupObject = Get-VSTeamVariableGroup -Name $Name -ProjectName $ToProject
+if ($toVariableGroupObject) {
+ Update-VSTeamVariableGroup -Body $body -ProjectName $ToProject -Id $toVariableGroupObject.id
+}
+else {
+ Add-VSTeamVariableGroup -Body $body -ProjectName $ToProject
+}
+
+```
+
## PARAMETERS
### -Confirm
@@ -144,6 +165,7 @@ The variable group description
```yaml
Type: String
+Parameter Sets: ByHashtable
Aliases:
Required: True
@@ -159,6 +181,7 @@ The variable group name
```yaml
Type: String
+Parameter Sets: ByHashtable
Aliases:
Required: True
@@ -174,6 +197,7 @@ The variable group ProviderData. This parameter is not available in TFS2017. Th
```yaml
Type: Hashtable
+Parameter Sets: ByHashtable
Aliases:
Required: False
@@ -189,6 +213,7 @@ The variable group type. This parameter is not available in TFS2017; all variab
```yaml
Type: String
+Parameter Sets: ByHashtable
Aliases:
Accepted values: Vsts, AzureKeyVault
@@ -205,6 +230,23 @@ The variable group variables.
```yaml
Type: Hashtable
+Parameter Sets: ByHashtable
+Aliases:
+
+Required: True
+Position: Named
+Default value: None
+Accept pipeline input: True (ByPropertyName)
+Accept wildcard characters: False
+```
+
+### -Body
+
+The json that represents the task group as a string
+
+```yaml
+Type: String
+Parameter Sets: ByBody
Aliases:
Required: True
diff --git a/docs/readme.md b/docs/readme.md
index 8aab27ae2..21fc353fd 100644
--- a/docs/readme.md
+++ b/docs/readme.md
@@ -18,516 +18,536 @@ The provider allows you to navigate your TFS or AzD as a file system.
## VSTeam Functions
-### [Add-VSTeam](Add-VSTeam.md)
-
-Adds a team to a team project.
-
-### [Add-VSTeamAccessControlEntry](Add-VSTeamAccessControlEntry.md)
-
+### [Add-VSTeam](Add-VSTeam.md)
+
+Adds a team to a team project.
+
+### [Add-VSTeamAccessControlEntry](Add-VSTeamAccessControlEntry.md)
+
Add or update ACEs in the ACL for the provided token. The request contains the target token, a list of ACEs and a optional merge parameter. In the case of a collision (by identity descriptor) with an existing ACE in the ACL, the "merge" parameter determines the behavior. If set, the existing ACE has its allow and deny merged with the incoming ACE's allow and deny. If unset, the existing ACE is displaced.
-Note: This is a low-level function. You should really use a high level function (Add-VSTeam*Permission / Set-VSTeam*Permission / Get-VSTeam*Permission) unless you know what you are doing.
-
-### [Add-VSTeamAzureRMServiceEndpoint](Add-VSTeamAzureRMServiceEndpoint.md)
-
-Adds a new Azure Resource Manager service endpoint.
-
-### [Add-VSTeamBuild](Add-VSTeamBuild.md)
-
-Queues a new build.
-
-### [Add-VSTeamBuildDefinition](Add-VSTeamBuildDefinition.md)
-
-Creates a new build definition from a JSON file.
-
-### [Add-VSTeamBuildTag](Add-VSTeamBuildTag.md)
-
-Adds a tag to a build.
-
-### [Add-VSTeamExtension](Add-VSTeamExtension.md)
-
-Install the specified extension into the account / project collection.
-
-### [Add-VSTeamFeed](Add-VSTeamFeed.md)
-
-Adds a new feed to package management.
-
-### [Add-VSTeamGitRepository](Add-VSTeamGitRepository.md)
-
-Adds a Git repository to your Azure DevOps or Team Foundation Server account.
-
-### [Add-VSTeamGitRepositoryPermission](Add-VSTeamGitRepositoryPermission.md)
-
-Add permissions to a git repository, all repositories in a project, or a specific branch
-
-### [Add-VSTeamKubernetesEndpoint](Add-VSTeamKubernetesEndpoint.md)
-
-Adds connections to Kubernetes clusters
-
-### [Add-VSTeamMembership](Add-VSTeamMembership.md)
-
-Adds a membership to a container.
-
-### [Add-VSTeamNuGetEndpoint](Add-VSTeamNuGetEndpoint.md)
-
-Adds a new NuGet service endpoint.
-
-### [Add-VSTeamPolicy](Add-VSTeamPolicy.md)
-
-Adds a new policy to the specified project.
-
-### [Add-VSTeamProfile](Add-VSTeamProfile.md)
-
+Note: This is a low-level function. You should really use a high level function (Add-VSTeam*Permission / Set-VSTeam*Permission / Get-VSTeam*Permission) unless you know what you are doing.
+
+### [Add-VSTeamAzureRMServiceEndpoint](Add-VSTeamAzureRMServiceEndpoint.md)
+
+Adds a new Azure Resource Manager service endpoint.
+
+### [Add-VSTeamBuild](Add-VSTeamBuild.md)
+
+Queues a new build.
+
+### [Add-VSTeamBuildDefinition](Add-VSTeamBuildDefinition.md)
+
+Creates a new build definition from a JSON file.
+
+### [Add-VSTeamBuildTag](Add-VSTeamBuildTag.md)
+
+Adds a tag to a build.
+
+### [Add-VSTeamExtension](Add-VSTeamExtension.md)
+
+Install the specified extension into the account / project collection.
+
+### [Add-VSTeamFeed](Add-VSTeamFeed.md)
+
+Adds a new feed to package management.
+
+### [Add-VSTeamGitRepository](Add-VSTeamGitRepository.md)
+
+Adds a Git repository to your Azure DevOps or Team Foundation Server account.
+
+### [Add-VSTeamGitRepositoryPermission](Add-VSTeamGitRepositoryPermission.md)
+
+Add permissions to a git repository, all repositories in a project, or a specific branch
+
+### [Add-VSTeamKubernetesEndpoint](Add-VSTeamKubernetesEndpoint.md)
+
+Adds connections to Kubernetes clusters
+
+### [Add-VSTeamMembership](Add-VSTeamMembership.md)
+
+Adds a membership to a container.
+
+### [Add-VSTeamNuGetEndpoint](Add-VSTeamNuGetEndpoint.md)
+
+Adds a new NuGet service endpoint.
+
+### [Add-VSTeamPolicy](Add-VSTeamPolicy.md)
+
+Adds a new policy to the specified project.
+
+### [Add-VSTeamProfile](Add-VSTeamProfile.md)
+
Stores your account name and personal access token as a profile for use with
-the Add-TeamAccount function in this module.
-
-### [Add-VSTeamProject](Add-VSTeamProject.md)
-
-Adds a Team Project to your account.
-
-### [Add-VSTeamProjectPermission](Add-VSTeamProjectPermission.md)
-
-Add Permissions on Project Level
-
-### [Add-VSTeamRelease](Add-VSTeamRelease.md)
-
-Queues a new release
-
-### [Add-VSTeamReleaseDefinition](Add-VSTeamReleaseDefinition.md)
-
-Creates a new release definition from a JSON file.
-
-### [Add-VSTeamServiceEndpoint](Add-VSTeamServiceEndpoint.md)
-
-Adds a generic service connection
-
-### [Add-VSTeamServiceFabricEndpoint](Add-VSTeamServiceFabricEndpoint.md)
-
-Adds a new Service Fabric service endpoint.
-
-### [Add-VSTeamSonarQubeEndpoint](Add-VSTeamSonarQubeEndpoint.md)
-
-Adds a new SonarQube service endpoint.
-
-### [Add-VSTeamUserEntitlement](Add-VSTeamUserEntitlement.md)
-
-Add a user, assign license and extensions and make them a member of a project group in an account.
-
-### [Add-VSTeamVariableGroup](Add-VSTeamVariableGroup.md)
-
-Adds a variable group.
-
-### [Add-VSTeamWorkItem](Add-VSTeamWorkItem.md)
-
-Adds a work item to your project.
-
-### [Add-VSTeamWorkItemAreaPermission](Add-VSTeamWorkItemAreaPermission.md)
-
-Add Permissions to a Work Item Area
-
-### [Add-VSTeamWorkItemIterationPermission](Add-VSTeamWorkItemIterationPermission.md)
-
-Add Permissions to an Iteration
-
-### [Clear-VSTeamDefaultProject](Clear-VSTeamDefaultProject.md)
-
-Clears the value stored in the default project parameter value.
-
-### [Disable-VSTeamAgent](Disable-VSTeamAgent.md)
-
-Disables an agent in a pool.
-
-### [Enable-VSTeamAgent](Enable-VSTeamAgent.md)
-
-Enables an agent in a pool.
-
-### [Get-VSTeam](Get-VSTeam.md)
-
-Returns a team.
-
-### [Get-VSTeamAccessControlList](Get-VSTeamAccessControlList.md)
-
-Return a list of access control lists for the specified security namespace and token. All ACLs in the security namespace will be retrieved if no optional parameters are provided.
-
-### [Get-VSTeamAgent](Get-VSTeamAgent.md)
-
-Returns the agents in a pool.
-
-### [Get-VSTeamApproval](Get-VSTeamApproval.md)
-
-Gets a list of approvals for all releases for a team project.
-
-### [Get-VSTeamBuild](Get-VSTeamBuild.md)
-
-Gets the builds for a team project.
-
-### [Get-VSTeamBuildArtifact](Get-VSTeamBuildArtifact.md)
-
-Returns the artifacts of a build.
-
-### [Get-VSTeamBuildDefinition](Get-VSTeamBuildDefinition.md)
-
-Gets the build definitions for a team project.
-
-### [Get-VSTeamBuildLog](Get-VSTeamBuildLog.md)
-
-Displays the logs for the build.
-
-### [Get-VSTeamBuildTag](Get-VSTeamBuildTag.md)
-
-Returns all the tags of a build.
-
-### [Get-VSTeamClassificationNode](Get-VSTeamClassificationNode.md)
-
-Gets the classification node for a given node path.
-
-### [Get-VSTeamCloudSubscription](Get-VSTeamCloudSubscription.md)
-
-Gets the Azure subscriptions associated with the Team Services account.
-
-### [Get-VSTeamDescriptor](Get-VSTeamDescriptor.md)
-
-Resolve a storage key to a descriptor.
-
-### [Get-VSTeamExtension](Get-VSTeamExtension.md)
-
-Get the installed extensions in the specified Azure DevOps or Team Foundation Server project.
-
-### [Get-VSTeamFeed](Get-VSTeamFeed.md)
-
-Returns a list of package feeds for the account.
-
-### [Get-VSTeamGitRef](Get-VSTeamGitRef.md)
-
-Queries the provided repository for its refs and returns them.
-
-### [Get-VSTeamGitRepository](Get-VSTeamGitRepository.md)
-
-Get all the repositories in your Azure DevOps or Team Foundation Server account, or a specific project.
-
-### [Get-VSTeamGroup](Get-VSTeamGroup.md)
-
-Returns a Group or List of Groups.
-
-### [Get-VSTeamInfo](Get-VSTeamInfo.md)
-
-Displays your current account and default project.
-
-### [Get-VSTeamJobRequest](Get-VSTeamJobRequest.md)
-
-Returns all the job requests of an agent.
-
-### [Get-VSTeamMember](Get-VSTeamMember.md)
-
-Returns a team member.
-
-### [Get-VSTeamMembership](Get-VSTeamMembership.md)
-
-Gets a memberships for a container or member.
-
-### [Get-VSTeamOption](Get-VSTeamOption.md)
-
-Returns all the versions of supported APIs of your TFS or AzD.
-
-### [Get-VSTeamPolicy](Get-VSTeamPolicy.md)
-
-Get the code policies in the specified Azure DevOps or Team Foundation Server project.
-
-### [Get-VSTeamPolicyType](Get-VSTeamPolicyType.md)
-
-Get the policy types in the specified Azure DevOps or Team Foundation Server project.
-
-### [Get-VSTeamPool](Get-VSTeamPool.md)
-
-Returns the agent pools.
-
-### [Get-VSTeamProcess](Get-VSTeamProcess.md)
-
-Returns a list of process templates in the Team Services or Team Foundation Server account.
-
-### [Get-VSTeamProfile](Get-VSTeamProfile.md)
-
-Returns the saved profiles.
-
-### [Get-VSTeamProject](Get-VSTeamProject.md)
-
-Returns a list of projects in the Team Services or Team Foundation Server account.
-
-### [Get-VSTeamPullRequest](Get-VSTeamPullRequest.md)
-
-Returns one or more open pull requests from your team, project, or Id.
-
-### [Get-VSTeamQueue](Get-VSTeamQueue.md)
-
-Gets a agent queue.
-
-### [Get-VSTeamRelease](Get-VSTeamRelease.md)
-
-Gets the releases for a team project.
-
-### [Get-VSTeamReleaseDefinition](Get-VSTeamReleaseDefinition.md)
-
-Gets the release definitions for a team project.
-
-### [Get-VSTeamResourceArea](Get-VSTeamResourceArea.md)
-
-List all the areas supported by this instance of TFS/VSTS.
-
-### [Get-VSTeamSecurityNamespace](Get-VSTeamSecurityNamespace.md)
-
-List all security namespaces or just the specified namespace.
-
-### [Get-VSTeamServiceEndpoint](Get-VSTeamServiceEndpoint.md)
-
-Gets a service endpoint.
-
-### [Get-VSTeamServiceEndpointType](Get-VSTeamServiceEndpointType.md)
-
-Get service endpoint types.
-
-### [Get-VSTeamTfvcBranch](Get-VSTeamTfvcBranch.md)
-
-Gets a branch for a given path from TFVC source control.
-
-### [Get-VSTeamTfvcRootBranch](Get-VSTeamTfvcRootBranch.md)
-
-Gets root branches for all projects with TFVC source control.
-
-### [Get-VSTeamUser](Get-VSTeamUser.md)
-
-Returns a list of users for the account.
-
-### [Get-VSTeamUserEntitlement](Get-VSTeamUserEntitlement.md)
-
-Get User Entitlement for a user.
-
-### [Get-VSTeamVariableGroup](Get-VSTeamVariableGroup.md)
-
-Gets a variable group
-
-### [Get-VSTeamWiql](Get-VSTeamWiql.md)
-
-Returns work items from the given WIQL query or a saved query by ID from your projects team.
-
-### [Get-VSTeamWorkItem](Get-VSTeamWorkItem.md)
-
-Returns one or more a work items from your project.
-
-### [Get-VSTeamWorkItemType](Get-VSTeamWorkItemType.md)
-
-Gets a list of all Work Item Types or a single work item type.
-
-### [Invoke-VSTeamRequest](Invoke-VSTeamRequest.md)
-
-Allows you to call any TFS/AzD REST API. All the Auth and Route Structure is taken care of for you. Just provide the parts of the API call you need. If you need to send a non-standard URL use the -Url parameter. If the -Url is used the Url is not changed but the header and UserAgent are added for you.
-
-### [Remove-VSTeam](Remove-VSTeam.md)
-
-Removes a team from a project.
-
-### [Remove-VSTeamAccessControlList](Remove-VSTeamAccessControlList.md)
-
-Remove access control lists under the specified security namespace.
-
-### [Remove-VSTeamAccount](Remove-VSTeamAccount.md)
-
-Clears your default project, account name and personal access token.
-
-### [Remove-VSTeamAgent](Remove-VSTeamAgent.md)
-
-Removes an agent from a pool.
-
-### [Remove-VSTeamBuild](Remove-VSTeamBuild.md)
-
-Deletes the build.
-
-### [Remove-VSTeamBuildDefinition](Remove-VSTeamBuildDefinition.md)
-
-Removes the build definitions for a team project.
-
-### [Remove-VSTeamBuildTag](Remove-VSTeamBuildTag.md)
-
-Removes the tag from a build.
-
-### [Remove-VSTeamExtension](Remove-VSTeamExtension.md)
-
-Uninstall the specified extension from the account / project collection.
-
-### [Remove-VSTeamFeed](Remove-VSTeamFeed.md)
-
-Removes a package feed from the account.
-
-### [Remove-VSTeamGitRepository](Remove-VSTeamGitRepository.md)
-
-Removes the Git repository from your Azure DevOps or Team Foundation Server account.
-
-### [Remove-VSTeamMembership](Remove-VSTeamMembership.md)
-
-Removes a membership to a container.
-
-### [Remove-VSTeamPolicy](Remove-VSTeamPolicy.md)
-
-Removes the specified policy from the specified project.
-
-### [Remove-VSTeamProfile](Remove-VSTeamProfile.md)
-
-Removes the profile.
-
-### [Remove-VSTeamProject](Remove-VSTeamProject.md)
-
-Deletes the Team Project from your Team Services account.
-
-### [Remove-VSTeamRelease](Remove-VSTeamRelease.md)
-
-Removes the releases for a team project.
-
-### [Remove-VSTeamReleaseDefinition](Remove-VSTeamReleaseDefinition.md)
-
-Removes the release definitions for a team project.
-
-### [Remove-VSTeamServiceEndpoint](Remove-VSTeamServiceEndpoint.md)
-
-Removes a service endpoint.
-
-### [Remove-VSTeamUserEntitlement](Remove-VSTeamUserEntitlement.md)
-
+the Add-TeamAccount function in this module.
+
+### [Add-VSTeamProject](Add-VSTeamProject.md)
+
+Adds a Team Project to your account.
+
+### [Add-VSTeamProjectPermission](Add-VSTeamProjectPermission.md)
+
+Add Permissions on Project Level
+
+### [Add-VSTeamRelease](Add-VSTeamRelease.md)
+
+Queues a new release
+
+### [Add-VSTeamReleaseDefinition](Add-VSTeamReleaseDefinition.md)
+
+Creates a new release definition from a JSON file.
+
+### [Add-VSTeamServiceEndpoint](Add-VSTeamServiceEndpoint.md)
+
+Adds a generic service connection
+
+### [Add-VSTeamServiceFabricEndpoint](Add-VSTeamServiceFabricEndpoint.md)
+
+Adds a new Service Fabric service endpoint.
+
+### [Add-VSTeamSonarQubeEndpoint](Add-VSTeamSonarQubeEndpoint.md)
+
+Adds a new SonarQube service endpoint.
+
+### [Add-VSTeamTaskGroup](Add-VSTeamTaskGroup.md)
+
+Adds a task group.
+
+### [Add-VSTeamUserEntitlement](Add-VSTeamUserEntitlement.md)
+
+Add a user, assign license and extensions and make them a member of a project group in an account.
+
+### [Add-VSTeamVariableGroup](Add-VSTeamVariableGroup.md)
+
+Adds a variable group.
+
+### [Add-VSTeamWorkItem](Add-VSTeamWorkItem.md)
+
+Adds a work item to your project.
+
+### [Add-VSTeamWorkItemAreaPermission](Add-VSTeamWorkItemAreaPermission.md)
+
+Add Permissions to a Work Item Area
+
+### [Add-VSTeamWorkItemIterationPermission](Add-VSTeamWorkItemIterationPermission.md)
+
+Add Permissions to an Iteration
+
+### [Clear-VSTeamDefaultProject](Clear-VSTeamDefaultProject.md)
+
+Clears the value stored in the default project parameter value.
+
+### [Disable-VSTeamAgent](Disable-VSTeamAgent.md)
+
+Disables an agent in a pool.
+
+### [Enable-VSTeamAgent](Enable-VSTeamAgent.md)
+
+Enables an agent in a pool.
+
+### [Get-VSTeam](Get-VSTeam.md)
+
+Returns a team.
+
+### [Get-VSTeamAccessControlList](Get-VSTeamAccessControlList.md)
+
+Return a list of access control lists for the specified security namespace and token. All ACLs in the security namespace will be retrieved if no optional parameters are provided.
+
+### [Get-VSTeamAgent](Get-VSTeamAgent.md)
+
+Returns the agents in a pool.
+
+### [Get-VSTeamApproval](Get-VSTeamApproval.md)
+
+Gets a list of approvals for all releases for a team project.
+
+### [Get-VSTeamBuild](Get-VSTeamBuild.md)
+
+Gets the builds for a team project.
+
+### [Get-VSTeamBuildArtifact](Get-VSTeamBuildArtifact.md)
+
+Returns the artifacts of a build.
+
+### [Get-VSTeamBuildDefinition](Get-VSTeamBuildDefinition.md)
+
+Gets the build definitions for a team project.
+
+### [Get-VSTeamBuildLog](Get-VSTeamBuildLog.md)
+
+Displays the logs for the build.
+
+### [Get-VSTeamBuildTag](Get-VSTeamBuildTag.md)
+
+Returns all the tags of a build.
+
+### [Get-VSTeamClassificationNode](Get-VSTeamClassificationNode.md)
+
+Gets the classification node for a given node path.
+
+### [Get-VSTeamCloudSubscription](Get-VSTeamCloudSubscription.md)
+
+Gets the Azure subscriptions associated with the Team Services account.
+
+### [Get-VSTeamDescriptor](Get-VSTeamDescriptor.md)
+
+Resolve a storage key to a descriptor.
+
+### [Get-VSTeamExtension](Get-VSTeamExtension.md)
+
+Get the installed extensions in the specified Azure DevOps or Team Foundation Server project.
+
+### [Get-VSTeamFeed](Get-VSTeamFeed.md)
+
+Returns a list of package feeds for the account.
+
+### [Get-VSTeamGitRef](Get-VSTeamGitRef.md)
+
+Queries the provided repository for its refs and returns them.
+
+### [Get-VSTeamGitRepository](Get-VSTeamGitRepository.md)
+
+Get all the repositories in your Azure DevOps or Team Foundation Server account, or a specific project.
+
+### [Get-VSTeamGroup](Get-VSTeamGroup.md)
+
+Returns a Group or List of Groups.
+
+### [Get-VSTeamInfo](Get-VSTeamInfo.md)
+
+Displays your current account and default project.
+
+### [Get-VSTeamJobRequest](Get-VSTeamJobRequest.md)
+
+Returns all the job requests of an agent.
+
+### [Get-VSTeamMember](Get-VSTeamMember.md)
+
+Returns a team member.
+
+### [Get-VSTeamMembership](Get-VSTeamMembership.md)
+
+Gets a memberships for a container or member.
+
+### [Get-VSTeamOption](Get-VSTeamOption.md)
+
+Returns all the versions of supported APIs of your TFS or AzD.
+
+### [Get-VSTeamPolicy](Get-VSTeamPolicy.md)
+
+Get the code policies in the specified Azure DevOps or Team Foundation Server project.
+
+### [Get-VSTeamPolicyType](Get-VSTeamPolicyType.md)
+
+Get the policy types in the specified Azure DevOps or Team Foundation Server project.
+
+### [Get-VSTeamPool](Get-VSTeamPool.md)
+
+Returns the agent pools.
+
+### [Get-VSTeamProcess](Get-VSTeamProcess.md)
+
+Returns a list of process templates in the Team Services or Team Foundation Server account.
+
+### [Get-VSTeamProfile](Get-VSTeamProfile.md)
+
+Returns the saved profiles.
+
+### [Get-VSTeamProject](Get-VSTeamProject.md)
+
+Returns a list of projects in the Team Services or Team Foundation Server account.
+
+### [Get-VSTeamPullRequest](Get-VSTeamPullRequest.md)
+
+Returns one or more open pull requests from your team, project, or Id.
+
+### [Get-VSTeamQueue](Get-VSTeamQueue.md)
+
+Gets a agent queue.
+
+### [Get-VSTeamRelease](Get-VSTeamRelease.md)
+
+Gets the releases for a team project.
+
+### [Get-VSTeamReleaseDefinition](Get-VSTeamReleaseDefinition.md)
+
+Gets the release definitions for a team project.
+
+### [Get-VSTeamResourceArea](Get-VSTeamResourceArea.md)
+
+List all the areas supported by this instance of TFS/VSTS.
+
+### [Get-VSTeamSecurityNamespace](Get-VSTeamSecurityNamespace.md)
+
+List all security namespaces or just the specified namespace.
+
+### [Get-VSTeamServiceEndpoint](Get-VSTeamServiceEndpoint.md)
+
+Gets a service endpoint.
+
+### [Get-VSTeamServiceEndpointType](Get-VSTeamServiceEndpointType.md)
+
+Get service endpoint types.
+
+### [Get-VSTeamTaskGroup](Get-VSTeamTaskGroup.md)
+
+Gets a task group
+
+### [Get-VSTeamTfvcBranch](Get-VSTeamTfvcBranch.md)
+
+Gets a branch for a given path from TFVC source control.
+
+### [Get-VSTeamTfvcRootBranch](Get-VSTeamTfvcRootBranch.md)
+
+Gets root branches for all projects with TFVC source control.
+
+### [Get-VSTeamUser](Get-VSTeamUser.md)
+
+Returns a list of users for the account.
+
+### [Get-VSTeamUserEntitlement](Get-VSTeamUserEntitlement.md)
+
+Get User Entitlement for a user.
+
+### [Get-VSTeamVariableGroup](Get-VSTeamVariableGroup.md)
+
+Gets a variable group
+
+### [Get-VSTeamWiql](Get-VSTeamWiql.md)
+
+Returns work items from the given WIQL query or a saved query by ID from your projects team.
+
+### [Get-VSTeamWorkItem](Get-VSTeamWorkItem.md)
+
+Returns one or more a work items from your project.
+
+### [Get-VSTeamWorkItemType](Get-VSTeamWorkItemType.md)
+
+Gets a list of all Work Item Types or a single work item type.
+
+### [Invoke-VSTeamRequest](Invoke-VSTeamRequest.md)
+
+Allows you to call any TFS/AzD REST API. All the Auth and Route Structure is taken care of for you. Just provide the parts of the API call you need. If you need to send a non-standard URL use the -Url parameter. If the -Url is used the Url is not changed but the header and UserAgent are added for you.
+
+### [Remove-VSTeam](Remove-VSTeam.md)
+
+Removes a team from a project.
+
+### [Remove-VSTeamAccessControlList](Remove-VSTeamAccessControlList.md)
+
+Remove access control lists under the specified security namespace.
+
+### [Remove-VSTeamAccount](Remove-VSTeamAccount.md)
+
+Clears your default project, account name and personal access token.
+
+### [Remove-VSTeamAgent](Remove-VSTeamAgent.md)
+
+Removes an agent from a pool.
+
+### [Remove-VSTeamBuild](Remove-VSTeamBuild.md)
+
+Deletes the build.
+
+### [Remove-VSTeamBuildDefinition](Remove-VSTeamBuildDefinition.md)
+
+Removes the build definitions for a team project.
+
+### [Remove-VSTeamBuildTag](Remove-VSTeamBuildTag.md)
+
+Removes the tag from a build.
+
+### [Remove-VSTeamExtension](Remove-VSTeamExtension.md)
+
+Uninstall the specified extension from the account / project collection.
+
+### [Remove-VSTeamFeed](Remove-VSTeamFeed.md)
+
+Removes a package feed from the account.
+
+### [Remove-VSTeamGitRepository](Remove-VSTeamGitRepository.md)
+
+Removes the Git repository from your Azure DevOps or Team Foundation Server account.
+
+### [Remove-VSTeamMembership](Remove-VSTeamMembership.md)
+
+Removes a membership to a container.
+
+### [Remove-VSTeamPolicy](Remove-VSTeamPolicy.md)
+
+Removes the specified policy from the specified project.
+
+### [Remove-VSTeamProfile](Remove-VSTeamProfile.md)
+
+Removes the profile.
+
+### [Remove-VSTeamProject](Remove-VSTeamProject.md)
+
+Deletes the Team Project from your Team Services account.
+
+### [Remove-VSTeamRelease](Remove-VSTeamRelease.md)
+
+Removes the releases for a team project.
+
+### [Remove-VSTeamReleaseDefinition](Remove-VSTeamReleaseDefinition.md)
+
+Removes the release definitions for a team project.
+
+### [Remove-VSTeamServiceEndpoint](Remove-VSTeamServiceEndpoint.md)
+
+Removes a service endpoint.
+
+### [Remove-VSTeamTaskGroup](Remove-VSTeamTaskGroup.md)
+
+Removes a task group
+
+### [Remove-VSTeamUserEntitlement](Remove-VSTeamUserEntitlement.md)
+
Delete a user from the account.
-The delete operation includes unassigning Extensions and Licenses and removing the user from all project memberships. The user would continue to have access to the account if she is member of an AAD group, that is added directly to the account.
-
-### [Remove-VSTeamVariableGroup](Remove-VSTeamVariableGroup.md)
-
-Removes a variable group
-
-### [Set-VSTeamAccount](Set-VSTeamAccount.md)
-
+The delete operation includes unassigning Extensions and Licenses and removing the user from all project memberships. The user would continue to have access to the account if she is member of an AAD group, that is added directly to the account.
+
+### [Remove-VSTeamVariableGroup](Remove-VSTeamVariableGroup.md)
+
+Removes a variable group
+
+### [Remove-VSTeamWorkItem](Remove-VSTeamWorkItem.md)
+
+Deletes the specified work item and sends it to the Recycle Bin, so that it can be restored back, if required. Optionally, if the destroy parameter has been set to true, it destroys the work item permanently. WARNING: If the destroy parameter is set to true, work items deleted by this command will NOT go to recycle-bin and there is no way to restore/recover them after deletion. It is recommended NOT to use this parameter. If you do, please use this parameter with extreme caution.
+
+### [Set-VSTeamAccount](Set-VSTeamAccount.md)
+
Stores your account name and personal access token for use with the other
-functions in this module.
-
-### [Set-VSTeamAlias](Set-VSTeamAlias.md)
-
-In version 6.0 the default aliases were removed to prevent conflicts with other modules. If you want to use the original aliases you can run this function to restore them.
-
-### [Set-VSTeamAPIVersion](Set-VSTeamAPIVersion.md)
-
-Sets the API versions to support either TFS2017, TFS2018, AzD2019 or AzD.
-
-### [Set-VSTeamApproval](Set-VSTeamApproval.md)
-
-Sets the status of approval to Approved, Rejected, Pending, or ReAssigned.
-
-### [Set-VSTeamDefaultProject](Set-VSTeamDefaultProject.md)
-
-Sets the default project to be used with other calls in the module.
-
-### [Set-VSTeamEnvironmentStatus](Set-VSTeamEnvironmentStatus.md)
-
-Sets the status of a environment to canceled, inProgress, notStarted, partiallySucceeded, queued, rejected, scheduled, succeeded or undefined.
-
-### [Set-VSTeamReleaseStatus](Set-VSTeamReleaseStatus.md)
-
-Sets the status of a release to Active or Abandoned.
-
-### [Show-VSTeam](Show-VSTeam.md)
-
-Opens TFS or AzD site in the default browser.
-
-### [Show-VSTeamApproval](Show-VSTeamApproval.md)
-
-Opens the release associated with the waiting approval in the default browser.
-
-### [Show-VSTeamBuild](Show-VSTeamBuild.md)
-
-Opens the build summary in the default browser.
-
-### [Show-VSTeamBuildDefinition](Show-VSTeamBuildDefinition.md)
-
-Opens the build definition in the default browser.
-
-### [Show-VSTeamFeed](Show-VSTeamFeed.md)
-
-Opens the feed in the default browser.
-
-### [Show-VSTeamGitRepository](Show-VSTeamGitRepository.md)
-
-Opens the Git repository in the default browser.
-
-### [Show-VSTeamProject](Show-VSTeamProject.md)
-
-Opens the project in the default browser.
-
-### [Show-VSTeamPullRequest](Show-VSTeamPullRequest.md)
-
-Opens the pull request in the default browser.
-
-### [Show-VSTeamRelease](Show-VSTeamRelease.md)
-
-Opens the release summary in the default browser.
-
-### [Show-VSTeamReleaseDefinition](Show-VSTeamReleaseDefinition.md)
-
-Opens the release definitions for a team project in the default browser.
-
-### [Show-VSTeamWorkItem](Show-VSTeamWorkItem.md)
-
-Opens the work item in the default browser.
-
-### [Test-VSTeamMembership](Test-VSTeamMembership.md)
-
-Tests the membership in a container.
-
-### [Update-VSTeam](Update-VSTeam.md)
-
-Updates the team name, description or both.
-
-### [Update-VSTeamBuild](Update-VSTeamBuild.md)
-
-Allows you to set the keep forever flag and build number.
-
-### [Update-VSTeamBuildDefinition](Update-VSTeamBuildDefinition.md)
-
-Updates a build definition for a team project.
-
-### [Update-VSTeamExtension](Update-VSTeamExtension.md)
-
-Update an installed extension. Typically this API is used to enable or disable an extension.
-
-### [Update-VSTeamPolicy](Update-VSTeamPolicy.md)
-
-Updates an existing policy in the specified project.
-
-### [Update-VSTeamProfile](Update-VSTeamProfile.md)
-
-Allows you to update the Personal Access Token for your profile.
-
-### [Update-VSTeamProject](Update-VSTeamProject.md)
-
-Updates the project name, description or both.
-
-### [Update-VSTeamRelease](Update-VSTeamRelease.md)
-
-Allows you to update release variables for future stages to read.
-
-### [Update-VSTeamReleaseDefinition](Update-VSTeamReleaseDefinition.md)
-
-Updates a build definition for a team project.
-
-### [Update-VSTeamServiceEndpoint](Update-VSTeamServiceEndpoint.md)
-
-Updates an existing service connection
-
-### [Update-VSTeamUserEntitlement](Update-VSTeamUserEntitlement.md)
-
-Edit the entitlements (License, Extensions, Projects, Teams etc) for a user.
-
-### [Update-VSTeamVariableGroup](Update-VSTeamVariableGroup.md)
-
-Updates an existing variable group
-
-### [Update-VSTeamWorkItem](Update-VSTeamWorkItem.md)
-
-Update a work item in your project.
-
-
-
-
+functions in this module.
+
+### [Set-VSTeamAlias](Set-VSTeamAlias.md)
+
+In version 6.0 the default aliases were removed to prevent conflicts with other modules. If you want to use the original aliases you can run this function to restore them.
+
+### [Set-VSTeamAPIVersion](Set-VSTeamAPIVersion.md)
+
+Sets the API versions to support either TFS2017, TFS2018, AzD2019 or AzD.
+
+### [Set-VSTeamApproval](Set-VSTeamApproval.md)
+
+Sets the status of approval to Approved, Rejected, Pending, or ReAssigned.
+
+### [Set-VSTeamDefaultProject](Set-VSTeamDefaultProject.md)
+
+Sets the default project to be used with other calls in the module.
+
+### [Set-VSTeamEnvironmentStatus](Set-VSTeamEnvironmentStatus.md)
+
+Sets the status of a environment to canceled, inProgress, notStarted, partiallySucceeded, queued, rejected, scheduled, succeeded or undefined.
+
+### [Set-VSTeamReleaseStatus](Set-VSTeamReleaseStatus.md)
+
+Sets the status of a release to Active or Abandoned.
+
+### [Show-VSTeam](Show-VSTeam.md)
+
+Opens TFS or AzD site in the default browser.
+
+### [Show-VSTeamApproval](Show-VSTeamApproval.md)
+
+Opens the release associated with the waiting approval in the default browser.
+
+### [Show-VSTeamBuild](Show-VSTeamBuild.md)
+
+Opens the build summary in the default browser.
+
+### [Show-VSTeamBuildDefinition](Show-VSTeamBuildDefinition.md)
+
+Opens the build definition in the default browser.
+
+### [Show-VSTeamFeed](Show-VSTeamFeed.md)
+
+Opens the feed in the default browser.
+
+### [Show-VSTeamGitRepository](Show-VSTeamGitRepository.md)
+
+Opens the Git repository in the default browser.
+
+### [Show-VSTeamProject](Show-VSTeamProject.md)
+
+Opens the project in the default browser.
+
+### [Show-VSTeamPullRequest](Show-VSTeamPullRequest.md)
+
+Opens the pull request in the default browser.
+
+### [Show-VSTeamRelease](Show-VSTeamRelease.md)
+
+Opens the release summary in the default browser.
+
+### [Show-VSTeamReleaseDefinition](Show-VSTeamReleaseDefinition.md)
+
+Opens the release definitions for a team project in the default browser.
+
+### [Show-VSTeamWorkItem](Show-VSTeamWorkItem.md)
+
+Opens the work item in the default browser.
+
+### [Test-VSTeamMembership](Test-VSTeamMembership.md)
+
+Tests the membership in a container.
+
+### [Update-VSTeam](Update-VSTeam.md)
+
+Updates the team name, description or both.
+
+### [Update-VSTeamBuild](Update-VSTeamBuild.md)
+
+Allows you to set the keep forever flag and build number.
+
+### [Update-VSTeamBuildDefinition](Update-VSTeamBuildDefinition.md)
+
+Updates a build definition for a team project.
+
+### [Update-VSTeamExtension](Update-VSTeamExtension.md)
+
+Update an installed extension. Typically this API is used to enable or disable an extension.
+
+### [Update-VSTeamPolicy](Update-VSTeamPolicy.md)
+
+Updates an existing policy in the specified project.
+
+### [Update-VSTeamProfile](Update-VSTeamProfile.md)
+
+Allows you to update the Personal Access Token for your profile.
+
+### [Update-VSTeamProject](Update-VSTeamProject.md)
+
+Updates the project name, description or both.
+
+### [Update-VSTeamRelease](Update-VSTeamRelease.md)
+
+Allows you to update release variables for future stages to read.
+
+### [Update-VSTeamReleaseDefinition](Update-VSTeamReleaseDefinition.md)
+
+Updates a build definition for a team project.
+
+### [Update-VSTeamServiceEndpoint](Update-VSTeamServiceEndpoint.md)
+
+Updates an existing service connection
+
+### [Update-VSTeamTaskGroup](Update-VSTeamTaskGroup.md)
+
+Updates an existing task group
+
+### [Update-VSTeamUserEntitlement](Update-VSTeamUserEntitlement.md)
+
+Edit the entitlements (License, Extensions, Projects, Teams etc) for a user.
+
+### [Update-VSTeamVariableGroup](Update-VSTeamVariableGroup.md)
+
+Updates an existing variable group
+
+### [Update-VSTeamWorkItem](Update-VSTeamWorkItem.md)
+
+Update a work item in your project.
+
+
+
+
diff --git a/unit/test/Remove-VSTeamWorkItem.Tests.ps1 b/unit/test/Remove-VSTeamWorkItem.Tests.ps1
new file mode 100644
index 000000000..5f564c58d
--- /dev/null
+++ b/unit/test/Remove-VSTeamWorkItem.Tests.ps1
@@ -0,0 +1,92 @@
+Set-StrictMode -Version Latest
+
+InModuleScope VSTeam {
+ [VSTeamVersions]::Account = 'https://dev.azure.com/test'
+
+ Describe 'workitems' {
+ # Mock the call to Get-Projects by the dynamic parameter for ProjectName
+ Mock Invoke-RestMethod { return @() } -ParameterFilter {
+ $Uri -like "*_apis/projects*"
+ }
+
+ . "$PSScriptRoot\mocks\mockProjectNameDynamicParamNoPSet.ps1"
+
+ $obj = @{
+ id = 47
+ rev = 1
+ url = "https://dev.azure.com/test/_apis/wit/workItems/47"
+ }
+
+ $objDeleted = @{
+ id = 47
+ name = "Test Work Item 47"
+ deletedBy = "Theobald Test "
+ deletedDate = "10/19/2019 9:08:48 PM"
+ code = 200
+ resource = $obj
+ }
+
+ $collectionDeleted = @(
+ $objDeleted
+ )
+
+ Context 'Remove-WorkItem' {
+
+ It 'Should delete single work item' {
+ Mock Invoke-RestMethod {
+ # If this test fails uncomment the line below to see how the mock was called.
+ #Write-Host $args
+
+ return $collectionDeleted
+ }
+
+ Remove-VSTeamWorkItem -Id 47 -Force
+
+ Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
+ $Uri -like "*https://dev.azure.com/test/_apis/wit/workitems/*" -and
+ $Uri -like "*api-version=$([VSTeamVersions]::Core)*" -and
+ $Uri -like "*workitems/47*"
+ }
+ }
+
+ It 'Should throw single work item with id equals $null' {
+ { Remove-VSTeamWorkItem -Id $null } | Should -Throw
+ }
+
+ It 'Should delete multipe work items' {
+ Mock Invoke-RestMethod {
+ # If this test fails uncomment the line below to see how the mock was called.
+ #Write-Host $args
+
+ return $collectionDeleted
+ }
+
+ Remove-VSTeamWorkItem -Id 47, 48 -Force
+
+ Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 2 -ParameterFilter {
+ $Uri -like "*https://dev.azure.com/test/_apis/wit/workitems/*" -and
+ $Uri -like "*api-version=$([VSTeamVersions]::Core)*" -and
+ ($Uri -like "*workitems/47*" -or $Uri -like "*workitems/48*")
+ }
+ }
+
+ It 'Single Work Item Should be deleted permanently' {
+ Mock Invoke-RestMethod {
+ # If this test fails uncomment the line below to see how the mock was called.
+ #Write-Host $args
+
+ return $collectionDeleted
+ }
+
+ Remove-VSTeamWorkItem -Id 47, 48 -Destroy -Force
+
+ Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 2 -ParameterFilter {
+ $Uri -like "*https://dev.azure.com/test/_apis/wit/workitems/*" -and
+ $Uri -like "*api-version=$([VSTeamVersions]::Core)*" -and
+ ($Uri -like "*workitems/47*" -or $Uri -like "*workitems/48*") -and
+ $Uri -like "*destroy=True*"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/unit/test/readme.md b/unit/test/readme.md
index b922923c6..5512c66c3 100644
--- a/unit/test/readme.md
+++ b/unit/test/readme.md
@@ -1,3 +1,3 @@
-Helpfull links
+Helpful links
[testing script modules with pester](https://blogs.technet.microsoft.com/heyscriptingguy/2015/12/17/testing-script-modules-with-pester/)
diff --git a/unit/test/sampleFiles/taskGroup.json b/unit/test/sampleFiles/taskGroup.json
new file mode 100644
index 000000000..77a24f464
--- /dev/null
+++ b/unit/test/sampleFiles/taskGroup.json
@@ -0,0 +1,191 @@
+{
+ "count": 1,
+ "value": [
+ {
+ "tasks": [
+ {
+ "environment": {},
+ "displayName": "If Versioning File Doesn't Exist",
+ "alwaysRun": false,
+ "continueOnError": false,
+ "condition": "succeeded()",
+ "enabled": true,
+ "timeoutInMinutes": 0,
+ "inputs": {
+ "targetType": "inline",
+ "arguments": "$(AssemblyVersionInfoFullPath)",
+ "script": "# Write your powershell commands here.\n\nWrite-Host \"Hello World\"\n\n# Use the environment variables input below to pass secret variables to this script.",
+ "errorActionPreference": "stop",
+ "failOnStderr": "false",
+ "ignoreLASTEXITCODE": "false",
+ "pwsh": "false",
+ "workingDirectory": ""
+ },
+ "task": {
+ "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f0",
+ "versionSpec": "2.*",
+ "definitionType": "task"
+ }
+ },
+ {
+ "environment": {},
+ "displayName": "Read Assembly Info",
+ "alwaysRun": false,
+ "continueOnError": false,
+ "condition": "succeeded()",
+ "enabled": true,
+ "timeoutInMinutes": 0,
+ "inputs": {
+ "searchPattern": "$(AssemblyVersionInfoFullPath)",
+ "variablesPrefix": ""
+ },
+ "task": {
+ "id": "33fd47eb-f330-4462-9c7d-230feee2956d",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ }
+ },
+ {
+ "environment": {},
+ "displayName": "Update AssemblyInfo",
+ "alwaysRun": false,
+ "continueOnError": false,
+ "condition": "succeeded()",
+ "enabled": true,
+ "timeoutInMinutes": 0,
+ "inputs": {
+ "assemblyInfoFiles": "$(AssemblyVersionInfoFullPath)",
+ "ensureAttribute": "false",
+ "description": "",
+ "configuration": "$(BuildConfiguration)",
+ "company": "",
+ "product": "",
+ "copyright": "",
+ "trademark": "",
+ "culture": "",
+ "informationalVersion": "$(AssemblyInfo.AssemblyFileVersion.Major).$(AssemblyInfo.AssemblyFileVersion.Minor).$(Build.BuildId)-$(PrereleaseTag)",
+ "comVisible": "none",
+ "clsCompliant": "none",
+ "fileVersionMajor": "",
+ "fileVersionMinor": "",
+ "fileVersionBuild": "$(Build.BuildId)",
+ "fileVersionRevision": "",
+ "assemblyVersionMajor": "",
+ "assemblyVersionMinor": "",
+ "assemblyVersionBuild": "",
+ "assemblyVersionRevision": "",
+ "customAttributes": ""
+ },
+ "task": {
+ "id": "406f4a5c-0822-4881-87cd-008b5aa90bc5",
+ "versionSpec": "2.*",
+ "definitionType": "task"
+ }
+ }
+ ],
+ "runsOn": [
+ "Agent",
+ "DeploymentGroup"
+ ],
+ "revision": 5,
+ "createdBy": {
+ "displayName": "Louis",
+ "id": "243afec6-f2b3-4678-a73c-ea7f2b8de771",
+ "uniqueName": "LOCAL\\tuser"
+ },
+ "createdOn": "2019-02-26T00:45:50.293Z",
+ "modifiedBy": {
+ "displayName": "Louis",
+ "id": "243afec6-f2b3-4678-a73c-ea7f2b8de771",
+ "uniqueName": "LOCAL\\tuser"
+ },
+ "modifiedOn": "2019-03-18T23:48:48.313Z",
+ "comment": "changed script to inline`",
+ "id": "d30f8b85-6b13-41a9-bb77-2e1a9c611def",
+ "name": "For Unit Tests",
+ "version": {
+ "major": 1,
+ "minor": 0,
+ "patch": 0,
+ "isTest": false
+ },
+ "iconUrl": "https://cdn.vsassets.io/v/M140_20181008.4/_content/icon-meta-task.png",
+ "friendlyName": "For Unit Tests",
+ "description": "Unit test run on 3/6/2019 3:57 PM.",
+ "category": "Build",
+ "definitionType": "metaTask",
+ "author": "Louis",
+ "demands": [],
+ "groups": [],
+ "inputs": [
+ {
+ "aliases": [],
+ "options": {},
+ "properties": {},
+ "name": "BuildConfiguration",
+ "label": "BuildConfiguration",
+ "defaultValue": "$(BuildConfiguration)",
+ "required": true,
+ "type": "string",
+ "helpMarkDown": "Left blank, the value is not updated. Variables can be used, eg. `$(BuildConfiguration)`.",
+ "groupName": ""
+ },
+ {
+ "aliases": [],
+ "options": {},
+ "properties": {},
+ "name": "AssemblyInfo.AssemblyFileVersion.Major",
+ "label": "AssemblyInfo.AssemblyFileVersion.Major",
+ "defaultValue": "",
+ "required": true,
+ "type": "string",
+ "helpMarkDown": "",
+ "groupName": ""
+ },
+ {
+ "aliases": [],
+ "options": {},
+ "properties": {},
+ "name": "AssemblyInfo.AssemblyFileVersion.Minor",
+ "label": "AssemblyInfo.AssemblyFileVersion.Minor",
+ "defaultValue": "",
+ "required": true,
+ "type": "string",
+ "helpMarkDown": "",
+ "groupName": ""
+ },
+ {
+ "aliases": [],
+ "options": {},
+ "properties": {},
+ "name": "AssemblyVersionInfoFullPath",
+ "label": "AssemblyVersionInfoFullPath",
+ "defaultValue": "**\\AssemblyInfo.cs",
+ "required": true,
+ "type": "filePath",
+ "helpMarkDown": "Pattern to use for finding the AssemblyInfo file.",
+ "groupName": ""
+ },
+ {
+ "aliases": [],
+ "options": {},
+ "properties": {},
+ "name": "PrereleaseTag",
+ "label": "PrereleaseTag",
+ "defaultValue": "",
+ "required": true,
+ "type": "string",
+ "helpMarkDown": "",
+ "groupName": ""
+ }
+ ],
+ "satisfies": [],
+ "sourceDefinitions": [],
+ "dataSourceBindings": [],
+ "instanceNameFormat": "Task group: For Unit Tests $(BuildConfiguration)",
+ "preJobExecution": {},
+ "execution": {},
+ "postJobExecution": {}
+ }
+ ]
+}
\ No newline at end of file
diff --git a/unit/test/sampleFiles/taskGroups.json b/unit/test/sampleFiles/taskGroups.json
new file mode 100644
index 000000000..353c66bc0
--- /dev/null
+++ b/unit/test/sampleFiles/taskGroups.json
@@ -0,0 +1,377 @@
+{
+ "count": 2,
+ "value": [
+ {
+ "tasks": [
+ {
+ "environment": {},
+ "displayName": "If Versioning File Doesn't Exist",
+ "alwaysRun": false,
+ "continueOnError": false,
+ "condition": "succeeded()",
+ "enabled": true,
+ "timeoutInMinutes": 0,
+ "inputs": {
+ "targetType": "inline",
+ "arguments": "$(AssemblyVersionInfoFullPath)",
+ "script": "# Write your powershell commands here.\n\nWrite-Host \"Hello World\"\n\n# Use the environment variables input below to pass secret variables to this script.",
+ "errorActionPreference": "stop",
+ "failOnStderr": "false",
+ "ignoreLASTEXITCODE": "false",
+ "pwsh": "false",
+ "workingDirectory": ""
+ },
+ "task": {
+ "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f0",
+ "versionSpec": "2.*",
+ "definitionType": "task"
+ }
+ },
+ {
+ "environment": {},
+ "displayName": "Read Assembly Info",
+ "alwaysRun": false,
+ "continueOnError": false,
+ "condition": "succeeded()",
+ "enabled": true,
+ "timeoutInMinutes": 0,
+ "inputs": {
+ "searchPattern": "$(AssemblyVersionInfoFullPath)",
+ "variablesPrefix": ""
+ },
+ "task": {
+ "id": "33fd47eb-f330-4462-9c7d-230feee2956d",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ }
+ },
+ {
+ "environment": {},
+ "displayName": "Update AssemblyInfo",
+ "alwaysRun": false,
+ "continueOnError": false,
+ "condition": "succeeded()",
+ "enabled": true,
+ "timeoutInMinutes": 0,
+ "inputs": {
+ "assemblyInfoFiles": "$(AssemblyVersionInfoFullPath)",
+ "ensureAttribute": "false",
+ "description": "",
+ "configuration": "$(BuildConfiguration)",
+ "company": "",
+ "product": "",
+ "copyright": "",
+ "trademark": "",
+ "culture": "",
+ "informationalVersion": "$(AssemblyInfo.AssemblyFileVersion.Major).$(AssemblyInfo.AssemblyFileVersion.Minor).$(Build.BuildId)-$(PrereleaseTag)",
+ "comVisible": "none",
+ "clsCompliant": "none",
+ "fileVersionMajor": "",
+ "fileVersionMinor": "",
+ "fileVersionBuild": "$(Build.BuildId)",
+ "fileVersionRevision": "",
+ "assemblyVersionMajor": "",
+ "assemblyVersionMinor": "",
+ "assemblyVersionBuild": "",
+ "assemblyVersionRevision": "",
+ "customAttributes": ""
+ },
+ "task": {
+ "id": "406f4a5c-0822-4881-87cd-008b5aa90bc5",
+ "versionSpec": "2.*",
+ "definitionType": "task"
+ }
+ }
+ ],
+ "runsOn": [
+ "Agent",
+ "DeploymentGroup"
+ ],
+ "revision": 5,
+ "createdBy": {
+ "displayName": "Louis",
+ "id": "243afec6-f2b3-4678-a73c-ea7f2b8de771",
+ "uniqueName": "LOCAL\\tuser"
+ },
+ "createdOn": "2019-02-26T00:45:50.293Z",
+ "modifiedBy": {
+ "displayName": "Louis",
+ "id": "243afec6-f2b3-4678-a73c-ea7f2b8de771",
+ "uniqueName": "LOCAL\\tuser"
+ },
+ "modifiedOn": "2019-03-18T23:48:48.313Z",
+ "comment": "changed script to inline`",
+ "id": "d30f8b85-6b13-41a9-bb77-2e1a9c611def",
+ "name": "For Unit Tests",
+ "version": {
+ "major": 1,
+ "minor": 0,
+ "patch": 0,
+ "isTest": false
+ },
+ "iconUrl": "https://cdn.vsassets.io/v/M140_20181008.4/_content/icon-meta-task.png",
+ "friendlyName": "For Unit Tests",
+ "description": "Unit test run on 3/6/2019 3:57 PM.",
+ "category": "Build",
+ "definitionType": "metaTask",
+ "author": "Louis",
+ "demands": [],
+ "groups": [],
+ "inputs": [
+ {
+ "aliases": [],
+ "options": {},
+ "properties": {},
+ "name": "BuildConfiguration",
+ "label": "BuildConfiguration",
+ "defaultValue": "$(BuildConfiguration)",
+ "required": true,
+ "type": "string",
+ "helpMarkDown": "Left blank, the value is not updated. Variables can be used, eg. `$(BuildConfiguration)`.",
+ "groupName": ""
+ },
+ {
+ "aliases": [],
+ "options": {},
+ "properties": {},
+ "name": "AssemblyInfo.AssemblyFileVersion.Major",
+ "label": "AssemblyInfo.AssemblyFileVersion.Major",
+ "defaultValue": "",
+ "required": true,
+ "type": "string",
+ "helpMarkDown": "",
+ "groupName": ""
+ },
+ {
+ "aliases": [],
+ "options": {},
+ "properties": {},
+ "name": "AssemblyInfo.AssemblyFileVersion.Minor",
+ "label": "AssemblyInfo.AssemblyFileVersion.Minor",
+ "defaultValue": "",
+ "required": true,
+ "type": "string",
+ "helpMarkDown": "",
+ "groupName": ""
+ },
+ {
+ "aliases": [],
+ "options": {},
+ "properties": {},
+ "name": "AssemblyVersionInfoFullPath",
+ "label": "AssemblyVersionInfoFullPath",
+ "defaultValue": "**\\AssemblyInfo.cs",
+ "required": true,
+ "type": "filePath",
+ "helpMarkDown": "Pattern to use for finding the AssemblyInfo file.",
+ "groupName": ""
+ },
+ {
+ "aliases": [],
+ "options": {},
+ "properties": {},
+ "name": "PrereleaseTag",
+ "label": "PrereleaseTag",
+ "defaultValue": "",
+ "required": true,
+ "type": "string",
+ "helpMarkDown": "",
+ "groupName": ""
+ }
+ ],
+ "satisfies": [],
+ "sourceDefinitions": [],
+ "dataSourceBindings": [],
+ "instanceNameFormat": "Task group: For Unit Tests $(BuildConfiguration)",
+ "preJobExecution": {},
+ "execution": {},
+ "postJobExecution": {}
+ },
+ {
+ "tasks": [
+ {
+ "environment": {},
+ "displayName": "If Versioning File Doesn't Exist",
+ "alwaysRun": false,
+ "continueOnError": false,
+ "condition": "succeeded()",
+ "enabled": true,
+ "timeoutInMinutes": 0,
+ "inputs": {
+ "targetType": "inline",
+ "arguments": "$(AssemblyVersionInfoFullPath)",
+ "script": "# Write your powershell commands here.\n\nWrite-Host \"Hello World\"\n\n# Use the environment variables input below to pass secret variables to this script.",
+ "errorActionPreference": "stop",
+ "failOnStderr": "false",
+ "ignoreLASTEXITCODE": "false",
+ "pwsh": "false",
+ "workingDirectory": ""
+ },
+ "task": {
+ "id": "e213ff0f-5d5c-4791-802d-52ea3e7be1f0",
+ "versionSpec": "2.*",
+ "definitionType": "task"
+ }
+ },
+ {
+ "environment": {},
+ "displayName": "Read Assembly Info",
+ "alwaysRun": false,
+ "continueOnError": false,
+ "condition": "succeeded()",
+ "enabled": true,
+ "timeoutInMinutes": 0,
+ "inputs": {
+ "searchPattern": "$(AssemblyVersionInfoFullPath)",
+ "variablesPrefix": ""
+ },
+ "task": {
+ "id": "33fd47eb-f330-4462-9c7d-230feee2956d",
+ "versionSpec": "1.*",
+ "definitionType": "task"
+ }
+ },
+ {
+ "environment": {},
+ "displayName": "Update AssemblyInfo",
+ "alwaysRun": false,
+ "continueOnError": false,
+ "condition": "succeeded()",
+ "enabled": true,
+ "timeoutInMinutes": 0,
+ "inputs": {
+ "assemblyInfoFiles": "$(AssemblyVersionInfoFullPath)",
+ "ensureAttribute": "false",
+ "description": "",
+ "configuration": "$(BuildConfiguration)",
+ "company": "",
+ "product": "",
+ "copyright": "",
+ "trademark": "",
+ "culture": "",
+ "informationalVersion": "$(AssemblyInfo.AssemblyFileVersion.Major).$(AssemblyInfo.AssemblyFileVersion.Minor).$(Build.BuildId)-$(PrereleaseTag)",
+ "comVisible": "none",
+ "clsCompliant": "none",
+ "fileVersionMajor": "",
+ "fileVersionMinor": "",
+ "fileVersionBuild": "$(Build.BuildId)",
+ "fileVersionRevision": "",
+ "assemblyVersionMajor": "",
+ "assemblyVersionMinor": "",
+ "assemblyVersionBuild": "",
+ "assemblyVersionRevision": "",
+ "customAttributes": ""
+ },
+ "task": {
+ "id": "406f4a5c-0822-4881-87cd-008b5aa90bc5",
+ "versionSpec": "2.*",
+ "definitionType": "task"
+ }
+ }
+ ],
+ "runsOn": [
+ "Agent",
+ "DeploymentGroup"
+ ],
+ "revision": 5,
+ "createdBy": {
+ "displayName": "Louis",
+ "id": "243afec6-f2b3-4678-a73c-ea7f2b8de771",
+ "uniqueName": "LOCAL\\tuser"
+ },
+ "createdOn": "2019-02-26T00:45:50.293Z",
+ "modifiedBy": {
+ "displayName": "Louis",
+ "id": "243afec6-f2b3-4678-a73c-ea7f2b8de771",
+ "uniqueName": "LOCAL\\tuser"
+ },
+ "modifiedOn": "2019-03-18T23:48:48.313Z",
+ "comment": "changed script to inline`",
+ "id": "d30f8b85-6b13-41a9-bb77-2e1a8c611def",
+ "name": "For Unit Tests 2",
+ "version": {
+ "major": 1,
+ "minor": 0,
+ "patch": 0,
+ "isTest": false
+ },
+ "iconUrl": "https://cdn.vsassets.io/v/M140_20181008.4/_content/icon-meta-task.png",
+ "friendlyName": "For Unit Tests 2",
+ "description": "Unit test run on 3/6/2019 3:57 PM.",
+ "category": "Build",
+ "definitionType": "metaTask",
+ "author": "Louis",
+ "demands": [],
+ "groups": [],
+ "inputs": [
+ {
+ "aliases": [],
+ "options": {},
+ "properties": {},
+ "name": "BuildConfiguration",
+ "label": "BuildConfiguration",
+ "defaultValue": "$(BuildConfiguration)",
+ "required": true,
+ "type": "string",
+ "helpMarkDown": "Left blank, the value is not updated. Variables can be used, eg. `$(BuildConfiguration)`.",
+ "groupName": ""
+ },
+ {
+ "aliases": [],
+ "options": {},
+ "properties": {},
+ "name": "AssemblyInfo.AssemblyFileVersion.Major",
+ "label": "AssemblyInfo.AssemblyFileVersion.Major",
+ "defaultValue": "",
+ "required": true,
+ "type": "string",
+ "helpMarkDown": "",
+ "groupName": ""
+ },
+ {
+ "aliases": [],
+ "options": {},
+ "properties": {},
+ "name": "AssemblyInfo.AssemblyFileVersion.Minor",
+ "label": "AssemblyInfo.AssemblyFileVersion.Minor",
+ "defaultValue": "",
+ "required": true,
+ "type": "string",
+ "helpMarkDown": "",
+ "groupName": ""
+ },
+ {
+ "aliases": [],
+ "options": {},
+ "properties": {},
+ "name": "AssemblyVersionInfoFullPath",
+ "label": "AssemblyVersionInfoFullPath",
+ "defaultValue": "**\\AssemblyInfo.cs",
+ "required": true,
+ "type": "filePath",
+ "helpMarkDown": "Pattern to use for finding the AssemblyInfo file.",
+ "groupName": ""
+ },
+ {
+ "aliases": [],
+ "options": {},
+ "properties": {},
+ "name": "PrereleaseTag",
+ "label": "PrereleaseTag",
+ "defaultValue": "",
+ "required": true,
+ "type": "string",
+ "helpMarkDown": "",
+ "groupName": ""
+ }
+ ],
+ "satisfies": [],
+ "sourceDefinitions": [],
+ "dataSourceBindings": [],
+ "instanceNameFormat": "Task group: For Unit Tests $(BuildConfiguration)",
+ "preJobExecution": {},
+ "execution": {},
+ "postJobExecution": {}
+ }
+ ]
+}
\ No newline at end of file
diff --git a/unit/test/taskGroups.Tests.ps1 b/unit/test/taskGroups.Tests.ps1
new file mode 100644
index 000000000..bb2f2be77
--- /dev/null
+++ b/unit/test/taskGroups.Tests.ps1
@@ -0,0 +1,144 @@
+Set-StrictMode -Version Latest
+
+InModuleScope VSTeam {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ [VSTeamVersions]::Account = 'https://dev.azure.com/test'
+
+ $taskGroupsJson = "$PSScriptRoot\sampleFiles\taskGroups.json"
+ $taskGroupJson = "$PSScriptRoot\sampleFiles\taskGroup.json"
+
+ Describe 'Task Groups VSTS' {
+ # Mock the call to Get-Projects by the dynamic parameter for ProjectName
+ Mock Invoke-RestMethod { return @() } -ParameterFilter {
+ $Uri -like "*_apis/project*"
+ }
+
+ . "$PSScriptRoot\mocks\mockProjectNameDynamicParamNoPSet.ps1"
+
+ BeforeAll {
+ Set-VSTeamAPIVersion -Target VSTS
+ $projectName = "project"
+ $taskGroupJsonAsString = Get-Content $taskGroupJson -Raw
+ }
+
+ Context 'Get-VSTeamTaskGroup list' {
+ Mock Invoke-RestMethod {
+ return Get-Content $taskGroupsJson | ConvertFrom-Json
+ }
+
+ It 'Should return all task groups' {
+ Get-VSTeamTaskGroup -projectName $projectName
+
+ Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
+ $Uri -eq "https://dev.azure.com/test/$projectName/_apis/distributedtask/taskgroups/?api-version=$([VSTeamVersions]::TaskGroups)"
+ }
+ }
+ }
+
+ Context 'Get-VSTeamTaskGroup Id' {
+ Mock Invoke-RestMethod {
+ return Get-Content $taskGroupJson | ConvertFrom-Json
+ }
+
+ It 'Should return one task group' {
+ $projectID = "d30f8b85-6b13-41a9-bb77-2e1a9c611def"
+ Get-VSTeamTaskGroup -projectName $projectName -id $projectID
+
+ Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
+ $Uri -eq "https://dev.azure.com/test/$projectName/_apis/distributedtask/taskgroups/$($projectID)?api-version=$([VSTeamVersions]::TaskGroups)"
+ }
+ }
+ }
+
+ Context 'Get-VSTeamTaskGroup Name' {
+ Mock Invoke-RestMethod {
+ # Return multiple task groups, because the function filters by name after getting the list from the server.
+ return Get-Content $taskGroupsJson | ConvertFrom-Json
+ }
+
+ It 'Should return one task group' {
+ $taskGroupName = "For Unit Tests 2"
+ $taskGroup = Get-VSTeamTaskGroup -projectName $projectName -Name $taskGroupName
+
+ Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
+ $Uri -eq "https://dev.azure.com/test/$projectName/_apis/distributedtask/taskgroups/?api-version=$([VSTeamVersions]::TaskGroups)"
+ }
+
+ # Ensure that we only have one task group, in other words, that the name filter was applied.
+ $taskGroup.name | Should Be $taskGroupName
+ }
+ }
+
+ Context 'Remove-VSTeamTaskGroup' {
+ Mock Invoke-RestMethod
+
+ It 'should delete Task group' {
+ $projectID = "d30f8b85-6b13-41a9-bb77-2e1a9c611def"
+
+ Remove-VSTeamTaskGroup -projectName $projectName -Id $projectID -Force
+
+ Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
+ $Uri -eq "https://dev.azure.com/test/$projectName/_apis/distributedtask/taskgroups/$($projectID)?api-version=$([VSTeamVersions]::TaskGroups)" -and
+ $Method -eq 'Delete'
+ }
+ }
+ }
+
+ Context 'Add-VSTeamTaskGroup' {
+ Mock Invoke-RestMethod {
+ return Get-Content $taskGroupJson | ConvertFrom-Json
+ }
+
+ It 'should create a task group using body param' {
+ Add-VSTeamTaskGroup -ProjectName $projectName -Body $taskGroupJsonAsString
+
+ Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
+ $Uri -eq "https://dev.azure.com/test/$projectName/_apis/distributedtask/taskgroups/?api-version=$([VSTeamVersions]::TaskGroups)" -and
+ $Body -eq $taskGroupJsonAsString -and
+ $Method -eq "Post"
+ }
+ }
+
+ It 'should create a task group using infile param' {
+ Add-VSTeamTaskGroup -ProjectName $projectName -InFile $taskGroupJson
+
+ Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
+ $Uri -eq "https://dev.azure.com/test/$projectName/_apis/distributedtask/taskgroups/?api-version=$([VSTeamVersions]::TaskGroups)" -and
+ $InFile -eq $taskGroupJson -and
+ $Method -eq "Post"
+ }
+ }
+ }
+
+ Context 'Update-VSTeamTaskGroup' {
+ Mock Invoke-RestMethod {
+ return Get-Content $taskGroupJson | ConvertFrom-Json
+ }
+
+ It 'should update a task group using body param' {
+ $taskGroupToUpdate = Get-VSTeamTaskGroup -Name "For Unit Tests" -ProjectName $projectName
+
+ Update-VSTeamTaskGroup -ProjectName $projectName -Body $taskGroupJsonAsString -Id $taskGroupToUpdate.id
+
+ Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
+ $Uri -eq "https://dev.azure.com/test/$projectName/_apis/distributedtask/taskgroups/$($taskGroupToUpdate.id)?api-version=$([VSTeamVersions]::TaskGroups)" -and
+ $Body -eq $taskGroupJsonAsString -and
+ $Method -eq "Put"
+ }
+ }
+
+ It 'should update a task group using infile param' {
+ $taskGroupToUpdate = Get-VSTeamTaskGroup -Name "For Unit Tests" -ProjectName $projectName
+
+ Update-VSTeamTaskGroup -ProjectName $projectName -InFile $taskGroupJson -Id $taskGroupToUpdate.id
+
+ Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
+ $Uri -eq "https://dev.azure.com/test/$projectName/_apis/distributedtask/taskgroups/$($taskGroupToUpdate.id)?api-version=$([VSTeamVersions]::TaskGroups)" -and
+ $InFile -eq $taskGroupJson -and
+ $Method -eq "Put"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/unit/test/team.Tests.ps1 b/unit/test/team.Tests.ps1
index 8362086a4..ffb739e15 100644
--- a/unit/test/team.Tests.ps1
+++ b/unit/test/team.Tests.ps1
@@ -54,7 +54,7 @@ InModuleScope VSTeam {
Context 'Get-VSTeamResourceArea' {
Mock _callAPI { return @{
- value = @{}
+ value = @{ }
}
}
@@ -252,54 +252,59 @@ InModuleScope VSTeam {
[VSTeamVersions]::Version | Should Be 'AzD'
}
- It 'Should change just Build'{
- Set-VSTeamAPIVersion -Service Build -Version '5.0'
- [VSTeamVersions]::Build | Should Be '5.0'
+ It 'Should change just TaskGroups' {
+ Set-VSTeamAPIVersion -Service TaskGroups -Version '7.0'
+ [VSTeamVersions]::TaskGroups | Should Be '7.0'
}
- It 'Should change just Git'{
- Set-VSTeamAPIVersion -Service Git -Version '5.0'
- [VSTeamVersions]::Git | Should Be '5.0'
+ It 'Should change just Build' {
+ Set-VSTeamAPIVersion -Service Build -Version '7.0'
+ [VSTeamVersions]::Build | Should Be '7.0'
}
- It 'Should change just Core'{
- Set-VSTeamAPIVersion -Service Core -Version '5.0'
- [VSTeamVersions]::Core | Should Be '5.0'
+ It 'Should change just Git' {
+ Set-VSTeamAPIVersion -Service Git -Version '7.0'
+ [VSTeamVersions]::Git | Should Be '7.0'
}
- It 'Should change just Release'{
- Set-VSTeamAPIVersion -Service Release -Version '5.0'
- [VSTeamVersions]::Release | Should Be '5.0'
+ It 'Should change just Core' {
+ Set-VSTeamAPIVersion -Service Core -Version '7.0'
+ [VSTeamVersions]::Core | Should Be '7.0'
}
- It 'Should change just DistributedTask'{
- Set-VSTeamAPIVersion -Service DistributedTask -Version '5.0'
- [VSTeamVersions]::DistributedTask | Should Be '5.0'
+ It 'Should change just Release' {
+ Set-VSTeamAPIVersion -Service Release -Version '7.0'
+ [VSTeamVersions]::Release | Should Be '7.0'
}
- It 'Should change just Tfvc'{
- Set-VSTeamAPIVersion -Service Tfvc -Version '5.0'
- [VSTeamVersions]::Tfvc | Should Be '5.0'
+ It 'Should change just DistributedTask' {
+ Set-VSTeamAPIVersion -Service DistributedTask -Version '7.0'
+ [VSTeamVersions]::DistributedTask | Should Be '7.0'
}
- It 'Should change just Packaging'{
- Set-VSTeamAPIVersion -Service Packaging -Version '5.0'
- [VSTeamVersions]::Packaging | Should Be '5.0'
+ It 'Should change just Tfvc' {
+ Set-VSTeamAPIVersion -Service Tfvc -Version '7.0'
+ [VSTeamVersions]::Tfvc | Should Be '7.0'
}
- It 'Should change just MemberEntitlementManagement'{
- Set-VSTeamAPIVersion -Service MemberEntitlementManagement -Version '5.0'
- [VSTeamVersions]::MemberEntitlementManagement | Should Be '5.0'
+ It 'Should change just Packaging' {
+ Set-VSTeamAPIVersion -Service Packaging -Version '7.0'
+ [VSTeamVersions]::Packaging | Should Be '7.0'
}
- It 'Should change just ServiceFabricEndpoint'{
- Set-VSTeamAPIVersion -Service ServiceFabricEndpoint -Version '5.0'
- [VSTeamVersions]::ServiceFabricEndpoint | Should Be '5.0'
+ It 'Should change just MemberEntitlementManagement' {
+ Set-VSTeamAPIVersion -Service MemberEntitlementManagement -Version '7.0'
+ [VSTeamVersions]::MemberEntitlementManagement | Should Be '7.0'
}
- It 'Should change just ExtensionsManagement'{
- Set-VSTeamAPIVersion -Service ExtensionsManagement -Version '5.0'
- [VSTeamVersions]::ExtensionsManagement | Should Be '5.0'
+ It 'Should change just ServiceFabricEndpoint' {
+ Set-VSTeamAPIVersion -Service ServiceFabricEndpoint -Version '7.0'
+ [VSTeamVersions]::ServiceFabricEndpoint | Should Be '7.0'
+ }
+
+ It 'Should change just ExtensionsManagement' {
+ Set-VSTeamAPIVersion -Service ExtensionsManagement -Version '7.0'
+ [VSTeamVersions]::ExtensionsManagement | Should Be '7.0'
}
}
}
diff --git a/unit/test/variableGroups.Tests.ps1 b/unit/test/variableGroups.Tests.ps1
index 1cbca738f..317d0205e 100644
--- a/unit/test/variableGroups.Tests.ps1
+++ b/unit/test/variableGroups.Tests.ps1
@@ -56,7 +56,7 @@ InModuleScope VSTeam {
Mock Invoke-RestMethod {
$collection = Get-Content $sampleFile2017 | ConvertFrom-Json
- return $collection.value | Where-Object {$_.name -eq "TestVariableGroup1"}
+ return $collection | Where-Object {$_.value.name -eq "TestVariableGroup1"}
}
It 'Should return one variable group' {
@@ -237,6 +237,16 @@ InModuleScope VSTeam {
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter { $Method -eq 'Post' }
}
+
+ It "should create a new var group when passing the json as the body" {
+ $body = Get-Content $sampleFileVSTS -Raw
+ $projName = "project"
+ Add-VSTeamVariableGroup -Body $body -ProjectName $projName
+
+ Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
+ $Uri -eq "https://dev.azure.com/test/$projName/_apis/distributedtask/variablegroups/?api-version=$([VSTeamVersions]::VariableGroups)" -and
+ $Method -eq 'Post' }
+ }
}
Context 'Update-VSTeamVariableGroup' {
@@ -272,6 +282,18 @@ InModuleScope VSTeam {
$Method -eq 'Put'
}
}
+
+ It "should update an existing var group when passing the json as the body" {
+ $body = Get-Content $sampleFileVSTS -Raw
+ $projName = "project"
+ $id = "1"
+ Update-VSTeamVariableGroup -Body $body -ProjectName $projName -Id $id
+
+ Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
+ $Uri -eq "https://dev.azure.com/test/$projName/_apis/distributedtask/variablegroups/$($id)?api-version=$([VSTeamVersions]::VariableGroups)" -and
+ $Method -eq 'Put'
+ }
+ }
}
}
}
diff --git a/unit/test/wiql.Tests.ps1 b/unit/test/wiql.Tests.ps1
index 53f8be35f..bc9543019 100644
--- a/unit/test/wiql.Tests.ps1
+++ b/unit/test/wiql.Tests.ps1
@@ -33,12 +33,12 @@ InModuleScope VSTeam {
asOf = "2019-10-03T18:35:09.117Z"
columns = @($column)
sortColumns = @($sortColumn)
- workItems = @($workItem, $workItem)
+ workItems = @($workItem, $workItem)
}
$expandedWorkItems = @{
count = 1
- value = @($workItem, $workItem)
+ value = @($workItem, $workItem)
}
Context 'Get-Wiql' {
diff --git a/unit/test/workitem.Tests.ps1 b/unit/test/workitem.Tests.ps1
index a344f23d4..42f3950bd 100644
--- a/unit/test/workitem.Tests.ps1
+++ b/unit/test/workitem.Tests.ps1
@@ -83,7 +83,7 @@ InModuleScope VSTeam {
It 'With Default Project should add work item only with additional properties and parent id' {
$Global:PSDefaultParameterValues["*:projectName"] = 'test'
- $additionalFields = @{"System.Tags"= "TestTag"; "System.AreaPath" = "Project\\MyPath"}
+ $additionalFields = @{"System.Tags" = "TestTag"; "System.AreaPath" = "Project\\MyPath" }
Add-VSTeamWorkItem -ProjectName test -WorkItemType Task -Title Test1 -Description Testing -ParentId 25 -AdditionalFields $additionalFields
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
@@ -106,7 +106,7 @@ InModuleScope VSTeam {
It 'With Default Project should add work item only with additional properties' {
$Global:PSDefaultParameterValues["*:projectName"] = 'test'
- $additionalFields = @{"System.Tags"= "TestTag"; "System.AreaPath" = "Project\\MyPath"}
+ $additionalFields = @{"System.Tags" = "TestTag"; "System.AreaPath" = "Project\\MyPath" }
Add-VSTeamWorkItem -ProjectName test -WorkItemType Task -Title Test1 -AdditionalFields $additionalFields
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
@@ -125,7 +125,7 @@ InModuleScope VSTeam {
It 'With Default Project should throw exception when adding existing parameters to additional properties and parent id' {
$Global:PSDefaultParameterValues["*:projectName"] = 'test'
- $additionalFields = @{"System.Title"= "Test1"; "System.AreaPath" = "Project\\TestPath"}
+ $additionalFields = @{"System.Title" = "Test1"; "System.AreaPath" = "Project\\TestPath" }
{ Add-VSTeamWorkItem -ProjectName test -WorkItemType Task -Title Test1 -Description Testing -ParentId 25 -AdditionalFields $additionalFields } | Should Throw
}
}
@@ -171,7 +171,7 @@ InModuleScope VSTeam {
It 'With Default Project should update work item with 2 parameters and additional properties' {
$Global:PSDefaultParameterValues["*:projectName"] = 'test'
- $additionalFields = @{"System.Tags"= "TestTag"; "System.AreaPath" = "Project\\MyPath"}
+ $additionalFields = @{"System.Tags" = "TestTag"; "System.AreaPath" = "Project\\MyPath" }
Update-VSTeamWorkItem 1 -Title Test1 -Description Testing -AdditionalFields $additionalFields
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
@@ -192,7 +192,7 @@ InModuleScope VSTeam {
It 'With Default Project should update work item only with 1 parameter and additional properties' {
$Global:PSDefaultParameterValues["*:projectName"] = 'test'
- $additionalFields = @{"System.Tags"= "TestTag"; "System.AreaPath" = "Project\\MyPath"}
+ $additionalFields = @{"System.Tags" = "TestTag"; "System.AreaPath" = "Project\\MyPath" }
Update-VSTeamWorkItem 1 -Title Test1 -AdditionalFields $additionalFields
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
@@ -211,7 +211,7 @@ InModuleScope VSTeam {
It 'With Default Project should update work item only with additional properties' {
$Global:PSDefaultParameterValues["*:projectName"] = 'test'
- $additionalFields = @{"System.Tags"= "TestTag"; "System.AreaPath" = "Project\\MyPath"}
+ $additionalFields = @{"System.Tags" = "TestTag"; "System.AreaPath" = "Project\\MyPath" }
Update-VSTeamWorkItem 1 -AdditionalFields $additionalFields
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
@@ -228,7 +228,7 @@ InModuleScope VSTeam {
It 'With Default Project should throw exception when adding existing parameters to additional properties' {
$Global:PSDefaultParameterValues["*:projectName"] = 'test'
- $additionalFields = @{"System.Title"= "Test1"; "System.AreaPath" = "Project\\TestPath"}
+ $additionalFields = @{"System.Title" = "Test1"; "System.AreaPath" = "Project\\TestPath" }
{ Update-VSTeamWorkItem -ProjectName test -WorkItemType Task -Title Test1 -Description Testing -AdditionalFields $additionalFields } | Should Throw
}
}
@@ -253,20 +253,21 @@ InModuleScope VSTeam {
return $collection
}
- Get-VSTeamWorkItem -Ids 47, 48
+ Get-VSTeamWorkItem -Id 47, 48
# With PowerShell core the order of the query string is not the
# same from run to run! So instead of testing the entire string
# matches I have to search for the portions I expect but can't
# assume the order.
# The general string should look like this:
- # https://dev.azure.com/test/test/_apis/wit/workitems/?api-version=$([VSTeamVersions]::Core)&ids=47,48&`$Expand=None&errorPolicy=Fail
+ # https://dev.azure.com/test/test/_apis/wit/workitems/?api-version=$([VSTeamVersions]::Core)&ids=47,48&`$Expand=None&errorPolicy=omit
+
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
$Uri -like "*https://dev.azure.com/test/_apis/wit/workitems/*" -and
$Uri -like "*api-version=$([VSTeamVersions]::Core)*" -and
$Uri -like "*ids=47,48*" -and
$Uri -like "*`$Expand=None*" -and
- $Uri -like "*errorPolicy=Fail*"
+ $Uri -like "*errorPolicy=omit*"
}
}