diff --git a/.docs/Remove-VSTeamAccessControlEntry.md b/.docs/Remove-VSTeamAccessControlEntry.md
new file mode 100644
index 000000000..299a02abb
--- /dev/null
+++ b/.docs/Remove-VSTeamAccessControlEntry.md
@@ -0,0 +1,202 @@
+
+
+
+# Remove-VSTeamAccessControlEntry
+
+## SYNOPSIS
+
+
+
+## SYNTAX
+
+## DESCRIPTION
+
+Removes specified ACEs in the ACL for the provided token. The request URI contains the namespace ID, the target token, and a single or list of descriptors that should be removed. Only supports removing AzD based users/groups.
+
+## EXAMPLES
+### -------------------------- EXAMPLE 1 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamAccessControlEntry -securityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -token "repov2/$projectid/$repoid" -descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0xMzk4ODc2NjMwLTEwMTQ0ODQ4MTMtMzE5MDA4NTI4Ny0xNDU4NTkwODY1LTEtMzE1MjE3NTkwMy03NjE1NjY3OTMtMjgwMTUwMjI2Ny0zMjU5Mjg5MTIy")
+```
+
+This will remove the specified descriptor from the specified repository, using the security namespace id, while confirming for the remove action.
+
+### -------------------------- EXAMPLE 2 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamAccessControlEntry -securityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -token "repov2/$projectid/$repoid" -descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0xMzk4ODc2NjMwLTEwMTQ0ODQ4MTMtMzE5MDA4NTI4Ny0xNDU4NTkwODY1LTEtMzE1MjE3NTkwMy03NjE1NjY3OTMtMjgwMTUwMjI2Ny0zMjU5Mjg5MTIy") -confirm:$false
+```
+
+This will remove the specified descriptor from the specified repository, using the security namespace id, with no confirmation for the remove action.
+
+### -------------------------- EXAMPLE 3 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamAccessControlEntry -securityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -token "repov2/$projectid/$repoid" -descriptor @("descriptor1","descriptor2")
+```
+
+This will remove multiple descriptors from the specified repository, using the security namespace id, while confirming for the remove action.
+
+### -------------------------- EXAMPLE 4 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamAccessControlEntry -securityNamespace [VSTeamSecurityNamespace]$securityNamespace -token "repov2/$projectid/$repoid" -descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0xMzk4ODc2NjMwLTEwMTQ0ODQ4MTMtMzE5MDA4NTI4Ny0xNDU4NTkwODY1LTEtMzE1MjE3NTkwMy03NjE1NjY3OTMtMjgwMTUwMjI2Ny0zMjU5Mjg5MTIy")
+```
+
+This will remove the specified descriptor from the specified repository, using a security namespace object, while confirming for the remove action.
+
+### -------------------------- EXAMPLE 5 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamAccessControlEntry -securityNamespace [VSTeamSecurityNamespace]$securityNamespace -token "repov2/$projectid/$repoid" -descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0xMzk4ODc2NjMwLTEwMTQ0ODQ4MTMtMzE5MDA4NTI4Ny0xNDU4NTkwODY1LTEtMzE1MjE3NTkwMy03NjE1NjY3OTMtMjgwMTUwMjI2Ny0zMjU5Mjg5MTIy") -confirm:$false
+```
+
+This will remove the specified descriptor from the specified repository, using a security namespace object, with no confirmation for the remove action.
+
+### -------------------------- EXAMPLE 6 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamAccessControlEntry -securityNamespace [VSTeamSecurityNamespace]$securityNamespace -token "repov2/$projectid/$repoid" -descriptor @("descriptor1","descriptor2")
+```
+
+This will remove multiple descriptors from the specified repository, using a security namespace object, while confirming for the remove action.
+
+## PARAMETERS
+
+### -SecurityNamespace
+
+VSTeamSecurityNamespace object.
+
+```yaml
+Type: VSTeamSecurityNamespace
+Required: True
+```
+
+### -SecurityNamespaceId
+
+Security namespace identifier.
+
+Valid IDs are:
+
+AzD:
+- Analytics (58450c49-b02d-465a-ab12-59ae512d6531)
+- AnalyticsViews (d34d3680-dfe5-4cc6-a949-7d9c68f73cba)
+- ReleaseManagement (7c7d32f7-0e86-4cd6-892e-b35dbba870bd)
+- ReleaseManagement2 (c788c23e-1b46-4162-8f5e-d7585343b5de)
+- Identity (5a27515b-ccd7-42c9-84f1-54c998f03866)
+- WorkItemTrackingAdministration (445d2788-c5fb-4132-bbef-09c4045ad93f)
+- DistributedTask (101eae8c-1709-47f9-b228-0e476c35b3ba)
+- WorkItemQueryFolders (71356614-aad7-4757-8f2c-0fb3bff6f680)
+- GitRepositories (2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87)
+- VersionControlItems2 (3c15a8b7-af1a-45c2-aa97-2cb97078332e)
+- EventSubscriber (2bf24a2b-70ba-43d3-ad97-3d9e1f75622f)
+- WorkItemTrackingProvision (5a6cd233-6615-414d-9393-48dbb252bd23)
+- ServiceEndpoints (49b48001-ca20-4adc-8111-5b60c903a50c)
+- ServiceHooks (cb594ebe-87dd-4fc9-ac2c-6a10a4c92046)
+- Chat (bc295513-b1a2-4663-8d1a-7017fd760d18)
+- Collection (3e65f728-f8bc-4ecd-8764-7e378b19bfa7)
+- Proxy (cb4d56d2-e84b-457e-8845-81320a133fbb)
+- Plan (bed337f8-e5f3-4fb9-80da-81e17d06e7a8)
+- Process (2dab47f9-bd70-49ed-9bd5-8eb051e59c02)
+- AccountAdminSecurity (11238e09-49f2-40c7-94d0-8f0307204ce4)
+- Library (b7e84409-6553-448a-bbb2-af228e07cbeb)
+- Environment (83d4c2e6-e57d-4d6e-892b-b87222b7ad20)
+- Project (52d39943-cb85-4d7f-8fa8-c6baac873819)
+- EventSubscription (58b176e7-3411-457a-89d0-c6d0ccb3c52b)
+- CSS (83e28ad4-2d72-4ceb-97b0-c7726d5502c3)
+- TeamLabSecurity (9e4894c3-ff9a-4eac-8a85-ce11cafdc6f1)
+- ProjectAnalysisLanguageMetrics (fc5b7b85-5d6b-41eb-8534-e128cb10eb67)
+- Tagging (bb50f182-8e5e-40b8-bc21-e8752a1e7ae2)
+- MetaTask (f6a4de49-dbe2-4704-86dc-f8ec1a294436)
+- Iteration (bf7bfa03-b2b7-47db-8113-fa2e002cc5b1)
+- Favorites (fa557b48-b5bf-458a-bb2b-1b680426fe8b)
+- Registry (4ae0db5d-8437-4ee8-a18b-1f6fb38bd34c)
+- Graph (c2ee56c9-e8fa-4cdd-9d48-2c44f697a58e)
+- ViewActivityPaneSecurity (dc02bf3d-cd48-46c3-8a41-345094ecc94b)
+- Job (2a887f97-db68-4b7c-9ae3-5cebd7add999)
+- WorkItemTracking (73e71c45-d483-40d5-bdba-62fd076f7f87)
+- StrongBox (4a9e8381-289a-4dfd-8460-69028eaa93b3)
+- Server (1f4179b3-6bac-4d01-b421-71ea09171400)
+- TestManagement (e06e1c24-e93d-4e4a-908a-7d951187b483)
+- SettingEntries (6ec4592e-048c-434e-8e6c-8671753a8418)
+- BuildAdministration (302acaca-b667-436d-a946-87133492041c)
+- Location (2725d2bc-7520-4af4-b0e3-8d876494731f)
+- Boards (251e12d9-bea3-43a8-bfdb-901b98c0125e)
+- UtilizationPermissions (83abde3a-4593-424e-b45f-9898af99034d)
+- WorkItemsHub (c0e7a722-1cad-4ae6-b340-a8467501e7ce)
+- WebPlatform (0582eb05-c896-449a-b933-aa3d99e121d6)
+- VersionControlPrivileges (66312704-deb5-43f9-b51c-ab4ff5e351c3)
+- Workspaces (93bafc04-9075-403a-9367-b7164eac6b5c)
+- CrossProjectWidgetView (093cbb02-722b-4ad6-9f88-bc452043fa63)
+- WorkItemTrackingConfiguration (35e35e8e-686d-4b01-aff6-c369d6e36ce0)
+- Discussion Threads (0d140cae-8ac1-4f48-b6d1-c93ce0301a12)
+- BoardsExternalIntegration (5ab15bc8-4ea1-d0f3-8344-cab8fe976877)
+- DataProvider (7ffa7cf4-317c-4fea-8f1d-cfda50cfa956)
+- Social (81c27cc8-7a9f-48ee-b63f-df1e1d0412dd)
+- Security (9a82c708-bfbe-4f31-984c-e860c2196781)
+- IdentityPicker (a60e0d84-c2f8-48e4-9c0c-f32da48d5fd1)
+- ServicingOrchestration (84cc1aa4-15bc-423d-90d9-f97c450fc729)
+- Build (33344d9c-fc72-4d6f-aba5-fa317101a7e9)
+- DashboardsPrivileges (8adf73b7-389a-4276-b638-fe1653f7efc7)
+- VersionControlItems (a39371cf-0841-4c16-bbd3-276e341bc052)
+
+VSSPS:
+- EventSubscriber (2bf24a2b-70ba-43d3-ad97-3d9e1f75622f) (VSSPS)
+- EventSubscription (58b176e7-3411-457a-89d0-c6d0ccb3c52b) (VSSPS)
+- Registry (4ae0db5d-8437-4ee8-a18b-1f6fb38bd34c) (VSSPS)
+- Graph (c2ee56c9-e8fa-4cdd-9d48-2c44f697a58e) (VSSPS)
+- Invitation (ea0b4d1e-577a-4797-97b5-2f5755e548d5) (VSSPS)
+- SystemGraph (b24dfdf1-285a-4ea6-a55b-32549a68121d) (VSSPS)
+- Job (2a887f97-db68-4b7c-9ae3-5cebd7add999) (VSSPS)
+- CommerceCollectionSecurity (307be2d3-12ed-45c2-aacf-6598760efca7) (VSSPS)
+- StrongBox (4a9e8381-289a-4dfd-8460-69028eaa93b3) (VSSPS)
+- GroupLicensing (c6a4fd35-b508-49eb-8ea7-7189df5f3698) (VSSPS)
+- Server (1f4179b3-6bac-4d01-b421-71ea09171400) (VSSPS)
+- SettingEntries (6ec4592e-048c-434e-8e6c-8671753a8418) (VSSPS)
+- RemotableTemplateTest (ccdcb71c-4780-4a42-9bb4-8bce07a7628f) (VSSPS)
+- Location (2725d2bc-7520-4af4-b0e3-8d876494731f) (VSSPS)
+- WebPlatform (0582eb05-c896-449a-b933-aa3d99e121d6) (VSSPS)
+- DataProvider (7ffa7cf4-317c-4fea-8f1d-cfda50cfa956) (VSSPS)
+- Security (9a82c708-bfbe-4f31-984c-e860c2196781) (VSSPS)
+- IdentityPicker (a60e0d84-c2f8-48e4-9c0c-f32da48d5fd1) (VSSPS)
+- ServicingOrchestration (84cc1aa4-15bc-423d-90d9-f97c450fc729) (VSSPS)
+
+```yaml
+Type: String
+Required: True
+```
+
+### -Token
+
+The security Token
+
+Valid token formats are:
+
+- Git Repository (repov2/$projectID/$repositoryID)
+- Build Definition ($projectID/$buildDefinitionID)
+- Release Definition ($projectID/$releaseDefinitionID, $projectID/Path/to/Release/$releaseDefinitionID)
+
+```yaml
+Type: String
+Required: True
+```
+
+### -Descriptor
+
+An array of descriptors of users/groups to be removed
+
+```yaml
+Type: System.Array
+Required: True
+```
+
+## INPUTS
+
+## OUTPUTS
+
+## NOTES
+
+This function outputs a non-terminating error if the ACE removal from the ACL returns $False. This can be due to the wrong descriptor being provided, or the descriptor already not being on the ACL.
+
+## RELATED LINKS
diff --git a/.docs/Test-VSTeamYamlPipeline.md b/.docs/Test-VSTeamYamlPipeline.md
new file mode 100644
index 000000000..a818c082d
--- /dev/null
+++ b/.docs/Test-VSTeamYamlPipeline.md
@@ -0,0 +1,90 @@
+
+
+# Test-VSTeamYamlPipeline
+
+## SYNOPSIS
+
+
+
+## SYNTAX
+
+## DESCRIPTION
+
+
+
+## EXAMPLES
+
+### -------------------------- EXAMPLE 1 --------------------------
+
+```PowerShell
+PS C:\> Test-VSTeamYamlPipeline -Project DemoProject -PipelineId 24 -FilePath './azure-pipelines.yml'
+
+Name Id url state
+---- -- --- -----
+ -1 https://dev.azure.com/devsdb/3428bdd7-9fed-4c30-a6c9-fcb52f084ab9/_apis/pipelines/24/runs/-1 unknown
+```
+
+This example checks the YAML pipeline with ID 24 and the file './azure-pipelines.yml' for consistency on Azure DevOps to see if the changes still work.
+
+### -------------------------- EXAMPLE 2 --------------------------
+
+```PowerShell
+PS C:\> $yamlOverride = [string](Get-Content -raw $FilePath)
+PS C:\> Test-VSTeamYamlPipeline -Project DemoProject -PipelineId 24 -YamlOverride $yamlOverride
+```
+
+This example checks the YAML pipeline with ID 24 and the content of a yaml file in the variable $yamlOverride for consistency on Azure DevOps to see if the changes still work.
+
+### -------------------------- EXAMPLE 3 --------------------------
+
+```PowerShell
+PS C:\> $yamlOverride = [string](Get-Content -raw $FilePath)
+PS C:\> Test-VSTeamYamlPipeline -Project DemoProject -PipelineId 24
+```
+
+This example checks the YAML pipeline with ID 24 for consistency on Azure DevOps to see if the existing YAML of the pipeline works.
+
+## PARAMETERS
+
+
+
+### -PipelineId
+
+Id of the YAML pipeline to be checked
+
+```yaml
+Type: Int32
+Position: 1
+```
+
+### -FilePath
+
+Path to the file that should be checked
+
+```yaml
+Type: String
+```
+
+## INPUTS
+
+### System.String
+
+FilePath
+
+### System.Int32
+
+PipelineId
+
+## OUTPUTS
+
+### Team.YamlPipelineResult
+
+## NOTES
+
+If you do not set the default project by called Set-VSTeamDefaultProject before calling Add-VSTeamBuild you will have to type in the names.
+
+Currently the API that is used by this cmdlet is only supporting YAML pipelines without template references. This will be supported soon. see the issue in GitHub: [https://github.com/microsoft/azure-pipelines-yaml/issues/34#issuecomment-591092498](https://github.com/microsoft/azure-pipelines-yaml/issues/34#issuecomment-591092498)
+
+## RELATED LINKS
+
+[Get-VSTeamBuildDefinition](Get-VSTeamBuildDefinition.md)
diff --git a/.docs/Update-VSTeamAgent.md b/.docs/Update-VSTeamAgent.md
new file mode 100644
index 000000000..f5ea6029b
--- /dev/null
+++ b/.docs/Update-VSTeamAgent.md
@@ -0,0 +1,54 @@
+
+
+# Update-VSTeamAgent
+
+## SYNOPSIS
+
+
+
+## SYNTAX
+
+## DESCRIPTION
+
+
+
+## EXAMPLES
+
+## PARAMETERS
+
+### -PoolId
+
+Id of the pool.
+
+```yaml
+Type: int
+Required: True
+Accept pipeline input: true (ByValue)
+```
+
+### -Id
+
+Id of the agent to Update.
+
+```yaml
+Type: int[]
+Aliases: AgentID
+Required: True
+Accept pipeline input: true (ByPropertyName)
+```
+
+
+
+
+
+
+
+## INPUTS
+
+### System.String
+
+## OUTPUTS
+
+## NOTES
+
+## RELATED LINKS
diff --git a/.docs/synopsis/Remove-VSTeamAccessControlEntry.md b/.docs/synopsis/Remove-VSTeamAccessControlEntry.md
new file mode 100644
index 000000000..b84fbf651
--- /dev/null
+++ b/.docs/synopsis/Remove-VSTeamAccessControlEntry.md
@@ -0,0 +1 @@
+Removes specified ACEs in the ACL for the provided token. The request URI contains the namespace ID, the target token, and a single or list of descriptors that should be removed. Only supports removing AzD based users/groups.
\ No newline at end of file
diff --git a/.docs/synopsis/Test-VSTeamYamlPipeline.md b/.docs/synopsis/Test-VSTeamYamlPipeline.md
new file mode 100644
index 000000000..7821492aa
--- /dev/null
+++ b/.docs/synopsis/Test-VSTeamYamlPipeline.md
@@ -0,0 +1 @@
+Tests the commited YAML pipeline files to check for inconsitencies. Now, you can try out a YAML pipeline without committing it to a repo or running it. Given an existing pipeline and an optional new YAML payload, this function will give you back the full YAML pipeline.
\ No newline at end of file
diff --git a/.docs/synopsis/Update-VSTeamAgent.md b/.docs/synopsis/Update-VSTeamAgent.md
new file mode 100644
index 000000000..b67f32d97
--- /dev/null
+++ b/.docs/synopsis/Update-VSTeamAgent.md
@@ -0,0 +1 @@
+Instructs the agent to download and install the lastest version of the agent on self-hosted agents.
\ No newline at end of file
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 2161de629..96d10d10d 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -6,4 +6,4 @@
- [ ] [Write Help](https://github.com/DarqueWarrior/vsteam/blob/master/.github/CONTRIBUTING.md#write-help)
- [ ] [Write Unit Test](https://github.com/DarqueWarrior/vsteam/blob/master/.github/CONTRIBUTING.md#write-unit-test)
-- [ ] [Update CHANGELOG.md](https://github.com/DarqueWarrior/vsteam/blob/master/.github/CONTRIBUTING.md#add-a-format-file)
+- [ ] [Update CHANGELOG.md](https://github.com/DarqueWarrior/vsteam/blob/master/.github/CONTRIBUTING.md#update-changelogmd)
diff --git a/Build-Module.ps1 b/Build-Module.ps1
index 997399ec5..2eed4ab25 100644
--- a/Build-Module.ps1
+++ b/Build-Module.ps1
@@ -1,29 +1,43 @@
-[CmdletBinding()]
+[CmdletBinding(DefaultParameterSetName = "All")]
param(
#output path of the build module
+ [Parameter(ParameterSetName = "All")]
+ [Parameter(ParameterSetName = "UnitTest")]
[string]$outputDir = './dist',
# Building help is skipped by default to speed your inner loop.
# Use this flag to include building the help
+ [Parameter(ParameterSetName = "All")]
+ [Parameter(ParameterSetName = "UnitTest")]
[switch]$buildHelp,
# By default the build will not install dependencies
+ [Parameter(ParameterSetName = "All")]
+ [Parameter(ParameterSetName = "UnitTest")]
[switch]$installDep,
- # build module will be imported into session
+ # built module will be imported into session
+ [Parameter(ParameterSetName = "All")]
+ [Parameter(ParameterSetName = "UnitTest")]
[switch]$ipmo,
# run the scripts with the PS script analyzer
+ [Parameter(ParameterSetName = "All")]
+ [Parameter(ParameterSetName = "UnitTest")]
[switch]$analyzeScript,
# runs the unit tests
+ [Parameter(ParameterSetName = "UnitTest", Mandatory = $true)]
+ [Parameter(ParameterSetName = "All")]
[switch]$runTests,
# can be used to filter the unit test parts that should be run
# see also: https://github.com/pester/Pester/wiki/Invoke%E2%80%90Pester#testname-alias-name
+ [Parameter(ParameterSetName = "UnitTest")]
[string]$testName,
# outputs the code coverage
+ [Parameter(ParameterSetName = "UnitTest")]
[switch]$codeCoverage
)
@@ -60,7 +74,8 @@ if ($buildHelp.IsPresent) {
Set-Location ./.docs
Try {
./gen-help.ps1
- } Finally {
+ }
+ Finally {
Pop-Location
}
}
@@ -71,18 +86,18 @@ Copy-Item -Path ./Source/VSTeam.psm1 -Destination "$output/VSTeam.psm1" -Force
Write-Output 'Updating Functions To Export'
$newValue = ((Get-ChildItem -Path "./Source/Public" -Filter '*.ps1').BaseName |
- ForEach-Object -Process { Write-Output "'$_'" }) -join ','
+ ForEach-Object -Process { Write-Output "'$_'" }) -join ','
(Get-Content "./Source/VSTeam.psd1") -Replace ("FunctionsToExport.+", "FunctionsToExport = ($newValue)") | Set-Content "$output/VSTeam.psd1"
Write-Output "Publish complete to $output"
-#reload the just build module
+# reload the just built module
if ($ipmo.IsPresent -or $runTests.IsPresent) {
- #module needs to be unloaded if present
- if((Get-Module VSTeam)){
+ # module needs to be unloaded if present
+ if ((Get-Module VSTeam)) {
Remove-Module VSTeam
}
@@ -90,20 +105,6 @@ if ($ipmo.IsPresent -or $runTests.IsPresent) {
Set-VSTeamAlias
}
-
-#run PSScriptAnalyzer
-if ($analyzeScript.IsPresent) {
- Write-Output "Starting static code analysis..."
- if ($null -eq $(Get-Module -Name PSScriptAnalyzer)) {
- Install-Module -Name PSScriptAnalyzer -Repository PSGallery -Force -Scope CurrentUser
- }
-
- $r = Invoke-ScriptAnalyzer -Path $output -Recurse
- $r | ForEach-Object { Write-Host "##vso[task.logissue type=$($_.Severity);sourcepath=$($_.ScriptPath);linenumber=$($_.Line);columnnumber=$($_.Column);]$($_.Message)" }
- Write-Output "Static code analysis complete."
-}
-
-
# run the unit tests with Pester
if ($runTests.IsPresent) {
if ($null -eq $(Get-Module -Name Pester)) {
@@ -111,11 +112,11 @@ if ($runTests.IsPresent) {
}
$pesterArgs = @{
- Script = '.\unit'
- OutputFile = 'test-results.xml'
+ Script = '.\unit'
+ OutputFile = 'test-results.xml'
OutputFormat = 'NUnitXml'
- Show = 'Fails'
- Strict = $true
+ Show = 'Fails'
+ Strict = $true
}
if ($codeCoverage.IsPresent) {
@@ -127,7 +128,7 @@ if ($runTests.IsPresent) {
$pesterArgs.PassThru = $true
}
- if($testName){
+ if ($testName) {
$pesterArgs.TestName = $testName
@@ -136,5 +137,18 @@ if ($runTests.IsPresent) {
}
Invoke-Pester @pesterArgs
+}
+
+# Run this last so the results can be seen even if tests were also run
+# if not the results scroll off and my not be in the buffer.
+# run PSScriptAnalyzer
+if ($analyzeScript.IsPresent) {
+ Write-Output "Starting static code analysis..."
+ if ($null -eq $(Get-Module -Name PSScriptAnalyzer)) {
+ Install-Module -Name PSScriptAnalyzer -Repository PSGallery -Force -Scope CurrentUser
+ }
+ $r = Invoke-ScriptAnalyzer -Path $output -Recurse
+ $r | ForEach-Object { Write-Host "##vso[task.logissue type=$($_.Severity);sourcepath=$($_.ScriptPath);linenumber=$($_.Line);columnnumber=$($_.Column);]$($_.Message)" }
+ Write-Output "Static code analysis complete."
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9f8e95283..baad1ad61 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,17 @@
# Changelog
+## 6.4.5
+
+All unit test now pass consistently.
+
+Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/272) from [Sebastian Schütze](https://github.com/SebastianSchuetze) which included the following:
+
+- Add Test-VSTeamYamlPipeline to preview check changes for YAML pipelines. [See release sprint 165](https://docs.microsoft.com/azure/devops/release-notes/2020/sprint-165-update#azure-pipelines-1).
+
+Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/273) from [Lukas Wöhrl](https://github.com/woehrl01) which included the following:
+
+Adds a new function Update-VSTeamAgent which allows to update the agent version
+
## 6.4.4
Merged [Pull Request](https://github.com/DarqueWarrior/vsteam/pull/257) from [Michel Zehnder](https://github.com/MichelZ) which included the following:
diff --git a/README.md b/README.md
index 151284890..812bfa0be 100644
--- a/README.md
+++ b/README.md
@@ -114,6 +114,7 @@ Runs the tests, but executes only the unit tests that have the description "work
## Maintainers
- [Donovan Brown](https://github.com/darquewarrior) - [@DonovanBrown](https://twitter.com/DonovanBrown)
+- [Sebastian Schütze](https://github.com/SebastianSchuetze) - [@RazorSPoint](https://twitter.com/RazorSPoint)
## License
diff --git a/Source/Private/applyTypes.ps1 b/Source/Private/applyTypes.ps1
index 98da653a4..4c028f702 100644
--- a/Source/Private/applyTypes.ps1
+++ b/Source/Private/applyTypes.ps1
@@ -194,3 +194,9 @@ function _applyTypesToVariableGroup {
}
$item.variables.PSObject.TypeNames.Insert(0, 'Team.Variables')
}
+
+function _applyTypesToYamlPipelineResultType {
+ param($item)
+
+ $item.PSObject.TypeNames.Insert(0, 'Team.YamlPipelineResult')
+}
diff --git a/Source/Private/common.ps1 b/Source/Private/common.ps1
index 23a2cc230..05ac2f11e 100644
--- a/Source/Private/common.ps1
+++ b/Source/Private/common.ps1
@@ -56,8 +56,12 @@ function _testAdministrator {
(New-Object Security.Principal.WindowsPrincipal $user).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
}
+function _getInstance {
+ return [VSTeamVersions]::Account
+}
+
function _hasAccount {
- if (-not [VSTeamVersions]::Account) {
+ if (-not $(_getInstance)) {
throw 'You must call Set-VSTeamAccount before calling any other functions in this module.'
}
}
@@ -85,7 +89,7 @@ function _buildRequestURI {
$sb = New-Object System.Text.StringBuilder
- $sb.Append($(_addSubDomain -subDomain $subDomain)) | Out-Null
+ $sb.Append($(_addSubDomain -subDomain $subDomain -instance $(_getInstance))) | Out-Null
if ($ProjectName) {
$sb.Append("/$projectName") | Out-Null
@@ -199,14 +203,13 @@ function _isOnWindows {
function _addSubDomain {
param(
- $subDomain
+ [string] $subDomain,
+ [string] $instance
)
- $instance = [VSTeamVersions]::Account
-
# For VSTS Entitlements is under .vsaex
- if ($subDomain -and [VSTeamVersions]::Account.ToLower().Contains('dev.azure.com')) {
- $instance = [VSTeamVersions]::Account.ToLower().Replace('dev.azure.com', "$subDomain.dev.azure.com")
+ if ($subDomain -and $instance.ToLower().Contains('dev.azure.com')) {
+ $instance = $instance.ToLower().Replace('dev.azure.com', "$subDomain.dev.azure.com")
}
return $instance
@@ -248,7 +251,7 @@ function _getUserAgent {
}
function _useWindowsAuthenticationOnPremise {
- return (_isOnWindows) -and (!$env:TEAM_PAT) -and -not ([VSTeamVersions]::Account -like "*visualstudio.com") -and -not ([VSTeamVersions]::Account -like "https://dev.azure.com/*")
+ return (_isOnWindows) -and (!$env:TEAM_PAT) -and -not ($(_getInstance) -like "*visualstudio.com") -and -not ($(_getInstance) -like "https://dev.azure.com/*")
}
function _useBearerToken {
@@ -261,24 +264,14 @@ function _getWorkItemTypes {
[string] $ProjectName
)
- if (-not [VSTeamVersions]::Account) {
+ if (-not $(_getInstance)) {
Write-Output @()
return
}
- $area = "/wit"
- $resource = "/workitemtypes"
- $instance = [VSTeamVersions]::Account
- $version = [VSTeamVersions]::Core
-
- # Build the url to list the projects
- # You CANNOT use _buildRequestURI here or you will end up
- # in an infinite loop.
- $listurl = $instance + '/' + $ProjectName + '/_apis' + $area + $resource + '?api-version=' + $version
-
# Call the REST API
try {
- $resp = _callAPI -url $listurl
+ $resp = _callAPI -ProjectName $ProjectName -area 'wit' -resource 'workitemtypes' -version $([VSTeamVersions]::Core)
# This call returns JSON with "": which causes the ConvertFrom-Json to fail.
# To replace all the "": with "_end":
@@ -295,13 +288,13 @@ function _getWorkItemTypes {
}
function _getProjects {
- if (-not [VSTeamVersions]::Account) {
+ if (-not $(_getInstance)) {
Write-Output @()
return
}
$resource = "/projects"
- $instance = [VSTeamVersions]::Account
+ $instance = $(_getInstance)
$version = [VSTeamVersions]::Core
# Build the url to list the projects
@@ -406,23 +399,17 @@ function _buildProjectNameDynamicParam {
}
function _getProcesses {
- if (-not [VSTeamVersions]::Account) {
+ if (-not $(_getInstance)) {
Write-Output @()
return
}
- $resource = "/process/processes"
- $instance = [VSTeamVersions]::Account
- $version = [VSTeamVersions]::Core
-
- # Build the url to list the projects
- # You CANNOT use _buildRequestURI here or you will end up
- # in an infinite loop.
- $listurl = $instance + '/_apis' + $resource + '?api-version=' + $version + '&stateFilter=All&$top=9999'
-
# Call the REST API
try {
- $resp = _callAPI -url $listurl
+ $query = @{}
+ $query['stateFilter'] = 'All'
+ $query['$top'] = '9999'
+ $resp = _callAPI -area 'process' -resource 'processes' -Version $([VSTeamVersions]::Core) -QueryString $query
if ($resp.count -gt 0) {
Write-Output ($resp.value).name
@@ -527,7 +514,34 @@ function _buildDynamicParam {
)
# Create the collection of attributes
$AttributeCollection = New-Object System.Collections.ObjectModel.Collection[System.Attribute]
+<#
+.SYNOPSIS
+Short description
+
+.DESCRIPTION
+Long description
+
+.PARAMETER ParameterName
+Parameter description
+
+.PARAMETER ParameterSetName
+Parameter description
+
+.PARAMETER Mandatory
+Parameter description
+
+.PARAMETER AliasName
+Parameter description
+
+.PARAMETER Position
+Parameter description
+
+.EXAMPLE
+An example
+.NOTES
+General notes
+#>
# Create and set the parameters' attributes
$ParameterAttribute = New-Object System.Management.Automation.ParameterAttribute
$ParameterAttribute.Mandatory = $Mandatory
diff --git a/Source/Public/Get-VSTeamApproval.ps1 b/Source/Public/Get-VSTeamApproval.ps1
index 4a3e9280e..3815880e3 100644
--- a/Source/Public/Get-VSTeamApproval.ps1
+++ b/Source/Public/Get-VSTeamApproval.ps1
@@ -23,7 +23,7 @@ function Get-VSTeamApproval {
$queryString = @{statusFilter = $StatusFilter; assignedtoFilter = $AssignedToFilter; releaseIdsFilter = ($ReleaseIdsFilter -join ',')}
# The support in TFS and VSTS are not the same.
- $instance = $([VSTeamVersions]::Account)
+ $instance = $(_getInstance)
if (_isVSTS $instance) {
if ([string]::IsNullOrEmpty($AssignedToFilter) -eq $false) {
$queryString.includeMyGroupApprovals = 'true';
diff --git a/Source/Public/Set-VSTeamAPIVersion.ps1 b/Source/Public/Set-VSTeamAPIVersion.ps1
index 10a3bc199..e3bf5fb92 100644
--- a/Source/Public/Set-VSTeamAPIVersion.ps1
+++ b/Source/Public/Set-VSTeamAPIVersion.ps1
@@ -112,7 +112,7 @@ function Set-VSTeamAPIVersion {
[VSTeamVersions]::Version = $Target
[VSTeamVersions]::Git = '5.1-preview'
[VSTeamVersions]::Core = '5.0'
- [VSTeamVersions]::Build = '5.0-preview'
+ [VSTeamVersions]::Build = '5.1-preview'
[VSTeamVersions]::Release = '5.1-preview'
[VSTeamVersions]::DistributedTask = '5.0-preview'
[VSTeamVersions]::VariableGroups = '5.0-preview.1'
diff --git a/Source/Public/Show-VSTeam.ps1 b/Source/Public/Show-VSTeam.ps1
index a974792d1..fa190107d 100644
--- a/Source/Public/Show-VSTeam.ps1
+++ b/Source/Public/Show-VSTeam.ps1
@@ -5,6 +5,6 @@ function Show-VSTeam {
process {
_hasAccount
- Show-Browser "$([VSTeamVersions]::Account)"
+ Show-Browser "$(_getInstance)"
}
}
\ No newline at end of file
diff --git a/Source/Public/Show-VSTeamApproval.ps1 b/Source/Public/Show-VSTeamApproval.ps1
index 17d5511f8..a1c89ef84 100644
--- a/Source/Public/Show-VSTeamApproval.ps1
+++ b/Source/Public/Show-VSTeamApproval.ps1
@@ -16,6 +16,6 @@ function Show-VSTeamApproval {
# Bind the parameter to a friendly variable
$ProjectName = $PSBoundParameters["ProjectName"]
- Show-Browser "$([VSTeamVersions]::Account)/$ProjectName/_release?releaseId=$ReleaseDefinitionId"
+ Show-Browser "$(_getInstance)/$ProjectName/_release?releaseId=$ReleaseDefinitionId"
}
}
\ No newline at end of file
diff --git a/Source/Public/Show-VSTeamBuild.ps1 b/Source/Public/Show-VSTeamBuild.ps1
index a7b11931e..a46660253 100644
--- a/Source/Public/Show-VSTeamBuild.ps1
+++ b/Source/Public/Show-VSTeamBuild.ps1
@@ -14,6 +14,6 @@ function Show-VSTeamBuild {
# Bind the parameter to a friendly variable
$ProjectName = $PSBoundParameters["ProjectName"]
- Show-Browser "$([VSTeamVersions]::Account)/$ProjectName/_build/index?buildId=$Id"
+ Show-Browser "$(_getInstance)/$ProjectName/_build/index?buildId=$Id"
}
}
\ No newline at end of file
diff --git a/Source/Public/Show-VSTeamBuildDefinition.ps1 b/Source/Public/Show-VSTeamBuildDefinition.ps1
index a228bb251..a7ab4ea85 100644
--- a/Source/Public/Show-VSTeamBuildDefinition.ps1
+++ b/Source/Public/Show-VSTeamBuildDefinition.ps1
@@ -25,7 +25,7 @@ function Show-VSTeamBuildDefinition {
$ProjectName = $PSBoundParameters["ProjectName"]
# Build the url
- $url = "$([VSTeamVersions]::Account)/$ProjectName/_build"
+ $url = "$(_getInstance)/$ProjectName/_build"
if ($id) {
$url += "/index?definitionId=$id"
diff --git a/Source/Public/Show-VSTeamFeed.ps1 b/Source/Public/Show-VSTeamFeed.ps1
index 2b05deb50..6ccce191a 100644
--- a/Source/Public/Show-VSTeamFeed.ps1
+++ b/Source/Public/Show-VSTeamFeed.ps1
@@ -9,6 +9,6 @@ function Show-VSTeamFeed {
process {
_hasAccount
- Show-Browser "$([VSTeamVersions]::Account)/_packaging?feed=$Name&_a=feed"
+ Show-Browser "$(_getInstance)/_packaging?feed=$Name&_a=feed"
}
}
\ No newline at end of file
diff --git a/Source/Public/Show-VSTeamGitRepository.ps1 b/Source/Public/Show-VSTeamGitRepository.ps1
index 81e116483..f5c491a56 100644
--- a/Source/Public/Show-VSTeamGitRepository.ps1
+++ b/Source/Public/Show-VSTeamGitRepository.ps1
@@ -17,7 +17,7 @@ function Show-VSTeamGitRepository {
Show-Browser $RemoteUrl
}
else {
- Show-Browser "$([VSTeamVersions]::Account)/_git/$ProjectName"
+ Show-Browser "$(_getInstance)/_git/$ProjectName"
}
}
}
\ No newline at end of file
diff --git a/Source/Public/Show-VSTeamProject.ps1 b/Source/Public/Show-VSTeamProject.ps1
index 8a7ffa460..c8ed8714a 100644
--- a/Source/Public/Show-VSTeamProject.ps1
+++ b/Source/Public/Show-VSTeamProject.ps1
@@ -20,6 +20,6 @@ function Show-VSTeamProject {
$ProjectName = $id
}
- Show-Browser "$([VSTeamVersions]::Account)/$ProjectName"
+ Show-Browser "$(_getInstance)/$ProjectName"
}
}
\ No newline at end of file
diff --git a/Source/Public/Show-VSTeamPullRequest.ps1 b/Source/Public/Show-VSTeamPullRequest.ps1
index fc3aec144..4461f328e 100644
--- a/Source/Public/Show-VSTeamPullRequest.ps1
+++ b/Source/Public/Show-VSTeamPullRequest.ps1
@@ -13,7 +13,7 @@ function Show-VSTeamPullRequest {
$projectName = [uri]::EscapeDataString($pullRequest.repository.project.name)
$repositoryId = $pullRequest.repositoryName
- Show-Browser "$([VSTeamVersions]::Account)/$projectName/_git/$repositoryId/pullrequest/$Id"
+ Show-Browser "$(_getInstance)/$projectName/_git/$repositoryId/pullrequest/$Id"
}
catch {
_handleException $_
diff --git a/Source/Public/Show-VSTeamRelease.ps1 b/Source/Public/Show-VSTeamRelease.ps1
index 281a9c5fa..187929c16 100644
--- a/Source/Public/Show-VSTeamRelease.ps1
+++ b/Source/Public/Show-VSTeamRelease.ps1
@@ -21,6 +21,6 @@ function Show-VSTeamRelease {
$ProjectName = $PSBoundParameters["ProjectName"]
# Build the url
- Show-Browser "$([VSTeamVersions]::Account)/$ProjectName/_release?releaseId=$id"
+ Show-Browser "$(_getInstance)/$ProjectName/_release?releaseId=$id"
}
}
\ No newline at end of file
diff --git a/Source/Public/Show-VSTeamReleaseDefinition.ps1 b/Source/Public/Show-VSTeamReleaseDefinition.ps1
index fec237057..aff4dde7e 100644
--- a/Source/Public/Show-VSTeamReleaseDefinition.ps1
+++ b/Source/Public/Show-VSTeamReleaseDefinition.ps1
@@ -17,7 +17,7 @@ function Show-VSTeamReleaseDefinition {
$ProjectName = $PSBoundParameters["ProjectName"]
# Build the url
- $url = "$([VSTeamVersions]::Account)/$ProjectName/_release"
+ $url = "$(_getInstance)/$ProjectName/_release"
if ($id) {
$url += "?definitionId=$id"
diff --git a/Source/Public/Show-VSTeamWorkItem.ps1 b/Source/Public/Show-VSTeamWorkItem.ps1
index 37bcee156..d1d07e413 100644
--- a/Source/Public/Show-VSTeamWorkItem.ps1
+++ b/Source/Public/Show-VSTeamWorkItem.ps1
@@ -14,6 +14,6 @@ function Show-VSTeamWorkItem {
# Bind the parameter to a friendly variable
$ProjectName = $PSBoundParameters["ProjectName"]
- Show-Browser "$([VSTeamVersions]::Account)/$ProjectName/_workitems/edit/$Id"
+ Show-Browser "$(_getInstance)/$ProjectName/_workitems/edit/$Id"
}
}
\ No newline at end of file
diff --git a/Source/Public/Test-VSTeamYamlPipeline.ps1 b/Source/Public/Test-VSTeamYamlPipeline.ps1
new file mode 100644
index 000000000..eaf6bc585
--- /dev/null
+++ b/Source/Public/Test-VSTeamYamlPipeline.ps1
@@ -0,0 +1,51 @@
+function Test-VSTeamYamlPipeline {
+ [CmdletBinding(DefaultParameterSetName = 'WithFilePath')]
+ param(
+ [Parameter(ParameterSetName = 'WithFilePath', Mandatory = $true, ValueFromPipelineByPropertyName = $true, Position = 1)]
+ [Parameter(ParameterSetName = 'WithYamlOverride', Mandatory = $true, ValueFromPipelineByPropertyName = $true, Position = 1)]
+ [Int32] $PipelineId,
+ [Parameter(ParameterSetName = 'WithFilePath', Mandatory = $false)]
+ [string] $FilePath,
+ [Parameter(ParameterSetName = 'WithYamlOverride', Mandatory = $false)]
+ [string] $YamlOverride
+ )
+ DynamicParam {
+ _buildProjectNameDynamicParam
+ }
+
+ process {
+ # Bind the parameter to a friendly variable
+ $ProjectName = $PSBoundParameters["ProjectName"]
+
+ $body = @{
+ PreviewRun = $true
+ }
+
+ if ($FilePath) {
+ $body.YamlOverride = [string](Get-Content -raw $FilePath)
+ }
+ elseif ($YamlOverride) {
+ $body.YamlOverride = $YamlOverride
+ }
+
+ try {
+ # Call the REST API
+ $resp = _callAPI -ProjectName $ProjectName -Area 'pipelines' -Resource "$PipelineId" -id "runs" `
+ -Method Post -ContentType 'application/json; charset=utf-8' -Body ($body | ConvertTo-Json) `
+ -Version $([VSTeamVersions]::Build)
+ }
+ catch {
+ if ($PSItem -match 'PipelineValidationException') {
+ Write-Error (($PSItem | ConvertFrom-Json).message -replace '/azure-pipelines.yml( ?: ?)? ?', '')
+ return
+ }
+ else {
+ throw
+ }
+ }
+
+ _applyTypesToYamlPipelineResultType -item $resp
+
+ return $resp
+ }
+}
diff --git a/Source/Public/Update-VSTeamAgent.ps1 b/Source/Public/Update-VSTeamAgent.ps1
new file mode 100644
index 000000000..f6b6ecb58
--- /dev/null
+++ b/Source/Public/Update-VSTeamAgent.ps1
@@ -0,0 +1,27 @@
+function Update-VSTeamAgent {
+ [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = "High")]
+ param(
+ [Parameter(Mandatory = $true, ValueFromPipeline = $true, Position = 0)]
+ [int] $PoolId,
+
+ [parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Position = 1)]
+ [Alias('AgentID')]
+ [int[]] $Id,
+
+ [switch] $Force
+ )
+
+ process {
+ foreach ($item in $Id) {
+ try {
+ if ($Force -or $pscmdlet.ShouldProcess($item, "Update-VSTeamAgent")) {
+ _callAPI -Method Post -Area "distributedtask/pools/$PoolId" -Resource messages -QueryString @{agentId = $item} -Version $([VSTeamVersions]::DistributedTask) -ContentType "application/json" | Out-Null
+ Write-Output "Update agent $item"
+ }
+ }
+ catch {
+ _handleException $_
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/en-US/VSTeam-Help.xml b/Source/en-US/VSTeam-Help.xml
index bdf592178..2d185e857 100644
--- a/Source/en-US/VSTeam-Help.xml
+++ b/Source/en-US/VSTeam-Help.xml
@@ -3572,21 +3572,19 @@ PS C:\> Add-NuGetEndpoint -EndpointName 'PowerShell Gallery' -NuGetUrl 'https
- Add-VSTeamRelease
+ Add-VSTeamPullRequestAdd
- VSTeamRelease
+ VSTeamPullRequest
- Queues a new release
+ Create a new Pull Request
- Add-VSTeamRelease will queue a new release.
- The environments will deploy according to how the release definition is configured in the Triggers tab.
- You must call Set-VSTeamAccount before calling this function.
+ Create a new Pull Request
- Add-VSTeamRelease
+ Add-VSTeamPullRequestProjectName
@@ -3601,22 +3599,22 @@ PS C:\> Add-NuGetEndpoint -EndpointName 'PowerShell Gallery' -NuGetUrl 'https
None
-
- DefinitionId
+
+ RepositoryId
- The id of the release definition to use.
+ Specifies the ID of the repository
- Int32
+ Guid
- Int32
+ GuidNone
- Description
+ SourceRefName
- The description to use on the release.
+ A source reference, like a branch or commit Needs to be in ref format like refs/heads/MyBranchString
@@ -3626,21 +3624,9 @@ PS C:\> Add-NuGetEndpoint -EndpointName 'PowerShell Gallery' -NuGetUrl 'https
None
- ArtifactAlias
-
- The alias of the artifact to use with this release.
-
- String
-
- String
-
-
- None
-
-
- Name
+ TargetRefName
- The name of this release.
+ A target reference, like a branch or commit Needs to be in ref format like refs/heads/MyBranchString
@@ -3650,49 +3636,9 @@ PS C:\> Add-NuGetEndpoint -EndpointName 'PowerShell Gallery' -NuGetUrl 'https
None
- BuildId
-
- The id of the build to use with this release.
-
- String
-
- String
-
-
- None
-
-
- SourceBranch
-
- The branch of the artifact
-
- String
-
- String
-
-
- None
-
-
- Force
-
- Forces the function without confirmation
-
-
- SwitchParameter
-
-
- False
-
-
-
- Add-VSTeamRelease
-
- ProjectName
+ Title
- 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.
+ The title of the pull requestString
@@ -3704,7 +3650,7 @@ PS C:\> Add-NuGetEndpoint -EndpointName 'PowerShell Gallery' -NuGetUrl 'https
Description
- The description to use on the release.
+ The description of the pull requestString
@@ -3714,57 +3660,42 @@ PS C:\> Add-NuGetEndpoint -EndpointName 'PowerShell Gallery' -NuGetUrl 'https
None
- Name
+ Draft
- The name of this release.
+ Mark the new pull request as a draft
- String
- String
+ SwitchParameter
- None
+ False
-
- DefinitionName
+
+ Confirm
- The name of the release definition to use.
+ Prompts you for confirmation before running the function.
- String
- String
+ SwitchParameter
- None
+ False
- SourceBranch
-
- The branch of the artifact
-
- String
-
- String
-
-
- None
-
-
- BuildNumber
+ Force
- The number of the build to use.
+ Forces the function without confirmation
- String
- String
+ SwitchParameter
- None
+ False
-
- Force
+
+ WhatIf
- Forces the function without confirmation
+ Shows what would happen if the function runs. The function is not run.SwitchParameter
@@ -3789,22 +3720,22 @@ PS C:\> Add-NuGetEndpoint -EndpointName 'PowerShell Gallery' -NuGetUrl 'https
None
-
- DefinitionId
+
+ RepositoryId
- The id of the release definition to use.
+ Specifies the ID of the repository
- Int32
+ Guid
- Int32
+ GuidNone
- Description
+ SourceRefName
- The description to use on the release.
+ A source reference, like a branch or commit Needs to be in ref format like refs/heads/MyBranchString
@@ -3814,9 +3745,9 @@ PS C:\> Add-NuGetEndpoint -EndpointName 'PowerShell Gallery' -NuGetUrl 'https
None
- ArtifactAlias
+ TargetRefName
- The alias of the artifact to use with this release.
+ A target reference, like a branch or commit Needs to be in ref format like refs/heads/MyBranchString
@@ -3825,10 +3756,10 @@ PS C:\> Add-NuGetEndpoint -EndpointName 'PowerShell Gallery' -NuGetUrl 'https
None
-
- Name
+
+ Title
- The name of this release.
+ The title of the pull requestString
@@ -3838,9 +3769,9 @@ PS C:\> Add-NuGetEndpoint -EndpointName 'PowerShell Gallery' -NuGetUrl 'https
None
- BuildId
+ Description
- The id of the build to use with this release.
+ The description of the pull requestString
@@ -3849,46 +3780,46 @@ PS C:\> Add-NuGetEndpoint -EndpointName 'PowerShell Gallery' -NuGetUrl 'https
None
-
- DefinitionName
+
+ Draft
- The name of the release definition to use.
+ Mark the new pull request as a draft
- String
+ SwitchParameter
- String
+ SwitchParameter
- None
+ False
-
- SourceBranch
+
+ Confirm
- The branch of the artifact
+ Prompts you for confirmation before running the function.
- String
+ SwitchParameter
- String
+ SwitchParameter
- None
+ False
-
- BuildNumber
+
+ Force
- The number of the build to use.
+ Forces the function without confirmation
- String
+ SwitchParameter
- String
+ SwitchParameter
- None
+ False
-
- Force
+
+ WhatIf
- Forces the function without confirmation
+ Shows what would happen if the function runs. The function is not run.SwitchParameter
@@ -3899,40 +3830,29 @@ PS C:\> Add-NuGetEndpoint -EndpointName 'PowerShell Gallery' -NuGetUrl 'https
-
+
+
+
+ Team.PullRequest
+
+
+
+
+
+
- This function has a Dynamic Parameter for ProjectName that specifies the project for which this function gets releases.
- 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.
+ -------------------------- EXAMPLE 1 --------------------------
- PS C:\> Get-VSTeamBuild | ft id,name
-
-id name
--- ----
-44 Demo-CI-44
-
-PS C:\> Get-VSTeamReleaseDefinition -Expand artifacts | ft id,name,@{l='Alias';e={$_.artifacts[0].alias}}
-
-id name Alias
--- ---- -----
- 1 Demo-CD Demo-CI
-
-PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias Demo-CI -BuildId 44
-
- This example shows how to find the Build ID, Artifact Alias, and Release definition ID required to start a release. If you call Set-VSTeamDefaultProject you can use Example 2 which is much easier.
-
-
-
- -------------------------- EXAMPLE 2 --------------------------
- PS C:\> Add-VSTeamRelease -DefinitionName Demo-CD -Description Test -BuildNumber Demo-CI-44
+ PS C:\> Set-VSTeamAccount -Account mydemos -Token $(System.AccessToken) -UseBearerToken
+PS C:\> $r = Get-VSTeamGitRepository -ProjectName project -Name demorepo
+PS C:\> Add-VSTeamPullRequest -ProjectName project -RepositoryId $r.RepositoryId -SourceRefName "refs/heads/mybranch" -TargetRefName "refs/heads/master" -Title "My PR" -Description "My Description" -Draft
- This command starts a new release using the Demo-CD release definition and the build with build number Demo-CI-44.
- You must set a default project to tab complete DefinitionName and BuildNumber.
+ Create a new pull request as a draft
@@ -3940,20 +3860,21 @@ PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias De
- Add-VSTeamReleaseDefinition
+ Add-VSTeamReleaseAdd
- VSTeamReleaseDefinition
+ VSTeamRelease
- Creates a new release definition from a JSON file.
+ Queues a new release
- Reads a JSON file off disk and uses that file to create a new release definition in the provided project.
+ Add-VSTeamRelease will queue a new release.
+ The environments will deploy according to how the release definition is configured in the Triggers tab.You must call Set-VSTeamAccount before calling this function.
- Add-VSTeamReleaseDefinition
+ Add-VSTeamReleaseProjectName
@@ -3968,10 +3889,22 @@ PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias De
None
-
- InFile
+
+ DefinitionId
- Path and file name to the JSON file that contains the definition to be created. If the path is omitted, the default is the current location.
+ The id of the release definition to use.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ Description
+
+ The description to use on the release.String
@@ -3980,86 +3913,10 @@ PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias De
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
-
-
- InFile
-
- Path and file name to the JSON file that contains the definition to be created. If the path is omitted, the default is the current location.
-
- String
-
- String
-
-
- None
-
-
-
-
-
- System.String
-
-
-
-
-
-
-
-
-
- This function has a Dynamic Parameter for ProjectName that specifies the project for which this function gets release definitions.
- 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.
-
-
-
-
- -------------------------- EXAMPLE 1 --------------------------
- PS C:\> Add-VSTeamReleaseDefinition -ProjectName demo -inFile release.json
-
- This command reads release.json and creates a new release definition from it on the demo team project.
-
-
-
-
-
-
-
- Add-VSTeamServiceEndpoint
- Add
- VSTeamServiceEndpoint
-
- Adds a generic service connection
-
-
-
- The cmdlet adds a new generic connection between TFS/AzD and a third party service (see AzD for available connections).
-
-
-
- Add-VSTeamServiceEndpoint
-
- ProjectName
+
+ ArtifactAlias
- 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.
+ The alias of the artifact to use with this release.String
@@ -4068,10 +3925,10 @@ PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias De
None
-
- EndpointName
+
+ Name
- The name displayed on the services page. In AzD this is the Connection Name.
+ The name of this release.String
@@ -4080,10 +3937,10 @@ PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias De
None
-
- EndpointType
+
+ BuildId
- Type of endpoint (eg. `kubernetes`, `sonarqube`). See AzD service page for supported endpoints.
+ The id of the build to use with this release.String
@@ -4092,119 +3949,32 @@ PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias De
None
-
- Object
+
+ SourceBranch
- Hashtable of Payload for REST call
+ The branch of the artifact
- Hashtable
+ String
- Hashtable
+ StringNone
+
+ 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
-
-
- Object
-
- Hashtable of Payload for REST call
-
- Hashtable
-
- Hashtable
-
-
- None
-
-
- EndpointName
-
- The name displayed on the services page. In AzD this is the Connection Name.
-
- String
-
- String
-
-
- None
-
-
- EndpointType
-
- Type of endpoint (eg. `kubernetes`, `sonarqube`). See AzD service page for supported endpoints.
-
- String
-
- String
-
-
- None
-
-
-
-
-
-
- Team.ServiceEndpoint
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Get-VSTeamServiceEndpoint
-
-
-
- Get-VSTeamServiceEndpointType
-
-
-
- Remove-VSTeamServiceEndpoint
-
-
-
-
-
-
- Add-VSTeamServiceFabricEndpoint
- Add
- VSTeamServiceFabricEndpoint
-
- Adds a new Service Fabric service endpoint.
-
-
-
- The cmdlet adds a new Service Fabric service endpoint to an existing project.
-
-
- Add-VSTeamServiceFabricEndpoint
+ Add-VSTeamReleaseProjectName
@@ -4219,10 +3989,10 @@ PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias De
None
-
- url
+
+ Description
- The url of the Service Fabric management endpoint.
+ The description to use on the release.String
@@ -4231,22 +4001,10 @@ PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias De
None
-
- useWindowsSecurity
-
- If windows integrated authentication should be enabled. If set to false, all authentication is disabled.
-
- Boolean
-
- Boolean
-
-
- None
-
-
- endpointName
+
+ Name
- The name displayed on the services page. In AzD this is the Connection Name.
+ The name of this release.String
@@ -4256,9 +4014,9 @@ PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias De
None
- clusterSpn
+ DefinitionName
- Specify the cluster service principal name, for use with windows integrated authentication.
+ The name of the release definition to use.String
@@ -4267,10 +4025,10 @@ PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias De
None
-
- serverCertThumbprint
+
+ SourceBranch
- The server certificate thumbprint, used for communicating with the Service Fabric cluster.
+ The branch of the artifactString
@@ -4279,10 +4037,10 @@ PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias De
None
-
- username
+
+ BuildNumber
- The Azure AD Username, used for communicating with the Service Fabric cluster.
+ The number of the build to use.String
@@ -4291,118 +4049,16 @@ PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias De
None
-
- password
+
+ Force
- The Password for the Azure AD User, used for communicating with the Service Fabric cluster.
+ Forces the function without confirmation
- SecureString
- SecureString
-
-
- None
-
-
-
- Add-VSTeamServiceFabricEndpoint
-
- 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
-
-
- url
-
- The url of the Service Fabric management endpoint.
-
- String
-
- String
-
-
- None
-
-
- useWindowsSecurity
-
- If windows integrated authentication should be enabled. If set to false, all authentication is disabled.
-
- Boolean
-
- Boolean
-
-
- None
-
-
- endpointName
-
- The name displayed on the services page. In AzD this is the Connection Name.
-
- String
-
- String
-
-
- None
-
-
- clusterSpn
-
- Specify the cluster service principal name, for use with windows integrated authentication.
-
- String
-
- String
-
-
- None
-
-
- serverCertThumbprint
-
- The server certificate thumbprint, used for communicating with the Service Fabric cluster.
-
- String
-
- String
-
-
- None
-
-
- certificate
-
- The certificate used for communicating with the Service Fabric cluster.
-
- String
-
- String
-
-
- None
-
-
- certificatePassword
-
- The Password for the certificate used for communicating with the Service Fabric cluster.
-
- SecureString
-
- SecureString
+ SwitchParameter
- None
+ False
@@ -4421,34 +4077,34 @@ PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias De
None
-
- url
+
+ DefinitionId
- The url of the Service Fabric management endpoint.
+ The id of the release definition to use.
- String
+ Int32
- String
+ Int32None
-
- useWindowsSecurity
+
+ Description
- If windows integrated authentication should be enabled. If set to false, all authentication is disabled.
+ The description to use on the release.
- Boolean
+ String
- Boolean
+ StringNone
-
- clusterSpn
+
+ ArtifactAlias
- Specify the cluster service principal name, for use with windows integrated authentication.
+ The alias of the artifact to use with this release.String
@@ -4457,10 +4113,10 @@ PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias De
None
-
- serverCertThumbprint
+
+ Name
- The server certificate thumbprint, used for communicating with the Service Fabric cluster.
+ The name of this release.String
@@ -4469,10 +4125,10 @@ PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias De
None
-
- username
+
+ BuildId
- The Azure AD Username, used for communicating with the Service Fabric cluster.
+ The id of the build to use with this release.String
@@ -4481,22 +4137,22 @@ PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias De
None
-
- password
+
+ DefinitionName
- The Password for the Azure AD User, used for communicating with the Service Fabric cluster.
+ The name of the release definition to use.
- SecureString
+ String
- SecureString
+ StringNone
-
- certificate
+
+ SourceBranch
- The certificate used for communicating with the Service Fabric cluster.
+ The branch of the artifactString
@@ -4505,106 +4161,87 @@ PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias De
None
-
- certificatePassword
+
+ BuildNumber
- The Password for the certificate used for communicating with the Service Fabric cluster.
+ The number of the build to use.
- SecureString
+ String
- SecureString
+ StringNone
-
- endpointName
+
+ Force
- The name displayed on the services page. In AzD this is the Connection Name.
+ Forces the function without confirmation
- String
+ SwitchParameter
- String
+ SwitchParameter
- None
+ False
-
-
-
- Team.ServiceEndpoint
-
-
-
-
-
-
+
-
+ This function has a Dynamic Parameter for ProjectName that specifies the project for which this function gets releases.
+ 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.-------------------------- EXAMPLE 1 --------------------------
- PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpointName "NoAuthTest" -url "tcp://10.0.0.1:19000" -useWindowsSecurity $false
+ PS C:\> Get-VSTeamBuild | ft id,name
+
+id name
+-- ----
+44 Demo-CI-44
+
+PS C:\> Get-VSTeamReleaseDefinition -Expand artifacts | ft id,name,@{l='Alias';e={$_.artifacts[0].alias}}
+
+id name Alias
+-- ---- -----
+ 1 Demo-CD Demo-CI
+
+PS C:\> Add-VSTeamRelease -DefinitionId 1 -Description Test -ArtifactAlias Demo-CI -BuildId 44
- Adds a Service Fabric Endpoint for a non-secure cluster
+ This example shows how to find the Build ID, Artifact Alias, and Release definition ID required to start a release. If you call Set-VSTeamDefaultProject you can use Example 2 which is much easier.-------------------------- EXAMPLE 2 --------------------------
- PS C:\> $password = '00000000-0000-0000-0000-000000000000' | ConvertTo-SecureString -AsPlainText -Force
-PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpointName "AzureAdAuthTest" -url "tcp://10.0.0.1:19000" -serverCertThumbprint "SOMECERTTHUMBPRINT" -username "someUser@someplace.com" -password $password
-
- Adds a Service Fabric Endpoint for an Azure AD secured cluster.
-
-
-
- -------------------------- EXAMPLE 3 --------------------------
- PS C:\> $password = '00000000-0000-0000-0000-000000000000' | ConvertTo-SecureString -AsPlainText -Force
-PS C:\> $pathToPFX = "C:\someFolder\theCertificateFile.pfx"
-PS C:\> $base64Cert = [System.Convert]::ToBase64String([System.IO.File]::ReadAllBytes($pathToPFX))
-PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpointName "CertificateAuthTest" -url "tcp://10.0.0.1:19000" -serverCertThumbprint "SOMECERTTHUMBPRINT" -certificate $base64Cert -certificatePassword $password
+ PS C:\> Add-VSTeamRelease -DefinitionName Demo-CD -Description Test -BuildNumber Demo-CI-44
- Adds a Service Fabric Endpoint for a certificate secured cluster.
+ This command starts a new release using the Demo-CD release definition and the build with build number Demo-CI-44.
+ You must set a default project to tab complete DefinitionName and BuildNumber.
-
-
- Get-VSTeamServiceEndpoint
-
-
-
- Get-VSTeamServiceEndpointType
-
-
-
- Remove-VSTeamServiceEndpoint
-
-
-
+
- Add-VSTeamSonarQubeEndpoint
+ Add-VSTeamReleaseDefinitionAdd
- VSTeamSonarQubeEndpoint
+ VSTeamReleaseDefinition
- Adds a new SonarQube service endpoint.
+ Creates a new release definition from a JSON file.
- The cmdlet adds a new connection between TFS/AzD and a SonarQube server using the SonarQube connection type.
- This is only used when using the SonarQube tasks.
- Using SonarQube with the Maven tasks uses a Generic Connection type.
+ Reads a JSON file off disk and uses that file to create a new release definition in the provided project.
+ You must call Set-VSTeamAccount before calling this function.
- Add-VSTeamSonarQubeEndpoint
+ Add-VSTeamReleaseDefinitionProjectName
@@ -4619,34 +4256,10 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
None
-
- SonarQubeUrl
-
- URL of the sonarqube server.
-
- String
-
- String
-
-
- None
-
-
- PersonalAccessToken
-
- Authentication Token generated by SonarQube.
-
- String
-
- String
-
-
- None
-
-
- EndpointName
+
+ InFile
- The name displayed on the services page. In AzD this is the Connection Name.
+ Path and file name to the JSON file that contains the definition to be created. If the path is omitted, the default is the current location.String
@@ -4656,8 +4269,79 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
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
+
+
+ InFile
+
+ Path and file name to the JSON file that contains the definition to be created. If the path is omitted, the default is the current location.
+
+ String
+
+ String
+
+
+ None
+
+
+
+
+
+ System.String
+
+
+
+
+
+
+
+
+
+ This function has a Dynamic Parameter for ProjectName that specifies the project for which this function gets release definitions.
+ 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.
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ PS C:\> Add-VSTeamReleaseDefinition -ProjectName demo -inFile release.json
+
+ This command reads release.json and creates a new release definition from it on the demo team project.
+
+
+
+
+
+
+
+ Add-VSTeamServiceEndpoint
+ Add
+ VSTeamServiceEndpoint
+
+ Adds a generic service connection
+
+
+
+ The cmdlet adds a new generic connection between TFS/AzD and a third party service (see AzD for available connections).
+
+
- Add-VSTeamSonarQubeEndpoint
+ Add-VSTeamServiceEndpointProjectName
@@ -4672,10 +4356,10 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
None
-
- SonarQubeUrl
+
+ EndpointName
- URL of the sonarqube server.
+ The name displayed on the services page. In AzD this is the Connection Name.String
@@ -4685,9 +4369,9 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
None
- EndpointName
+ EndpointType
- The name displayed on the services page. In AzD this is the Connection Name.
+ Type of endpoint (eg. `kubernetes`, `sonarqube`). See AzD service page for supported endpoints.String
@@ -4696,16 +4380,14 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
None
-
- SecurePersonalAccessToken
+
+ Object
- A secured string to capture your personal access token.
- This will allow you to provide your personal access token without displaying it in plain text.
- To use pat simply omit it from the Set-VSTeamAccount command.
+ Hashtable of Payload for REST call
- SecureString
+ Hashtable
- SecureString
+ HashtableNone
@@ -4727,22 +4409,22 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
None
-
- SonarQubeUrl
+
+ Object
- URL of the sonarqube server.
+ Hashtable of Payload for REST call
- String
+ Hashtable
- String
+ HashtableNone
-
- PersonalAccessToken
+
+ EndpointName
- Authentication Token generated by SonarQube.
+ The name displayed on the services page. In AzD this is the Connection Name.String
@@ -4752,9 +4434,9 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
None
- EndpointName
+ EndpointType
- The name displayed on the services page. In AzD this is the Connection Name.
+ Type of endpoint (eg. `kubernetes`, `sonarqube`). See AzD service page for supported endpoints.String
@@ -4763,23 +4445,18 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
None
-
- SecurePersonalAccessToken
-
- A secured string to capture your personal access token.
- This will allow you to provide your personal access token without displaying it in plain text.
- To use pat simply omit it from the Set-VSTeamAccount command.
-
- SecureString
-
- SecureString
-
-
- None
-
-
+
+
+
+ Team.ServiceEndpoint
+
+
+
+
+
+
@@ -4803,19 +4480,19 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
- Add-VSTeamTaskGroup
+ Add-VSTeamServiceFabricEndpointAdd
- VSTeamTaskGroup
+ VSTeamServiceFabricEndpoint
- Adds a task group.
+ Adds a new Service Fabric service endpoint.
- Adds a task group.
+ The cmdlet adds a new Service Fabric service endpoint to an existing project.
- Add-VSTeamTaskGroup
+ Add-VSTeamServiceFabricEndpointProjectName
@@ -4830,21 +4507,34 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
None
-
- WhatIf
+
+ url
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ The url of the Service Fabric management endpoint.
+ String
- SwitchParameter
+ String
- False
+ None
-
- InFile
+
+ useWindowsSecurity
- The path to the json file that represents the task group
+ If windows integrated authentication should be enabled. If set to false, all authentication is disabled.
+
+ Boolean
+
+ Boolean
+
+
+ None
+
+
+ endpointName
+
+ The name displayed on the services page. In AzD this is the Connection Name.String
@@ -4853,15 +4543,10 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
None
-
-
- Add-VSTeamTaskGroup
-
- ProjectName
+
+ clusterSpn
- 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.
+ Specify the cluster service principal name, for use with windows integrated authentication.String
@@ -4870,21 +4555,22 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
None
-
- WhatIf
+
+ serverCertThumbprint
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ The server certificate thumbprint, used for communicating with the Service Fabric cluster.
+ String
- SwitchParameter
+ String
- False
+ None
-
- Body
+
+ username
- The json that represents the task group as a string
+ The Azure AD Username, used for communicating with the Service Fabric cluster.String
@@ -4893,21 +4579,122 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
None
+
+ password
+
+ The Password for the Azure AD User, used for communicating with the Service Fabric cluster.
+
+ SecureString
+
+ SecureString
+
+
+ None
+
-
-
-
- ProjectName
-
-
-
-
-
-
-
-
- None
-
+
+ Add-VSTeamServiceFabricEndpoint
+
+ 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
+
+
+ url
+
+ The url of the Service Fabric management endpoint.
+
+ String
+
+ String
+
+
+ None
+
+
+ useWindowsSecurity
+
+ If windows integrated authentication should be enabled. If set to false, all authentication is disabled.
+
+ Boolean
+
+ Boolean
+
+
+ None
+
+
+ endpointName
+
+ The name displayed on the services page. In AzD this is the Connection Name.
+
+ String
+
+ String
+
+
+ None
+
+
+ clusterSpn
+
+ Specify the cluster service principal name, for use with windows integrated authentication.
+
+ String
+
+ String
+
+
+ None
+
+
+ serverCertThumbprint
+
+ The server certificate thumbprint, used for communicating with the Service Fabric cluster.
+
+ String
+
+ String
+
+
+ None
+
+
+ certificate
+
+ The certificate used for communicating with the Service Fabric cluster.
+
+ String
+
+ String
+
+
+ None
+
+
+ certificatePassword
+
+ The Password for the certificate used for communicating with the Service Fabric cluster.
+
+ SecureString
+
+ SecureString
+
+
+ None
+
+
+
+ ProjectName
@@ -4922,22 +4709,34 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
None
-
- WhatIf
+
+ url
- Shows what would happen if the cmdlet runs. The cmdlet is not run.
+ The url of the Service Fabric management endpoint.
- SwitchParameter
+ String
- SwitchParameter
+ String
- False
+ None
-
- InFile
+
+ useWindowsSecurity
- The path to the json file that represents the task group
+ If windows integrated authentication should be enabled. If set to false, all authentication is disabled.
+
+ Boolean
+
+ Boolean
+
+
+ None
+
+
+ clusterSpn
+
+ Specify the cluster service principal name, for use with windows integrated authentication.String
@@ -4946,10 +4745,10 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
None
-
- Body
+
+ serverCertThumbprint
- The json that represents the task group as a string
+ The server certificate thumbprint, used for communicating with the Service Fabric cluster.String
@@ -4958,21 +4757,72 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
None
-
-
-
+
+ username
+
+ The Azure AD Username, used for communicating with the Service Fabric cluster.
+
+ String
- System.String
+ String
+
-
-
-
-
-
+ None
+
+
+ password
+
+ The Password for the Azure AD User, used for communicating with the Service Fabric cluster.
+
+ SecureString
+
+ SecureString
+
+
+ None
+
+
+ certificate
+
+ The certificate used for communicating with the Service Fabric cluster.
+
+ String
+
+ String
+
+
+ None
+
+
+ certificatePassword
+
+ The Password for the certificate used for communicating with the Service Fabric cluster.
+
+ SecureString
+
+ SecureString
+
+
+ None
+
+
+ endpointName
+
+ The name displayed on the services page. In AzD this is the Connection Name.
+
+ String
+
+ String
+
+
+ None
+
+
+
- System.Object
+ Team.ServiceEndpoint
@@ -4987,50 +4837,62 @@ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpo
-------------------------- 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"
+ PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpointName "NoAuthTest" -url "tcp://10.0.0.1:19000" -useWindowsSecurity $false
- This example is useful for when one wants to copy an existing task group in one project into another project.
+ Adds a Service Fabric Endpoint for a non-secure cluster
+
+
+
+ -------------------------- EXAMPLE 2 --------------------------
+ PS C:\> $password = '00000000-0000-0000-0000-000000000000' | ConvertTo-SecureString -AsPlainText -Force
+PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpointName "AzureAdAuthTest" -url "tcp://10.0.0.1:19000" -serverCertThumbprint "SOMECERTTHUMBPRINT" -username "someUser@someplace.com" -password $password
+
+ Adds a Service Fabric Endpoint for an Azure AD secured cluster.
+
+
+
+ -------------------------- EXAMPLE 3 --------------------------
+ PS C:\> $password = '00000000-0000-0000-0000-000000000000' | ConvertTo-SecureString -AsPlainText -Force
+PS C:\> $pathToPFX = "C:\someFolder\theCertificateFile.pfx"
+PS C:\> $base64Cert = [System.Convert]::ToBase64String([System.IO.File]::ReadAllBytes($pathToPFX))
+PS C:\> Add-VSTeamServiceFabricEndpoint -ProjectName "SomeProjectName" -endpointName "CertificateAuthTest" -url "tcp://10.0.0.1:19000" -serverCertThumbprint "SOMECERTTHUMBPRINT" -certificate $base64Cert -certificatePassword $password
+
+ Adds a Service Fabric Endpoint for a certificate secured cluster.
- Update-VSTeamTaskGroup
+ Get-VSTeamServiceEndpoint
- Get-VSTeamTaskGroup
+ Get-VSTeamServiceEndpointType
- Remove-VSTeamTaskGroup
+ Remove-VSTeamServiceEndpoint
- Add-VSTeamUserEntitlement
+ Add-VSTeamSonarQubeEndpointAdd
- VSTeamUserEntitlement
+ VSTeamSonarQubeEndpoint
- Add a user, assign license and extensions and make them a member of a project group in an account.
+ Adds a new SonarQube service endpoint.
- Add a user, assign license and extensions and make them a member of a project group in an account.
+ The cmdlet adds a new connection between TFS/AzD and a SonarQube server using the SonarQube connection type.
+ This is only used when using the SonarQube tasks.
+ Using SonarQube with the Maven tasks uses a Generic Connection type.
- Add-VSTeamUserEntitlement
+ Add-VSTeamSonarQubeEndpointProjectName
@@ -5045,40 +4907,96 @@ Add-VSTeamTaskGroup -Body $taskGroupJson -ProjectName "destinationProjectName"
None
-
- License
+
+ SonarQubeUrl
- Type of Account License. The acceptable values for this parameter are:
- - Advanced
- - EarlyAdopter
- - Express
- - None
- - Professional
- - StakeHolder
+ URL of the sonarqube server.StringString
- EarlyAdopter
+ None
-
- Group
+
+ PersonalAccessToken
- The acceptable values for this parameter are:
- - Custom
- - ProjectAdministrator
- - ProjectContributor
- - ProjectReader
- - ProjectStakeholder
+ Authentication Token generated by SonarQube.StringString
- ProjectContributor
+ None
+
+
+ EndpointName
+
+ The name displayed on the services page. In AzD this is the Connection Name.
+
+ String
+
+ String
+
+
+ None
+
+
+
+ Add-VSTeamSonarQubeEndpoint
+
+ 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
+
+
+ SonarQubeUrl
+
+ URL of the sonarqube server.
+
+ String
+
+ String
+
+
+ None
+
+
+ EndpointName
+
+ The name displayed on the services page. In AzD this is the Connection Name.
+
+ String
+
+ String
+
+
+ None
+
+
+ SecurePersonalAccessToken
+
+ A secured string to capture your personal access token.
+ This will allow you to provide your personal access token without displaying it in plain text.
+ To use pat simply omit it from the Set-VSTeamAccount command.
+
+ SecureString
+
+ SecureString
+
+
+ None
@@ -5097,76 +5015,95 @@ Add-VSTeamTaskGroup -Body $taskGroupJson -ProjectName "destinationProjectName"
None
-
- License
+
+ SonarQubeUrl
- Type of Account License. The acceptable values for this parameter are:
- - Advanced
- - EarlyAdopter
- - Express
- - None
- - Professional
- - StakeHolder
+ URL of the sonarqube server.StringString
- EarlyAdopter
+ None
-
- Group
+
+ PersonalAccessToken
- The acceptable values for this parameter are:
- - Custom
- - ProjectAdministrator
- - ProjectContributor
- - ProjectReader
- - ProjectStakeholder
+ Authentication Token generated by SonarQube.StringString
- ProjectContributor
+ None
-
-
-
-
+
+ EndpointName
+
+ The name displayed on the services page. In AzD this is the Connection Name.
+
+ String
- System.Object
+ String
+
-
-
-
-
-
+ None
+
+
+ SecurePersonalAccessToken
+
+ A secured string to capture your personal access token.
+ This will allow you to provide your personal access token without displaying it in plain text.
+ To use pat simply omit it from the Set-VSTeamAccount command.
+
+ SecureString
+
+ SecureString
+
+
+ None
+
+
+
+
-
+
+
+ Get-VSTeamServiceEndpoint
+
+
+
+ Get-VSTeamServiceEndpointType
+
+
+
+ Remove-VSTeamServiceEndpoint
+
+
+
- Add-VSTeamVariableGroup
+ Add-VSTeamTaskGroupAdd
- VSTeamVariableGroup
+ VSTeamTaskGroup
- Adds a variable group.
+ Adds a task group.
- Adds a variable group.
+ Adds a task group.
- Add-VSTeamVariableGroup
+ Add-VSTeamTaskGroupProjectName
@@ -5181,22 +5118,21 @@ Add-VSTeamTaskGroup -Body $taskGroupJson -ProjectName "destinationProjectName"
None
-
- Description
+
+ WhatIf
- The variable group description
+ Shows what would happen if the cmdlet runs. The cmdlet is not run.
- String
- String
+ SwitchParameter
- None
+ False
- Name
+ InFile
- The variable group name
+ The path to the json file that represents the task groupString
@@ -5205,27 +5141,16 @@ Add-VSTeamTaskGroup -Body $taskGroupJson -ProjectName "destinationProjectName"
None
-
- ProviderData
-
- The variable group ProviderData. This parameter is not available in TFS2017. This should be $null for Vsts types.
-
- Hashtable
-
- Hashtable
-
-
- None
-
-
- Type
+
+
+ Add-VSTeamTaskGroup
+
+ ProjectName
- The variable group type. This parameter is not available in TFS2017; all variable groups are type Vsts in this case.
+ 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.
-
- Vsts
- AzureKeyVault
- StringString
@@ -5233,39 +5158,21 @@ Add-VSTeamTaskGroup -Body $taskGroupJson -ProjectName "destinationProjectName"
None
-
- Variables
+
+ WhatIf
- The variable group variables.
+ Shows what would happen if the cmdlet runs. The cmdlet is not run.
- Hashtable
- Hashtable
+ SwitchParameter
- None
+ False
-
-
- Add-VSTeamVariableGroup
-
- ProjectName
+
+ Body
- 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
+ The json that represents the task group as a stringString
@@ -5277,36 +5184,24 @@ Add-VSTeamTaskGroup -Body $taskGroupJson -ProjectName "destinationProjectName"
-
+ 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
-
-
- Description
-
- The variable group description
+
- String
+
- String
+ None
-
- Name
+
+ ProjectName
- The variable group name
+ 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
@@ -5315,22 +5210,22 @@ Add-VSTeamTaskGroup -Body $taskGroupJson -ProjectName "destinationProjectName"
None
-
- ProviderData
+
+ WhatIf
- The variable group ProviderData. This parameter is not available in TFS2017. This should be $null for Vsts types.
+ Shows what would happen if the cmdlet runs. The cmdlet is not run.
- Hashtable
+ SwitchParameter
- Hashtable
+ SwitchParameter
- None
+ False
- Type
+ InFile
- The variable group type. This parameter is not available in TFS2017; all variable groups are type Vsts in this case.
+ The path to the json file that represents the task groupString
@@ -5339,22 +5234,10 @@ Add-VSTeamTaskGroup -Body $taskGroupJson -ProjectName "destinationProjectName"
None
-
- Variables
-
- The variable group variables.
-
- Hashtable
-
- Hashtable
-
-
- None
- Body
- The json that represents the variable group as a string
+ The json that represents the task group as a stringString
@@ -5370,7 +5253,7 @@ Add-VSTeamTaskGroup -Body $taskGroupJson -ProjectName "destinationProjectName"
System.String
- System.Collections.Hashtable
+
@@ -5392,105 +5275,50 @@ Add-VSTeamTaskGroup -Body $taskGroupJson -ProjectName "destinationProjectName"
-------------------------- EXAMPLE 1 --------------------------
- $methodParameters = @{
- ProjectName = "some_project_name"
- Name = "new_variable_group"
- Description = "Describe the Variable Group"
- Type = "Vsts"
- Variables = @{
- key1 = @{
- value = "value1"
- }
- key2 = @{
- value = "value2"
- isSecret = $true
- }
- }
-}
-
-Add-VSTeamVariableGroup @methodParameters
-
-
-
-
-
- -------------------------- EXAMPLE 2 --------------------------
- $methodParameters = @{
- ProjectName = "some_project_name"
- Name = "new_variable_group"
- Description = "Describe the Variable Group"
- Type = "AzureKeyVault"
- Variables = @{
- name_of_existing_secret = @{
- enabled = $true
- contentType = ""
- value = ""
- isSecret = $true
- }
- }
- ProviderData = @{
- serviceEndpointId = "AzureRMServiceEndpointGuid"
- vault = "name_of_existing_key_vault"
- }
-}
+ $taskGroup = Get-VSTeamTaskGroup -Name "taskGroupName" -ProjectName "sourceProjectName"
-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.
+# Set the ID and revision to null, so AzD is happy.
+$taskGroup.id = $null
+$taskGroup.revision = $null
-$Name = "varGroupName"
-$FromProject = "sourceProjectName"
-$ToProject = "targetProjectName"
+$taskGroupJson = ConvertTo-Json -InputObject $taskGroup -Depth 10
-$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
-}
+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-VSTeamVariableGroup
+ Update-VSTeamTaskGroup
- Get-VSTeamVariableGroup
+ Get-VSTeamTaskGroup
- Remove-VSTeamVariableGroup
+ Remove-VSTeamTaskGroup
- Add-VSTeamWorkItem
+ Add-VSTeamUserEntitlementAdd
- VSTeamWorkItem
+ VSTeamUserEntitlement
- Adds a work item to your project.
+ Add a user, assign license and extensions and make them a member of a project group in an account.
- Add-VSTeamWorkItem will add a new work item to your project.
+ Add a user, assign license and extensions and make them a member of a project group in an account.
- Add-VSTeamWorkItem
+ Add-VSTeamUserEntitlementProjectName
@@ -5506,90 +5334,77 @@ else {
None
- Title
+ License
- The title of the work item
+ Type of Account License. The acceptable values for this parameter are:
+ - Advanced
+ - EarlyAdopter
+ - Express
+ - None
+ - Professional
+ - StakeHolderStringString
- None
+ EarlyAdopter
-
- Description
+
+ Group
- The Description of the work item
+ The acceptable values for this parameter are:
+ - Custom
+ - ProjectAdministrator
+ - ProjectContributor
+ - ProjectReader
+ - ProjectStakeholderStringString
- None
+ ProjectContributor
- IterationPath
+ LicensingSource
- The IterationPath of the work item
+ Licensing Source (e.g. Account. MSDN etc.). The acceptable values for this parameter are:
+ - account
+ - auto
+ - msdn
+ - none
+ - profile
+ - trialStringString
- None
+ account
- AssignedTo
-
- The email address of the user this work item will be assigned to.
-
- String
-
- String
-
-
- None
-
-
- WorkItemType
+ MSDNLicenseType
- The type of work item to add.
- You can tab complete from a list of available work item types.
- You must use Set-VSTeamDefaultProject to set a default project to enable the tab completion.
+ Type of MSDN License (e.g. Visual Studio Professional, Visual Studio Enterprise etc.). The acceptable values for this parameter are:
+ - eligible
+ - enterprise
+ - none
+ - platforms
+ - premium
+ - professional
+ - testProfessional
+ - ultimateStringString
- None
-
-
- ParentId
-
- The Id of the parent work item that this work item will be related to.
-
- Int
-
- Int
-
-
- None
-
-
- AdditionalFields
-
- Hashtable which contains a key value pair of any field that should be filled with values. Key is the internal name of the field and the value is the content of the field being filled. E.g. the internal name for the area path is 'System.AreaPath'.
-
- Hashtable
-
- Hashtable
-
-
- None
+ none
@@ -5609,167 +5424,113 @@ else {
None
- Title
+ License
- The title of the work item
+ Type of Account License. The acceptable values for this parameter are:
+ - Advanced
+ - EarlyAdopter
+ - Express
+ - None
+ - Professional
+ - StakeHolderStringString
- None
+ EarlyAdopter
-
- Description
+
+ Group
- The Description of the work item
+ The acceptable values for this parameter are:
+ - Custom
+ - ProjectAdministrator
+ - ProjectContributor
+ - ProjectReader
+ - ProjectStakeholderStringString
- None
+ ProjectContributor
- IterationPath
+ LicensingSource
- The IterationPath of the work item
+ Licensing Source (e.g. Account. MSDN etc.). The acceptable values for this parameter are:
+ - account
+ - auto
+ - msdn
+ - none
+ - profile
+ - trialStringString
- None
+ account
- AssignedTo
-
- The email address of the user this work item will be assigned to.
-
- String
-
- String
-
-
- None
-
-
- WorkItemType
+ MSDNLicenseType
- The type of work item to add.
- You can tab complete from a list of available work item types.
- You must use Set-VSTeamDefaultProject to set a default project to enable the tab completion.
+ Type of MSDN License (e.g. Visual Studio Professional, Visual Studio Enterprise etc.). The acceptable values for this parameter are:
+ - eligible
+ - enterprise
+ - none
+ - platforms
+ - premium
+ - professional
+ - testProfessional
+ - ultimateStringString
- None
-
-
- ParentId
-
- The Id of the parent work item that this work item will be related to.
-
- Int
-
- Int
-
-
- None
-
-
- AdditionalFields
-
- Hashtable which contains a key value pair of any field that should be filled with values. Key is the internal name of the field and the value is the content of the field being filled. E.g. the internal name for the area path is 'System.AreaPath'.
-
- Hashtable
-
- Hashtable
-
-
- None
+ none
-
-
+
+
+
- System.String
+ System.Object
- ProjectName
- WorkItemType
+
-
-
-
+
+
- WorkItemType is a dynamic parameter and use the default project value to query their validate set.
- If you do not set the default project by called Set-VSTeamDefaultProject before calling Add-VSTeamWorkItem you will have to type in the names.
- Any of the basic work item parameters defined in this method, will cause an exception if also added to the parameter AdditionalFields, since it is redundant. Either only use the parameter OR define them in the AdditionalFields parameter.
+
-
-
- -------------------------- EXAMPLE 1 --------------------------
- PS C:\> Set-VSTeamDefaultProject Demo
-PS C:\> Add-VSTeamWorkItem -Title "New Work Item" -WorkItemType Task
-
-ID Title Status
--- ----- ------
-6 New Work Item To Do
-
-
-
-
-
- -------------------------- EXAMPLE 2 --------------------------
- PS C:\> Set-VSTeamDefaultProject Demo
-PS C:\> Add-VSTeamWorkItem -Title "New Work Item" -WorkItemType Task -Description "This is a description"
-
-ID Title Status
--- ----- ------
-6 New Work Item To Do
-
-
-
-
-
- -------------------------- EXAMPLE 3 --------------------------
- PS C:\> Set-VSTeamDefaultProject Demo
-PS C:\> $additionalFields = @{"System.Tags"= "TestTag"; "System.AreaPath" = "Project\\MyPath"}
-PS C:\> Add-VSTeamWorkItem -Title "New Work Item" -WorkItemType Task -Description "This is a description" -AdditionalFields $additionalFields
-
-ID Title Status
--- ----- ------
-6 New Work Item To Do
-
-
-
-
-
+
- Add-VSTeamWorkItemAreaPermission
+ Add-VSTeamVariableGroupAdd
- VSTeamWorkItemAreaPermission
+ VSTeamVariableGroup
- Add Permissions to a Work Item Area
+ Adds a variable group.
- Add Permissions to a Work Item Area
+ Adds a variable group.
- Add-VSTeamWorkItemAreaPermission
+ Add-VSTeamVariableGroupProjectName
@@ -5784,22 +5545,22 @@ ID Title Status
None
-
- AreaID
+
+ Description
-
+ The variable group description
- Int32
+ String
- Int32
+ StringNone
-
- AreaPath
+
+ Name
-
+ The variable group nameString
@@ -5808,62 +5569,71 @@ ID Title Status
None
-
- Descriptor
+
+ ProviderData
-
+ The variable group ProviderData. This parameter is not available in TFS2017. This should be $null for Vsts types.
- String
+ Hashtable
- String
+ HashtableNone
-
- User
+
+ Type
-
+ The variable group type. This parameter is not available in TFS2017; all variable groups are type Vsts in this case.
- VSTeamUser
+
+ Vsts
+ AzureKeyVault
+
+ String
- VSTeamUser
+ StringNone
-
- Group
+
+ Variables
-
+ The variable group variables.
- VSTeamGroup
+ Hashtable
- VSTeamGroup
+ HashtableNone
-
- Allow
+
+
+ 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.
- VSTeamWorkItemAreaPermissions
+ String
- VSTeamWorkItemAreaPermissions
+ StringNone
-
- Deny
+
+ Body
-
+ The json that represents the variable group as a string
- VSTeamWorkItemAreaPermissions
+ String
- VSTeamWorkItemAreaPermissions
+ StringNone
@@ -5885,22 +5655,10 @@ ID Title Status
None
-
- AreaID
-
-
-
- Int32
-
- Int32
-
-
- None
-
-
- AreaPath
+
+ Description
-
+ The variable group descriptionString
@@ -5909,10 +5667,10 @@ ID Title Status
None
-
- Descriptor
+
+ Name
-
+ The variable group nameString
@@ -5921,59 +5679,68 @@ ID Title Status
None
-
- User
+
+ ProviderData
-
+ The variable group ProviderData. This parameter is not available in TFS2017. This should be $null for Vsts types.
- VSTeamUser
+ Hashtable
- VSTeamUser
+ HashtableNone
-
- Group
+
+ Type
-
+ The variable group type. This parameter is not available in TFS2017; all variable groups are type Vsts in this case.
- VSTeamGroup
+ String
- VSTeamGroup
+ StringNone
-
- Allow
+
+ Variables
-
+ The variable group variables.
- VSTeamWorkItemAreaPermissions
+ Hashtable
- VSTeamWorkItemAreaPermissions
+ HashtableNone
-
- Deny
+
+ Body
-
+ The json that represents the variable group as a string
- VSTeamWorkItemAreaPermissions
+ String
- VSTeamWorkItemAreaPermissions
+ StringNone
-
-
-
-
+
+
+
+ System.String
+
+
+ System.Collections.Hashtable
+
+
+
+
+
+ System.Object
@@ -5986,24 +5753,108 @@ ID Title Status
-
-
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ $methodParameters = @{
+ ProjectName = "some_project_name"
+ Name = "new_variable_group"
+ Description = "Describe the Variable Group"
+ Type = "Vsts"
+ Variables = @{
+ key1 = @{
+ value = "value1"
+ }
+ key2 = @{
+ value = "value2"
+ isSecret = $true
+ }
+ }
+}
+
+Add-VSTeamVariableGroup @methodParameters
+
+
+
+
+
+ -------------------------- EXAMPLE 2 --------------------------
+ $methodParameters = @{
+ ProjectName = "some_project_name"
+ Name = "new_variable_group"
+ Description = "Describe the Variable Group"
+ Type = "AzureKeyVault"
+ Variables = @{
+ name_of_existing_secret = @{
+ enabled = $true
+ contentType = ""
+ value = ""
+ isSecret = $true
+ }
+ }
+ ProviderData = @{
+ serviceEndpointId = "AzureRMServiceEndpointGuid"
+ vault = "name_of_existing_key_vault"
+ }
+}
+
+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
+}
+
+
+
+
+
+
+
+ Update-VSTeamVariableGroup
+
+
+
+ Get-VSTeamVariableGroup
+
+
+
+ Remove-VSTeamVariableGroup
+
+
+
- Add-VSTeamWorkItemIterationPermission
+ Add-VSTeamWorkItemAdd
- VSTeamWorkItemIterationPermission
+ VSTeamWorkItem
- Add Permissions to an Iteration
+ Adds a work item to your project.
- Add Permissions to an Iteration
+ Add-VSTeamWorkItem will add a new work item to your project.
- Add-VSTeamWorkItemIterationPermission
+ Add-VSTeamWorkItemProjectName
@@ -6019,21 +5870,21 @@ ID Title Status
None
- IterationID
+ Title
-
+ The title of the work item
- Int32
+ String
- Int32
+ StringNone
-
- IterationPath
+
+ Description
-
+ The Description of the work itemString
@@ -6042,10 +5893,10 @@ ID Title Status
None
-
- Descriptor
+
+ IterationPath
-
+ The IterationPath of the work itemString
@@ -6054,50 +5905,52 @@ ID Title Status
None
-
- User
+
+ AssignedTo
-
+ The email address of the user this work item will be assigned to.
- VSTeamUser
+ String
- VSTeamUser
+ StringNone
- Group
+ WorkItemType
-
+ The type of work item to add.
+ You can tab complete from a list of available work item types.
+ You must use Set-VSTeamDefaultProject to set a default project to enable the tab completion.
- VSTeamGroup
+ String
- VSTeamGroup
+ StringNone
-
- Allow
+
+ ParentId
-
+ The Id of the parent work item that this work item will be related to.
- VSTeamWorkItemIterationPermissions
+ Int
- VSTeamWorkItemIterationPermissions
+ IntNone
-
- Deny
+
+ AdditionalFields
-
+ Hashtable which contains a key value pair of any field that should be filled with values. Key is the internal name of the field and the value is the content of the field being filled. E.g. the internal name for the area path is 'System.AreaPath'.
- VSTeamWorkItemIterationPermissions
+ Hashtable
- VSTeamWorkItemIterationPermissions
+ HashtableNone
@@ -6120,21 +5973,21 @@ ID Title Status
None
- IterationID
+ Title
-
+ The title of the work item
- Int32
+ String
- Int32
+ StringNone
-
- IterationPath
+
+ Description
-
+ The Description of the work itemString
@@ -6143,10 +5996,10 @@ ID Title Status
None
-
- Descriptor
+
+ IterationPath
-
+ The IterationPath of the work itemString
@@ -6155,179 +6008,226 @@ ID Title Status
None
-
- User
+
+ AssignedTo
-
+ The email address of the user this work item will be assigned to.
- VSTeamUser
+ String
- VSTeamUser
+ StringNone
- Group
+ WorkItemType
-
+ The type of work item to add.
+ You can tab complete from a list of available work item types.
+ You must use Set-VSTeamDefaultProject to set a default project to enable the tab completion.
- VSTeamGroup
+ String
- VSTeamGroup
+ StringNone
-
- Allow
+
+ ParentId
-
+ The Id of the parent work item that this work item will be related to.
- VSTeamWorkItemIterationPermissions
+ Int
- VSTeamWorkItemIterationPermissions
+ IntNone
-
- Deny
+
+ AdditionalFields
-
+ Hashtable which contains a key value pair of any field that should be filled with values. Key is the internal name of the field and the value is the content of the field being filled. E.g. the internal name for the area path is 'System.AreaPath'.
- VSTeamWorkItemIterationPermissions
+ Hashtable
- VSTeamWorkItemIterationPermissions
+ HashtableNone
-
-
-
+
+
- System.Object
+ System.String
-
+ ProjectName
+ WorkItemType
-
-
+
+
+
-
-
-
-
-
-
-
-
- Clear-VSTeamDefaultProject
- Clear
- VSTeamDefaultProject
-
- Clears the value stored in the default project parameter value.
-
-
-
- Clears the value stored in the default project parameter value.
-
-
-
- Clear-VSTeamDefaultProject
-
- Level
-
- On Windows allows you to clear your default project at the Process, User or Machine levels.
-
- String
-
- String
-
-
- None
-
-
-
-
-
- Level
-
- On Windows allows you to clear your default project at the Process, User or Machine levels.
-
- String
-
- String
-
-
- None
-
-
-
-
-
-
-
+ WorkItemType is a dynamic parameter and use the default project value to query their validate set.
+ If you do not set the default project by called Set-VSTeamDefaultProject before calling Add-VSTeamWorkItem you will have to type in the names.
+ Any of the basic work item parameters defined in this method, will cause an exception if also added to the parameter AdditionalFields, since it is redundant. Either only use the parameter OR define them in the AdditionalFields parameter.-------------------------- EXAMPLE 1 --------------------------
- PS C:\> Clear-Project
+ PS C:\> Set-VSTeamDefaultProject Demo
+PS C:\> Add-VSTeamWorkItem -Title "New Work Item" -WorkItemType Task
+
+ID Title Status
+-- ----- ------
+6 New Work Item To Do
- This will clear the default project parameter value. You will now have to provide a project for any functions that require a project.
+
+
+
+
+ -------------------------- EXAMPLE 2 --------------------------
+ PS C:\> Set-VSTeamDefaultProject Demo
+PS C:\> Add-VSTeamWorkItem -Title "New Work Item" -WorkItemType Task -Description "This is a description"
+
+ID Title Status
+-- ----- ------
+6 New Work Item To Do
+
+
+
+
+
+ -------------------------- EXAMPLE 3 --------------------------
+ PS C:\> Set-VSTeamDefaultProject Demo
+PS C:\> $additionalFields = @{"System.Tags"= "TestTag"; "System.AreaPath" = "Project\\MyPath"}
+PS C:\> Add-VSTeamWorkItem -Title "New Work Item" -WorkItemType Task -Description "This is a description" -AdditionalFields $additionalFields
+
+ID Title Status
+-- ----- ------
+6 New Work Item To Do
+
+
-
-
- Set-VSTeamDefaultProject
-
-
-
- Set-VSTeamAccount
-
-
-
+
- Disable-VSTeamAgent
- Disable
- VSTeamAgent
+ Add-VSTeamWorkItemAreaPermission
+ Add
+ VSTeamWorkItemAreaPermission
- Disables an agent in a pool.
+ Add Permissions to a Work Item Area
- Disables an agent in a pool.
+ Add Permissions to a Work Item Area
- Disable-VSTeamAgent
-
- PoolId
+ Add-VSTeamWorkItemAreaPermission
+
+ ProjectName
- Id of the pool.
+ 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.
- int
+ String
- int
+ StringNone
-
- Id
+
+ AreaID
- Id of the agent to disable.
+
- int[]
+ Int32
- int[]
+ Int32
+
+
+ None
+
+
+ AreaPath
+
+
+
+ String
+
+ String
+
+
+ None
+
+
+ Descriptor
+
+
+
+ String
+
+ String
+
+
+ None
+
+
+ User
+
+
+
+ VSTeamUser
+
+ VSTeamUser
+
+
+ None
+
+
+ Group
+
+
+
+ VSTeamGroup
+
+ VSTeamGroup
+
+
+ None
+
+
+ Allow
+
+
+
+ VSTeamWorkItemAreaPermissions
+
+ VSTeamWorkItemAreaPermissions
+
+
+ None
+
+
+ Deny
+
+
+
+ VSTeamWorkItemAreaPermissions
+
+ VSTeamWorkItemAreaPermissionsNone
@@ -6335,128 +6235,116 @@ ID Title Status
-
- PoolId
+
+ ProjectName
- Id of the pool.
+ 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.
- int
+ String
- int
+ StringNone
-
- Id
+
+ AreaID
- Id of the agent to disable.
+
- int[]
+ Int32
- int[]
+ Int32None
-
-
-
+
+ AreaPath
+
+
+
+ String
- System.String
+ String
+
-
+ None
+
+
+ Descriptor
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Enable-VSTeamAgent
- Enable
- VSTeamAgent
-
- Enables an agent in a pool.
-
-
-
- Enables an agent in a pool.
-
-
-
- Enable-VSTeamAgent
-
- PoolId
-
- Id of the pool.
-
- int
-
- int
-
-
- None
-
-
- Id
-
- Id of the agent to enable.
-
- int[]
-
- int[]
-
-
- None
-
-
-
-
-
- PoolId
+
+ String
+
+ String
+
+
+ None
+
+
+ User
- Id of the pool.
+
- int
+ VSTeamUser
- int
+ VSTeamUserNone
-
- Id
+
+ Group
- Id of the agent to enable.
+
- int[]
+ VSTeamGroup
- int[]
+ VSTeamGroup
+
+
+ None
+
+
+ Allow
+
+
+
+ VSTeamWorkItemAreaPermissions
+
+ VSTeamWorkItemAreaPermissions
+
+
+ None
+
+
+ Deny
+
+
+
+ VSTeamWorkItemAreaPermissions
+
+ VSTeamWorkItemAreaPermissionsNone
-
-
+
+
+
- System.String
+ System.Object
-
-
-
+
+
@@ -6467,19 +6355,19 @@ ID Title Status
- Get-VSTeam
- Get
- VSTeam
+ Add-VSTeamWorkItemIterationPermission
+ Add
+ VSTeamWorkItemIterationPermission
- Returns a team.
+ Add Permissions to an Iteration
- Returns a team.
+ Add Permissions to an Iteration
- Get-VSTeam
+ Add-VSTeamWorkItemIterationPermissionProjectName
@@ -6494,10 +6382,10 @@ ID Title Status
None
-
- Skip
+
+ IterationID
- The number of items to skip.
+ Int32
@@ -6506,27 +6394,22 @@ ID Title Status
None
-
- Top
+
+ IterationPath
- Specifies the maximum number to return.
+
- Int32
+ String
- Int32
+ StringNone
-
-
- Get-VSTeam
-
- ProjectName
+
+ Descriptor
- 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
@@ -6535,43 +6418,50 @@ ID Title Status
None
-
- TeamId
+
+ User
- The id of the team to retrieve.
+
- String[]
+ VSTeamUser
- String[]
+ VSTeamUserNone
-
-
- Get-VSTeam
-
- ProjectName
+
+ Group
- 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
+ VSTeamGroup
- String
+ VSTeamGroupNone
-
- Name
+
+ Allow
- The name of the team to retrieve.
+
- String[]
+ VSTeamWorkItemIterationPermissions
- String[]
+ VSTeamWorkItemIterationPermissions
+
+
+ None
+
+
+ Deny
+
+
+
+ VSTeamWorkItemIterationPermissions
+
+ VSTeamWorkItemIterationPermissionsNone
@@ -6593,10 +6483,10 @@ ID Title Status
None
-
- Skip
+
+ IterationID
- The number of items to skip.
+ Int32
@@ -6605,117 +6495,117 @@ ID Title Status
None
-
- TeamId
+
+ IterationPath
- The id of the team to retrieve.
+
- String[]
+ String
- String[]
+ StringNone
-
- Top
+
+ Descriptor
- Specifies the maximum number to return.
+
- Int32
+ String
- Int32
+ StringNone
-
- Name
+
+ User
- The name of the team to retrieve.
+
- String[]
+ VSTeamUser
- String[]
+ VSTeamUserNone
-
-
-
-
+
+ Group
+
+
+
+ VSTeamGroup
- Team.Team
+ VSTeamGroup
+
-
+ None
+
+
+ Allow
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- Get-VSTeamAccessControlList
- Get
- VSTeamAccessControlList
+
+ VSTeamWorkItemIterationPermissions
+
+ VSTeamWorkItemIterationPermissions
+
+
+ None
+
+
+ Deny
+
+
+
+ VSTeamWorkItemIterationPermissions
+
+ VSTeamWorkItemIterationPermissions
+
+
+ None
+
+
+
+
+
+
+ System.Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Clear-VSTeamDefaultProject
+ Clear
+ VSTeamDefaultProject
- 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.
+ Clears the value stored in the default project parameter value.
- 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.
+ Clears the value stored in the default project parameter value.
- Get-VSTeamAccessControlList
-
- SecurityNamespace
-
- Security namespace identifier.
-
- VSTeamSecurityNamespace
-
- VSTeamSecurityNamespace
-
-
- None
-
-
- SecurityNamespaceId
-
- Security namespace identifier.
-
- String
-
- String
-
-
- None
-
-
- Token
-
- Security token
-
- String
-
- String
-
-
- None
-
-
- Descriptors
+ Clear-VSTeamDefaultProject
+
+ Level
- An optional filter string containing a list of identity descriptors whose ACEs should be retrieved. If this is not set entire ACLs will be returned.
+ On Windows allows you to clear your default project at the Process, User or Machine levels.String
@@ -6724,71 +6614,13 @@ ID Title Status
None
-
- IncludeExtendedInfo
-
- If set, populate the extended information properties for the access control entries contained in the returned lists.
-
-
- SwitchParameter
-
-
- False
-
-
- Recurse
-
- If true and this is a hierarchical namespace, return child ACLs of the specified token.
-
-
- SwitchParameter
-
-
- False
-
-
- SecurityNamespace
-
- Security namespace identifier.
-
- VSTeamSecurityNamespace
-
- VSTeamSecurityNamespace
-
-
- None
-
-
- SecurityNamespaceId
-
- Security namespace identifier.
-
- String
-
- String
-
-
- None
-
-
- Token
-
- Security token
-
- String
-
- String
-
-
- None
-
-
- Descriptors
+
+ Level
- An optional filter string containing a list of identity descriptors whose ACEs should be retrieved. If this is not set entire ACLs will be returned.
+ On Windows allows you to clear your default project at the Process, User or Machine levels.String
@@ -6797,42 +6629,9 @@ ID Title Status
None
-
- IncludeExtendedInfo
-
- If set, populate the extended information properties for the access control entries contained in the returned lists.
-
- SwitchParameter
-
- SwitchParameter
-
-
- False
-
-
- Recurse
-
- If true and this is a hierarchical namespace, return child ACLs of the specified token.
-
- SwitchParameter
-
- SwitchParameter
-
-
- False
-
-
-
-
- VSTeamAccessControlList
-
-
-
-
-
-
+
@@ -6841,37 +6640,46 @@ ID Title Status
-------------------------- EXAMPLE 1 --------------------------
- Get-VSTeamSecurityNamespace | Select-Object -First 1 | Get-VSTeamAccessControlList
+ PS C:\> Clear-Project
-
+ This will clear the default project parameter value. You will now have to provide a project for any functions that require a project.
-
+
+
+ Set-VSTeamDefaultProject
+
+
+
+ Set-VSTeamAccount
+
+
+
- Get-VSTeamAgent
- Get
+ Disable-VSTeamAgent
+ DisableVSTeamAgent
- Returns the agents in a pool.
+ Disables an agent in a pool.
- Returns the agents in a pool.
+ Disables an agent in a pool.
- Get-VSTeamAgent
+ Disable-VSTeamAgentPoolIdId of the pool.
- String
+ int
- String
+ intNone
@@ -6879,11 +6687,11 @@ ID Title Status
Id
- Id of the agent to return.
+ Id of the agent to disable.
- String
+ int[]
- String
+ int[]None
@@ -6896,9 +6704,9 @@ ID Title Status
Id of the pool.
- String
+ int
- String
+ intNone
@@ -6906,11 +6714,11 @@ ID Title Status
Id
- Id of the agent to return.
+ Id of the agent to disable.
- String
+ int[]
- String
+ int[]None
@@ -6926,20 +6734,10 @@ ID Title Status
-
-
-
- System.Object
-
-
-
-
-
-
+
- To read system capabilities that contain dots you have to use the PSObject Properties property.
- (Get-VSTeamAgent 1 91).systemCapabilities.PSObject.Properties['Agent.OS'].Value
+
@@ -6947,74 +6745,39 @@ ID Title Status
- Get-VSTeamApproval
- Get
- VSTeamApproval
-
- Gets a list of approvals for all releases for a team project.
+ Enable-VSTeamAgent
+ Enable
+ VSTeamAgent
+
+ Enables an agent in a pool.
- The Get-VSTeamApproval function gets the approvals for all releases for a team project.
- With just a project name, this function gets all of the pending approvals for that team project.
- When using with AzD "IncludeMyGroupApprovals" will be added to the request when Assigned To Filter is not empty.
- When using with TFS "IncludeMyGroupApprovals" will be added to the request when Assigned To Filter, Release Id Filter are not empty and Status Filter equals Pending.
- The Team.Approval type has three custom table formats:
- - Pending: ID, Status, Release Name, Environment, Type, Approver Name, Release Definitions
- - Approved: Release Name, Environment, Is Automated, Approval Type, Approver Name, Release Definitions, Comments
- - Rejected: Release Name, Environment, Approval Type, Approver Name, Release Definition, Comments
+ Enables an agent in a pool.
- Get-VSTeamApproval
-
- 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
-
-
- StatusFilter
-
- By default the function returns Pending approvals.
- Using this filter you can return Approved, ReAssigned or Rejected approvals.
- There is a custom table view for each status.
-
- String
-
- String
-
-
- None
-
-
- ReleaseIdsFilter
+ Enable-VSTeamAgent
+
+ PoolId
- Only approvals for the release ids provided will be returned.
+ Id of the pool.
- Int32[]
+ int
- Int32[]
+ intNone
-
- AssignedToFilter
+
+ Id
- Approvals are filtered to only those assigned to this user.
+ Id of the agent to enable.
- String
+ int[]
- String
+ int[]None
@@ -7022,137 +6785,65 @@ ID Title Status
-
- 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
-
-
- StatusFilter
-
- By default the function returns Pending approvals.
- Using this filter you can return Approved, ReAssigned or Rejected approvals.
- There is a custom table view for each status.
-
- String
-
- String
-
-
- None
-
-
- ReleaseIdsFilter
+
+ PoolId
- Only approvals for the release ids provided will be returned.
+ Id of the pool.
- Int32[]
+ int
- Int32[]
+ intNone
-
- AssignedToFilter
+
+ Id
- Approvals are filtered to only those assigned to this user.
+ Id of the agent to enable.
- String
+ int[]
- String
+ int[]None
-
-
-
+
+
- Team.BuildDefinition
+ System.String
-
-
+
+
+
- This function has a Dynamic Parameter for ProjectName that specifies the project for which this function gets build definitions.
- 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.
- You can pipe build definition IDs to this function.
+
-
-
- -------------------------- EXAMPLE 1 --------------------------
- PS C:\> Get-VSTeamApproval -ProjectName Demo
-
- This command gets a list of all pending approvals.
-
-
-
- -------------------------- EXAMPLE 2 --------------------------
- PS C:\> Get-VSTeamApproval -ProjectName Demo -StatusFilter Approved | Format-Table -View Approved
-
- This command gets a list of all approved approvals using a custom table format.
-
-
-
- -------------------------- EXAMPLE 3 --------------------------
- PS C:\> Get-VSTeamApproval -ProjectName Demo -AssignedToFilter Administrator -StatusFilter Rejected | FT -View Rejected
-
- This command gets a list of all approvals rejected by Administrator using a custom table format.
-
-
-
-
-
- Set-VSTeamAccount
-
-
-
- Set-VSTeamDefaultProject
-
-
-
- Add-VSTeamBuildDefinition
-
-
-
- Remove-VSTeamBuildDefinition
-
-
-
+
+
- Get-VSTeamBuild
+ Get-VSTeamGet
- VSTeamBuild
+ VSTeam
- Gets the builds for a team project.
+ Returns a team.
- The Get-VSTeamBuild function gets the builds for a team project.
- With just a project name, this function gets all of the builds for that team project.
- You can also specify a particular build by ID.
+ Returns a team.
- Get-VSTeamBuild
+ Get-VSTeamProjectName
@@ -7168,45 +6859,38 @@ ID Title Status
None
- Top
+ Skip
- Specifies the maximum number to return.
+ The number of items to skip.Int32Int32
- 0
-
-
- ResultFilter
-
- Specifies the result of the builds to return Succeeded, PartiallySucceeded, Failed, or Canceled.
-
- String
-
- String
-
- None
- ReasonFilter
+ Top
- Specifies the reason the build was created of the builds to return Manual, IndividualCI, BatchedCI, Schedule, UserCreated, ValidateShelveSet, CheckInShelveSet, Triggered, or All.
+ Specifies the maximum number to return.
- String
+ Int32
- String
+ Int32None
-
- StatusFilter
+
+
+ Get-VSTeam
+
+ ProjectName
- Specifies the status of the builds to return InProgress, Completed, Cancelling, Postponed, NotStarted, or All.
+ 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
@@ -7216,102 +6900,162 @@ ID Title Status
None
- Queues
+ TeamId
- A comma-delimited list of queue IDs that specifies the builds to return.
+ The id of the team to retrieve.
- Int32[]
+ String[]
- Int32[]
+ String[]None
-
- Definitions
+
+
+ Get-VSTeam
+
+ ProjectName
- A comma-delimited list of build definition IDs that specifies the builds to return.
+ 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.
- Int32[]
+ String
- Int32[]
+ StringNone
- BuildNumber
+ Name
- Returns the build with this build number.
- You can also use * for a starts with search. For example: 2015* Will return all build numbers that start with 2015.
+ The name of the team to retrieve.
- String
+ String[]
- String
+ String[]None
-
- Type
-
- The type of builds to retrieve.
-
- String
-
- String
-
-
- None
-
-
- MaxBuildsPerDefinition
-
- The maximum number of builds to retrieve for each definition.
- This is only valid when definitions is also specified.
-
- Int32
-
- Int32
-
-
- None
-
-
- Properties
-
- A comma-delimited list of extended properties to retrieve.
-
- String[]
-
- String[]
-
-
- None
-
-
- Id
+
+
+
+
+ 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
+
+
+ Skip
+
+ The number of items to skip.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ TeamId
+
+ The id of the team to retrieve.
+
+ String[]
+
+ String[]
+
+
+ None
+
+
+ Top
+
+ Specifies the maximum number to return.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ Name
+
+ The name of the team to retrieve.
+
+ String[]
+
+ String[]
+
+
+ None
+
+
+
+
+
+
+ Team.Team
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-VSTeamAccessControlList
+ Get
+ VSTeamAccessControlList
+
+ 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.
+
+
+
+ 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-VSTeamAccessControlList
+
+ SecurityNamespace
- Specifies one or more builds by ID.
- To specify multiple IDs, use commas to separate the IDs.
- To find the ID of a build, type Get-VSTeamBuild.
+ Security namespace identifier.
- Int32[]
+ VSTeamSecurityNamespace
- Int32[]
+ VSTeamSecurityNamespaceNone
-
-
- Get-VSTeamBuild
-
- ProjectName
+
+ SecurityNamespaceId
- 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.
+ Security namespace identifier.String
@@ -7320,40 +7064,22 @@ ID Title Status
None
-
- Id
+
+ Token
- Specifies one or more builds by ID.
- To specify multiple IDs, use commas to separate the IDs.
- To find the ID of a build, type Get-VSTeamBuild.
+ Security token
- Int32[]
+ String
- Int32[]
+ StringNone
- JSON
-
- Converts the raw response into JSON and displays in the console. This is required when you need to use the object to send back. Without this switch the JSON produced from the returned object will not match the expected shape of the JSON for sending back to server.
-
-
- SwitchParameter
-
-
- False
-
-
-
- Get-VSTeamBuild
-
- ProjectName
+ Descriptors
- 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.
+ An optional filter string containing a list of identity descriptors whose ACEs should be retrieved. If this is not set entire ACLs will be returned.String
@@ -7362,24 +7088,21 @@ ID Title Status
None
-
- Id
+
+ IncludeExtendedInfo
- Specifies one or more builds by ID.
- To specify multiple IDs, use commas to separate the IDs.
- To find the ID of a build, type Get-VSTeamBuild.
+ If set, populate the extended information properties for the access control entries contained in the returned lists.
- Int32[]
- Int32[]
+ SwitchParameter
- None
+ False
- Raw
+ Recurse
- Returns the raw response. This is required when you need to use the object to send back. Without this switch the object produced from the returned object will not match the expected shape of the JSON for sending back to server.
+ If true and this is a hierarchical namespace, return child ACLs of the specified token.SwitchParameter
@@ -7390,36 +7113,22 @@ ID Title Status
-
- ProjectName
+
+ SecurityNamespace
- 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.
+ Security namespace identifier.
- String
+ VSTeamSecurityNamespace
- String
+ VSTeamSecurityNamespaceNone
-
- Top
-
- Specifies the maximum number to return.
-
- Int32
-
- Int32
-
-
- 0
-
-
- ResultFilter
+
+ SecurityNamespaceId
- Specifies the result of the builds to return Succeeded, PartiallySucceeded, Failed, or Canceled.
+ Security namespace identifier.String
@@ -7428,10 +7137,10 @@ ID Title Status
None
-
- ReasonFilter
+
+ Token
- Specifies the reason the build was created of the builds to return Manual, IndividualCI, BatchedCI, Schedule, UserCreated, ValidateShelveSet, CheckInShelveSet, Triggered, or All.
+ Security tokenString
@@ -7440,10 +7149,10 @@ ID Title Status
None
-
- StatusFilter
+
+ Descriptors
- Specifies the status of the builds to return InProgress, Completed, Cancelling, Postponed, NotStarted, or All.
+ An optional filter string containing a list of identity descriptors whose ACEs should be retrieved. If this is not set entire ACLs will be returned.String
@@ -7452,100 +7161,12 @@ ID Title Status
None
-
- Queues
+
+ IncludeExtendedInfo
- A comma-delimited list of queue IDs that specifies the builds to return.
+ If set, populate the extended information properties for the access control entries contained in the returned lists.
- Int32[]
-
- Int32[]
-
-
- None
-
-
- Definitions
-
- A comma-delimited list of build definition IDs that specifies the builds to return.
-
- Int32[]
-
- Int32[]
-
-
- None
-
-
- BuildNumber
-
- Returns the build with this build number.
- You can also use * for a starts with search. For example: 2015* Will return all build numbers that start with 2015.
-
- String
-
- String
-
-
- None
-
-
- Type
-
- The type of builds to retrieve.
-
- String
-
- String
-
-
- None
-
-
- MaxBuildsPerDefinition
-
- The maximum number of builds to retrieve for each definition.
- This is only valid when definitions is also specified.
-
- Int32
-
- Int32
-
-
- None
-
-
- Properties
-
- A comma-delimited list of extended properties to retrieve.
-
- String[]
-
- String[]
-
-
- None
-
-
- Id
-
- Specifies one or more builds by ID.
- To specify multiple IDs, use commas to separate the IDs.
- To find the ID of a build, type Get-VSTeamBuild.
-
- Int32[]
-
- Int32[]
-
-
- None
-
-
- JSON
-
- Converts the raw response into JSON and displays in the console. This is required when you need to use the object to send back. Without this switch the JSON produced from the returned object will not match the expected shape of the JSON for sending back to server.
-
- SwitchParameter
+ SwitchParameterSwitchParameter
@@ -7553,9 +7174,9 @@ ID Title Status
False
- Raw
+ Recurse
- Returns the raw response. This is required when you need to use the object to send back. Without this switch the object produced from the returned object will not match the expected shape of the JSON for sending back to server.
+ If true and this is a hierarchical namespace, return child ACLs of the specified token.SwitchParameter
@@ -7569,7 +7190,7 @@ ID Title Status
- Team.Build
+ VSTeamAccessControlList
@@ -7578,90 +7199,39 @@ ID Title Status
- This function has a Dynamic Parameter for ProjectName that specifies the project for which this function gets builds.
- 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.
- You can pipe build IDs to this function.
+ -------------------------- EXAMPLE 1 --------------------------
- PS C:\> Get-VSTeamBuild -ProjectName demo | Format-List *
-
- This command gets a list of all builds in the demo project.
- The pipeline operator (|) passes the data to the Format-List cmdlet, which displays all available properties (*) of the build objects.
-
-
-
- -------------------------- EXAMPLE 2 --------------------------
- PS C:\> Get-VSTeamBuild -ProjectName demo -top 5 -resultFilter failed
-
- This command gets a list of 5 failed builds in the demo project.
-
-
-
- -------------------------- EXAMPLE 3 --------------------------
- PS C:\> 1203,1204 | Get-VSTeamBuild -ProjectName demo
-
- This command gets builds with IDs 1203 and 1204 by using the pipeline.
-
-
-
- -------------------------- EXAMPLE 4 --------------------------
- PS C:\> Get-VSTeamBuild -ProjectName demo -ID 1203,1204
-
- This command gets builds with IDs 1203 and 1204 by using the ID parameter.
-
-
-
- -------------------------- EXAMPLE 5 --------------------------
- PS C:\> Get-VSTeamBuild -ProjectName demo -ID 1203 -Raw
+ Get-VSTeamSecurityNamespace | Select-Object -First 1 | Get-VSTeamAccessControlList
- This command returns the raw object returned from the server.
+
-
-
- Set-VSTeamAccount
-
-
-
- Set-VSTeamDefaultProject
-
-
-
- Add-VSTeamBuild
-
-
-
- Remove-VSTeamBuild
-
-
-
+
- Get-VSTeamBuildArtifact
+ Get-VSTeamAgentGet
- VSTeamBuildArtifact
+ VSTeamAgent
- Returns the artifacts of a build.
+ Returns the agents in a pool.
- Returns the artifacts of a build.
+ Returns the agents in a pool.
- Get-VSTeamBuildArtifact
-
- ProjectName
+ Get-VSTeamAgent
+
+ PoolId
- 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.
+ Id of the pool.String
@@ -7670,14 +7240,14 @@ ID Title Status
None
-
+ Id
- The id of the build.
+ Id of the agent to return.
- Int32
+ String
- Int32
+ StringNone
@@ -7685,12 +7255,10 @@ ID Title Status
-
- ProjectName
+
+ PoolId
- 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.
+ Id of the pool.String
@@ -7699,20 +7267,29 @@ ID Title Status
None
-
+ Id
- The id of the build.
+ Id of the agent to return.
- Int32
+ String
- Int32
+ StringNone
-
+
+
+
+ System.String
+
+
+
+
+
+
@@ -7725,7 +7302,8 @@ ID Title Status
-
+ To read system capabilities that contain dots you have to use the PSObject Properties property.
+ (Get-VSTeamAgent 1 91).systemCapabilities.PSObject.Properties['Agent.OS'].Value
@@ -7733,22 +7311,26 @@ ID Title Status
- Get-VSTeamBuildDefinition
+ Get-VSTeamApprovalGet
- VSTeamBuildDefinition
+ VSTeamApproval
- Gets the build definitions for a team project.
+ Gets a list of approvals for all releases for a team project.
- The Get-VSTeamBuildDefinition function gets the build definitions for a team project.
- The project name is a Dynamic Parameter which may not be displayed in the syntax above but is mandatory.
- With just a project name, this function gets all of the build definitions for that team project.
- You can also specify a particular build definition by ID.
+ The Get-VSTeamApproval function gets the approvals for all releases for a team project.
+ With just a project name, this function gets all of the pending approvals for that team project.
+ When using with AzD "IncludeMyGroupApprovals" will be added to the request when Assigned To Filter is not empty.
+ When using with TFS "IncludeMyGroupApprovals" will be added to the request when Assigned To Filter, Release Id Filter are not empty and Status Filter equals Pending.
+ The Team.Approval type has three custom table formats:
+ - Pending: ID, Status, Release Name, Environment, Type, Approver Name, Release Definitions
+ - Approved: Release Name, Environment, Is Automated, Approval Type, Approver Name, Release Definitions, Comments
+ - Rejected: Release Name, Environment, Approval Type, Approver Name, Release Definition, Comments
- Get-VSTeamBuildDefinition
+ Get-VSTeamApprovalProjectName
@@ -7764,9 +7346,11 @@ ID Title Status
None
- Filter
+ StatusFilter
- Filters to definitions whose names equal this value. Append a * to filter to definitions whose names start with this value. For example: MS*
+ By default the function returns Pending approvals.
+ Using this filter you can return Approved, ReAssigned or Rejected approvals.
+ There is a custom table view for each status.String
@@ -7775,119 +7359,29 @@ ID Title Status
None
+
+ ReleaseIdsFilter
+
+ Only approvals for the release ids provided will be returned.
+
+ Int32[]
+
+ Int32[]
+
+
+ None
+
- Type
+ AssignedToFilter
- The type of the build definitions to retrieve. The acceptable values for this parameter are:
- - build
- - xaml
- - All
+ Approvals are filtered to only those assigned to this user.StringString
- All
-
-
-
- Get-VSTeamBuildDefinition
-
- 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
-
- Specifies one or more build definitions by ID.
- To specify multiple IDs, use commas to separate the IDs.
- To find the ID of a build definition, type Get-VSTeamBuildDefinition.
-
- Int32[]
-
- Int32[]
-
-
- None
-
-
- Revision
-
- Specifies the specific revision number of the definition to retrieve.
-
- Int32
-
- Int32
-
-
- -1
-
-
-
- Get-VSTeamBuildDefinition
-
- 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
-
-
- JSON
-
- Converts the raw response into JSON and displays in the console. This is required when you need to use the object to send back. Without this switch the JSON produced from the returned object will not match the expected shape of the JSON for sending back to server.
-
-
- SwitchParameter
-
-
- False
-
-
-
- Get-VSTeamBuildDefinition
-
- 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
-
-
- Raw
-
- Returns the raw response. This is required when you need to use the object to send back. Without this switch the object produced from the returned object will not match the expected shape of the JSON for sending back to server.
-
-
- SwitchParameter
-
-
- False
+ None
@@ -7907,9 +7401,11 @@ ID Title Status
None
- Filter
+ StatusFilter
- Filters to definitions whose names equal this value. Append a * to filter to definitions whose names start with this value. For example: MS*
+ By default the function returns Pending approvals.
+ Using this filter you can return Approved, ReAssigned or Rejected approvals.
+ There is a custom table view for each status.String
@@ -7918,27 +7414,10 @@ ID Title Status
None
-
- Type
-
- The type of the build definitions to retrieve. The acceptable values for this parameter are:
- - build
- - xaml
- - All
-
- String
-
- String
-
-
- All
-
-
- Id
+
+ ReleaseIdsFilter
- Specifies one or more build definitions by ID.
- To specify multiple IDs, use commas to separate the IDs.
- To find the ID of a build definition, type Get-VSTeamBuildDefinition.
+ Only approvals for the release ids provided will be returned.Int32[]
@@ -7948,40 +7427,16 @@ ID Title Status
None
- Revision
-
- Specifies the specific revision number of the definition to retrieve.
-
- Int32
-
- Int32
-
-
- -1
-
-
- JSON
-
- Converts the raw response into JSON and displays in the console. This is required when you need to use the object to send back. Without this switch the JSON produced from the returned object will not match the expected shape of the JSON for sending back to server.
-
- SwitchParameter
-
- SwitchParameter
-
-
- False
-
-
- Raw
+ AssignedToFilter
- Returns the raw response. This is required when you need to use the object to send back. Without this switch the object produced from the returned object will not match the expected shape of the JSON for sending back to server.
+ Approvals are filtered to only those assigned to this user.
- SwitchParameter
+ String
- SwitchParameter
+ String
- False
+ None
@@ -7997,30 +7452,32 @@ ID Title Status
+ This function has a Dynamic Parameter for ProjectName that specifies the project for which this function gets build definitions.
+ 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.You can pipe build definition IDs to this function.-------------------------- EXAMPLE 1 --------------------------
- PS C:\> Get-VSTeamBuildDefinition -ProjectName Demo | Format-List *
+ PS C:\> Get-VSTeamApproval -ProjectName Demo
- This command gets a list of all build definitions in the demo project.
- The pipeline operator (|) passes the data to the Format-List cmdlet, which displays all available properties (*) of the build definition objects.
+ This command gets a list of all pending approvals.-------------------------- EXAMPLE 2 --------------------------
- PS C:\> Get-VSTeamBuildDefinition -ProjectName Demo -id 2 -Json
+ PS C:\> Get-VSTeamApproval -ProjectName Demo -StatusFilter Approved | Format-Table -View Approved
- This command returns the raw object returned from the server formatted as a JSON string.
+ This command gets a list of all approved approvals using a custom table format.-------------------------- EXAMPLE 3 --------------------------
- PS C:\> Get-VSTeamBuildDefinition -ProjectName Demo -id 2 -Raw
+ PS C:\> Get-VSTeamApproval -ProjectName Demo -AssignedToFilter Administrator -StatusFilter Rejected | FT -View Rejected
- This command returns the raw object returned from the server.
+ This command gets a list of all approvals rejected by Administrator using a custom table format.
@@ -8045,19 +7502,21 @@ ID Title Status
- Get-VSTeamBuildLog
+ Get-VSTeamBuildGet
- VSTeamBuildLog
+ VSTeamBuild
- Displays the logs for the build.
+ Gets the builds for a team project.
- Displays the logs for the build.
+ The Get-VSTeamBuild function gets the builds for a team project.
+ With just a project name, this function gets all of the builds for that team project.
+ You can also specify a particular build by ID.
- Get-VSTeamBuildLog
+ Get-VSTeamBuildProjectName
@@ -8072,12 +7531,58 @@ ID Title Status
None
-
- Id
+
+ Top
- Specifies one or more builds by ID.
- To specify multiple IDs, use commas to separate the IDs.
- To find the ID of a build, type Get-VSTeamBuild.
+ Specifies the maximum number to return.
+
+ Int32
+
+ Int32
+
+
+ 0
+
+
+ ResultFilter
+
+ Specifies the result of the builds to return Succeeded, PartiallySucceeded, Failed, or Canceled.
+
+ String
+
+ String
+
+
+ None
+
+
+ ReasonFilter
+
+ Specifies the reason the build was created of the builds to return Manual, IndividualCI, BatchedCI, Schedule, UserCreated, ValidateShelveSet, CheckInShelveSet, Triggered, or All.
+
+ String
+
+ String
+
+
+ None
+
+
+ StatusFilter
+
+ Specifies the status of the builds to return InProgress, Completed, Cancelling, Postponed, NotStarted, or All.
+
+ String
+
+ String
+
+
+ None
+
+
+ Queues
+
+ A comma-delimited list of queue IDs that specifies the builds to return.Int32[]
@@ -8087,104 +7592,84 @@ ID Title Status
None
- Index
+ Definitions
- Each task stores its logs in an array. If you know the index of a specific task you can return just its logs. If you do not provide a value all the logs are displayed.
+ A comma-delimited list of build definition IDs that specifies the builds to return.
- Int32
+ Int32[]
- Int32
+ Int32[]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
-
- Specifies one or more builds by ID.
- To specify multiple IDs, use commas to separate the IDs.
- To find the ID of a build, type Get-VSTeamBuild.
-
- Int32[]
-
- Int32[]
-
-
- None
-
-
- Index
-
- Each task stores its logs in an array. If you know the index of a specific task you can return just its logs. If you do not provide a value all the logs are displayed.
-
- Int32
-
- Int32
-
-
- None
-
-
-
-
-
-
- System.Object
-
-
-
-
-
-
-
-
-
-
-
-
-
- -------------------------- EXAMPLE 1 --------------------------
- PS C:\> Get-VSTeamBuild -Top 1 | Get-VSTeamBuildLog
-
- This command displays the logs of the first build.
- The pipeline operator (|) passes the build id to the Get-VSTeamBuildLog cmdlet, which displays the logs.
-
-
-
-
-
-
-
- Get-VSTeamBuildTag
- Get
- VSTeamBuildTag
-
- Returns all the tags of a build.
-
-
-
- Returns all the tags of a build.
-
-
+
+ BuildNumber
+
+ Returns the build with this build number.
+ You can also use * for a starts with search. For example: 2015* Will return all build numbers that start with 2015.
+
+ String
+
+ String
+
+
+ None
+
+
+ Type
+
+ The type of builds to retrieve.
+
+ String
+
+ String
+
+
+ None
+
+
+ MaxBuildsPerDefinition
+
+ The maximum number of builds to retrieve for each definition.
+ This is only valid when definitions is also specified.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ Properties
+
+ A comma-delimited list of extended properties to retrieve.
+
+ String[]
+
+ String[]
+
+
+ None
+
+
+ Id
+
+ Specifies one or more builds by ID.
+ To specify multiple IDs, use commas to separate the IDs.
+ To find the ID of a build, type Get-VSTeamBuild.
+
+ Int32[]
+
+ Int32[]
+
+
+ None
+
+
- Get-VSTeamBuildTag
+ Get-VSTeamBuildProjectName
@@ -8199,18 +7684,73 @@ ID Title Status
None
-
+ Id
- The id of the build.
+ Specifies one or more builds by ID.
+ To specify multiple IDs, use commas to separate the IDs.
+ To find the ID of a build, type Get-VSTeamBuild.
- Int32
+ Int32[]
- Int32
+ Int32[]
+
+
+ None
+
+
+ JSON
+
+ Converts the raw response into JSON and displays in the console. This is required when you need to use the object to send back. Without this switch the JSON produced from the returned object will not match the expected shape of the JSON for sending back to server.
+
+
+ SwitchParameter
+
+
+ False
+
+
+
+ Get-VSTeamBuild
+
+ 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
+
+ Specifies one or more builds by ID.
+ To specify multiple IDs, use commas to separate the IDs.
+ To find the ID of a build, type Get-VSTeamBuild.
+
+ Int32[]
+
+ Int32[]None
+
+ Raw
+
+ Returns the raw response. This is required when you need to use the object to send back. Without this switch the object produced from the returned object will not match the expected shape of the JSON for sending back to server.
+
+
+ SwitchParameter
+
+
+ False
+
@@ -8228,59 +7768,2190 @@ ID Title Status
None
-
- Id
+
+ Top
- The id of the build.
+ Specifies the maximum number to return.Int32Int32
+ 0
+
+
+ ResultFilter
+
+ Specifies the result of the builds to return Succeeded, PartiallySucceeded, Failed, or Canceled.
+
+ String
+
+ String
+
+ None
-
-
-
-
+
+ ReasonFilter
+
+ Specifies the reason the build was created of the builds to return Manual, IndividualCI, BatchedCI, Schedule, UserCreated, ValidateShelveSet, CheckInShelveSet, Triggered, or All.
+
+ String
- System.Object
+ String
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Get-VSTeamClassificationNode
+ None
+
+
+ StatusFilter
+
+ Specifies the status of the builds to return InProgress, Completed, Cancelling, Postponed, NotStarted, or All.
+
+ String
+
+ String
+
+
+ None
+
+
+ Queues
+
+ A comma-delimited list of queue IDs that specifies the builds to return.
+
+ Int32[]
+
+ Int32[]
+
+
+ None
+
+
+ Definitions
+
+ A comma-delimited list of build definition IDs that specifies the builds to return.
+
+ Int32[]
+
+ Int32[]
+
+
+ None
+
+
+ BuildNumber
+
+ Returns the build with this build number.
+ You can also use * for a starts with search. For example: 2015* Will return all build numbers that start with 2015.
+
+ String
+
+ String
+
+
+ None
+
+
+ Type
+
+ The type of builds to retrieve.
+
+ String
+
+ String
+
+
+ None
+
+
+ MaxBuildsPerDefinition
+
+ The maximum number of builds to retrieve for each definition.
+ This is only valid when definitions is also specified.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ Properties
+
+ A comma-delimited list of extended properties to retrieve.
+
+ String[]
+
+ String[]
+
+
+ None
+
+
+ Id
+
+ Specifies one or more builds by ID.
+ To specify multiple IDs, use commas to separate the IDs.
+ To find the ID of a build, type Get-VSTeamBuild.
+
+ Int32[]
+
+ Int32[]
+
+
+ None
+
+
+ JSON
+
+ Converts the raw response into JSON and displays in the console. This is required when you need to use the object to send back. Without this switch the JSON produced from the returned object will not match the expected shape of the JSON for sending back to server.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ Raw
+
+ Returns the raw response. This is required when you need to use the object to send back. Without this switch the object produced from the returned object will not match the expected shape of the JSON for sending back to server.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+
+
+
+
+ Team.Build
+
+
+
+
+
+
+
+
+ This function has a Dynamic Parameter for ProjectName that specifies the project for which this function gets builds.
+ 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.
+ You can pipe build IDs to this function.
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ PS C:\> Get-VSTeamBuild -ProjectName demo | Format-List *
+
+ This command gets a list of all builds in the demo project.
+ The pipeline operator (|) passes the data to the Format-List cmdlet, which displays all available properties (*) of the build objects.
+
+
+
+ -------------------------- EXAMPLE 2 --------------------------
+ PS C:\> Get-VSTeamBuild -ProjectName demo -top 5 -resultFilter failed
+
+ This command gets a list of 5 failed builds in the demo project.
+
+
+
+ -------------------------- EXAMPLE 3 --------------------------
+ PS C:\> 1203,1204 | Get-VSTeamBuild -ProjectName demo
+
+ This command gets builds with IDs 1203 and 1204 by using the pipeline.
+
+
+
+ -------------------------- EXAMPLE 4 --------------------------
+ PS C:\> Get-VSTeamBuild -ProjectName demo -ID 1203,1204
+
+ This command gets builds with IDs 1203 and 1204 by using the ID parameter.
+
+
+
+ -------------------------- EXAMPLE 5 --------------------------
+ PS C:\> Get-VSTeamBuild -ProjectName demo -ID 1203 -Raw
+
+ This command returns the raw object returned from the server.
+
+
+
+
+
+ Set-VSTeamAccount
+
+
+
+ Set-VSTeamDefaultProject
+
+
+
+ Add-VSTeamBuild
+
+
+
+ Remove-VSTeamBuild
+
+
+
+
+
+
+ Get-VSTeamBuildArtifactGet
- VSTeamClassificationNode
+ VSTeamBuildArtifact
- Gets the classification node for a given node path.
+ Returns the artifacts of a build.
- Gets the classification node for a given node path.
+ Returns the artifacts of a build.
- Get-VSTeamClassificationNode
+ Get-VSTeamBuildArtifactProjectName
- 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
+
+ The id of the build.
+
+ Int32
+
+ Int32
+
+
+ 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
+
+ The id of the build.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+
+
+
+
+ System.Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-VSTeamBuildDefinition
+ Get
+ VSTeamBuildDefinition
+
+ Gets the build definitions for a team project.
+
+
+
+ The Get-VSTeamBuildDefinition function gets the build definitions for a team project.
+ The project name is a Dynamic Parameter which may not be displayed in the syntax above but is mandatory.
+ With just a project name, this function gets all of the build definitions for that team project.
+ You can also specify a particular build definition by ID.
+
+
+
+ Get-VSTeamBuildDefinition
+
+ 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
+
+
+ Filter
+
+ Filters to definitions whose names equal this value. Append a * to filter to definitions whose names start with this value. For example: MS*
+
+ String
+
+ String
+
+
+ None
+
+
+ Type
+
+ The type of the build definitions to retrieve. The acceptable values for this parameter are:
+ - build
+ - xaml
+ - All
+
+ String
+
+ String
+
+
+ All
+
+
+
+ Get-VSTeamBuildDefinition
+
+ 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
+
+ Specifies one or more build definitions by ID.
+ To specify multiple IDs, use commas to separate the IDs.
+ To find the ID of a build definition, type Get-VSTeamBuildDefinition.
+
+ Int32[]
+
+ Int32[]
+
+
+ None
+
+
+ Revision
+
+ Specifies the specific revision number of the definition to retrieve.
+
+ Int32
+
+ Int32
+
+
+ -1
+
+
+
+ Get-VSTeamBuildDefinition
+
+ 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
+
+
+ JSON
+
+ Converts the raw response into JSON and displays in the console. This is required when you need to use the object to send back. Without this switch the JSON produced from the returned object will not match the expected shape of the JSON for sending back to server.
+
+
+ SwitchParameter
+
+
+ False
+
+
+
+ Get-VSTeamBuildDefinition
+
+ 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
+
+
+ Raw
+
+ Returns the raw response. This is required when you need to use the object to send back. Without this switch the object produced from the returned object will not match the expected shape of the JSON for sending back to server.
+
+
+ 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
+
+
+ Filter
+
+ Filters to definitions whose names equal this value. Append a * to filter to definitions whose names start with this value. For example: MS*
+
+ String
+
+ String
+
+
+ None
+
+
+ Type
+
+ The type of the build definitions to retrieve. The acceptable values for this parameter are:
+ - build
+ - xaml
+ - All
+
+ String
+
+ String
+
+
+ All
+
+
+ Id
+
+ Specifies one or more build definitions by ID.
+ To specify multiple IDs, use commas to separate the IDs.
+ To find the ID of a build definition, type Get-VSTeamBuildDefinition.
+
+ Int32[]
+
+ Int32[]
+
+
+ None
+
+
+ Revision
+
+ Specifies the specific revision number of the definition to retrieve.
+
+ Int32
+
+ Int32
+
+
+ -1
+
+
+ JSON
+
+ Converts the raw response into JSON and displays in the console. This is required when you need to use the object to send back. Without this switch the JSON produced from the returned object will not match the expected shape of the JSON for sending back to server.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ Raw
+
+ Returns the raw response. This is required when you need to use the object to send back. Without this switch the object produced from the returned object will not match the expected shape of the JSON for sending back to server.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+
+
+
+
+ Team.BuildDefinition
+
+
+
+
+
+
+
+
+ You can pipe build definition IDs to this function.
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ PS C:\> Get-VSTeamBuildDefinition -ProjectName Demo | Format-List *
+
+ This command gets a list of all build definitions in the demo project.
+ The pipeline operator (|) passes the data to the Format-List cmdlet, which displays all available properties (*) of the build definition objects.
+
+
+
+ -------------------------- EXAMPLE 2 --------------------------
+ PS C:\> Get-VSTeamBuildDefinition -ProjectName Demo -id 2 -Json
+
+ This command returns the raw object returned from the server formatted as a JSON string.
+
+
+
+ -------------------------- EXAMPLE 3 --------------------------
+ PS C:\> Get-VSTeamBuildDefinition -ProjectName Demo -id 2 -Raw
+
+ This command returns the raw object returned from the server.
+
+
+
+
+
+ Set-VSTeamAccount
+
+
+
+ Set-VSTeamDefaultProject
+
+
+
+ Add-VSTeamBuildDefinition
+
+
+
+ Remove-VSTeamBuildDefinition
+
+
+
+
+
+
+ Get-VSTeamBuildLog
+ Get
+ VSTeamBuildLog
+
+ Displays the logs for the build.
+
+
+
+ Displays the logs for the build.
+
+
+
+ Get-VSTeamBuildLog
+
+ 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
+
+ Specifies one or more builds by ID.
+ To specify multiple IDs, use commas to separate the IDs.
+ To find the ID of a build, type Get-VSTeamBuild.
+
+ Int32[]
+
+ Int32[]
+
+
+ None
+
+
+ Index
+
+ Each task stores its logs in an array. If you know the index of a specific task you can return just its logs. If you do not provide a value all the logs are displayed.
+
+ Int32
+
+ Int32
+
+
+ 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
+
+ Specifies one or more builds by ID.
+ To specify multiple IDs, use commas to separate the IDs.
+ To find the ID of a build, type Get-VSTeamBuild.
+
+ Int32[]
+
+ Int32[]
+
+
+ None
+
+
+ Index
+
+ Each task stores its logs in an array. If you know the index of a specific task you can return just its logs. If you do not provide a value all the logs are displayed.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+
+
+
+
+ System.Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ PS C:\> Get-VSTeamBuild -Top 1 | Get-VSTeamBuildLog
+
+ This command displays the logs of the first build.
+ The pipeline operator (|) passes the build id to the Get-VSTeamBuildLog cmdlet, which displays the logs.
+
+
+
+
+
+
+
+ Get-VSTeamBuildTag
+ Get
+ VSTeamBuildTag
+
+ Returns all the tags of a build.
+
+
+
+ Returns all the tags of a build.
+
+
+
+ Get-VSTeamBuildTag
+
+ 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
+
+ The id of the build.
+
+ Int32
+
+ Int32
+
+
+ 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
+
+ The id of the build.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+
+
+
+
+ System.Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-VSTeamClassificationNode
+ Get
+ VSTeamClassificationNode
+
+ Gets the classification node for a given node path.
+
+
+
+ Gets the classification node for a given node path.
+
+
+
+ Get-VSTeamClassificationNode
+
+ 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
+
+
+ StructureGroup
+
+ Structure group of the classification node, area or iteration.
+
+ string
+
+ string
+
+
+ None
+
+
+ Depth
+
+ Depth of children to fetch.
+
+ int32
+
+ int32
+
+
+ None
+
+
+ Path
+
+ Path of the classification node.
+
+ string
+
+ string
+
+
+ None
+
+
+ Ids
+
+ Integer classification nodes ids.
+
+ int32[]
+
+ int32[]
+
+
+ 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
+
+
+ StructureGroup
+
+ Structure group of the classification node, area or iteration.
+
+ string
+
+ string
+
+
+ None
+
+
+ Depth
+
+ Depth of children to fetch.
+
+ int32
+
+ int32
+
+
+ None
+
+
+ Path
+
+ Path of the classification node.
+
+ string
+
+ string
+
+
+ None
+
+
+ Ids
+
+ Integer classification nodes ids.
+
+ int32[]
+
+ int32[]
+
+
+ None
+
+
+
+
+
+
+ System.Object
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-VSTeamCloudSubscription
+ Get
+ VSTeamCloudSubscription
+
+ Gets the Azure subscriptions associated with the Team Services account.
+
+
+
+ The Get-VSTeamCloudSubscription function gets the Azure subscriptions associated with the Team Services account.
+
+
+
+ Get-VSTeamCloudSubscription
+
+
+
+
+
+
+ None
+
+
+
+
+
+
+
+
+
+ Team.AzureSubscription
+
+
+
+
+
+
+
+
+ This function currently is not supported in TFS.
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ PS C:\> Get-VSTeamCloudSubscription
+
+ This command gets a list of all Azure subscriptions associated with the Team Services account.
+
+
+
+
+
+ Set-VSTeamAccount
+
+
+
+
+
+
+ Get-VSTeamDescriptor
+ Get
+ VSTeamDescriptor
+
+ Resolve a storage key to a descriptor.
+
+
+
+ Resolve a storage key to a descriptor.
+
+
+
+ Get-VSTeamDescriptor
+
+ StorageKey
+
+ Storage key of the subject (user, group, scope, etc.) to resolve
+
+ String
+
+ String
+
+
+ None
+
+
+
+
+
+ StorageKey
+
+ Storage key of the subject (user, group, scope, etc.) to resolve
+
+ String
+
+ String
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get-VSTeamExtension
+ Get
+ VSTeamExtension
+
+ Get the installed extensions in the specified Azure DevOps or Team Foundation Server project.
+
+
+
+ Get the installed extensions in the specified Azure DevOps or Team Foundation Server project.
+
+
+
+ Get-VSTeamExtension
+
+ PublisherId
+
+ The id of the publisher.
+
+ String
+
+ String
+
+
+ None
+
+
+ ExtensionId
+
+ The id of the extension.
+
+ String
+
+ String
+
+
+ None
+
+
+
+ Get-VSTeamExtension
+
+ IncludeInstallationIssues
+
+ If true (the default), include installed extensions with issues.
+
+
+ SwitchParameter
+
+
+ False
+
+
+ IncludeDisabledExtensions
+
+ If true (the default), include disabled extensions in the results.
+
+
+ SwitchParameter
+
+
+ False
+
+
+ IncludeErrors
+
+ If true, include installed extensions with errors.
+
+
+ SwitchParameter
+
+
+ False
+
+
+
+
+
+ PublisherId
+
+ The id of the publisher.
+
+ String
+
+ String
+
+
+ None
+
+
+ ExtensionId
+
+ The id of the extension.
+
+ String
+
+ String
+
+
+ None
+
+
+ IncludeInstallationIssues
+
+ If true (the default), include installed extensions with issues.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ IncludeDisabledExtensions
+
+ If true (the default), include disabled extensions in the results.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ IncludeErrors
+
+ If true, include installed extensions with errors.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+ Add-VSTeamExtension
+
+
+
+ Get-VSTeamExtension
+
+
+
+ Remove-VSTeamExtension
+
+
+
+ Update-VSTeamExtension
+
+
+
+
+
+
+ Get-VSTeamFeed
+ Get
+ VSTeamFeed
+
+ Returns a list of package feeds for the account.
+
+
+
+ Get-VSTeamFeed gets all the feeds for the account
+
+
+
+ Get-VSTeamFeed
+
+ FeedId
+
+ Specifies the ID of the feed.
+
+ Guid
+
+ Guid
+
+
+ None
+
+
+
+
+
+ FeedId
+
+ Specifies the ID of the feed.
+
+ Guid
+
+ Guid
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ PS C:\> Get-VSTeamFeed
+
+ This command returns all the package feeds for the account.
+
+
+
+
+
+
+
+ Get-VSTeamGitCommit
+ Get
+ VSTeamGitCommit
+
+ Retrieve git commits for a project
+
+
+
+ The Get-VSTeamGitCommit function gets the commits for a git repository.
+
+
+
+ Get-VSTeamGitCommit
+
+ 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
+
+
+ RepositoryId
+
+ The id or friendly name of the repository. To use the friendly name, projectId must also be specified.
+
+ Guid
+
+ Guid
+
+
+ None
+
+
+ FromDate
+
+ If provided, only include history entries created after this date (string)
+
+ DateTime
+
+ DateTime
+
+
+ None
+
+
+ ToDate
+
+ If provided, only include history entries created before this date (string)
+
+ DateTime
+
+ DateTime
+
+
+ None
+
+
+ ItemVersionVersionType
+
+ Version type (branch, tag, or commit). Determines how Id is interpreted. The acceptable values for this parameter are:
+ - branch
+ - commit
+ - tag
+
+ String
+
+ String
+
+
+ None
+
+
+ ItemVersionVersion
+
+ Version string identifier (name of tag/branch, SHA1 of commit)
+
+ String
+
+ String
+
+
+ None
+
+
+ ItemVersionVersionOptions
+
+ Version options - Specify additional modifiers to version (e.g Previous). The acceptable values for this parameter are:
+ - firstParent
+ - none
+ - previousChange
+
+ String
+
+ String
+
+
+ None
+
+
+ CompareVersionVersionType
+
+ Version type (branch, tag, or commit). Determines how Id is interpreted. The acceptable values for this parameter are:
+ - branch
+ - commit
+ - tag
+
+ String
+
+ String
+
+
+ None
+
+
+ CompareVersionVersion
+
+ Version string identifier (name of tag/branch, SHA1 of commit). The acceptable values for this parameter are:
+ - firstParent
+ - none
+ - previousChange
+
+ String
+
+ String
+
+
+ None
+
+
+ CompareVersionVersionOptions
+
+ Version options - Specify additional modifiers to version (e.g Previous)
+
+ String
+
+ String
+
+
+ None
+
+
+ FromCommitId
+
+ If provided, a lower bound for filtering commits alphabetically
+
+ String
+
+ String
+
+
+ None
+
+
+ ToCommitId
+
+ If provided, an upper bound for filtering commits alphabetically
+
+ String
+
+ String
+
+
+ None
+
+
+ Author
+
+ Alias or display name of the author
+
+ String
+
+ String
+
+
+ None
+
+
+ ItemPath
+
+ Path of item to search under
+
+ String
+
+ String
+
+
+ None
+
+
+ ExcludeDeletes
+
+ Only applies when an itemPath is specified. This determines whether to exclude delete entries of the specified path.
+
+
+ SwitchParameter
+
+
+ False
+
+
+ Top
+
+ Maximum number of entries to retrieve
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ Skip
+
+ Number of entries to skip
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ User
+
+ Alias or display name of the committer
+
+ String
+
+ String
+
+
+ None
+
+
+
+ Get-VSTeamGitCommit
+
+ 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
+
+
+ RepositoryId
+
+ The id or friendly name of the repository. To use the friendly name, projectId must also be specified.
+
+ Guid
+
+ Guid
+
+
+ None
+
+
+ FromDate
+
+ If provided, only include history entries created after this date (string)
+
+ DateTime
+
+ DateTime
+
+
+ None
+
+
+ ToDate
+
+ If provided, only include history entries created before this date (string)
+
+ DateTime
+
+ DateTime
+
+
+ None
+
+
+ ItemVersionVersionType
+
+ Version type (branch, tag, or commit). Determines how Id is interpreted. The acceptable values for this parameter are:
+ - branch
+ - commit
+ - tag
+
+ String
+
+ String
+
+
+ None
+
+
+ ItemVersionVersion
+
+ Version string identifier (name of tag/branch, SHA1 of commit)
+
+ String
+
+ String
+
+
+ None
+
+
+ ItemVersionVersionOptions
+
+ Version options - Specify additional modifiers to version (e.g Previous). The acceptable values for this parameter are:
+ - firstParent
+ - none
+ - previousChange
+
+ String
+
+ String
+
+
+ None
+
+
+ CompareVersionVersionType
+
+ Version type (branch, tag, or commit). Determines how Id is interpreted. The acceptable values for this parameter are:
+ - branch
+ - commit
+ - tag
+
+ String
+
+ String
+
+
+ None
+
+
+ CompareVersionVersion
+
+ Version string identifier (name of tag/branch, SHA1 of commit). The acceptable values for this parameter are:
+ - firstParent
+ - none
+ - previousChange
+
+ String
+
+ String
+
+
+ None
+
+
+ CompareVersionVersionOptions
+
+ Version options - Specify additional modifiers to version (e.g Previous)
+
+ String
+
+ String
+
+
+ None
+
+
+ FromCommitId
+
+ If provided, a lower bound for filtering commits alphabetically
+
+ String
+
+ String
+
+
+ None
+
+
+ ToCommitId
+
+ If provided, an upper bound for filtering commits alphabetically
+
+ String
+
+ String
+
+
+ None
+
+
+ Author
+
+ Alias or display name of the author
+
+ String
+
+ String
+
+
+ None
+
+
+ Top
+
+ Maximum number of entries to retrieve
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ Skip
+
+ Number of entries to skip
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ User
+
+ Alias or display name of the committer
+
+ String
+
+ String
+
+
+ None
+
+
+
+ Get-VSTeamGitCommit
+
+ 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
+
+
+ RepositoryId
+
+ The id or friendly name of the repository. To use the friendly name, projectId must also be specified.
+
+ Guid
+
+ Guid
+
+
+ None
+
+
+ FromDate
+
+ If provided, only include history entries created after this date (string)
+
+ DateTime
+
+ DateTime
+
+
+ None
+
+
+ ToDate
+
+ If provided, only include history entries created before this date (string)
+
+ DateTime
+
+ DateTime
+
+
+ None
+
+
+ ItemVersionVersionType
+
+ Version type (branch, tag, or commit). Determines how Id is interpreted. The acceptable values for this parameter are:
+ - branch
+ - commit
+ - tag
+
+ String
+
+ String
+
+
+ None
+
+
+ ItemVersionVersion
+
+ Version string identifier (name of tag/branch, SHA1 of commit)
+
+ String
+
+ String
+
+
+ None
+
+
+ ItemVersionVersionOptions
+
+ Version options - Specify additional modifiers to version (e.g Previous). The acceptable values for this parameter are:
+ - firstParent
+ - none
+ - previousChange
+
+ String
+
+ String
+
+
+ None
+
+
+ CompareVersionVersionType
+
+ Version type (branch, tag, or commit). Determines how Id is interpreted. The acceptable values for this parameter are:
+ - branch
+ - commit
+ - tag
+
+ String
+
+ String
+
+
+ None
+
+
+ CompareVersionVersion
+
+ Version string identifier (name of tag/branch, SHA1 of commit). The acceptable values for this parameter are:
+ - firstParent
+ - none
+ - previousChange
+
+ String
+
+ String
+
+
+ None
+
+
+ CompareVersionVersionOptions
+
+ Version options - Specify additional modifiers to version (e.g Previous)
+
+ String
+
+ String
+
+
+ None
+
+
+ FromCommitId
+
+ If provided, a lower bound for filtering commits alphabetically
+
+ String
+
+ String
+
+
+ None
+
+
+ ToCommitId
+
+ If provided, an upper bound for filtering commits alphabetically
+
+ String
+
+ String
+
+
+ None
+
+
+ Author
+
+ Alias or display name of the author
+
+ String
+
+ String
+
+
+ None
+
+
+ Top
+
+ Maximum number of entries to retrieve
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ Skip
+
+ Number of entries to skip
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ User
+
+ Alias or display name of the committer
+
+ String
+
+ String
+
+
+ None
+
+
+
+ Get-VSTeamGitCommit
+
+ 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
+
+
+ RepositoryId
+
+ The id or friendly name of the repository. To use the friendly name, projectId must also be specified.
+
+ Guid
+
+ Guid
+
+
+ None
+
+
+ FromDate
+
+ If provided, only include history entries created after this date (string)
+
+ DateTime
+
+ DateTime
+
+
+ None
+
+
+ ToDate
+
+ If provided, only include history entries created before this date (string)
+
+ DateTime
+
+ DateTime
+
+
+ None
+
+
+ ItemVersionVersionType
+
+ Version type (branch, tag, or commit). Determines how Id is interpreted. The acceptable values for this parameter are:
+ - branch
+ - commit
+ - tag
+
+ String
+
+ String
+
+
+ None
+
+
+ ItemVersionVersion
+
+ Version string identifier (name of tag/branch, SHA1 of commit)
+
+ String
+
+ String
+
+
+ None
+
+
+ ItemVersionVersionOptions
+
+ Version options - Specify additional modifiers to version (e.g Previous). The acceptable values for this parameter are:
+ - firstParent
+ - none
+ - previousChange
+
+ String
+
+ String
+
+
+ None
+
+
+ CompareVersionVersionType
+
+ Version type (branch, tag, or commit). Determines how Id is interpreted. The acceptable values for this parameter are:
+ - branch
+ - commit
+ - tag
+
+ String
+
+ String
+
+
+ None
+
+
+ CompareVersionVersion
+
+ Version string identifier (name of tag/branch, SHA1 of commit). The acceptable values for this parameter are:
+ - firstParent
+ - none
+ - previousChange
+
+ String
+
+ String
+
+
+ None
+
+
+ CompareVersionVersionOptions
+
+ Version options - Specify additional modifiers to version (e.g Previous)
+
+ String
+
+ String
+
+
+ None
+
+
+ FromCommitId
+
+ If provided, a lower bound for filtering commits alphabetically
+
+ String
+
+ String
+
+
+ None
+
+
+ ToCommitId
+
+ If provided, an upper bound for filtering commits alphabetically
+
+ String
+
+ String
+
+
+ None
+
+
+ Author
+
+ Alias or display name of the authorString
@@ -8290,37 +9961,105 @@ ID Title Status
None
- StructureGroup
+ ItemPath
- Structure group of the classification node, area or iteration.
+ Path of item to search under
- string
+ String
- string
+ StringNone
- Depth
+ ExcludeDeletes
- Depth of children to fetch.
+ Only applies when an itemPath is specified. This determines whether to exclude delete entries of the specified path.
- int32
- int32
+ SwitchParameter
+
+
+ False
+
+
+ Top
+
+ Maximum number of entries to retrieve
+
+ Int32
+
+ Int32None
- Path
+ Skip
- Path of the classification node.
+ Number of entries to skip
- string
+ Int32
- string
+ Int32
+
+
+ None
+
+
+ HistoryMode
+
+ What Git history mode should be used. This only applies to the search criteria when Ids = null and an itemPath is specified. The acceptable values for this parameter are:
+ - firstParent
+ - fullHistory
+ - fullHistorySimplifyMerges
+ - simplifiedHistory
+
+ String
+
+ String
+
+
+ None
+
+
+ User
+
+ Alias or display name of the committer
+
+ String
+
+ String
+
+
+ None
+
+
+
+ Get-VSTeamGitCommit
+
+ 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
+
+
+ RepositoryId
+
+ The id or friendly name of the repository. To use the friendly name, projectId must also be specified.
+
+ Guid
+
+ GuidNone
@@ -8328,11 +10067,11 @@ ID Title Status
Ids
- Integer classification nodes ids.
+ If provided, specifies the exact commit ids of the commits to fetch. May not be combined with other parameters.
- int32[]
+ String
- int32[]
+ StringNone
@@ -8354,167 +10093,118 @@ ID Title Status
None
+
+ RepositoryId
+
+ The id or friendly name of the repository. To use the friendly name, projectId must also be specified.
+
+ Guid
+
+ Guid
+
+
+ None
+
- StructureGroup
+ FromDate
- Structure group of the classification node, area or iteration.
+ If provided, only include history entries created after this date (string)
- string
+ DateTime
- string
+ DateTimeNone
- Depth
+ ToDate
- Depth of children to fetch.
+ If provided, only include history entries created before this date (string)
- int32
+ DateTime
- int32
+ DateTimeNone
- Path
+ ItemVersionVersionType
- Path of the classification node.
+ Version type (branch, tag, or commit). Determines how Id is interpreted. The acceptable values for this parameter are:
+ - branch
+ - commit
+ - tag
- string
+ String
- string
+ StringNone
- Ids
+ ItemVersionVersion
- Integer classification nodes ids.
+ Version string identifier (name of tag/branch, SHA1 of commit)
- int32[]
+ String
- int32[]
+ StringNone
-
-
-
-
+
+ ItemVersionVersionOptions
+
+ Version options - Specify additional modifiers to version (e.g Previous). The acceptable values for this parameter are:
+ - firstParent
+ - none
+ - previousChange
+
+ String
- System.Object
+ String
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Get-VSTeamCloudSubscription
- Get
- VSTeamCloudSubscription
-
- Gets the Azure subscriptions associated with the Team Services account.
-
-
-
- The Get-VSTeamCloudSubscription function gets the Azure subscriptions associated with the Team Services account.
-
-
-
- Get-VSTeamCloudSubscription
-
-
-
-
-
+ None
+
+
+ CompareVersionVersionType
+
+ Version type (branch, tag, or commit). Determines how Id is interpreted. The acceptable values for this parameter are:
+ - branch
+ - commit
+ - tag
+
+ String
- None
+ String
+
-
-
-
-
-
-
-
+ None
+
+
+ CompareVersionVersion
+
+ Version string identifier (name of tag/branch, SHA1 of commit). The acceptable values for this parameter are:
+ - firstParent
+ - none
+ - previousChange
+
+ String
- Team.AzureSubscription
+ String
+
-
-
-
-
-
-
-
- This function currently is not supported in TFS.
-
-
-
-
- -------------------------- EXAMPLE 1 --------------------------
- PS C:\> Get-VSTeamCloudSubscription
-
- This command gets a list of all Azure subscriptions associated with the Team Services account.
-
-
-
-
-
- Set-VSTeamAccount
-
-
-
-
-
-
- Get-VSTeamDescriptor
- Get
- VSTeamDescriptor
-
- Resolve a storage key to a descriptor.
-
-
-
- Resolve a storage key to a descriptor.
-
-
-
- Get-VSTeamDescriptor
-
- StorageKey
-
- Storage key of the subject (user, group, scope, etc.) to resolve
-
- String
-
- String
-
-
- None
-
-
-
-
-
- StorageKey
+ None
+
+
+ CompareVersionVersionOptions
- Storage key of the subject (user, group, scope, etc.) to resolve
+ Version options - Specify additional modifiers to version (e.g Previous)String
@@ -8523,99 +10213,10 @@ ID Title Status
None
-
-
-
-
-
-
-
-
-
-
-
-
-
- Get-VSTeamExtension
- Get
- VSTeamExtension
-
- Get the installed extensions in the specified Azure DevOps or Team Foundation Server project.
-
-
-
- Get the installed extensions in the specified Azure DevOps or Team Foundation Server project.
-
-
-
- Get-VSTeamExtension
-
- PublisherId
-
- The id of the publisher.
-
- String
-
- String
-
-
- None
-
-
- ExtensionId
-
- The id of the extension.
-
- String
-
- String
-
-
- None
-
-
-
- Get-VSTeamExtension
-
- IncludeInstallationIssues
-
- If true (the default), include installed extensions with issues.
-
-
- SwitchParameter
-
-
- False
-
-
- IncludeDisabledExtensions
-
- If true (the default), include disabled extensions in the results.
-
-
- SwitchParameter
-
-
- False
-
-
- IncludeErrors
-
- If true, include installed extensions with errors.
-
-
- SwitchParameter
-
-
- False
-
-
-
-
-
- PublisherId
+
+ FromCommitId
- The id of the publisher.
+ If provided, a lower bound for filtering commits alphabeticallyString
@@ -8624,10 +10225,10 @@ ID Title Status
None
-
- ExtensionId
+
+ ToCommitId
- The id of the extension.
+ If provided, an upper bound for filtering commits alphabeticallyString
@@ -8637,33 +10238,45 @@ ID Title Status
None
- IncludeInstallationIssues
+ Author
- If true (the default), include installed extensions with issues.
+ Alias or display name of the author
- SwitchParameter
+ String
- SwitchParameter
+ String
- False
+ None
- IncludeDisabledExtensions
+ Ids
- If true (the default), include disabled extensions in the results.
+ If provided, specifies the exact commit ids of the commits to fetch. May not be combined with other parameters.
- SwitchParameter
+ String
- SwitchParameter
+ String
- False
+ None
- IncludeErrors
+ ItemPath
- If true, include installed extensions with errors.
+ Path of item to search under
+
+ String
+
+ String
+
+
+ None
+
+
+ ExcludeDeletes
+
+ Only applies when an itemPath is specified. This determines whether to exclude delete entries of the specified path.SwitchParameter
@@ -8672,57 +10285,165 @@ ID Title Status
False
+
+ Top
+
+ Maximum number of entries to retrieve
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ Skip
+
+ Number of entries to skip
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ HistoryMode
+
+ What Git history mode should be used. This only applies to the search criteria when Ids = null and an itemPath is specified. The acceptable values for this parameter are:
+ - firstParent
+ - fullHistory
+ - fullHistorySimplifyMerges
+ - simplifiedHistory
+
+ String
+
+ String
+
+
+ None
+
+
+ User
+
+ Alias or display name of the committer
+
+ String
+
+ String
+
+
+ None
+
-
+ This function has a Dynamic Parameter for ProjectName that specifies the project for which this function gets commits.
+ 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.
+ You can pipe a repository ID to this function.
-
-
-
- Add-VSTeamExtension
-
-
-
- Get-VSTeamExtension
-
-
-
- Remove-VSTeamExtension
-
-
-
- Update-VSTeamExtension
-
-
-
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ PS C:\> Get-VSTeamGitCommit -ProjectName demo -RepositoryId 118C262F-0D4C-4B76-BD9B-7DD8CA12F196
+
+ This command gets a list of all commits in the demo project for a specific repository.
+
+
+
+
- Get-VSTeamFeed
+ Get-VSTeamGitRefGet
- VSTeamFeed
+ VSTeamGitRef
- Returns a list of package feeds for the account.
+ Queries the provided repository for its refs and returns them.
- Get-VSTeamFeed gets all the feeds for the account
+ Get-VSTeamGitRef gets all the refs for the provided repository.
- Get-VSTeamFeed
+ Get-VSTeamGitRef
+
+ 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
+
- FeedId
+ RepositoryId
+
+ Specifies the ID of the repository.
+
+ Guid
+
+ Guid
+
+
+ None
+
+
+ Filter
+
+ A filter to apply to the refs (starts with).
+
+ string
+
+ string
+
+
+ None
+
+
+ FilterContains
+
+ A filter to apply to the refs (contains). (Azure DevOps Service and Azure DevOps Server 2019+ only)
+
+ string
+
+ string
+
+
+ None
+
+
+ Top
- Specifies the ID of the feed.
+ Maximum number of refs to return. It cannot be bigger than 1000. If it is not provided but continuationToken is, top will default to 100. (Azure DevOps Service and Azure DevOps Server 2019+ only)
- Guid
+ int
- Guid
+ int
+
+
+ None
+
+
+ ContinuationToken
+
+ The continuation token used for pagination. (Azure DevOps Service and Azure DevOps Server 2019+ only)
+
+ string
+
+ stringNone
@@ -8730,10 +10451,24 @@ ID Title Status
+
+ 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
+
- FeedId
+ RepositoryId
- Specifies the ID of the feed.
+ Specifies the ID of the repository.Guid
@@ -8742,6 +10477,54 @@ ID Title Status
None
+
+ Filter
+
+ A filter to apply to the refs (starts with).
+
+ string
+
+ string
+
+
+ None
+
+
+ FilterContains
+
+ A filter to apply to the refs (contains). (Azure DevOps Service and Azure DevOps Server 2019+ only)
+
+ string
+
+ string
+
+
+ None
+
+
+ Top
+
+ Maximum number of refs to return. It cannot be bigger than 1000. If it is not provided but continuationToken is, top will default to 100. (Azure DevOps Service and Azure DevOps Server 2019+ only)
+
+ int
+
+ int
+
+
+ None
+
+
+ ContinuationToken
+
+ The continuation token used for pagination. (Azure DevOps Service and Azure DevOps Server 2019+ only)
+
+ string
+
+ string
+
+
+ None
+
@@ -8753,9 +10536,9 @@ ID Title Status
-------------------------- EXAMPLE 1 --------------------------
- PS C:\> Get-VSTeamFeed
+ PS C:\> Get-VSTeamGitRef -ProjectName Demo
- This command returns all the package feeds for the account.
+ This command returns all the Git refs for the Demo team project.
@@ -8763,19 +10546,19 @@ ID Title Status
- Get-VSTeamGitRef
+ Get-VSTeamGitRepositoryGet
- VSTeamGitRef
+ VSTeamGitRepository
- Queries the provided repository for its refs and returns them.
+ Get all the repositories in your Azure DevOps or Team Foundation Server account, or a specific project.
- Get-VSTeamGitRef gets all the refs for the provided repository.
+ Get-VSTeamGitRepository gets all the repositories in your Azure DevOps or Team Foundation Server account, or a specific project.
- Get-VSTeamGitRef
+ Get-VSTeamGitRepositoryProjectName
@@ -8790,14 +10573,47 @@ ID Title Status
None
-
- RepositoryId
+
+ Id
- Specifies the ID of the repository.
+ Specifies one or more repositories by ID.
+ To specify multiple IDs, use commas to separate the IDs.
+ To find the ID of a repository, type Get-VSTeamGitRepository.
- Guid
+ Guid[]
- Guid
+ Guid[]
+
+
+ None
+
+
+
+ Get-VSTeamGitRepository
+
+ 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
+
+ Specifies one or more repositories by name.
+ To specify multiple names, use commas to separate the names.
+ To find the name of a repository, type Get-VSTeamGitRepository.
+
+ String[]
+
+ String[]None
@@ -8819,14 +10635,30 @@ ID Title Status
None
-
- RepositoryId
+
+ Id
- Specifies the ID of the repository.
+ Specifies one or more repositories by ID.
+ To specify multiple IDs, use commas to separate the IDs.
+ To find the ID of a repository, type Get-VSTeamGitRepository.
- Guid
+ Guid[]
- Guid
+ Guid[]
+
+
+ None
+
+
+ Name
+
+ Specifies one or more repositories by name.
+ To specify multiple names, use commas to separate the names.
+ To find the name of a repository, type Get-VSTeamGitRepository.
+
+ String[]
+
+ String[]None
@@ -8842,9 +10674,23 @@ ID Title Status
-------------------------- EXAMPLE 1 --------------------------
- PS C:\> Get-VSTeamGitRef -ProjectName Demo
+ PS C:\> Get-VSTeamGitRepository
- This command returns all the Git refs for the Demo team project.
+ This command returns all the Git repositories for your TFS or Team Services account.
+
+
+
+ -------------------------- EXAMPLE 2 --------------------------
+ PS C:\> Get-VSTeamGitRepository -ProjectName Demo
+
+ This command returns all the Git repositories for the Demo team project.
+
+
+
+ -------------------------- EXAMPLE 3 --------------------------
+ PS C:\> git clone (Get-VSTeamGitRepository | select -ExpandProperty remoteUrl)
+
+ This command gets the remote URL and passes it to git clone command.
@@ -8852,19 +10698,19 @@ ID Title Status
- Get-VSTeamGitRepository
+ Get-VSTeamGitStatGet
- VSTeamGitRepository
+ VSTeamGitStat
- Get all the repositories in your Azure DevOps or Team Foundation Server account, or a specific project.
+ Retrieves statistics about branches within a repository.
- Get-VSTeamGitRepository gets all the repositories in your Azure DevOps or Team Foundation Server account, or a specific project.
+ Retrieves statistics about branches within a repository.
- Get-VSTeamGitRepository
+ Get-VSTeamGitStatProjectName
@@ -8879,29 +10725,22 @@ ID Title Status
None
-
- Id
+
+ RepositoryId
- Specifies one or more repositories by ID.
- To specify multiple IDs, use commas to separate the IDs.
- To find the ID of a repository, type Get-VSTeamGitRepository.
+ Specifies the ID of the repository.
- Guid[]
+ Guid
- Guid[]
+ GuidNone
-
-
- Get-VSTeamGitRepository
-
- ProjectName
+
+ BranchName
- 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.
+ Name of the branch.String
@@ -8910,16 +10749,44 @@ ID Title Status
None
-
- Name
+
+ VersionOptions
- Specifies one or more repositories by name.
- To specify multiple names, use commas to separate the names.
- To find the name of a repository, type Get-VSTeamGitRepository.
+ Version options - Specify additional modifiers to version (e.g Previous). Valid options for this parameter are:
+ - firstParent
+ - none
+ - previousChange
- String[]
+ String
- String[]
+ String
+
+
+ None
+
+
+ Version
+
+ Version string identifier (name of tag/branch, SHA1 of commit)
+
+ String
+
+ String
+
+
+ None
+
+
+ VersionType
+
+ Version type (branch, tag, or commit). Determines how Id is interpreted. Valid options for this parameter are:
+ - branch
+ - commit
+ - tag
+
+ String
+
+ StringNone
@@ -8930,9 +10797,33 @@ ID Title Status
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
+
+
+ RepositoryId
+
+ Specifies the ID of the repository.
+
+ Guid
+
+ Guid
+
+
+ None
+
+
+ BranchName
+
+ Name of the branch.String
@@ -8941,30 +10832,44 @@ ID Title Status
None
-
- Id
+
+ VersionOptions
- Specifies one or more repositories by ID.
- To specify multiple IDs, use commas to separate the IDs.
- To find the ID of a repository, type Get-VSTeamGitRepository.
+ Version options - Specify additional modifiers to version (e.g Previous). Valid options for this parameter are:
+ - firstParent
+ - none
+ - previousChange
- Guid[]
+ String
- Guid[]
+ StringNone
-
- Name
+
+ Version
- Specifies one or more repositories by name.
- To specify multiple names, use commas to separate the names.
- To find the name of a repository, type Get-VSTeamGitRepository.
+ Version string identifier (name of tag/branch, SHA1 of commit)
- String[]
+ String
- String[]
+ String
+
+
+ None
+
+
+ VersionType
+
+ Version type (branch, tag, or commit). Determines how Id is interpreted. Valid options for this parameter are:
+ - branch
+ - commit
+ - tag
+
+ String
+
+ StringNone
@@ -8980,23 +10885,23 @@ ID Title Status
-------------------------- EXAMPLE 1 --------------------------
- PS C:\> Get-VSTeamGitRepository
+ PS C:\> Get-VSTeamGitStat -ProjectName Demo -RepositoryId 011E421A-2A54-4491-B370-9256AD8A1BDD
- This command returns all the Git repositories for your TFS or Team Services account.
+ This command returns all the Git stats for the entire repository-------------------------- EXAMPLE 2 --------------------------
- PS C:\> Get-VSTeamGitRepository -ProjectName Demo
+ PS C:\> Get-VSTeamGitStat -ProjectName Demo -RepositoryId 011E421A-2A54-4491-B370-9256AD8A1BDD -BranchName develop
- This command returns all the Git repositories for the Demo team project.
+ This command returns all the Git stats for a specific branch-------------------------- EXAMPLE 3 --------------------------
- PS C:\> git clone (Get-VSTeamGitRepository | select -ExpandProperty remoteUrl)
+ PS C:\> Get-VSTeamGitStat -ProjectName Demo -RepositoryId 011E421A-2A54-4491-B370-9256AD8A1BDD -BranchName develop -VersionType branch -Version 67cae2b029dff7eb3dc062b49403aaedca5bad8d
- This command gets the remote URL and passes it to git clone command.
+ This command returns all the Git stats for a specific commit
@@ -10657,14 +12562,268 @@ ID Title Status
None
+
+ Get-VSTeamPullRequest
+
+ 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
+
+
+ RepositoryId
+
+ The repository ID of the pull request's target branch.
+
+ Guid
+
+ Guid
+
+
+ None
+
+
+ SourceRepositoryId
+
+ If set, search for pull requests whose source branch is in this repository.
+
+ Guid
+
+ Guid
+
+
+ None
+
+
+ SourceBranchRef
+
+ If set, search for pull requests from this branch.
+
+ String
+
+ String
+
+
+ None
+
+
+ TargetBranchRef
+
+ If set, search for pull requests into this branch.
+
+ String
+
+ String
+
+
+ None
+
+
+ Status
+
+ If set, search for pull requests that are in this state. Defaults to Active if unset. Valid values for this parameter are:
+ - abandoned
+ - active
+ - all
+ - completed
+ - notSet
+
+ String
+
+ String
+
+
+ None
+
+
+ Top
+
+ The number of pull requests to retrieve.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ Skip
+
+ The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+
+ Get-VSTeamPullRequest
+
+ 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
+
+
+ RepositoryId
+
+ The repository ID of the pull request's target branch.
+
+ Guid
+
+ Guid
+
+
+ None
+
+
+ SourceRepositoryId
+
+ If set, search for pull requests whose source branch is in this repository.
+
+ Guid
+
+ Guid
+
+
+ None
+
+
+ SourceBranchRef
+
+ If set, search for pull requests from this branch.
+
+ String
+
+ String
+
+
+ None
+
+
+ TargetBranchRef
+
+ If set, search for pull requests into this branch.
+
+ String
+
+ String
+
+
+ None
+
+
+ All
+
+
+
+
+ SwitchParameter
+
+
+ False
+
+
+ Top
+
+ The number of pull requests to retrieve.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ Skip
+
+ The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.
+
+ Int32
+
+ Int32
+
+
+ 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.
+ 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
+
+ Specifies the pull request by ID.
+
+ String
+
+ String
+
+
+ None
+
+
+ RepositoryId
+
+ The repository ID of the pull request's target branch.
+
+ Guid
+
+ Guid
+
+
+ None
+
+
+ SourceRepositoryId
+
+ If set, search for pull requests whose source branch is in this repository.
+
+ Guid
+
+ Guid
+
+
+ None
+
+
+ SourceBranchRef
+
+ If set, search for pull requests from this branch.String
@@ -10673,10 +12832,27 @@ ID Title Status
None
-
- Id
+
+ TargetBranchRef
- Specifies the pull request by ID.
+ If set, search for pull requests into this branch.
+
+ String
+
+ String
+
+
+ None
+
+
+ Status
+
+ If set, search for pull requests that are in this state. Defaults to Active if unset. Valid values for this parameter are:
+ - abandoned
+ - active
+ - all
+ - completed
+ - notSetString
@@ -10685,6 +12861,42 @@ ID Title Status
None
+
+ All
+
+
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ Top
+
+ The number of pull requests to retrieve.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ Skip
+
+ The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.
+
+ Int32
+
+ Int32
+
+
+ None
+
@@ -10710,6 +12922,20 @@ ID Title Status
-------------------------- EXAMPLE 3 --------------------------
+ PS C:\> Get-VSTeamPullRequest -ProjectName Demo -All
+
+ This command returns all pull requests for the Demo team project.
+
+
+
+ -------------------------- EXAMPLE 4 --------------------------
+ PS C:\> Get-VSTeamPullRequest -ProjectName Demo -TargetBranchRef "refs/heads/mybranch"
+
+ This command returns all open pull requests for a specific branch
+
+
+
+ -------------------------- EXAMPLE 5 --------------------------PS C:\> Get-VSTeamPullRequest -Id 123This command gets the pull request with an Id of 123.
@@ -10721,6 +12947,14 @@ ID Title Status
Show-VSTeamPullRequest
+
+ Add-VSTeamPullRequest
+
+
+
+ Update-VSTeamPullRequest
+
+
@@ -13503,6 +15737,18 @@ Get-VSTeamVariableGroup @methodParameters
False
+
+ AdditionalHeaders
+
+ Adds additional headers to the request
+
+ Hashtable
+
+ Hashtable
+
+
+ None
+
@@ -13666,6 +15912,18 @@ Get-VSTeamVariableGroup @methodParameters
False
+
+ AdditionalHeaders
+
+ Adds additional headers to the request
+
+ Hashtable
+
+ Hashtable
+
+
+ None
+
@@ -13716,33 +15974,262 @@ Get-VSTeamVariableGroup @methodParameters
RemoveVSTeam
- Removes a team from a project.
+ Removes a team from a project.
+
+
+
+ Removes a team from a project.
+
+
+
+ Remove-VSTeam
+
+ 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
+
+
+ TeamId
+
+ The id of the team 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
+
+
+
+
+
+ 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
+
+
+ TeamId
+
+ The id of the team to remove.
+
+ String
+
+ String
+
+
+ None
+
+
+ Confirm
+
+ Prompts you for confirmation before running the function.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ Force
+
+ Forces the function without confirmation
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ WhatIf
+
+ Shows what would happen if the function runs. The function is not run.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Remove-VSTeamAccessControlEntry
+ Remove
+ VSTeamAccessControlEntry
+
+ Removes specified ACEs in the ACL for the provided token. The request URI contains the namespace ID, the target token, and a single or list of descriptors that should be removed. Only supports removing AzD based users/groups.
- Removes a team from a project.
+ Removes specified ACEs in the ACL for the provided token. The request URI contains the namespace ID, the target token, and a single or list of descriptors that should be removed. Only supports removing AzD based users/groups.
- Remove-VSTeam
-
- ProjectName
+ Remove-VSTeamAccessControlEntry
+
+ SecurityNamespace
- 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.
+ VSTeamSecurityNamespace object.
- String
+ VSTeamSecurityNamespace
- String
+ VSTeamSecurityNamespaceNone
-
- TeamId
+
+ SecurityNamespaceId
- The id of the team to remove.
+ Security namespace identifier.
+ Valid IDs are:
+ AzD: - Analytics (58450c49-b02d-465a-ab12-59ae512d6531)
+ - AnalyticsViews (d34d3680-dfe5-4cc6-a949-7d9c68f73cba)
+ - ReleaseManagement (7c7d32f7-0e86-4cd6-892e-b35dbba870bd)
+ - ReleaseManagement2 (c788c23e-1b46-4162-8f5e-d7585343b5de)
+ - Identity (5a27515b-ccd7-42c9-84f1-54c998f03866)
+ - WorkItemTrackingAdministration (445d2788-c5fb-4132-bbef-09c4045ad93f)
+ - DistributedTask (101eae8c-1709-47f9-b228-0e476c35b3ba)
+ - WorkItemQueryFolders (71356614-aad7-4757-8f2c-0fb3bff6f680)
+ - GitRepositories (2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87)
+ - VersionControlItems2 (3c15a8b7-af1a-45c2-aa97-2cb97078332e)
+ - EventSubscriber (2bf24a2b-70ba-43d3-ad97-3d9e1f75622f)
+ - WorkItemTrackingProvision (5a6cd233-6615-414d-9393-48dbb252bd23)
+ - ServiceEndpoints (49b48001-ca20-4adc-8111-5b60c903a50c)
+ - ServiceHooks (cb594ebe-87dd-4fc9-ac2c-6a10a4c92046)
+ - Chat (bc295513-b1a2-4663-8d1a-7017fd760d18)
+ - Collection (3e65f728-f8bc-4ecd-8764-7e378b19bfa7)
+ - Proxy (cb4d56d2-e84b-457e-8845-81320a133fbb)
+ - Plan (bed337f8-e5f3-4fb9-80da-81e17d06e7a8)
+ - Process (2dab47f9-bd70-49ed-9bd5-8eb051e59c02)
+ - AccountAdminSecurity (11238e09-49f2-40c7-94d0-8f0307204ce4)
+ - Library (b7e84409-6553-448a-bbb2-af228e07cbeb)
+ - Environment (83d4c2e6-e57d-4d6e-892b-b87222b7ad20)
+ - Project (52d39943-cb85-4d7f-8fa8-c6baac873819)
+ - EventSubscription (58b176e7-3411-457a-89d0-c6d0ccb3c52b)
+ - CSS (83e28ad4-2d72-4ceb-97b0-c7726d5502c3)
+ - TeamLabSecurity (9e4894c3-ff9a-4eac-8a85-ce11cafdc6f1)
+ - ProjectAnalysisLanguageMetrics (fc5b7b85-5d6b-41eb-8534-e128cb10eb67)
+ - Tagging (bb50f182-8e5e-40b8-bc21-e8752a1e7ae2)
+ - MetaTask (f6a4de49-dbe2-4704-86dc-f8ec1a294436)
+ - Iteration (bf7bfa03-b2b7-47db-8113-fa2e002cc5b1)
+ - Favorites (fa557b48-b5bf-458a-bb2b-1b680426fe8b)
+ - Registry (4ae0db5d-8437-4ee8-a18b-1f6fb38bd34c)
+ - Graph (c2ee56c9-e8fa-4cdd-9d48-2c44f697a58e)
+ - ViewActivityPaneSecurity (dc02bf3d-cd48-46c3-8a41-345094ecc94b)
+ - Job (2a887f97-db68-4b7c-9ae3-5cebd7add999)
+ - WorkItemTracking (73e71c45-d483-40d5-bdba-62fd076f7f87)
+ - StrongBox (4a9e8381-289a-4dfd-8460-69028eaa93b3)
+ - Server (1f4179b3-6bac-4d01-b421-71ea09171400)
+ - TestManagement (e06e1c24-e93d-4e4a-908a-7d951187b483)
+ - SettingEntries (6ec4592e-048c-434e-8e6c-8671753a8418)
+ - BuildAdministration (302acaca-b667-436d-a946-87133492041c)
+ - Location (2725d2bc-7520-4af4-b0e3-8d876494731f)
+ - Boards (251e12d9-bea3-43a8-bfdb-901b98c0125e)
+ - UtilizationPermissions (83abde3a-4593-424e-b45f-9898af99034d)
+ - WorkItemsHub (c0e7a722-1cad-4ae6-b340-a8467501e7ce)
+ - WebPlatform (0582eb05-c896-449a-b933-aa3d99e121d6)
+ - VersionControlPrivileges (66312704-deb5-43f9-b51c-ab4ff5e351c3)
+ - Workspaces (93bafc04-9075-403a-9367-b7164eac6b5c)
+ - CrossProjectWidgetView (093cbb02-722b-4ad6-9f88-bc452043fa63)
+ - WorkItemTrackingConfiguration (35e35e8e-686d-4b01-aff6-c369d6e36ce0)
+ - Discussion Threads (0d140cae-8ac1-4f48-b6d1-c93ce0301a12)
+ - BoardsExternalIntegration (5ab15bc8-4ea1-d0f3-8344-cab8fe976877)
+ - DataProvider (7ffa7cf4-317c-4fea-8f1d-cfda50cfa956)
+ - Social (81c27cc8-7a9f-48ee-b63f-df1e1d0412dd)
+ - Security (9a82c708-bfbe-4f31-984c-e860c2196781)
+ - IdentityPicker (a60e0d84-c2f8-48e4-9c0c-f32da48d5fd1)
+ - ServicingOrchestration (84cc1aa4-15bc-423d-90d9-f97c450fc729)
+ - Build (33344d9c-fc72-4d6f-aba5-fa317101a7e9)
+ - DashboardsPrivileges (8adf73b7-389a-4276-b638-fe1653f7efc7)
+ - VersionControlItems (a39371cf-0841-4c16-bbd3-276e341bc052)
+
+ VSSPS: - EventSubscriber (2bf24a2b-70ba-43d3-ad97-3d9e1f75622f) (VSSPS)
+ - EventSubscription (58b176e7-3411-457a-89d0-c6d0ccb3c52b) (VSSPS)
+ - Registry (4ae0db5d-8437-4ee8-a18b-1f6fb38bd34c) (VSSPS)
+ - Graph (c2ee56c9-e8fa-4cdd-9d48-2c44f697a58e) (VSSPS)
+ - Invitation (ea0b4d1e-577a-4797-97b5-2f5755e548d5) (VSSPS)
+ - SystemGraph (b24dfdf1-285a-4ea6-a55b-32549a68121d) (VSSPS)
+ - Job (2a887f97-db68-4b7c-9ae3-5cebd7add999) (VSSPS)
+ - CommerceCollectionSecurity (307be2d3-12ed-45c2-aacf-6598760efca7) (VSSPS)
+ - StrongBox (4a9e8381-289a-4dfd-8460-69028eaa93b3) (VSSPS)
+ - GroupLicensing (c6a4fd35-b508-49eb-8ea7-7189df5f3698) (VSSPS)
+ - Server (1f4179b3-6bac-4d01-b421-71ea09171400) (VSSPS)
+ - SettingEntries (6ec4592e-048c-434e-8e6c-8671753a8418) (VSSPS)
+ - RemotableTemplateTest (ccdcb71c-4780-4a42-9bb4-8bce07a7628f) (VSSPS)
+ - Location (2725d2bc-7520-4af4-b0e3-8d876494731f) (VSSPS)
+ - WebPlatform (0582eb05-c896-449a-b933-aa3d99e121d6) (VSSPS)
+ - DataProvider (7ffa7cf4-317c-4fea-8f1d-cfda50cfa956) (VSSPS)
+ - Security (9a82c708-bfbe-4f31-984c-e860c2196781) (VSSPS)
+ - IdentityPicker (a60e0d84-c2f8-48e4-9c0c-f32da48d5fd1) (VSSPS)
+ - ServicingOrchestration (84cc1aa4-15bc-423d-90d9-f97c450fc729) (VSSPS)String
@@ -13751,60 +16238,134 @@ Get-VSTeamVariableGroup @methodParameters
None
-
- Confirm
-
- Prompts you for confirmation before running the function.
-
-
- SwitchParameter
-
-
- False
-
-
- Force
+
+ Token
- Forces the function without confirmation
+ The security Token
+ Valid token formats are:
+ - Git Repository (repov2/$projectID/$repositoryID)
+ - Build Definition ($projectID/$buildDefinitionID)
+ - Release Definition ($projectID/$releaseDefinitionID, $projectID/Path/to/Release/$releaseDefinitionID)
+ String
- SwitchParameter
+ String
- False
+ None
-
- WhatIf
+
+ Descriptor
- Shows what would happen if the function runs. The function is not run.
+ An array of descriptors of users/groups to be removed
+ System.Array
- SwitchParameter
+ System.Array
- False
+ None
-
- ProjectName
+
+ SecurityNamespace
- 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.
+ VSTeamSecurityNamespace object.
- String
+ VSTeamSecurityNamespace
- String
+ VSTeamSecurityNamespaceNone
-
- TeamId
+
+ SecurityNamespaceId
- The id of the team to remove.
+ Security namespace identifier.
+ Valid IDs are:
+ AzD: - Analytics (58450c49-b02d-465a-ab12-59ae512d6531)
+ - AnalyticsViews (d34d3680-dfe5-4cc6-a949-7d9c68f73cba)
+ - ReleaseManagement (7c7d32f7-0e86-4cd6-892e-b35dbba870bd)
+ - ReleaseManagement2 (c788c23e-1b46-4162-8f5e-d7585343b5de)
+ - Identity (5a27515b-ccd7-42c9-84f1-54c998f03866)
+ - WorkItemTrackingAdministration (445d2788-c5fb-4132-bbef-09c4045ad93f)
+ - DistributedTask (101eae8c-1709-47f9-b228-0e476c35b3ba)
+ - WorkItemQueryFolders (71356614-aad7-4757-8f2c-0fb3bff6f680)
+ - GitRepositories (2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87)
+ - VersionControlItems2 (3c15a8b7-af1a-45c2-aa97-2cb97078332e)
+ - EventSubscriber (2bf24a2b-70ba-43d3-ad97-3d9e1f75622f)
+ - WorkItemTrackingProvision (5a6cd233-6615-414d-9393-48dbb252bd23)
+ - ServiceEndpoints (49b48001-ca20-4adc-8111-5b60c903a50c)
+ - ServiceHooks (cb594ebe-87dd-4fc9-ac2c-6a10a4c92046)
+ - Chat (bc295513-b1a2-4663-8d1a-7017fd760d18)
+ - Collection (3e65f728-f8bc-4ecd-8764-7e378b19bfa7)
+ - Proxy (cb4d56d2-e84b-457e-8845-81320a133fbb)
+ - Plan (bed337f8-e5f3-4fb9-80da-81e17d06e7a8)
+ - Process (2dab47f9-bd70-49ed-9bd5-8eb051e59c02)
+ - AccountAdminSecurity (11238e09-49f2-40c7-94d0-8f0307204ce4)
+ - Library (b7e84409-6553-448a-bbb2-af228e07cbeb)
+ - Environment (83d4c2e6-e57d-4d6e-892b-b87222b7ad20)
+ - Project (52d39943-cb85-4d7f-8fa8-c6baac873819)
+ - EventSubscription (58b176e7-3411-457a-89d0-c6d0ccb3c52b)
+ - CSS (83e28ad4-2d72-4ceb-97b0-c7726d5502c3)
+ - TeamLabSecurity (9e4894c3-ff9a-4eac-8a85-ce11cafdc6f1)
+ - ProjectAnalysisLanguageMetrics (fc5b7b85-5d6b-41eb-8534-e128cb10eb67)
+ - Tagging (bb50f182-8e5e-40b8-bc21-e8752a1e7ae2)
+ - MetaTask (f6a4de49-dbe2-4704-86dc-f8ec1a294436)
+ - Iteration (bf7bfa03-b2b7-47db-8113-fa2e002cc5b1)
+ - Favorites (fa557b48-b5bf-458a-bb2b-1b680426fe8b)
+ - Registry (4ae0db5d-8437-4ee8-a18b-1f6fb38bd34c)
+ - Graph (c2ee56c9-e8fa-4cdd-9d48-2c44f697a58e)
+ - ViewActivityPaneSecurity (dc02bf3d-cd48-46c3-8a41-345094ecc94b)
+ - Job (2a887f97-db68-4b7c-9ae3-5cebd7add999)
+ - WorkItemTracking (73e71c45-d483-40d5-bdba-62fd076f7f87)
+ - StrongBox (4a9e8381-289a-4dfd-8460-69028eaa93b3)
+ - Server (1f4179b3-6bac-4d01-b421-71ea09171400)
+ - TestManagement (e06e1c24-e93d-4e4a-908a-7d951187b483)
+ - SettingEntries (6ec4592e-048c-434e-8e6c-8671753a8418)
+ - BuildAdministration (302acaca-b667-436d-a946-87133492041c)
+ - Location (2725d2bc-7520-4af4-b0e3-8d876494731f)
+ - Boards (251e12d9-bea3-43a8-bfdb-901b98c0125e)
+ - UtilizationPermissions (83abde3a-4593-424e-b45f-9898af99034d)
+ - WorkItemsHub (c0e7a722-1cad-4ae6-b340-a8467501e7ce)
+ - WebPlatform (0582eb05-c896-449a-b933-aa3d99e121d6)
+ - VersionControlPrivileges (66312704-deb5-43f9-b51c-ab4ff5e351c3)
+ - Workspaces (93bafc04-9075-403a-9367-b7164eac6b5c)
+ - CrossProjectWidgetView (093cbb02-722b-4ad6-9f88-bc452043fa63)
+ - WorkItemTrackingConfiguration (35e35e8e-686d-4b01-aff6-c369d6e36ce0)
+ - Discussion Threads (0d140cae-8ac1-4f48-b6d1-c93ce0301a12)
+ - BoardsExternalIntegration (5ab15bc8-4ea1-d0f3-8344-cab8fe976877)
+ - DataProvider (7ffa7cf4-317c-4fea-8f1d-cfda50cfa956)
+ - Social (81c27cc8-7a9f-48ee-b63f-df1e1d0412dd)
+ - Security (9a82c708-bfbe-4f31-984c-e860c2196781)
+ - IdentityPicker (a60e0d84-c2f8-48e4-9c0c-f32da48d5fd1)
+ - ServicingOrchestration (84cc1aa4-15bc-423d-90d9-f97c450fc729)
+ - Build (33344d9c-fc72-4d6f-aba5-fa317101a7e9)
+ - DashboardsPrivileges (8adf73b7-389a-4276-b638-fe1653f7efc7)
+ - VersionControlItems (a39371cf-0841-4c16-bbd3-276e341bc052)
+
+ VSSPS: - EventSubscriber (2bf24a2b-70ba-43d3-ad97-3d9e1f75622f) (VSSPS)
+ - EventSubscription (58b176e7-3411-457a-89d0-c6d0ccb3c52b) (VSSPS)
+ - Registry (4ae0db5d-8437-4ee8-a18b-1f6fb38bd34c) (VSSPS)
+ - Graph (c2ee56c9-e8fa-4cdd-9d48-2c44f697a58e) (VSSPS)
+ - Invitation (ea0b4d1e-577a-4797-97b5-2f5755e548d5) (VSSPS)
+ - SystemGraph (b24dfdf1-285a-4ea6-a55b-32549a68121d) (VSSPS)
+ - Job (2a887f97-db68-4b7c-9ae3-5cebd7add999) (VSSPS)
+ - CommerceCollectionSecurity (307be2d3-12ed-45c2-aacf-6598760efca7) (VSSPS)
+ - StrongBox (4a9e8381-289a-4dfd-8460-69028eaa93b3) (VSSPS)
+ - GroupLicensing (c6a4fd35-b508-49eb-8ea7-7189df5f3698) (VSSPS)
+ - Server (1f4179b3-6bac-4d01-b421-71ea09171400) (VSSPS)
+ - SettingEntries (6ec4592e-048c-434e-8e6c-8671753a8418) (VSSPS)
+ - RemotableTemplateTest (ccdcb71c-4780-4a42-9bb4-8bce07a7628f) (VSSPS)
+ - Location (2725d2bc-7520-4af4-b0e3-8d876494731f) (VSSPS)
+ - WebPlatform (0582eb05-c896-449a-b933-aa3d99e121d6) (VSSPS)
+ - DataProvider (7ffa7cf4-317c-4fea-8f1d-cfda50cfa956) (VSSPS)
+ - Security (9a82c708-bfbe-4f31-984c-e860c2196781) (VSSPS)
+ - IdentityPicker (a60e0d84-c2f8-48e4-9c0c-f32da48d5fd1) (VSSPS)
+ - ServicingOrchestration (84cc1aa4-15bc-423d-90d9-f97c450fc729) (VSSPS)String
@@ -13813,51 +16374,86 @@ Get-VSTeamVariableGroup @methodParameters
None
-
- Confirm
-
- Prompts you for confirmation before running the function.
-
- SwitchParameter
-
- SwitchParameter
-
-
- False
-
-
- Force
+
+ Token
- Forces the function without confirmation
+ The security Token
+ Valid token formats are:
+ - Git Repository (repov2/$projectID/$repositoryID)
+ - Build Definition ($projectID/$buildDefinitionID)
+ - Release Definition ($projectID/$releaseDefinitionID, $projectID/Path/to/Release/$releaseDefinitionID)
- SwitchParameter
+ String
- SwitchParameter
+ String
- False
+ None
-
- WhatIf
+
+ Descriptor
- Shows what would happen if the function runs. The function is not run.
+ An array of descriptors of users/groups to be removed
- SwitchParameter
+ System.Array
- SwitchParameter
+ System.Array
- False
+ None
-
+ This function outputs a non-terminating error if the ACE removal from the ACL returns $False. This can be due to the wrong descriptor being provided, or the descriptor already not being on the ACL.
-
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ PS C:\> Remove-VSTeamAccessControlEntry -securityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -token "repov2/$projectid/$repoid" -descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0xMzk4ODc2NjMwLTEwMTQ0ODQ4MTMtMzE5MDA4NTI4Ny0xNDU4NTkwODY1LTEtMzE1MjE3NTkwMy03NjE1NjY3OTMtMjgwMTUwMjI2Ny0zMjU5Mjg5MTIy")
+
+ This will remove the specified descriptor from the specified repository, using the security namespace id, while confirming for the remove action.
+
+
+
+ -------------------------- EXAMPLE 2 --------------------------
+ PS C:\> Remove-VSTeamAccessControlEntry -securityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -token "repov2/$projectid/$repoid" -descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0xMzk4ODc2NjMwLTEwMTQ0ODQ4MTMtMzE5MDA4NTI4Ny0xNDU4NTkwODY1LTEtMzE1MjE3NTkwMy03NjE1NjY3OTMtMjgwMTUwMjI2Ny0zMjU5Mjg5MTIy") -confirm:$false
+
+ This will remove the specified descriptor from the specified repository, using the security namespace id, with no confirmation for the remove action.
+
+
+
+ -------------------------- EXAMPLE 3 --------------------------
+ PS C:\> Remove-VSTeamAccessControlEntry -securityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -token "repov2/$projectid/$repoid" -descriptor @("descriptor1","descriptor2")
+
+ This will remove multiple descriptors from the specified repository, using the security namespace id, while confirming for the remove action.
+
+
+
+ -------------------------- EXAMPLE 4 --------------------------
+ PS C:\> Remove-VSTeamAccessControlEntry -securityNamespace [VSTeamSecurityNamespace]$securityNamespace -token "repov2/$projectid/$repoid" -descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0xMzk4ODc2NjMwLTEwMTQ0ODQ4MTMtMzE5MDA4NTI4Ny0xNDU4NTkwODY1LTEtMzE1MjE3NTkwMy03NjE1NjY3OTMtMjgwMTUwMjI2Ny0zMjU5Mjg5MTIy")
+
+ This will remove the specified descriptor from the specified repository, using a security namespace object, while confirming for the remove action.
+
+
+
+ -------------------------- EXAMPLE 5 --------------------------
+ PS C:\> Remove-VSTeamAccessControlEntry -securityNamespace [VSTeamSecurityNamespace]$securityNamespace -token "repov2/$projectid/$repoid" -descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0xMzk4ODc2NjMwLTEwMTQ0ODQ4MTMtMzE5MDA4NTI4Ny0xNDU4NTkwODY1LTEtMzE1MjE3NTkwMy03NjE1NjY3OTMtMjgwMTUwMjI2Ny0zMjU5Mjg5MTIy") -confirm:$false
+
+ This will remove the specified descriptor from the specified repository, using a security namespace object, with no confirmation for the remove action.
+
+
+
+ -------------------------- EXAMPLE 6 --------------------------
+ PS C:\> Remove-VSTeamAccessControlEntry -securityNamespace [VSTeamSecurityNamespace]$securityNamespace -token "repov2/$projectid/$repoid" -descriptor @("descriptor1","descriptor2")
+
+ This will remove multiple descriptors from the specified repository, using a security namespace object, while confirming for the remove action.
+
+
+
@@ -18262,7 +20858,262 @@ PS demo:\> Get-ChildItem
- Show-VSTeamApproval
+ Show-VSTeamApproval
+
+ 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
+
+
+ ReleaseDefinitionId
+
+ Only approvals for the release id provided will be returned.
+
+ Int32
+
+ Int32
+
+
+ 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
+
+
+ ReleaseDefinitionId
+
+ Only approvals for the release id provided will be returned.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+
+
+
+
+ Team.BuildDefinition
+
+
+
+
+
+
+
+
+ This function has a Dynamic Parameter for ProjectName that specifies the project for which this function gets build definitions.
+ 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.
+ You can pipe build definition IDs to this function.
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ PS C:\> Get-VSTeamApproval -ProjectName Demo | Show-VSTeamApproval
+
+ This command opens a web browser showing the release requiring approval.
+
+
+
+
+
+ Set-VSTeamAccount
+
+
+
+ Set-VSTeamDefaultProject
+
+
+
+ Add-VSTeamBuildDefinition
+
+
+
+ Remove-VSTeamBuildDefinition
+
+
+
+
+
+
+ Show-VSTeamBuild
+ Show
+ VSTeamBuild
+
+ Opens the build summary in the default browser.
+
+
+
+ Opens the build summary in the default browser.
+
+
+
+ Show-VSTeamBuild
+
+ Id
+
+ Specifies build by ID.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+
+
+
+ Id
+
+ Specifies build by ID.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+
+
+
+
+ Team.Build
+
+
+
+
+
+
+
+
+ You can pipe the build ID to this function.
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ PS C:\> Show-VSTeamBuild -ProjectName Demo -Id 3
+
+ This command will open a web browser with the summary of build 3.
+
+
+
+
+
+ Set-VSTeamAccount
+
+
+
+ Set-VSTeamDefaultProject
+
+
+
+ Add-VSTeamBuild
+
+
+
+ Remove-VSTeamBuild
+
+
+
+
+
+
+ Show-VSTeamBuildDefinition
+ Show
+ VSTeamBuildDefinition
+
+ Opens the build definition in the default browser.
+
+
+
+ Opens the build definition in the default browser.
+ The project name is a Dynamic Parameter which may not be displayed in the syntax above but is mandatory.
+ With just a project name, this function shows all of the build definitions for that team project.
+ You can also specify a particular build definition by ID.
+
+
+
+ Show-VSTeamBuildDefinition
+
+ 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
+
+
+ Type
+
+ The type of the build definitions to retrieve. The acceptable values for this parameter are:
+ - Mine
+ - All
+ - Queued
+ - XAML
+
+ If not specified, all types will be returned.
+
+ String
+
+ String
+
+
+ All
+
+
+ Path
+
+ The folder of the build definitions to retrieve.
+
+ String
+
+ String
+
+
+ \
+
+
+
+ Show-VSTeamBuildDefinitionProjectName
@@ -18277,10 +21128,10 @@ PS demo:\> Get-ChildItem
None
-
- ReleaseDefinitionId
+
+ Id
- Only approvals for the release id provided will be returned.
+ Specifies build definition by ID.Int32
@@ -18306,10 +21157,40 @@ PS demo:\> Get-ChildItem
None
-
- ReleaseDefinitionId
+
+ Type
- Only approvals for the release id provided will be returned.
+ The type of the build definitions to retrieve. The acceptable values for this parameter are:
+ - Mine
+ - All
+ - Queued
+ - XAML
+
+ If not specified, all types will be returned.
+
+ String
+
+ String
+
+
+ All
+
+
+ Path
+
+ The folder of the build definitions to retrieve.
+
+ String
+
+ String
+
+
+ \
+
+
+ Id
+
+ Specifies build definition by ID.Int32
@@ -18332,18 +21213,15 @@ PS demo:\> Get-ChildItem
- This function has a Dynamic Parameter for ProjectName that specifies the project for which this function gets build definitions.
- 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.You can pipe build definition IDs to this function.-------------------------- EXAMPLE 1 --------------------------
- PS C:\> Get-VSTeamApproval -ProjectName Demo | Show-VSTeamApproval
+ PS C:\> Show-VSTeamBuildDefinition -ProjectName Demo
- This command opens a web browser showing the release requiring approval.
+ This command will open a web browser with All Definitions for this project showing.
@@ -18368,38 +21246,26 @@ PS demo:\> Get-ChildItem
- Show-VSTeamBuild
+ Show-VSTeamFeedShow
- VSTeamBuild
+ VSTeamFeed
- Opens the build summary in the default browser.
+ Opens the feed in the default browser.
- Opens the build summary in the default browser.
+ Opens the feed in the default browser.
- Show-VSTeamBuild
-
- Id
-
- Specifies build by ID.
-
- Int32
-
- Int32
-
-
- None
-
+ Show-VSTeamFeed
-
+ Id
- Specifies build by ID.
+ Specifies feed by ID or Name.Int32
@@ -18413,7 +21279,7 @@ PS demo:\> Get-ChildItem
- Team.Build
+ Team.Feed
@@ -18422,15 +21288,15 @@ PS demo:\> Get-ChildItem
- You can pipe the build ID to this function.
+ -------------------------- EXAMPLE 1 --------------------------
- PS C:\> Show-VSTeamBuild -ProjectName Demo -Id 3
+ PS C:\> Show-VSTeamFeed -Name Demo
- This command will open a web browser with the summary of build 3.
+ This command will open a web browser with this feed showing.
@@ -18440,37 +21306,26 @@ PS demo:\> Get-ChildItem
- Set-VSTeamDefaultProject
-
-
-
- Add-VSTeamBuild
-
-
-
- Remove-VSTeamBuild
+ Add-VSTeamFeed
- Show-VSTeamBuildDefinition
+ Show-VSTeamGitRepositoryShow
- VSTeamBuildDefinition
+ VSTeamGitRepository
- Opens the build definition in the default browser.
+ Opens the Git repository in the default browser.
- Opens the build definition in the default browser.
- The project name is a Dynamic Parameter which may not be displayed in the syntax above but is mandatory.
- With just a project name, this function shows all of the build definitions for that team project.
- You can also specify a particular build definition by ID.
+ Opens the Git repository in the default browser.
- Show-VSTeamBuildDefinition
+ Show-VSTeamGitRepositoryProjectName
@@ -18485,39 +21340,82 @@ PS demo:\> Get-ChildItem
None
-
- Type
-
- The type of the build definitions to retrieve. The acceptable values for this parameter are:
- - Mine
- - All
- - Queued
- - XAML
-
- If not specified, all types will be returned.
-
- String
-
- String
-
-
- All
-
-
- Path
+
+ RemoteUrl
- The folder of the build definitions to retrieve.
+ The RemoteUrl of the Git repository to open.StringString
- \
+ 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
+
+
+ RemoteUrl
+
+ The RemoteUrl of the Git repository to open.
+
+ String
+
+ String
+
+
+ None
+
+
+
+
+
+
+
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ PS C:\> Show-VSTeamGitRepository -ProjectName Demo
+
+ This command opens the Git repository in a browser.
+
+
+
+
+
+
+
+ Show-VSTeamProject
+ Show
+ VSTeamProject
+
+ Opens the project in the default browser.
+
+
+
+ Opens the project in default browser.
+ You must call Set-VSTeamAccount before calling this function.
+
+
- Show-VSTeamBuildDefinition
+ Show-VSTeamProjectProjectName
@@ -18532,14 +21430,14 @@ PS demo:\> Get-ChildItem
None
-
+ Id
- Specifies build definition by ID.
+ The id of the project to return.
- Int32
+ String
- Int32
+ StringNone
@@ -18550,51 +21448,95 @@ PS demo:\> Get-ChildItem
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
-
-
- Type
-
- The type of the build definitions to retrieve. The acceptable values for this parameter are:
- - Mine
- - All
- - Queued
- - XAML
-
- If not specified, all types will be returned.
+ 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.StringString
- All
+ None
-
- Path
+
+ Id
- The folder of the build definitions to retrieve.
+ The id of the project to return.StringString
- \
+ None
-
- Id
+
+
+
+
+
+
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ PS C:\> Show-VSTeamProject TestProject
+
+ This will open a browser to the TestProject site
+
+
+
+
+
+ Set-VSTeamAccount
+
+
+
+ Add-VSTeamProject
+
+
+
+ Remove-VSTeamProject
+
+
+
+
+
+
+ Show-VSTeamPullRequest
+ Show
+ VSTeamPullRequest
+
+ Opens the pull request in the default browser.
+
+
+
+ Opens the pull request in the default browser.
+
+
+
+ Show-VSTeamPullRequest
+
+ PullRequestId
+
+ Specifies pull request by ID.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+
+
+
+ PullRequestId
- Specifies build definition by ID.
+ Specifies pull request by ID.Int32
@@ -18608,7 +21550,7 @@ PS demo:\> Get-ChildItem
- Team.BuildDefinition
+ Team.Release
@@ -18617,59 +21559,66 @@ PS demo:\> Get-ChildItem
- You can pipe build definition IDs to this function.
+ You can pipe the pull request ID to this function.-------------------------- EXAMPLE 1 --------------------------
- PS C:\> Show-VSTeamBuildDefinition -ProjectName Demo
+ PS C:\> Show-VSTeamPullRequest 3
- This command will open a web browser with All Definitions for this project showing.
+ This command will open a web browser with the pull request id of 3.
+
+
+
+ -------------------------- EXAMPLE 2 --------------------------
+ PS C:\> Show-VSTeamPullRequest -Id 3
+
+ This command will open a web browser with the pull request id of 3.
- Set-VSTeamAccount
-
-
-
- Set-VSTeamDefaultProject
-
-
-
- Add-VSTeamBuildDefinition
-
-
-
- Remove-VSTeamBuildDefinition
+ Get-VSTeamPullRequest
- Show-VSTeamFeed
+ Show-VSTeamReleaseShow
- VSTeamFeed
+ VSTeamRelease
- Opens the feed in the default browser.
+ Opens the release summary in the default browser.
- Opens the feed in the default browser.
+ Opens the release summary in the default browser.
- Show-VSTeamFeed
+ Show-VSTeamRelease
+
+ Id
+
+ Specifies release by ID.
+
+ Int32
+
+ Int32
+
+
+ None
+
-
+ Id
- Specifies feed by ID or Name.
+ Specifies release by ID.Int32
@@ -18683,7 +21632,7 @@ PS demo:\> Get-ChildItem
- Team.Feed
+ Team.Release
@@ -18692,15 +21641,15 @@ PS demo:\> Get-ChildItem
-
+ You can pipe the release ID to this function.-------------------------- EXAMPLE 1 --------------------------
- PS C:\> Show-VSTeamFeed -Name Demo
+ PS C:\> Show-VSTeamRelease -ProjectName Demo -Id 3
- This command will open a web browser with this feed showing.
+ This command will open a web browser with the summary of release 3.
@@ -18710,26 +21659,34 @@ PS demo:\> Get-ChildItem
- Add-VSTeamFeed
+ Set-VSTeamDefaultProject
+
+
+
+ Add-VSTeamRelease
+
+
+
+ Remove-VSTeamRelease
- Show-VSTeamGitRepository
+ Show-VSTeamReleaseDefinitionShow
- VSTeamGitRepository
+ VSTeamReleaseDefinition
- Opens the Git repository in the default browser.
+ Opens the release definitions for a team project in the default browser.
- Opens the Git repository in the default browser.
+ Opens the release definitions for a team project in the default browser.
- Show-VSTeamGitRepository
+ Show-VSTeamReleaseDefinitionProjectName
@@ -18744,14 +21701,14 @@ PS demo:\> Get-ChildItem
None
-
- RemoteUrl
+
+ Id
- The RemoteUrl of the Git repository to open.
+ Specifies release definition by ID.
- String
+ Int32
- String
+ Int32None
@@ -18773,75 +21730,86 @@ PS demo:\> Get-ChildItem
None
-
- RemoteUrl
+
+ Id
- The RemoteUrl of the Git repository to open.
+ Specifies release definition by ID.
- String
+ Int32
- String
+ Int32None
-
+
+
+
+ Team.ReleaseDefinition
+
+
+
+
+
+
-
+ You can pipe the release definition ID to this function.-------------------------- EXAMPLE 1 --------------------------
- PS C:\> Show-VSTeamGitRepository -ProjectName Demo
+ PS C:\> Show-VSTeamReleaseDefinition -ProjectName Demo
- This command opens the Git repository in a browser.
+ This command will open a web browser with All Release Definitions for this project showing.
-
+
+
+ Set-VSTeamAccount
+
+
+
+ Set-VSTeamDefaultProject
+
+
+
+ Add-VSTeamReleaseDefinition
+
+
+
+ Remove-VSTeamReleaseDefinition
+
+
+
- Show-VSTeamProject
+ Show-VSTeamWorkItemShow
- VSTeamProject
+ VSTeamWorkItem
- Opens the project in the default browser.
+ Opens the work item in the default browser.
-
-
- Opens the project in default browser.
- You must call Set-VSTeamAccount before calling this function.
-
-
-
- Show-VSTeamProject
-
- 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
-
-
+
+
+ Opens the work item in the default browser.
+
+
+
+ Show-VSTeamWorkItem
+ Id
- The id of the project to return.
+ Specifies work item by ID.
- String
+ Int32
- String
+ Int32None
@@ -18849,46 +21817,41 @@ PS demo:\> Get-ChildItem
-
- 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
- The id of the project to return.
+ Specifies work item by ID.
- String
+ Int32
- String
+ Int32None
-
+
+
+
+ Team.WorkItem
+
+
+
+
+
+
-
+ You can pipe the WorkItem ID to this function.-------------------------- EXAMPLE 1 --------------------------
- PS C:\> Show-VSTeamProject TestProject
+ PS C:\> Show-VSTeamWorkItem -ProjectName Demo -Id 3
- This will open a browser to the TestProject site
+ This command will open a web browser with the summary of work item 3.
@@ -18898,38 +21861,54 @@ PS demo:\> Get-ChildItem
- Add-VSTeamProject
+ Set-VSTeamDefaultProject
- Remove-VSTeamProject
+ Add-VSTeamWorkItem
+
+
+
+ Get-VSTeamWorkItem
- Show-VSTeamPullRequest
- Show
- VSTeamPullRequest
+ Test-VSTeamMembership
+ Test
+ VSTeamMembership
- Opens the pull request in the default browser.
+ Tests the membership in a container.
- Opens the pull request in the default browser.
+ Tests the membership in a container.
- Show-VSTeamPullRequest
-
- PullRequestId
+ Test-VSTeamMembership
+
+ MemberDescriptor
- Specifies pull request by ID.
+ A member descriptor retrieved by Get-VsTeamUser
- Int32
+ String
- Int32
+ String
+
+
+ None
+
+
+ ContainerDescriptor
+
+ A container descriptor retrieved by Get-VsTeamGroup
+
+ String
+
+ StringNone
@@ -18937,14 +21916,26 @@ PS demo:\> Get-ChildItem
-
- PullRequestId
+
+ MemberDescriptor
- Specifies pull request by ID.
+ A member descriptor retrieved by Get-VsTeamUser
- Int32
+ String
- Int32
+ String
+
+
+ None
+
+
+ ContainerDescriptor
+
+ A container descriptor retrieved by Get-VsTeamGroup
+
+ String
+
+ StringNone
@@ -18954,7 +21945,7 @@ PS demo:\> Get-ChildItem
- Team.Release
+ System.Boolean
@@ -18963,80 +21954,237 @@ PS demo:\> Get-ChildItem
- You can pipe the pull request ID to this function.
+
-
-
- -------------------------- EXAMPLE 1 --------------------------
- PS C:\> Show-VSTeamPullRequest 3
-
- This command will open a web browser with the pull request id of 3.
-
-
-
- -------------------------- EXAMPLE 2 --------------------------
- PS C:\> Show-VSTeamPullRequest -Id 3
-
- This command will open a web browser with the pull request id of 3.
-
-
-
+
- Get-VSTeamPullRequest
+ Get-VsTeamUser
+
+
+
+ Get-VsTeamGroup
+
+
+
+ Add-VsTeamMembership
+
+
+
+ Get-VsTeamMembership
+
+
+
+ Remove-VsTeamMembership
- Show-VSTeamRelease
- Show
- VSTeamRelease
+ Update-VSTeam
+ Update
+ VSTeam
- Opens the release summary in the default browser.
+ Updates the team name, description or both.
- Opens the release summary in the default browser.
+ Updates the team name, description or both.
- Show-VSTeamRelease
-
- Id
+ Update-VSTeam
+
+ ProjectName
- Specifies release by ID.
+ 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.
- Int32
+ String
- Int32
+ String
+
+
+ None
+
+
+ Description
+
+ The new description of the team
+
+ String
+
+ StringNone
+
+ Name
+
+ The name of the team to update
+
+ String
+
+ String
+
+
+ None
+
+
+ NewTeamName
+
+ The new name of the team
+
+ 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
+
-
- Id
+
+ 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
+
+
+ Description
- Specifies release by ID.
+ The new description of the team
- Int32
+ String
- Int32
+ String
+
+
+ None
+
+
+ Name
+
+ The name of the team to update
+
+ String
+
+ String
+
+
+ None
+
+
+ NewTeamName
+
+ The new name of the team
+
+ String
+
+ StringNone
+
+ Confirm
+
+ Prompts you for confirmation before running the function.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ Force
+
+ Forces the function without confirmation
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ WhatIf
+
+ Shows what would happen if the function runs. The function is not run.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
-
+
+
+
+ System.String
+
+
+ Description
+ Name
+ NewTeamName
+
+
+
- Team.Release
+ Team.Team
@@ -19045,52 +22193,27 @@ PS demo:\> Get-ChildItem
- You can pipe the release ID to this function.
+
-
-
- -------------------------- EXAMPLE 1 --------------------------
- PS C:\> Show-VSTeamRelease -ProjectName Demo -Id 3
-
- This command will open a web browser with the summary of release 3.
-
-
-
-
-
- Set-VSTeamAccount
-
-
-
- Set-VSTeamDefaultProject
-
-
-
- Add-VSTeamRelease
-
-
-
- Remove-VSTeamRelease
-
-
-
+
+
- Show-VSTeamReleaseDefinition
- Show
- VSTeamReleaseDefinition
+ Update-VSTeamBuild
+ Update
+ VSTeamBuild
- Opens the release definitions for a team project in the default browser.
+ Allows you to set the keep forever flag and build number.
- Opens the release definitions for a team project in the default browser.
+ Allows you to set the keep forever flag and build number.
- Show-VSTeamReleaseDefinition
+ Update-VSTeamBuildProjectName
@@ -19105,10 +22228,22 @@ PS demo:\> Get-ChildItem
None
-
+
+ BuildNumber
+
+ The value you want to set as the build number.
+
+ String
+
+ String
+
+
+ None
+
+ Id
- Specifies release definition by ID.
+ The id of the build.Int32
@@ -19117,41 +22252,146 @@ PS demo:\> Get-ChildItem
None
+
+ KeepForever
+
+ $True or $False to set the keep forever property of the build.
+
+ Boolean
+
+ Boolean
+
+
+ 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
+ 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
+
+
+ BuildNumber
+
+ The value you want to set as the build number.
+
+ String
+
+ String
+
+
+ None
+
+
+ Id
+
+ The id of the build.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ KeepForever
+
+ $True or $False to set the keep forever property of the build.
+
+ Boolean
+
+ Boolean
+
+
+ None
+
+
+ Confirm
+
+ Prompts you for confirmation before running the function.
+
+ SwitchParameter
+
+ SwitchParameter
+
+
+ False
+
+
+ Force
+
+ Forces the function without confirmation
- String
+ SwitchParameter
- String
+ SwitchParameter
- None
+ False
-
- Id
+
+ WhatIf
- Specifies release definition by ID.
+ Shows what would happen if the function runs. The function is not run.
- Int32
+ SwitchParameter
- Int32
+ SwitchParameter
- None
+ False
- Team.ReleaseDefinition
+ Team.Build
@@ -19160,56 +22400,67 @@ PS demo:\> Get-ChildItem
- You can pipe the release definition ID to this function.
+ -------------------------- EXAMPLE 1 --------------------------
- PS C:\> Show-VSTeamReleaseDefinition -ProjectName Demo
+ PS C:\> Get-VSTeamBuild | Update-VSTeamBuild -KeepForever $false
- This command will open a web browser with All Release Definitions for this project showing.
+ Sets the keep forever property of every build to false.
-
-
- Set-VSTeamAccount
-
-
-
- Set-VSTeamDefaultProject
-
-
-
- Add-VSTeamReleaseDefinition
-
-
-
- Remove-VSTeamReleaseDefinition
-
-
-
+
- Show-VSTeamWorkItem
- Show
- VSTeamWorkItem
+ Update-VSTeamBuildDefinition
+ Update
+ VSTeamBuildDefinition
- Opens the work item in the default browser.
+ Updates a build definition for a team project.
- Opens the work item in the default browser.
+ Reads a JSON file off disk or string and uses that file to update an existing build definition in the provided project.
+ You must call Set-VSTeamAccount before calling this function.
- Show-VSTeamWorkItem
-
+ Update-VSTeamBuildDefinition
+
+ 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
+
+
+ InFile
+
+ Path and file name to the JSON file that contains the definition to be updated. If the path is omitted, the default is the current location.
+
+ String
+
+ String
+
+
+ None
+
+ Id
- Specifies work item by ID.
+ Specifies the build definition to update by ID.
+ To find the ID of a build definition, type Get-VSTeamBuildDefinition.Int32
@@ -19219,84 +22470,14 @@ PS demo:\> Get-ChildItem
None
-
-
-
- Id
-
- Specifies work item by ID.
-
- Int32
-
- Int32
-
-
- None
-
-
-
-
-
-
- Team.WorkItem
-
-
-
-
-
-
-
-
- You can pipe the WorkItem ID to this function.
-
-
-
-
- -------------------------- EXAMPLE 1 --------------------------
- PS C:\> Show-VSTeamWorkItem -ProjectName Demo -Id 3
-
- This command will open a web browser with the summary of work item 3.
-
-
-
-
-
- Set-VSTeamAccount
-
-
-
- Set-VSTeamDefaultProject
-
-
-
- Add-VSTeamWorkItem
-
-
-
- Get-VSTeamWorkItem
-
-
-
-
-
-
- Test-VSTeamMembership
- Test
- VSTeamMembership
-
- Tests the membership in a container.
-
-
-
- Tests the membership in a container.
-
-
- Test-VSTeamMembership
-
- MemberDescriptor
+ Update-VSTeamBuildDefinition
+
+ ProjectName
- A member descriptor retrieved by Get-VsTeamUser
+ 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
@@ -19305,10 +22486,10 @@ PS demo:\> Get-ChildItem
None
-
- ContainerDescriptor
+
+ BuildDefinition
- A container descriptor retrieved by Get-VsTeamGroup
+ JSON string of build definition.String
@@ -19317,13 +22498,28 @@ PS demo:\> Get-ChildItem
None
+
+ Id
+
+ Specifies the build definition to update by ID.
+ To find the ID of a build definition, type Get-VSTeamBuildDefinition.
+
+ Int32
+
+ Int32
+
+
+ None
+
-
- MemberDescriptor
+
+ ProjectName
- A member descriptor retrieved by Get-VsTeamUser
+ 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
@@ -19332,10 +22528,35 @@ PS demo:\> Get-ChildItem
None
-
- ContainerDescriptor
+
+ Id
- A container descriptor retrieved by Get-VsTeamGroup
+ Specifies the build definition to update by ID.
+ To find the ID of a build definition, type Get-VSTeamBuildDefinition.
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ InFile
+
+ Path and file name to the JSON file that contains the definition to be updated. If the path is omitted, the default is the current location.
+
+ String
+
+ String
+
+
+ None
+
+
+ BuildDefinition
+
+ JSON string of build definition.String
@@ -19349,75 +22570,60 @@ PS demo:\> Get-ChildItem
- System.Boolean
+ None
-
-
-
-
-
-
-
-
-
-
-
- Get-VsTeamUser
-
-
-
- Get-VsTeamGroup
-
-
-
- Add-VsTeamMembership
-
-
-
- Get-VsTeamMembership
-
-
-
- Remove-VsTeamMembership
-
-
-
+
+
+
+
+
+ This function has a Dynamic Parameter for ProjectName that specifies the project for which this function gets build definitions.
+ 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.
+
+
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 123 -InFile build.json
+
+ This command reads build.json and updates existing build definition with id 123 from it on the demo team project.
+
+
+
+ -------------------------- EXAMPLE 2 --------------------------
+ PS C:\> $b = Get-VSTeamBuildDefinition -ProjectName Demo -Id 23 -Raw
+PS C:\> $b.variables.subscriptionId.value = 'Some New Value'
+PS C:\> $body = $b | ConvertTo-Json -Depth 100
+PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinition $body
+
+
+
+
+
+
- Update-VSTeam
+ Update-VSTeamExtensionUpdate
- VSTeam
+ VSTeamExtension
- Updates the team name, description or both.
+ Update an installed extension. Typically this API is used to enable or disable an extension.
- Updates the team name, description or both.
+ Update an installed extension. Typically this API is used to enable or disable an extension.
- Update-VSTeam
-
- 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
-
-
- Description
+ Update-VSTeamExtension
+
+ PublisherId
- The new description of the team
+ The id of the publisher.String
@@ -19426,10 +22632,10 @@ PS demo:\> Get-ChildItem
None
-
- Name
+
+ ExtensionId
- The name of the team to update
+ The id of the extension.String
@@ -19438,10 +22644,12 @@ PS demo:\> Get-ChildItem
None
-
- NewTeamName
+
+ ExtensionState
- The new name of the team
+ The state of an installed extension. Example: "disabled". The acceptable values for this parameter are:
+ - none
+ - disabledString
@@ -19450,17 +22658,6 @@ PS demo:\> Get-ChildItem
None
-
- Confirm
-
- Prompts you for confirmation before running the function.
-
-
- SwitchParameter
-
-
- False
- Force
@@ -19472,38 +22669,13 @@ PS demo:\> Get-ChildItem
False
-
- WhatIf
-
- Shows what would happen if the function runs. The function is not run.
-
-
- 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
-
-
- Description
+
+ PublisherId
- The new description of the team
+ The id of the publisher.String
@@ -19512,10 +22684,10 @@ PS demo:\> Get-ChildItem
None
-
- Name
+
+ ExtensionId
- The name of the team to update
+ The id of the extension.String
@@ -19524,10 +22696,12 @@ PS demo:\> Get-ChildItem
None
-
- NewTeamName
+
+ ExtensionState
- The new name of the team
+ The state of an installed extension. Example: "disabled". The acceptable values for this parameter are:
+ - none
+ - disabledString
@@ -19536,18 +22710,6 @@ PS demo:\> Get-ChildItem
None
-
- Confirm
-
- Prompts you for confirmation before running the function.
-
- SwitchParameter
-
- SwitchParameter
-
-
- False
- Force
@@ -19560,64 +22722,49 @@ PS demo:\> Get-ChildItem
False
-
- WhatIf
-
- Shows what would happen if the function runs. The function is not run.
-
- SwitchParameter
-
- SwitchParameter
-
-
- False
-
-
-
-
- System.String
-
-
- Description
- Name
- NewTeamName
-
-
-
-
-
-
- Team.Team
-
-
-
-
-
-
+
+
-
+
+
+ Add-VSTeamExtension
+
+
+
+ Get-VSTeamExtension
+
+
+
+ Remove-VSTeamExtension
+
+
+
+ Update-VSTeamExtension
+
+
+
- Update-VSTeamBuild
+ Update-VSTeamPolicyUpdate
- VSTeamBuild
+ VSTeamPolicy
- Allows you to set the keep forever flag and build number.
+ Updates an existing policy in the specified project.
- Allows you to set the keep forever flag and build number.
+ Updates an existing policy in the specified project.
- Update-VSTeamBuild
+ Update-VSTeamPolicyProjectName
@@ -19632,46 +22779,34 @@ PS demo:\> Get-ChildItem
None
-
- BuildNumber
-
- The value you want to set as the build number.
-
- String
-
- String
-
-
- None
-
-
+ Id
- The id of the build.
+ Specifies the policy to update.
- Int32
+ Int
- Int32
+ IntNone
-
- KeepForever
+
+ type
- $True or $False to set the keep forever property of the build.
+ Specifies the id of the type of policy to be update. This must match the original policy, it cannot be changed via this call.
- Boolean
+ Guid
- Boolean
+ GuidNone
-
- Confirm
+
+ enabled
- Prompts you for confirmation before running the function.
+ Enables the policySwitchParameter
@@ -19680,9 +22815,9 @@ PS demo:\> Get-ChildItem
False
- Force
+ blocking
- Forces the function without confirmation
+ Determines if the policy will block pushes to the branch if the policy is not adhered to.SwitchParameter
@@ -19690,16 +22825,18 @@ PS demo:\> Get-ChildItem
False
-
- WhatIf
+
+ settings
- Shows what would happen if the function runs. The function is not run.
+ The settings for the policy.
+ Each policy type has it's own settings that will need to be set.
+ Hashtable
- SwitchParameter
+ Hashtable
- False
+ None
@@ -19718,46 +22855,34 @@ PS demo:\> Get-ChildItem
None
-
- BuildNumber
-
- The value you want to set as the build number.
-
- String
-
- String
-
-
- None
-
-
+ Id
- The id of the build.
+ Specifies the policy to update.
- Int32
+ Int
- Int32
+ IntNone
-
- KeepForever
+
+ type
- $True or $False to set the keep forever property of the build.
+ Specifies the id of the type of policy to be update. This must match the original policy, it cannot be changed via this call.
- Boolean
+ Guid
- Boolean
+ GuidNone
-
- Confirm
+
+ enabled
- Prompts you for confirmation before running the function.
+ Enables the policySwitchParameter
@@ -19767,9 +22892,9 @@ PS demo:\> Get-ChildItem
False
- Force
+ blocking
- Forces the function without confirmation
+ Determines if the policy will block pushes to the branch if the policy is not adhered to.SwitchParameter
@@ -19778,30 +22903,22 @@ PS demo:\> Get-ChildItem
False
-
- WhatIf
+
+ settings
- Shows what would happen if the function runs. The function is not run.
+ The settings for the policy.
+ Each policy type has it's own settings that will need to be set.
- SwitchParameter
+ Hashtable
- SwitchParameter
+ Hashtable
- False
+ None
-
-
-
- Team.Build
-
-
-
-
-
-
+
@@ -19810,36 +22927,46 @@ PS demo:\> Get-ChildItem
-------------------------- EXAMPLE 1 --------------------------
- PS C:\> Get-VSTeamBuild | Update-VSTeamBuild -KeepForever $false
+ PS C:\> Update-VSTeamPolicy -ProjectName Demo -id 1 -type 687c53f8-1a82-4e89-9a86-13d51bc4a8d5 -enabled -blocking -settings @{MinimumApproverCount = 1;Scope=@(@{repositoryId=b87c5af8-1a82-4e59-9a86-13d5cbc4a8d5; matchKind="Exact"; refName="refs/heads/master"})}
- Sets the keep forever property of every build to false.
+ This command updates an existing policy in the Demo project.
-
+
+
+ Get-VSTeamPolicy
+
+
+
+ Remove-VSTeamPolicy
+
+
+
+ Get-VSTeamPolicyType
+
+
+
- Update-VSTeamBuildDefinition
+ Update-VSTeamProfileUpdate
- VSTeamBuildDefinition
+ VSTeamProfile
- Updates a build definition for a team project.
+ Allows you to update the Personal Access Token for your profile.
- Reads a JSON file off disk or string and uses that file to update an existing build definition in the provided project.
- You must call Set-VSTeamAccount before calling this function.
+
- Update-VSTeamBuildDefinition
-
- ProjectName
+ Update-VSTeamProfile
+
+ Name
- 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.
+ Name of the profile to be updatedString
@@ -19848,40 +22975,38 @@ PS demo:\> Get-ChildItem
None
-
- InFile
+
+ PAT
- Path and file name to the JSON file that contains the definition to be updated. If the path is omitted, the default is the current location.
+ A secured string to capture your personal access token.
+ This will allow you to provide your personal access token without displaying it in plain text.
+ To use pat simply omit it from the Update-VSTeamProfile command.
- String
+ SecureString
- String
+ SecureStringNone
-
- Id
+
+ Force
- Specifies the build definition to update by ID.
- To find the ID of a build definition, type Get-VSTeamBuildDefinition.
+ Forces the function without confirmation
- Int32
- Int32
+ SwitchParameter
- None
+ False
- Update-VSTeamBuildDefinition
-
- ProjectName
+ Update-VSTeamProfile
+
+ PersonalAccessToken
- 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.
+ The personal access token from AzD/TFS to use to access this account.String
@@ -19890,10 +23015,10 @@ PS demo:\> Get-ChildItem
None
-
- BuildDefinition
+
+ Name
- JSON string of build definition.
+ Name of the profile to be updatedString
@@ -19902,53 +23027,50 @@ PS demo:\> Get-ChildItem
None
-
- Id
+
+ Force
- Specifies the build definition to update by ID.
- To find the ID of a build definition, type Get-VSTeamBuildDefinition.
+ Forces the function without confirmation
- Int32
- Int32
+ SwitchParameter
- None
+ False
-
- ProjectName
+
+ PAT
- 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.
+ A secured string to capture your personal access token.
+ This will allow you to provide your personal access token without displaying it in plain text.
+ To use pat simply omit it from the Update-VSTeamProfile command.
- String
+ SecureString
- String
+ SecureStringNone
-
- Id
+
+ PersonalAccessToken
- Specifies the build definition to update by ID.
- To find the ID of a build definition, type Get-VSTeamBuildDefinition.
+ The personal access token from AzD/TFS to use to access this account.
- Int32
+ String
- Int32
+ StringNone
-
- InFile
+
+ Name
- Path and file name to the JSON file that contains the definition to be updated. If the path is omitted, the default is the current location.
+ Name of the profile to be updatedString
@@ -19957,77 +23079,81 @@ PS demo:\> Get-ChildItem
None
-
- BuildDefinition
+
+ Force
- JSON string of build definition.
+ Forces the function without confirmation
- String
+ SwitchParameter
- String
+ SwitchParameter
- None
+ False
-
-
-
- None
-
-
-
-
-
-
+
- This function has a Dynamic Parameter for ProjectName that specifies the project for which this function gets build definitions.
- 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.
+ -------------------------- EXAMPLE 1 --------------------------
- PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 123 -InFile build.json
+ PS C:\> Update-VSTeamProfile -Name ProfileName
- This command reads build.json and updates existing build definition with id 123 from it on the demo team project.
+ You will be prompted for the account name and personal access token.-------------------------- EXAMPLE 2 --------------------------
- PS C:\> $b = Get-VSTeamBuildDefinition -ProjectName Demo -Id 23 -Raw
-PS C:\> $b.variables.subscriptionId.value = 'Some New Value'
-PS C:\> $body = $b | ConvertTo-Json -Depth 100
-PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinition $body
+ PS C:\> Update-VSTeamProfile -Name mydemos -PersonalAccessToken 7a8ilh6db4aforlrnrqmdrxdztkjvcc4uhlh5vgbteserp3mziwnga
-
+ Allows you to provide all the information on the command line.
+
+
+
+ -------------------------- EXAMPLE 3 --------------------------
+ PS C:\> Get-VSTeamProfile | Where-Object version -eq vsts | Select-Object -skip 1 | Update-VSTeamProfile -PersonalAccessToken 7a8ilh6db4aforlrnrqmdrxdztkjvcc4uhlh5vgbteserp3mziwnga -Force
+
+ This will update all but the first AzD profile
-
+
+
+ Update-VSTeamAccount
+
+
+
+ Set-VSTeamDefaultProject
+
+
+
- Update-VSTeamExtension
+ Update-VSTeamProjectUpdate
- VSTeamExtension
+ VSTeamProject
- Update an installed extension. Typically this API is used to enable or disable an extension.
+ Updates the project name, description or both.
- Update an installed extension. Typically this API is used to enable or disable an extension.
+ Updates the project name, description or both.
- Update-VSTeamExtension
-
- PublisherId
+ Update-VSTeamProject
+
+ ProjectName
- The id of the publisher.
+ 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
@@ -20036,10 +23162,10 @@ PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinitio
None
-
- ExtensionId
+
+ NewName
- The id of the extension.
+ The new name for the project.String
@@ -20048,12 +23174,22 @@ PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinitio
None
-
- ExtensionState
+
+ NewDescription
- The state of an installed extension. Example: "disabled". The acceptable values for this parameter are:
- - none
- - disabled
+ The new description for the project.
+
+ String
+
+ String
+
+
+ None
+
+
+ Id
+
+ The id of the project to update.String
@@ -20076,10 +23212,12 @@ PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinitio
-
- PublisherId
+
+ ProjectName
- The id of the publisher.
+ 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
@@ -20088,10 +23226,10 @@ PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinitio
None
-
- ExtensionId
+
+ NewName
- The id of the extension.
+ The new name for the project.String
@@ -20100,12 +23238,22 @@ PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinitio
None
-
- ExtensionState
+
+ NewDescription
- The state of an installed extension. Example: "disabled". The acceptable values for this parameter are:
- - none
- - disabled
+ The new description for the project.
+
+ String
+
+ String
+
+
+ None
+
+
+ Id
+
+ The id of the project to update.String
@@ -20127,54 +23275,220 @@ PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinitio
False
-
-
+
+
+
+ System.String
+
+
+
+
+
+
+
+
+
+ System.Object
+
+
+
+
+
+
-
-
-
- Add-VSTeamExtension
-
-
-
- Get-VSTeamExtension
-
-
-
- Remove-VSTeamExtension
-
-
-
- Update-VSTeamExtension
-
-
-
+
+
+ -------------------------- EXAMPLE 1 --------------------------
+ PS C:\> Update-VSTeamProject -Name Demo -NewName aspDemo
+
+ This command changes the name of your project from Demo to aspDemo.
+
+
+
+
- Update-VSTeamPolicy
+ Update-VSTeamPullRequestUpdate
- VSTeamPolicy
+ VSTeamPullRequest
- Updates an existing policy in the specified project.
+ Update a pull request
- Updates an existing policy in the specified project.
+ Update a pull request
- Update-VSTeamPolicy
-
- ProjectName
+ Update-VSTeamPullRequest
+
+ RepositoryId
+
+ The id of the repository
+
+ Guid
+
+ Guid
+
+
+ None
+
+
+ PullRequestId
+
+ The id of the pull request
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ Draft
+
+ Set the pull request as a draft
+
+
+ SwitchParameter
+
+
+ False
+
+
+ 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
+
+
+
+ Update-VSTeamPullRequest
+
+ RepositoryId
+
+ The id of the repository
+
+ Guid
+
+ Guid
+
+
+ None
+
+
+ PullRequestId
+
+ The id of the pull request
+
+ Int32
+
+ Int32
+
+
+ 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
+
+
+
+ Update-VSTeamPullRequest
+
+ RepositoryId
- 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.
+ The id of the repository
+
+ Guid
+
+ Guid
+
+
+ None
+
+
+ PullRequestId
+
+ The id of the pull request
+
+ Int32
+
+ Int32
+
+
+ None
+
+
+ Status
+
+ The status to set the pull request to. Valid values for this are:
+ - abandoned
+ - active
+ - completed
+ - notSetString
@@ -20183,22 +23497,46 @@ PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinitio
None
+
+ Confirm
+
+ Prompts you for confirmation before running the function.
+
+
+ SwitchParameter
+
+
+ False
+
- Id
+ Force
- Specifies the policy to update.
+ Forces the function without confirmation
- Int
- Int
+ SwitchParameter
- None
+ False
-
- type
+
+ WhatIf
- Specifies the id of the type of policy to be update. This must match the original policy, it cannot be changed via this call.
+ Shows what would happen if the function runs. The function is not run.
+
+
+ SwitchParameter
+
+
+ False
+
+
+
+ Update-VSTeamPullRequest
+
+ RepositoryId
+
+ The id of the repositoryGuid
@@ -20207,10 +23545,22 @@ PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinitio
None
+
+ PullRequestId
+
+ The id of the pull request
+
+ Int32
+
+ Int32
+
+
+ None
+
- enabled
+ EnableAutoComplete
- Enables the policy
+ Set the pull requests auto complete statusSwitchParameter
@@ -20219,9 +23569,21 @@ PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinitio
False
- blocking
+ AutoCompleteIdentity
- Determines if the policy will block pushes to the branch if the policy is not adhered to.
+ The identity that enabled autocomplete. This is mandatory if -AutoComplete is set to $true
+
+ VSTeamUser
+
+ VSTeamUser
+
+
+ None
+
+
+ Confirm
+
+ Prompts you for confirmation before running the function.SwitchParameter
@@ -20229,174 +23591,59 @@ PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinitio
False
-
- settings
+
+ Force
- The settings for the policy.
- Each policy type has it's own settings that will need to be set.
+ Forces the function without confirmation
- Hashtable
- Hashtable
+ SwitchParameter
- None
+ False
+
+
+ WhatIf
+
+ Shows what would happen if the function runs. The function is not run.
+
+
+ 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
-
- Specifies the policy to update.
-
- Int
-
- Int
-
-
- None
-
-
- type
-
- Specifies the id of the type of policy to be update. This must match the original policy, it cannot be changed via this call.
-
- Guid
-
- Guid
-
-
- None
-
-
- enabled
-
- Enables the policy
-
- SwitchParameter
-
- SwitchParameter
-
-
- False
-
-
- blocking
-
- Determines if the policy will block pushes to the branch if the policy is not adhered to.
-
- SwitchParameter
-
- SwitchParameter
-
-
- False
-
-
- settings
-
- The settings for the policy.
- Each policy type has it's own settings that will need to be set.
-
- Hashtable
-
- Hashtable
-
-
- None
-
-
-
-
-
-
-
-
-
-
-
- -------------------------- EXAMPLE 1 --------------------------
- PS C:\> Update-VSTeamPolicy -ProjectName Demo -id 1 -type 687c53f8-1a82-4e89-9a86-13d51bc4a8d5 -enabled -blocking -settings @{MinimumApproverCount = 1;Scope=@(@{repositoryId=b87c5af8-1a82-4e59-9a86-13d5cbc4a8d5; matchKind="Exact"; refName="refs/heads/master"})}
-
- This command updates an existing policy in the Demo project.
-
-
-
-
-
- Get-VSTeamPolicy
-
-
-
- Remove-VSTeamPolicy
-
-
-
- Get-VSTeamPolicyType
-
-
-
-
-
-
- Update-VSTeamProfile
- Update
- VSTeamProfile
-
- Allows you to update the Personal Access Token for your profile.
-
-
-
-
-
-
- Update-VSTeamProfile
-
- Name
+ Update-VSTeamPullRequest
+
+ RepositoryId
- Name of the profile to be updated
+ The id of the repository
- String
+ Guid
- String
+ GuidNone
- PAT
-
- A secured string to capture your personal access token.
- This will allow you to provide your personal access token without displaying it in plain text.
- To use pat simply omit it from the Update-VSTeamProfile command.
+ PullRequestId
+
+ The id of the pull request
- SecureString
+ Int32
- SecureString
+ Int32None
- Force
+ DisableAutoComplete
- Forces the function without confirmation
+ Unset the pull requests auto complete statusSwitchParameter
@@ -20404,37 +23651,32 @@ PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinitio
False
-
-
- Update-VSTeamProfile
-
- PersonalAccessToken
+
+ Confirm
- The personal access token from AzD/TFS to use to access this account.
+ Prompts you for confirmation before running the function.
- String
- String
+ SwitchParameter
- None
+ False
-
- Name
+
+ Force
- Name of the profile to be updated
+ Forces the function without confirmation
- String
- String
+ SwitchParameter
- None
+ False
-
- Force
+
+ WhatIf
- Forces the function without confirmation
+ Shows what would happen if the function runs. The function is not run.SwitchParameter
@@ -20445,36 +23687,38 @@ PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinitio
-
- PAT
+
+ RepositoryId
- A secured string to capture your personal access token.
- This will allow you to provide your personal access token without displaying it in plain text.
- To use pat simply omit it from the Update-VSTeamProfile command.
+ The id of the repository
- SecureString
+ Guid
- SecureString
+ GuidNone
-
- PersonalAccessToken
+
+ PullRequestId
- The personal access token from AzD/TFS to use to access this account.
+ The id of the pull request
- String
+ Int32
- String
+ Int32None
-
- Name
+
+ Status
- Name of the profile to be updated
+ The status to set the pull request to. Valid values for this are:
+ - abandoned
+ - active
+ - completed
+ - notSetString
@@ -20484,9 +23728,9 @@ PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinitio
None
- Force
+ EnableAutoComplete
- Forces the function without confirmation
+ Set the pull requests auto complete statusSwitchParameter
@@ -20495,176 +23739,53 @@ PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinitio
False
-
-
-
-
-
-
-
-
-
-
- -------------------------- EXAMPLE 1 --------------------------
- PS C:\> Update-VSTeamProfile -Name ProfileName
-
- You will be prompted for the account name and personal access token.
-
-
-
- -------------------------- EXAMPLE 2 --------------------------
- PS C:\> Update-VSTeamProfile -Name mydemos -PersonalAccessToken 7a8ilh6db4aforlrnrqmdrxdztkjvcc4uhlh5vgbteserp3mziwnga
-
- Allows you to provide all the information on the command line.
-
-
-
- -------------------------- EXAMPLE 3 --------------------------
- PS C:\> Get-VSTeamProfile | Where-Object version -eq vsts | Select-Object -skip 1 | Update-VSTeamProfile -PersonalAccessToken 7a8ilh6db4aforlrnrqmdrxdztkjvcc4uhlh5vgbteserp3mziwnga -Force
-
- This will update all but the first AzD profile
-
-
-
-
-
- Update-VSTeamAccount
-
-
-
- Set-VSTeamDefaultProject
-
-
-
-
-
-
- Update-VSTeamProject
- Update
- VSTeamProject
-
- Updates the project name, description or both.
-
-
-
- Updates the project name, description or both.
-
-
-
- Update-VSTeamProject
-
- 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
-
-
- NewName
-
- The new name for the project.
-
- String
-
- String
-
-
- None
-
-
- NewDescription
-
- The new description for the project.
-
- String
-
- String
-
-
- None
-
-
- Id
-
- The id of the project to update.
-
- String
-
- String
-
-
- None
-
-
- Force
-
- Forces the function without confirmation
-
-
- SwitchParameter
-
-
- False
-
-
-
-
-
- ProjectName
+
+ AutoCompleteIdentity
- 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.
+ The identity that enabled autocomplete. This is mandatory if -AutoComplete is set to $true
- String
+ VSTeamUser
- String
+ VSTeamUserNone
- NewName
+ DisableAutoComplete
- The new name for the project.
+ Unset the pull requests auto complete status
- String
+ SwitchParameter
- String
+ SwitchParameter
- None
+ False
- NewDescription
+ Draft
- The new description for the project.
+ Set the pull request as a draft
- String
+ SwitchParameter
- String
+ SwitchParameter
- None
+ False
-
- Id
+
+ Confirm
- The id of the project to update.
+ Prompts you for confirmation before running the function.
- String
+ SwitchParameter
- String
+ SwitchParameter
- None
+ FalseForce
@@ -20678,21 +23799,24 @@ PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinitio
False
-
-
-
+
+ WhatIf
+
+ Shows what would happen if the function runs. The function is not run.
+
+ SwitchParameter
- System.String
+ SwitchParameter
+
-
-
-
-
-
+ False
+
+
+
- System.Object
+ Team.PullRequest
@@ -20707,9 +23831,20 @@ PS C:\> Update-VSTeamBuildDefinition -ProjectName Demo -Id 23 -BuildDefinitio
-------------------------- EXAMPLE 1 --------------------------
- PS C:\> Update-VSTeamProject -Name Demo -NewName aspDemo
+ PS C:\> Set-VSTeamAccount -Account mydemos -Token $(System.AccessToken) -UseBearerToken
+PS C:\> $r = Get-VSTeamGitRepository -ProjectName project -Name demorepo
+PS C:\> Update-VSTeamPullRequest -RepositoryId $r.RepositoryId -Draft
- This command changes the name of your project from Demo to aspDemo.
+ Set the pull request to be a draft
+
+
+
+ -------------------------- EXAMPLE 2 --------------------------
+ PS C:\> Set-VSTeamAccount -Account mydemos -Token $(System.AccessToken) -UseBearerToken
+PS C:\> $r = Get-VSTeamGitRepository -ProjectName project -Name demorepo
+PS C:\> Update-VSTeamPullRequest -RepositoryId $r.RepositoryId -Status abandoned
+
+ Abandon a pull request
diff --git a/Source/formats/Team.Agent.TableView.ps1xml b/Source/formats/Team.Agent.TableView.ps1xml
index 0e8f6dafe..5552ad407 100644
--- a/Source/formats/Team.Agent.TableView.ps1xml
+++ b/Source/formats/Team.Agent.TableView.ps1xml
@@ -1 +1,53 @@
-Team.Agent.TableViewTeam.Agentnameenabledversionosid
+
+
+
+
+ Team.Agent.TableView
+
+ Team.Agent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ name
+
+
+ enabled
+
+
+ version
+
+
+ os
+
+
+ id
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Approval.Approved.TableView.ps1xml b/Source/formats/Team.Approval.Approved.TableView.ps1xml
index 22f863bcf..a61a874c5 100644
--- a/Source/formats/Team.Approval.Approved.TableView.ps1xml
+++ b/Source/formats/Team.Approval.Approved.TableView.ps1xml
@@ -1,63 +1,63 @@
-
-
- Team.Approval.Approved.TableView
-
- Team.Approval
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- releaseName
-
-
- releaseEnvironmentName
-
-
- isAutomated
-
-
- shortApprovalType
-
-
- approverName
-
-
- releaseDefinitionName
-
-
- comments
-
-
-
-
-
-
-
+
+
+ Team.Approval.Approved.TableView
+
+ Team.Approval
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ releaseName
+
+
+ releaseEnvironmentName
+
+
+ isAutomated
+
+
+ shortApprovalType
+
+
+ approverName
+
+
+ releaseDefinitionName
+
+
+ comments
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/formats/Team.Build.Artifact.ListView.ps1xml b/Source/formats/Team.Build.Artifact.ListView.ps1xml
index 396cca3c1..3cccf99ae 100644
--- a/Source/formats/Team.Build.Artifact.ListView.ps1xml
+++ b/Source/formats/Team.Build.Artifact.ListView.ps1xml
@@ -1 +1,34 @@
-Team.Build.Artifact.ListViewTeam.Build.ArtifactidnametypedatadownloadUrl
+
+
+
+
+ Team.Build.Artifact.ListView
+
+ Team.Build.Artifact
+
+
+
+
+
+
+ id
+
+
+ name
+
+
+ type
+
+
+ data
+
+
+ downloadUrl
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Build.Artifact.Resource.ListView.ps1xml b/Source/formats/Team.Build.Artifact.Resource.ListView.ps1xml
index 0bbc58c95..36bfc8cb1 100644
--- a/Source/formats/Team.Build.Artifact.Resource.ListView.ps1xml
+++ b/Source/formats/Team.Build.Artifact.Resource.ListView.ps1xml
@@ -1 +1,34 @@
-Team.Build.Artifact.Resource.ListViewTeam.Build.Artifact.ResourcetypedataurldownloadUrlproperties
+
+
+
+
+ Team.Build.Artifact.Resource.ListView
+
+ Team.Build.Artifact.Resource
+
+
+
+
+
+
+ type
+
+
+ data
+
+
+ url
+
+
+ downloadUrl
+
+
+ properties
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Build.Artifact.Resource.TableView.ps1xml b/Source/formats/Team.Build.Artifact.Resource.TableView.ps1xml
index 59fc1ae65..2d13ce6c3 100644
--- a/Source/formats/Team.Build.Artifact.Resource.TableView.ps1xml
+++ b/Source/formats/Team.Build.Artifact.Resource.TableView.ps1xml
@@ -1 +1,51 @@
-Team.Build.Artifact.Resource.TableViewTeam.Build.Artifact.ResourcetypedataurldownloadUrlproperties
+
+
+
+
+ Team.Build.Artifact.Resource.TableView
+
+ Team.Build.Artifact.Resource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ type
+
+
+ data
+
+
+ url
+
+
+ downloadUrl
+
+
+ properties
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Build.Artifact.Resource.WideView.ps1xml b/Source/formats/Team.Build.Artifact.Resource.WideView.ps1xml
index 5eb088c56..62c7f93fb 100644
--- a/Source/formats/Team.Build.Artifact.Resource.WideView.ps1xml
+++ b/Source/formats/Team.Build.Artifact.Resource.WideView.ps1xml
@@ -1 +1,20 @@
-Team.Build.Artifact.Resource.WideViewTeam.Build.Artifact.Resourceproperties
+
+
+
+
+ Team.Build.Artifact.Resource.WideView
+
+ Team.Build.Artifact.Resource
+
+
+
+
+
+ properties
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Build.Artifact.TableView.ps1xml b/Source/formats/Team.Build.Artifact.TableView.ps1xml
index 0dce8341b..bba19853e 100644
--- a/Source/formats/Team.Build.Artifact.TableView.ps1xml
+++ b/Source/formats/Team.Build.Artifact.TableView.ps1xml
@@ -1 +1,39 @@
-Team.Build.Artifact.TableViewTeam.Build.ArtifactnametypedownloadUrl
+
+
+
+
+ Team.Build.Artifact.TableView
+
+ Team.Build.Artifact
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ name
+
+
+ type
+
+
+ downloadUrl
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Build.Artifact.WideView.ps1xml b/Source/formats/Team.Build.Artifact.WideView.ps1xml
index 4a0f88fc7..82fd46a02 100644
--- a/Source/formats/Team.Build.Artifact.WideView.ps1xml
+++ b/Source/formats/Team.Build.Artifact.WideView.ps1xml
@@ -1 +1,20 @@
-Team.Build.Artifact.WideViewTeam.Build.ArtifactdownloadUrl
+
+
+
+
+ Team.Build.Artifact.WideView
+
+ Team.Build.Artifact
+
+
+
+
+
+ downloadUrl
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Build.ListView.ps1xml b/Source/formats/Team.Build.ListView.ps1xml
index 59822699b..e4a1d325d 100644
--- a/Source/formats/Team.Build.ListView.ps1xml
+++ b/Source/formats/Team.Build.ListView.ps1xml
@@ -1 +1,44 @@
-Team.Build.ListViewTeam.Provider.BuildVSTeamBuildIDNameStatusResultStartTimeRequestedByBuildDefinitionProjectName
+
+
+
+
+ Team.Build.ListView
+
+ Team.Provider.Build
+ VSTeamBuild
+
+
+
+
+
+
+ ID
+
+
+ Name
+
+
+ Status
+
+
+ Result
+
+
+ StartTime
+
+
+ RequestedBy
+
+
+ BuildDefinition
+
+
+ ProjectName
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Build.WideView.ps1xml b/Source/formats/Team.Build.WideView.ps1xml
index a9b7b9fbe..7bace7ba2 100644
--- a/Source/formats/Team.Build.WideView.ps1xml
+++ b/Source/formats/Team.Build.WideView.ps1xml
@@ -1 +1,20 @@
-Team.Build.WideViewTeam.Buildbuildnumber
+
+
+
+
+ Team.Build.WideView
+
+ Team.Build
+
+
+
+
+
+ buildnumber
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.BuildDefinition.ListView.ps1xml b/Source/formats/Team.BuildDefinition.ListView.ps1xml
index 0fc72e81e..5c96a54a2 100644
--- a/Source/formats/Team.BuildDefinition.ListView.ps1xml
+++ b/Source/formats/Team.BuildDefinition.ListView.ps1xml
@@ -1 +1,28 @@
-Team.BuildDefinition.ListViewTeam.BuildDefinitionIDNameAuthoredBy
+
+
+
+
+ Team.BuildDefinition.ListView
+
+ Team.BuildDefinition
+
+
+
+
+
+
+ ID
+
+
+ Name
+
+
+ AuthoredBy
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.BuildDefinition.TableView.ps1xml b/Source/formats/Team.BuildDefinition.TableView.ps1xml
index 627754fda..6417b80da 100644
--- a/Source/formats/Team.BuildDefinition.TableView.ps1xml
+++ b/Source/formats/Team.BuildDefinition.TableView.ps1xml
@@ -1 +1,35 @@
-Team.BuildDefinition.TableViewTeam.BuildDefinitionNameID
+
+
+
+
+ Team.BuildDefinition.TableView
+
+ Team.BuildDefinition
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ ID
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.BuildDefinitionPhasedProcess.TableView.ps1xml b/Source/formats/Team.BuildDefinitionPhasedProcess.TableView.ps1xml
index f9ad1eb68..af4d0e236 100644
--- a/Source/formats/Team.BuildDefinitionPhasedProcess.TableView.ps1xml
+++ b/Source/formats/Team.BuildDefinitionPhasedProcess.TableView.ps1xml
@@ -1 +1,35 @@
-Team.BuildDefinitionPhasedProcess.TableViewTeam.BuildDefinitionPhasedProcessNamePhases
+
+
+
+
+ Team.BuildDefinitionPhasedProcess.TableView
+
+ Team.BuildDefinitionPhasedProcess
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Phases
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.BuildDefinitionProcess.ListView.ps1xml b/Source/formats/Team.BuildDefinitionProcess.ListView.ps1xml
index de4a9e011..3db821419 100644
--- a/Source/formats/Team.BuildDefinitionProcess.ListView.ps1xml
+++ b/Source/formats/Team.BuildDefinitionProcess.ListView.ps1xml
@@ -1 +1,25 @@
-Team.BuildDefinitionProcess.ListViewTeam.BuildDefinitionProcessNamePhases
+
+
+
+
+ Team.BuildDefinitionProcess.ListView
+
+ Team.BuildDefinitionProcess
+
+
+
+
+
+
+ Name
+
+
+ Phases
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.BuildDefinitionProcessPhase.ListView.ps1xml b/Source/formats/Team.BuildDefinitionProcessPhase.ListView.ps1xml
index 6b47be326..d4dbf4174 100644
--- a/Source/formats/Team.BuildDefinitionProcessPhase.ListView.ps1xml
+++ b/Source/formats/Team.BuildDefinitionProcessPhase.ListView.ps1xml
@@ -1 +1,25 @@
-Team.BuildDefinitionProcessPhase.ListViewTeam.BuildDefinitionProcessPhaseNameSteps
+
+
+
+
+ Team.BuildDefinitionProcessPhase.ListView
+
+ Team.BuildDefinitionProcessPhase
+
+
+
+
+
+
+ Name
+
+
+ Steps
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.BuildDefinitionProcessPhase.TableView.ps1xml b/Source/formats/Team.BuildDefinitionProcessPhase.TableView.ps1xml
index 49e1906df..f4029672a 100644
--- a/Source/formats/Team.BuildDefinitionProcessPhase.TableView.ps1xml
+++ b/Source/formats/Team.BuildDefinitionProcessPhase.TableView.ps1xml
@@ -1 +1,35 @@
-Team.BuildDefinitionProcessPhase.TableViewTeam.BuildDefinitionProcessPhaseNameStepCount
+
+
+
+
+ Team.BuildDefinitionProcessPhase.TableView
+
+ Team.BuildDefinitionProcessPhase
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ StepCount
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.BuildDefinitionProcessPhaseStep.ListView.ps1xml b/Source/formats/Team.BuildDefinitionProcessPhaseStep.ListView.ps1xml
index adf942c4c..b009dd0b3 100644
--- a/Source/formats/Team.BuildDefinitionProcessPhaseStep.ListView.ps1xml
+++ b/Source/formats/Team.BuildDefinitionProcessPhaseStep.ListView.ps1xml
@@ -1 +1,28 @@
-Team.BuildDefinitionProcessPhaseStep.ListViewTeam.BuildDefinitionProcessPhaseStepIDNameEnabled
+
+
+
+
+ Team.BuildDefinitionProcessPhaseStep.ListView
+
+ Team.BuildDefinitionProcessPhaseStep
+
+
+
+
+
+
+ ID
+
+
+ Name
+
+
+ Enabled
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.BuildDefinitionProcessPhaseStep.TableView.ps1xml b/Source/formats/Team.BuildDefinitionProcessPhaseStep.TableView.ps1xml
index c73583e75..d3e50c9a5 100644
--- a/Source/formats/Team.BuildDefinitionProcessPhaseStep.TableView.ps1xml
+++ b/Source/formats/Team.BuildDefinitionProcessPhaseStep.TableView.ps1xml
@@ -1 +1,41 @@
-Team.BuildDefinitionProcessPhaseStep.TableViewTeam.BuildDefinitionProcessPhaseStepIDNameEnabled
+
+
+
+
+ Team.BuildDefinitionProcessPhaseStep.TableView
+
+ Team.BuildDefinitionProcessPhaseStep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID
+
+
+ Name
+
+
+ Enabled
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.BuildDefinitionYamlProcess.TableView.ps1xml b/Source/formats/Team.BuildDefinitionYamlProcess.TableView.ps1xml
index ca5773be9..c295a7e5e 100644
--- a/Source/formats/Team.BuildDefinitionYamlProcess.TableView.ps1xml
+++ b/Source/formats/Team.BuildDefinitionYamlProcess.TableView.ps1xml
@@ -1 +1,29 @@
-Team.BuildDefinitionYamlProcess.TableViewTeam.BuildDefinitionYamlProcessyamlFilename
+
+
+
+
+ Team.BuildDefinitionYamlProcess.TableView
+
+ Team.BuildDefinitionYamlProcess
+
+
+
+
+
+
+
+
+
+
+
+
+
+ yamlFilename
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.ClassificationNode.ListView.ps1xml b/Source/formats/Team.ClassificationNode.ListView.ps1xml
index c5506079c..989024ab7 100644
--- a/Source/formats/Team.ClassificationNode.ListView.ps1xml
+++ b/Source/formats/Team.ClassificationNode.ListView.ps1xml
@@ -1 +1,46 @@
-Team.ClassificationNode.ListViewTeam.ClassificationNodeIDIdentifierNamePathStructureTypeProjectNameUrlHasChildrenChildren
+
+
+
+
+ Team.ClassificationNode.ListView
+
+ Team.ClassificationNode
+
+
+
+
+
+
+ ID
+
+
+ Identifier
+
+
+ Name
+
+
+ Path
+
+
+ StructureType
+
+
+ ProjectName
+
+
+ Url
+
+
+ HasChildren
+
+
+ Children
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.ClassificationNode.TableView.ps1xml b/Source/formats/Team.ClassificationNode.TableView.ps1xml
index 615af6470..ab757b630 100644
--- a/Source/formats/Team.ClassificationNode.TableView.ps1xml
+++ b/Source/formats/Team.ClassificationNode.TableView.ps1xml
@@ -1 +1,57 @@
-Team.ClassificationNode.TableViewTeam.ClassificationNodeIDIdentifierNamePathStructureTypeHasChildren
+
+
+
+
+ Team.ClassificationNode.TableView
+
+ Team.ClassificationNode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID
+
+
+ Identifier
+
+
+ Name
+
+
+ Path
+
+
+ StructureType
+
+
+ HasChildren
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Descriptor.ListView.ps1xml b/Source/formats/Team.Descriptor.ListView.ps1xml
index 05a984e84..d4a90a5fa 100644
--- a/Source/formats/Team.Descriptor.ListView.ps1xml
+++ b/Source/formats/Team.Descriptor.ListView.ps1xml
@@ -1 +1,25 @@
-Team.Descriptor.ListViewTeam.DescriptorDescriptorLinks
+
+
+
+
+ Team.Descriptor.ListView
+
+ Team.Descriptor
+
+
+
+
+
+
+ Descriptor
+
+
+ Links
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Descriptor.TableView.ps1xml b/Source/formats/Team.Descriptor.TableView.ps1xml
index 066a10746..8fc84cb9a 100644
--- a/Source/formats/Team.Descriptor.TableView.ps1xml
+++ b/Source/formats/Team.Descriptor.TableView.ps1xml
@@ -1 +1,33 @@
-Team.Descriptor.TableViewTeam.DescriptorDescriptorLinks
+
+
+
+
+ Team.Descriptor.TableView
+
+ Team.Descriptor
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Descriptor
+
+
+ Links
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Environment.Status.TableView.ps1xml b/Source/formats/Team.Environment.Status.TableView.ps1xml
index 581a523ba..3e289d399 100644
--- a/Source/formats/Team.Environment.Status.TableView.ps1xml
+++ b/Source/formats/Team.Environment.Status.TableView.ps1xml
@@ -1 +1,41 @@
-Team.Environment.Status.TableViewVSTeamEnvironmentVSTeamAttemptVSTeamTaskDisplayModeNamestatus
+
+
+
+
+ Team.Environment.Status.TableView
+
+ VSTeamEnvironment
+ VSTeamAttempt
+ VSTeamTask
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DisplayMode
+
+
+ Name
+
+
+ status
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Extension.TableView.ps1xml b/Source/formats/Team.Extension.TableView.ps1xml
index 45f402898..55a7a3b19 100644
--- a/Source/formats/Team.Extension.TableView.ps1xml
+++ b/Source/formats/Team.Extension.TableView.ps1xml
@@ -1 +1,41 @@
-Team.Extension.TableViewTeam.ExtensionNameIDpublisherId
+
+
+
+
+ Team.Extension.TableView
+
+ Team.Extension
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ ID
+
+
+ publisherId
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.GitRef.TableView.ps1xml b/Source/formats/Team.GitRef.TableView.ps1xml
index d80d59310..07da5c025 100644
--- a/Source/formats/Team.GitRef.TableView.ps1xml
+++ b/Source/formats/Team.GitRef.TableView.ps1xml
@@ -1 +1,35 @@
-Team.GitRef.TableViewTeam.GitRefRefNameCreator
+
+
+
+
+ Team.GitRef.TableView
+
+ Team.GitRef
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ RefName
+
+
+ Creator
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Group.ListView.ps1xml b/Source/formats/Team.Group.ListView.ps1xml
index 0e77b30ce..3006e820a 100644
--- a/Source/formats/Team.Group.ListView.ps1xml
+++ b/Source/formats/Team.Group.ListView.ps1xml
@@ -1 +1,46 @@
-Team.Group.ListViewTeam.GroupIDPrincipalNameDisplayNameProjectNameOriginOriginIDURLDescriptorLinks
+
+
+
+
+ Team.Group.ListView
+
+ Team.Group
+
+
+
+
+
+
+ ID
+
+
+ PrincipalName
+
+
+ DisplayName
+
+
+ ProjectName
+
+
+ Origin
+
+
+ OriginID
+
+
+ URL
+
+
+ Descriptor
+
+
+ Links
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Group.TableView.ps1xml b/Source/formats/Team.Group.TableView.ps1xml
index 5da2c1f49..66ec9220c 100644
--- a/Source/formats/Team.Group.TableView.ps1xml
+++ b/Source/formats/Team.Group.TableView.ps1xml
@@ -1 +1,45 @@
-Team.Group.TableViewTeam.GroupPrincipalNameDisplayNameProjectNameOrigin
+
+
+
+
+ Team.Group.TableView
+
+ Team.Group
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PrincipalName
+
+
+ DisplayName
+
+
+ ProjectName
+
+
+ Origin
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Option.TableView.ps1xml b/Source/formats/Team.Option.TableView.ps1xml
index 0bfa01661..1ad68f122 100644
--- a/Source/formats/Team.Option.TableView.ps1xml
+++ b/Source/formats/Team.Option.TableView.ps1xml
@@ -1 +1,45 @@
-Team.Option.TableViewTeam.OptionresourceNameareamaxVersionrouteTemplate
+
+
+
+
+ Team.Option.TableView
+
+ Team.Option
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ resourceName
+
+
+ area
+
+
+ maxVersion
+
+
+ routeTemplate
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Option.Versions.TableView.ps1xml b/Source/formats/Team.Option.Versions.TableView.ps1xml
index 2422856f3..442343850 100644
--- a/Source/formats/Team.Option.Versions.TableView.ps1xml
+++ b/Source/formats/Team.Option.Versions.TableView.ps1xml
@@ -1 +1,57 @@
-Team.Option.Versions.TableViewTeam.OptionresourceNameareaminVersionmaxVersionreleasedVersionresourceVersion
+
+
+
+
+ Team.Option.Versions.TableView
+
+ Team.Option
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ resourceName
+
+
+ area
+
+
+ minVersion
+
+
+ maxVersion
+
+
+ releasedVersion
+
+
+ resourceVersion
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.PSDrive.Default.ListView.ps1xml b/Source/formats/Team.PSDrive.Default.ListView.ps1xml
index 50feec87a..e4a5eeecc 100644
--- a/Source/formats/Team.PSDrive.Default.ListView.ps1xml
+++ b/Source/formats/Team.PSDrive.Default.ListView.ps1xml
@@ -1 +1,34 @@
-Team.PSDrive.Default.ListViewMicrosoft.PowerShell.SHiPS.SHiPSDirectoryTeam.AccountTeam.PoolTeam.QueuesTeam.PoolsTeam.BuildsTeam.BuildDefinitionsTeam.ReleasesTeam.RepositoriesTeam.TeamsNameprojectName
+
+
+
+
+ Team.PSDrive.Default.ListView
+
+ Microsoft.PowerShell.SHiPS.SHiPSDirectory
+ Team.Account
+ Team.Pool
+ Team.Queues
+ Team.Pools
+ Team.Builds
+ Team.BuildDefinitions
+ Team.Releases
+ Team.Repositories
+ Team.Teams
+
+
+
+
+
+
+ Name
+
+
+ projectName
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.PolicyType.TableView.ps1xml b/Source/formats/Team.PolicyType.TableView.ps1xml
index 109e73809..282eac587 100644
--- a/Source/formats/Team.PolicyType.TableView.ps1xml
+++ b/Source/formats/Team.PolicyType.TableView.ps1xml
@@ -1 +1,39 @@
-Team.PolicyType.TableViewTeam.PolicyTypedisplayNamedescriptionid
+
+
+
+
+ Team.PolicyType.TableView
+
+ Team.PolicyType
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ displayName
+
+
+ description
+
+
+ id
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Pool.TableView.ps1xml b/Source/formats/Team.Pool.TableView.ps1xml
index ffd503cbc..70caf0448 100644
--- a/Source/formats/Team.Pool.TableView.ps1xml
+++ b/Source/formats/Team.Pool.TableView.ps1xml
@@ -1 +1,41 @@
-Team.Pool.TableViewTeam.PoolNameCountID
+
+
+
+
+ Team.Pool.TableView
+
+ Team.Pool
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Count
+
+
+ ID
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Process.ListView.ps1xml b/Source/formats/Team.Process.ListView.ps1xml
index 2ce043a8d..724665469 100644
--- a/Source/formats/Team.Process.ListView.ps1xml
+++ b/Source/formats/Team.Process.ListView.ps1xml
@@ -1 +1,30 @@
-Team.Process.ListViewTeam.ProcessTeam.Provider.ProcessVSTeamProcessNameIDDescription
+
+
+
+
+ Team.Process.ListView
+
+ Team.Process
+ Team.Provider.Process
+ VSTeamProcess
+
+
+
+
+
+
+ Name
+
+
+ ID
+
+
+ Description
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Process.TableView.ps1xml b/Source/formats/Team.Process.TableView.ps1xml
index ee4e064fd..fe80c501a 100644
--- a/Source/formats/Team.Process.TableView.ps1xml
+++ b/Source/formats/Team.Process.TableView.ps1xml
@@ -1 +1,35 @@
-Team.Process.TableViewTeam.ProcessNameDescription
+
+
+
+
+ Team.Process.TableView
+
+ Team.Process
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Description
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Profile.TableView.ps1xml b/Source/formats/Team.Profile.TableView.ps1xml
index 121b29b29..45c2b4709 100644
--- a/Source/formats/Team.Profile.TableView.ps1xml
+++ b/Source/formats/Team.Profile.TableView.ps1xml
@@ -1 +1,45 @@
-Team.Profile.TableViewTeam.ProfileNameURLVersionType
+
+
+
+
+ Team.Profile.TableView
+
+ Team.Profile
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ URL
+
+
+ Version
+
+
+ Type
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Project.ListView.ps1xml b/Source/formats/Team.Project.ListView.ps1xml
index fbb7f0ff1..87b5b5cb9 100644
--- a/Source/formats/Team.Project.ListView.ps1xml
+++ b/Source/formats/Team.Project.ListView.ps1xml
@@ -1 +1,30 @@
-Team.Project.ListViewTeam.ProjectTeam.Provider.ProjectVSTeamProjectNameIDDescription
+
+
+
+
+ Team.Project.ListView
+
+ Team.Project
+ Team.Provider.Project
+ VSTeamProject
+
+
+
+
+
+
+ Name
+
+
+ ID
+
+
+ Description
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Project.TableView.ps1xml b/Source/formats/Team.Project.TableView.ps1xml
index cf5070a8c..608ab32a6 100644
--- a/Source/formats/Team.Project.TableView.ps1xml
+++ b/Source/formats/Team.Project.TableView.ps1xml
@@ -1 +1,35 @@
-Team.Project.TableViewTeam.ProjectNameDescription
+
+
+
+
+ Team.Project.TableView
+
+ Team.Project
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Description
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Provider.Agent.TableView.ps1xml b/Source/formats/Team.Provider.Agent.TableView.ps1xml
index 3e0a0a43e..99eae72b1 100644
--- a/Source/formats/Team.Provider.Agent.TableView.ps1xml
+++ b/Source/formats/Team.Provider.Agent.TableView.ps1xml
@@ -1 +1,53 @@
-Team.Provider.Agent.TableViewTeam.Provider.AgentDisplayModenameenabledversionos
+
+
+
+
+ Team.Provider.Agent.TableView
+
+ Team.Provider.Agent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DisplayMode
+
+
+ name
+
+
+ enabled
+
+
+ version
+
+
+ os
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Provider.BuildDefinition.TableView.ps1xml b/Source/formats/Team.Provider.BuildDefinition.TableView.ps1xml
index 99588ac72..f0c3057d3 100644
--- a/Source/formats/Team.Provider.BuildDefinition.TableView.ps1xml
+++ b/Source/formats/Team.Provider.BuildDefinition.TableView.ps1xml
@@ -1 +1,41 @@
-Team.Provider.BuildDefinition.TableViewTeam.Provider.BuildDefinitionDisplayModeNameID
+
+
+
+
+ Team.Provider.BuildDefinition.TableView
+
+ Team.Provider.BuildDefinition
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DisplayMode
+
+
+ Name
+
+
+ ID
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Provider.BuildDefinitionProcessPhase.TableView.ps1xml b/Source/formats/Team.Provider.BuildDefinitionProcessPhase.TableView.ps1xml
index fec63f639..3c2e527ad 100644
--- a/Source/formats/Team.Provider.BuildDefinitionProcessPhase.TableView.ps1xml
+++ b/Source/formats/Team.Provider.BuildDefinitionProcessPhase.TableView.ps1xml
@@ -1 +1,41 @@
-Team.Provider.BuildDefinitionProcessPhase.TableViewTeam.Provider.BuildDefinitionProcessPhaseDisplayModeNameStepCount
+
+
+
+
+ Team.Provider.BuildDefinitionProcessPhase.TableView
+
+ Team.Provider.BuildDefinitionProcessPhase
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DisplayMode
+
+
+ Name
+
+
+ StepCount
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Provider.BuildDefinitionProcessPhaseStep.TableView.ps1xml b/Source/formats/Team.Provider.BuildDefinitionProcessPhaseStep.TableView.ps1xml
index ff2eabfe3..5d0e478c3 100644
--- a/Source/formats/Team.Provider.BuildDefinitionProcessPhaseStep.TableView.ps1xml
+++ b/Source/formats/Team.Provider.BuildDefinitionProcessPhaseStep.TableView.ps1xml
@@ -1 +1,41 @@
-Team.Provider.BuildDefinitionProcessPhaseStep.TableViewTeam.Provider.BuildDefinitionProcessPhaseStepDisplayModeNameEnabled
+
+
+
+
+ Team.Provider.BuildDefinitionProcessPhaseStep.TableView
+
+ Team.Provider.BuildDefinitionProcessPhaseStep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DisplayMode
+
+
+ Name
+
+
+ Enabled
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Provider.BuildDefinitionYamlProcess.TableView.ps1xml b/Source/formats/Team.Provider.BuildDefinitionYamlProcess.TableView.ps1xml
index 9d458e68b..06b586fbe 100644
--- a/Source/formats/Team.Provider.BuildDefinitionYamlProcess.TableView.ps1xml
+++ b/Source/formats/Team.Provider.BuildDefinitionYamlProcess.TableView.ps1xml
@@ -1 +1,35 @@
-Team.Provider.BuildDefinitionYamlProcess.TableViewTeam.Provider.BuildDefinitionYamlProcessDisplayModeyamlFilename
+
+
+
+
+ Team.Provider.BuildDefinitionYamlProcess.TableView
+
+ Team.Provider.BuildDefinitionYamlProcess
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DisplayMode
+
+
+ yamlFilename
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Provider.Extension.TableView.ps1xml b/Source/formats/Team.Provider.Extension.TableView.ps1xml
index 36dd8bba1..218cace8c 100644
--- a/Source/formats/Team.Provider.Extension.TableView.ps1xml
+++ b/Source/formats/Team.Provider.Extension.TableView.ps1xml
@@ -1 +1,47 @@
-Team.Provider.Extension.TableViewTeam.Provider.ExtensionDisplayModeNameIDpublisherId
+
+
+
+
+ Team.Provider.Extension.TableView
+
+ Team.Provider.Extension
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DisplayMode
+
+
+ Name
+
+
+ ID
+
+
+ publisherId
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Provider.Feed.TableView.ps1xml b/Source/formats/Team.Provider.Feed.TableView.ps1xml
index 353fddace..f857b1ae7 100644
--- a/Source/formats/Team.Provider.Feed.TableView.ps1xml
+++ b/Source/formats/Team.Provider.Feed.TableView.ps1xml
@@ -1 +1,41 @@
-Team.Provider.Feed.TableViewTeam.Provider.FeedDisplayModeNameDescription
+
+
+
+
+ Team.Provider.Feed.TableView
+
+ Team.Provider.Feed
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DisplayMode
+
+
+ Name
+
+
+ Description
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Provider.Pool.TableView.ps1xml b/Source/formats/Team.Provider.Pool.TableView.ps1xml
index 71dcae181..64e1f3d36 100644
--- a/Source/formats/Team.Provider.Pool.TableView.ps1xml
+++ b/Source/formats/Team.Provider.Pool.TableView.ps1xml
@@ -1 +1,41 @@
-Team.Provider.Pool.TableViewTeam.Provider.PoolDisplayModeNameCount
+
+
+
+
+ Team.Provider.Pool.TableView
+
+ Team.Provider.Pool
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DisplayMode
+
+
+ Name
+
+
+ Count
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Provider.Project.TableView.ps1xml b/Source/formats/Team.Provider.Project.TableView.ps1xml
index 0b17a78e5..2fa5c5b93 100644
--- a/Source/formats/Team.Provider.Project.TableView.ps1xml
+++ b/Source/formats/Team.Provider.Project.TableView.ps1xml
@@ -1 +1,41 @@
-Team.Provider.Project.TableViewTeam.Provider.ProjectDisplayModeNameDescription
+
+
+
+
+ Team.Provider.Project.TableView
+
+ Team.Provider.Project
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DisplayMode
+
+
+ Name
+
+
+ Description
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Provider.Queue.TableView.ps1xml b/Source/formats/Team.Provider.Queue.TableView.ps1xml
index 48d24baa6..bac1b5e91 100644
--- a/Source/formats/Team.Provider.Queue.TableView.ps1xml
+++ b/Source/formats/Team.Provider.Queue.TableView.ps1xml
@@ -1 +1,35 @@
-Team.Provider.Queue.TableViewTeam.Provider.QueueDisplayModeName
+
+
+
+
+ Team.Provider.Queue.TableView
+
+ Team.Provider.Queue
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DisplayMode
+
+
+ Name
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Provider.Release.TableView.ps1xml b/Source/formats/Team.Provider.Release.TableView.ps1xml
index 4dc2b3cc8..915d252a3 100644
--- a/Source/formats/Team.Provider.Release.TableView.ps1xml
+++ b/Source/formats/Team.Provider.Release.TableView.ps1xml
@@ -1 +1,45 @@
-Team.Provider.Release.TableViewTeam.Provider.ReleaseDisplayModeNamestatusdefinitionname
+
+
+
+
+ Team.Provider.Release.TableView
+
+ Team.Provider.Release
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DisplayMode
+
+
+ Name
+
+
+ status
+
+
+ definitionname
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Provider.Repository.TableView.ps1xml b/Source/formats/Team.Provider.Repository.TableView.ps1xml
index 88bbe5ae9..61016d9f5 100644
--- a/Source/formats/Team.Provider.Repository.TableView.ps1xml
+++ b/Source/formats/Team.Provider.Repository.TableView.ps1xml
@@ -1 +1,52 @@
-Team.Provider.Repository.TableViewTeam.Provider.RepositoryVSTeamGitRepositoryDisplayModeNameremoteUrldefaultBranchprojectName
+
+
+
+
+ Team.Provider.Repository.TableView
+
+ Team.Provider.Repository
+ VSTeamGitRepository
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DisplayMode
+
+
+ Name
+
+
+ remoteUrl
+
+
+ defaultBranch
+
+
+ projectName
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Provider.Team.TableView.ps1xml b/Source/formats/Team.Provider.Team.TableView.ps1xml
index e5d4eccf7..b5a307090 100644
--- a/Source/formats/Team.Provider.Team.TableView.ps1xml
+++ b/Source/formats/Team.Provider.Team.TableView.ps1xml
@@ -1 +1,41 @@
-Team.Provider.Team.TableViewTeam.Provider.TeamDisplayModeNameDescription
+
+
+
+
+ Team.Provider.Team.TableView
+
+ Team.Provider.Team
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DisplayMode
+
+
+ Name
+
+
+ Description
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Release.TableView.ps1xml b/Source/formats/Team.Release.TableView.ps1xml
index 3db2efeb3..fb6fe2820 100644
--- a/Source/formats/Team.Release.TableView.ps1xml
+++ b/Source/formats/Team.Release.TableView.ps1xml
@@ -1 +1,39 @@
-Team.Release.TableViewVSTeamReleaseDisplayModeNamestatus
+
+
+
+
+ Team.Release.TableView
+
+ VSTeamRelease
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ DisplayMode
+
+
+ Name
+
+
+ status
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Repository.ListView.ps1xml b/Source/formats/Team.Repository.ListView.ps1xml
index 0189aaed2..eeb4811f9 100644
--- a/Source/formats/Team.Repository.ListView.ps1xml
+++ b/Source/formats/Team.Repository.ListView.ps1xml
@@ -1 +1,33 @@
-Team.Repository.ListViewTeam.RepositoryTeam.Provider.RepositoryVSTeamGitRepositoryNameremoteUrldefaultBranchprojectName
+
+
+
+
+ Team.Repository.ListView
+
+ Team.Repository
+ Team.Provider.Repository
+ VSTeamGitRepository
+
+
+
+
+
+
+ Name
+
+
+ remoteUrl
+
+
+ defaultBranch
+
+
+ projectName
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Repository.TableView.ps1xml b/Source/formats/Team.Repository.TableView.ps1xml
index 4f1857a19..987fe77d4 100644
--- a/Source/formats/Team.Repository.TableView.ps1xml
+++ b/Source/formats/Team.Repository.TableView.ps1xml
@@ -1 +1,46 @@
-Team.Repository.TableViewTeam.RepositoryVSTeamGitRepositoryNameremoteUrldefaultBranchprojectName
+
+
+
+
+ Team.Repository.TableView
+
+ Team.Repository
+ VSTeamGitRepository
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ remoteUrl
+
+
+ defaultBranch
+
+
+ projectName
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.SecurityNamespace.ListView.ps1xml b/Source/formats/Team.SecurityNamespace.ListView.ps1xml
index 5d04688c9..87237c3c8 100644
--- a/Source/formats/Team.SecurityNamespace.ListView.ps1xml
+++ b/Source/formats/Team.SecurityNamespace.ListView.ps1xml
@@ -1 +1,58 @@
-Team.SecurityNamespace.ListViewTeam.SecurityNamespaceIDNameDisplayNameElementLengthWritePermissionReadPermissionDataspaceCategoryStructureValueExtensionTypeIsRemotableUseTokenTranslatorSystemBitMaskActions
+
+
+
+
+ Team.SecurityNamespace.ListView
+
+ Team.SecurityNamespace
+
+
+
+
+
+
+ ID
+
+
+ Name
+
+
+ DisplayName
+
+
+ ElementLength
+
+
+ WritePermission
+
+
+ ReadPermission
+
+
+ DataspaceCategory
+
+
+ StructureValue
+
+
+ ExtensionType
+
+
+ IsRemotable
+
+
+ UseTokenTranslator
+
+
+ SystemBitMask
+
+
+ Actions
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.SecurityNamespace.TableView.ps1xml b/Source/formats/Team.SecurityNamespace.TableView.ps1xml
index a889ab159..6a224dfda 100644
--- a/Source/formats/Team.SecurityNamespace.TableView.ps1xml
+++ b/Source/formats/Team.SecurityNamespace.TableView.ps1xml
@@ -1 +1,39 @@
-Team.SecurityNamespace.TableViewTeam.SecurityNamespaceIDNameIsRemotable
+
+
+
+
+ Team.SecurityNamespace.TableView
+
+ Team.SecurityNamespace
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID
+
+
+ Name
+
+
+ IsRemotable
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.ServiceEndpoint.ListView.ps1xml b/Source/formats/Team.ServiceEndpoint.ListView.ps1xml
index 69edc6668..d59a33666 100644
--- a/Source/formats/Team.ServiceEndpoint.ListView.ps1xml
+++ b/Source/formats/Team.ServiceEndpoint.ListView.ps1xml
@@ -1 +1,31 @@
-Team.ServiceEndpoint.ListViewTeam.ServiceEndpointnametypecreatedByUserid
+
+
+
+
+ Team.ServiceEndpoint.ListView
+
+ Team.ServiceEndpoint
+
+
+
+
+
+
+ name
+
+
+ type
+
+
+ createdByUser
+
+
+ id
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.ServiceEndpoint.TableView.ps1xml b/Source/formats/Team.ServiceEndpoint.TableView.ps1xml
index 2ea9ed12d..cf9b18f05 100644
--- a/Source/formats/Team.ServiceEndpoint.TableView.ps1xml
+++ b/Source/formats/Team.ServiceEndpoint.TableView.ps1xml
@@ -1 +1,45 @@
-Team.ServiceEndpoint.TableViewTeam.ServiceEndpointnametypeidcreatedByUser
+
+
+
+
+ Team.ServiceEndpoint.TableView
+
+ Team.ServiceEndpoint
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ name
+
+
+ type
+
+
+ id
+
+
+ createdByUser
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.ServiceEndpointType.ListView.ps1xml b/Source/formats/Team.ServiceEndpointType.ListView.ps1xml
index 677cc96c8..0c48dd29e 100644
--- a/Source/formats/Team.ServiceEndpointType.ListView.ps1xml
+++ b/Source/formats/Team.ServiceEndpointType.ListView.ps1xml
@@ -1 +1,31 @@
-Team.ServiceEndpointType.ListViewTeam.ServiceEndpointTypenamedisplayNamedescriptionhelpMarkDown
+
+
+
+
+ Team.ServiceEndpointType.ListView
+
+ Team.ServiceEndpointType
+
+
+
+
+
+
+ name
+
+
+ displayName
+
+
+ description
+
+
+ helpMarkDown
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.ServiceEndpointType.TableView.ps1xml b/Source/formats/Team.ServiceEndpointType.TableView.ps1xml
index 2687fd6f3..34ac363fa 100644
--- a/Source/formats/Team.ServiceEndpointType.TableView.ps1xml
+++ b/Source/formats/Team.ServiceEndpointType.TableView.ps1xml
@@ -1 +1,33 @@
-Team.ServiceEndpointType.TableViewTeam.ServiceEndpointTypedisplayNamedescription
+
+
+
+
+ Team.ServiceEndpointType.TableView
+
+ Team.ServiceEndpointType
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ displayName
+
+
+ description
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Team.ListView.ps1xml b/Source/formats/Team.Team.ListView.ps1xml
index 6421f744a..a04f333b0 100644
--- a/Source/formats/Team.Team.ListView.ps1xml
+++ b/Source/formats/Team.Team.ListView.ps1xml
@@ -1 +1,32 @@
-Team.Team.ListViewTeam.TeamTeam.Provider.TeamNameDescriptionIDProjectName
+
+
+
+
+ Team.Team.ListView
+
+ Team.Team
+ Team.Provider.Team
+
+
+
+
+
+
+ Name
+
+
+ Description
+
+
+ ID
+
+
+ ProjectName
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.Team.TableView.ps1xml b/Source/formats/Team.Team.TableView.ps1xml
index 7ca6de4db..759183e2d 100644
--- a/Source/formats/Team.Team.TableView.ps1xml
+++ b/Source/formats/Team.Team.TableView.ps1xml
@@ -1 +1,35 @@
-Team.Team.TableViewTeam.TeamNameDescription
+
+
+
+
+ Team.Team.TableView
+
+ Team.Team
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Description
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.User2.ListView.ps1xml b/Source/formats/Team.User2.ListView.ps1xml
index e4380d056..a9901cfd8 100644
--- a/Source/formats/Team.User2.ListView.ps1xml
+++ b/Source/formats/Team.User2.ListView.ps1xml
@@ -1 +1,46 @@
-Team.User2.ListViewTeam.User2IDPrincipalNameMailAddressDisplayNameOriginOriginIDURLDescriptorLinks
+
+
+
+
+ Team.User2.ListView
+
+ Team.User2
+
+
+
+
+
+
+ ID
+
+
+ PrincipalName
+
+
+ MailAddress
+
+
+ DisplayName
+
+
+ Origin
+
+
+ OriginID
+
+
+ URL
+
+
+ Descriptor
+
+
+ Links
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.User2.TableView.ps1xml b/Source/formats/Team.User2.TableView.ps1xml
index 7dfd0f53a..cca34ed09 100644
--- a/Source/formats/Team.User2.TableView.ps1xml
+++ b/Source/formats/Team.User2.TableView.ps1xml
@@ -1 +1,39 @@
-Team.User2.TableViewTeam.User2PrincipalNameDisplayNameOrigin
+
+
+
+
+ Team.User2.TableView
+
+ Team.User2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PrincipalName
+
+
+ DisplayName
+
+
+ Origin
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.UserEntitlement.ListView.ps1xml b/Source/formats/Team.UserEntitlement.ListView.ps1xml
index ed385f554..957966113 100644
--- a/Source/formats/Team.UserEntitlement.ListView.ps1xml
+++ b/Source/formats/Team.UserEntitlement.ListView.ps1xml
@@ -1 +1,34 @@
-Team.UserEntitlement.ListViewTeam.UserEntitlementiduserNameemailaccessLevelNameprojects
+
+
+
+
+ Team.UserEntitlement.ListView
+
+ Team.UserEntitlement
+
+
+
+
+
+
+ id
+
+
+ userName
+
+
+ email
+
+
+ accessLevelName
+
+
+ projects
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.UserEntitlement.TableView.ps1xml b/Source/formats/Team.UserEntitlement.TableView.ps1xml
index b71b35836..1b49f0d86 100644
--- a/Source/formats/Team.UserEntitlement.TableView.ps1xml
+++ b/Source/formats/Team.UserEntitlement.TableView.ps1xml
@@ -1 +1,45 @@
-Team.UserEntitlement.TableViewTeam.UserEntitlementuserNameemailaccessLevelNamelastAccessedDate
+
+
+
+
+ Team.UserEntitlement.TableView
+
+ Team.UserEntitlement
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ userName
+
+
+ email
+
+
+ accessLevelName
+
+
+ lastAccessedDate
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.UserEntitlement.WideView.ps1xml b/Source/formats/Team.UserEntitlement.WideView.ps1xml
index 5ec5fc04d..d205f140d 100644
--- a/Source/formats/Team.UserEntitlement.WideView.ps1xml
+++ b/Source/formats/Team.UserEntitlement.WideView.ps1xml
@@ -1 +1,20 @@
-Team.UserEntitlement.WideViewTeam.UserEntitlementuserName
+
+
+
+
+ Team.UserEntitlement.WideView
+
+ Team.UserEntitlement
+
+
+
+
+
+ userName
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.VariableGroup.ListView.ps1xml b/Source/formats/Team.VariableGroup.ListView.ps1xml
index 748bf26e7..a874e484a 100644
--- a/Source/formats/Team.VariableGroup.ListView.ps1xml
+++ b/Source/formats/Team.VariableGroup.ListView.ps1xml
@@ -1 +1,31 @@
-Team.VariableGroup.ListViewTeam.VariableGroupidnamecreatedByUsermodifiedByUser
+
+
+
+
+ Team.VariableGroup.ListView
+
+ Team.VariableGroup
+
+
+
+
+
+
+ id
+
+
+ name
+
+
+ createdByUser
+
+
+ modifiedByUser
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.VariableGroup.TableView.ps1xml b/Source/formats/Team.VariableGroup.TableView.ps1xml
index 4b1576d5c..8d9989223 100644
--- a/Source/formats/Team.VariableGroup.TableView.ps1xml
+++ b/Source/formats/Team.VariableGroup.TableView.ps1xml
@@ -1 +1,45 @@
-Team.VariableGroup.TableViewTeam.VariableGroupidnamecreatedByUsermodifiedByUser
+
+
+
+
+ Team.VariableGroup.TableView
+
+ Team.VariableGroup
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id
+
+
+ name
+
+
+ createdByUser
+
+
+ modifiedByUser
+
+
+
+
+
+
+
+
diff --git a/Source/formats/Team.YamlPipelineResult.TableView.ps1xml b/Source/formats/Team.YamlPipelineResult.TableView.ps1xml
new file mode 100644
index 000000000..708694730
--- /dev/null
+++ b/Source/formats/Team.YamlPipelineResult.TableView.ps1xml
@@ -0,0 +1,45 @@
+
+
+
+
+ Team.YamlPipelineResult.TableView
+
+ Team.YamlPipelineResult
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ name
+
+
+ id
+
+
+ url
+
+
+ state
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/types/Team.YamlPipelineResult.ps1xml b/Source/types/Team.YamlPipelineResult.ps1xml
new file mode 100644
index 000000000..593d4aaca
--- /dev/null
+++ b/Source/types/Team.YamlPipelineResult.ps1xml
@@ -0,0 +1,51 @@
+
+
+
+ Team.YamlPipelineResult
+
+
+ links
+ $this._links
+
+
+ pipeline
+ $this.pipeline
+
+
+ state
+ $this.state
+
+
+ url
+ $this.url
+
+
+ finalYaml
+ $this.finalYaml
+
+
+ id
+ $this.id
+
+
+ name
+ $this.name
+
+
+ PSStandardMembers
+
+
+ DefaultDisplayPropertySet
+
+ name
+ id
+ url
+ state
+ finalYaml
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 0bd75f14b..62fa19377 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -74,7 +74,8 @@ stages:
- task: SdtReport@1
displayName: 'Create Security Analysis Report'
inputs:
- AllTools: true
+ AllTools: false
+ CredScan: true
- task: PublishSecurityAnalysisLogs@2
displayName: 'Publish Security Analysis Logs'
@@ -82,7 +83,8 @@ stages:
- task: PostAnalysis@1
displayName: 'Post Analysis'
inputs:
- AllTools: true
+ AllTools: false
+ CredScan: true
- task: CopyFiles@2
displayName: 'Copy Module to Artifacts Folder'
@@ -136,7 +138,7 @@ stages:
displayName: 'Install NuGet 5.2.0'
inputs:
versionSpec: 5.2.0
-
+
- task: PowerShell@2
displayName: 'Install Module Dependencies'
inputs:
@@ -190,7 +192,7 @@ stages:
displayName: Testing stage
dependsOn: Package
jobs:
-
+
- template: build/integrationTests.yml
parameters:
displayName: 'Linux TFS 2017'
@@ -277,6 +279,11 @@ stages:
script: |
Install-Module -Name Trackyon.Nuget -Scope CurrentUser -Force -Verbose
ConvertTo-NuSpec -Path ./$(Folder)/VSTeam.psd1
+
+ # Load the psd1 file so you can read the version
+ $manifest = Import-PowerShellDataFile ./$(Folder)/VSTeam.psd1
+
+ Write-Host "##vso[task.setvariable variable=PACKAGE_VERSION;isOutput=false]$($manifest.ModuleVersion)"
workingDirectory: '$(Pipeline.Workspace)/Module'
- task: NuGetCommand@2
@@ -293,14 +300,14 @@ stages:
packagesToPush: '$(Pipeline.Workspace)/Module/$(Folder)/*.nupkg'
nuGetFeedType: external
publishFeedCredentials: 'PowerShell Gallery'
-
- - task: GithubRelease@0
- displayName: 'Create GitHub Release'
+
+ - task: GithubRelease@0
+ displayName: 'Create GitHub Release'
inputs:
gitHubConnection: Darquewarrior
repositoryName: DarqueWarrior/vsteam
tagSource: manual
- tag: v$(PACKAGE_VERSION)
+ tag: v$(PACKAGE_VERSION)
addChangeLog: true
compareWith: 'lastFullRelease'
assets: |
diff --git a/docs/Add-VSTeamPullRequest.md b/docs/Add-VSTeamPullRequest.md
new file mode 100644
index 000000000..01d19f975
--- /dev/null
+++ b/docs/Add-VSTeamPullRequest.md
@@ -0,0 +1,151 @@
+
+
+
+# Add-VSTeamPullRequest
+
+## SYNOPSIS
+
+Create a new Pull Request
+
+## SYNTAX
+
+## DESCRIPTION
+
+Create a new Pull Request
+
+## EXAMPLES
+
+### -------------------------- EXAMPLE 1 --------------------------
+
+```PowerShell
+PS C:\> Set-VSTeamAccount -Account mydemos -Token $(System.AccessToken) -UseBearerToken
+PS C:\> $r = Get-VSTeamGitRepository -ProjectName project -Name demorepo
+PS C:\> Add-VSTeamPullRequest -ProjectName project -RepositoryId $r.RepositoryId -SourceRefName "refs/heads/mybranch" -TargetRefName "refs/heads/master" -Title "My PR" -Description "My Description" -Draft
+```
+
+Create a new pull request as a draft
+
+## PARAMETERS
+
+### -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)
+```
+
+### -RepositoryId
+
+Specifies the ID of the repository
+
+```yaml
+Type: Guid
+Required: True
+Aliases: Id
+Accept pipeline input: true (ByPropertyName)
+```
+
+### -SourceRefName
+
+A source reference, like a branch or commit
+Needs to be in ref format like refs/heads/MyBranch
+
+```yaml
+Type: String
+Required: True
+```
+
+### -TargetRefName
+
+A target reference, like a branch or commit
+Needs to be in ref format like refs/heads/MyBranch
+
+```yaml
+Type: String
+Required: True
+```
+
+### -Title
+
+The title of the pull request
+
+```yaml
+Type: String
+Required: True
+```
+
+### -Description
+
+The description of the pull request
+
+```yaml
+Type: String
+Required: True
+```
+
+### -Draft
+
+Mark the new pull request as a draft
+
+```yaml
+Type: Switch
+```
+
+### -Confirm
+
+Prompts you for confirmation before running the function.
+
+```yaml
+Type: SwitchParameter
+Required: false
+Position: Named
+Accept pipeline input: false
+Parameter Sets: (All)
+Aliases: cf
+```
+
+### -Force
+
+Forces the function without confirmation
+
+```yaml
+Type: SwitchParameter
+Required: false
+Position: Named
+Accept pipeline input: false
+Parameter Sets: (All)
+```
+
+### -WhatIf
+
+Shows what would happen if the function runs.
+The function is not run.
+
+```yaml
+Type: SwitchParameter
+Required: false
+Position: Named
+Accept pipeline input: false
+Parameter Sets: (All)
+Aliases: wi
+```
+
+## INPUTS
+
+## OUTPUTS
+
+### Team.PullRequest
+
+## NOTES
+
+## RELATED LINKS
+
diff --git a/docs/Add-VSTeamUserEntitlement.md b/docs/Add-VSTeamUserEntitlement.md
index 542f88add..9288d501e 100644
--- a/docs/Add-VSTeamUserEntitlement.md
+++ b/docs/Add-VSTeamUserEntitlement.md
@@ -66,6 +66,40 @@ Required: True
Default value: ProjectContributor
```
+### -LicensingSource
+
+Licensing Source (e.g. Account. MSDN etc.). The acceptable values for this parameter are:
+
+- account
+- auto
+- msdn
+- none
+- profile
+- trial
+
+```yaml
+Type: String
+Default value: account
+```
+
+### -MSDNLicenseType
+
+Type of MSDN License (e.g. Visual Studio Professional, Visual Studio Enterprise etc.). The acceptable values for this parameter are:
+
+- eligible
+- enterprise
+- none
+- platforms
+- premium
+- professional
+- testProfessional
+- ultimate
+
+```yaml
+Type: String
+Default value: none
+```
+
## INPUTS
## OUTPUTS
diff --git a/docs/Get-VSTeamGitCommit.md b/docs/Get-VSTeamGitCommit.md
new file mode 100644
index 000000000..592227059
--- /dev/null
+++ b/docs/Get-VSTeamGitCommit.md
@@ -0,0 +1,253 @@
+
+
+
+# Get-VSTeamGitCommit
+
+## SYNOPSIS
+
+Retrieve git commits for a project
+
+## SYNTAX
+
+## DESCRIPTION
+
+The Get-VSTeamGitCommit function gets the commits for a git repository.
+
+## EXAMPLES
+
+### -------------------------- EXAMPLE 1 --------------------------
+
+```PowerShell
+PS C:\> Get-VSTeamGitCommit -ProjectName demo -RepositoryId 118C262F-0D4C-4B76-BD9B-7DD8CA12F196
+```
+
+This command gets a list of all commits in the demo project for a specific repository.
+
+## PARAMETERS
+
+### -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)
+```
+
+### -RepositoryId
+
+The id or friendly name of the repository. To use the friendly name, projectId must also be specified.
+
+```yaml
+Type: Guid
+Required: True
+Accept pipeline input: true (ByPropertyName)
+Parameter Sets: All, ItemVersion, CompareVersion, ItemPath, ByIds
+```
+
+### -FromDate
+
+If provided, only include history entries created after this date (string)
+
+```yaml
+Type: DateTime
+Parameter Sets: All, ItemVersion, CompareVersion, ItemPath
+```
+
+### -ToDate
+
+If provided, only include history entries created before this date (string)
+
+```yaml
+Type: DateTime
+Parameter Sets: All, ItemVersion, CompareVersion, ItemPath
+```
+
+### -ItemVersionVersionType
+
+Version type (branch, tag, or commit). Determines how Id is interpreted. The acceptable values for this parameter are:
+
+- branch
+- commit
+- tag
+
+```yaml
+Type: String
+Parameter Sets: All, ItemVersion, CompareVersion, ItemPath
+```
+
+### -ItemVersionVersion
+
+Version string identifier (name of tag/branch, SHA1 of commit)
+
+```yaml
+Type: String
+Parameter Sets: All, ItemVersion, CompareVersion, ItemPath
+```
+
+### -ItemVersionVersionOptions
+
+Version options - Specify additional modifiers to version (e.g Previous). The acceptable values for this parameter are:
+
+- firstParent
+- none
+- previousChange
+
+```yaml
+Type: String
+Parameter Sets: All, ItemVersion, CompareVersion, ItemPath
+```
+
+### -CompareVersionVersionType
+
+Version type (branch, tag, or commit). Determines how Id is interpreted. The acceptable values for this parameter are:
+
+- branch
+- commit
+- tag
+
+```yaml
+Type: String
+Parameter Sets: All, ItemVersion, CompareVersion, ItemPath
+```
+
+### -CompareVersionVersion
+
+Version string identifier (name of tag/branch, SHA1 of commit). The acceptable values for this parameter are:
+
+- firstParent
+- none
+- previousChange
+
+```yaml
+Type: String
+Parameter Sets: All, ItemVersion, CompareVersion, ItemPath
+```
+
+### -CompareVersionVersionOptions
+
+Version options - Specify additional modifiers to version (e.g Previous)
+
+```yaml
+Type: String
+Parameter Sets: All, ItemVersion, CompareVersion, ItemPath
+```
+
+### -FromCommitId
+
+If provided, a lower bound for filtering commits alphabetically
+
+```yaml
+Type: String
+Parameter Sets: All, ItemVersion, CompareVersion, ItemPath
+```
+
+### -ToCommitId
+
+If provided, an upper bound for filtering commits alphabetically
+
+```yaml
+Type: String
+Parameter Sets: All, ItemVersion, CompareVersion, ItemPath
+```
+
+### -Author
+
+Alias or display name of the author
+
+```yaml
+Type: String
+Parameter Sets: All, ItemVersion, CompareVersion, ItemPath
+```
+
+### -Ids
+
+If provided, specifies the exact commit ids of the commits to fetch. May not be combined with other parameters.
+
+```yaml
+Type: String
+Parameter Sets: ByIds
+```
+
+### -ItemPath
+
+Path of item to search under
+
+```yaml
+Type: String
+Parameter Sets: All, ItemPath
+```
+
+### -ExcludeDeletes
+
+Only applies when an itemPath is specified. This determines whether to exclude delete entries of the specified path.
+
+```yaml
+Type: Switch
+Parameter Sets: All, ItemPath
+```
+
+### -Top
+
+Maximum number of entries to retrieve
+
+```yaml
+Type: Int32
+Parameter Sets: All, ItemVersion, CompareVersion, ItemPath
+```
+
+### -Skip
+
+Number of entries to skip
+
+```yaml
+Type: Int32
+Parameter Sets: All, ItemVersion, CompareVersion, ItemPath
+```
+
+### -HistoryMode
+
+What Git history mode should be used. This only applies to the search criteria when Ids = null and an itemPath is specified. The acceptable values for this parameter are:
+
+- firstParent
+- fullHistory
+- fullHistorySimplifyMerges
+- simplifiedHistory
+
+```yaml
+Type: String
+Parameter Sets: ItemPath
+```
+
+### -User
+
+Alias or display name of the committer
+
+```yaml
+Type: String
+Parameter Sets: All, ItemVersion, CompareVersion, ItemPath
+```
+
+## INPUTS
+
+## OUTPUTS
+
+## NOTES
+
+This function has a Dynamic Parameter for ProjectName that specifies the project for which this function gets commits.
+
+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.
+
+You can pipe a repository ID to this function.
+
+## RELATED LINKS
+
diff --git a/docs/Get-VSTeamGitRef.md b/docs/Get-VSTeamGitRef.md
index 0cd004977..028f9ab9d 100644
--- a/docs/Get-VSTeamGitRef.md
+++ b/docs/Get-VSTeamGitRef.md
@@ -51,6 +51,38 @@ Aliases: ID
Accept pipeline input: true (ByPropertyName)
```
+### -Filter
+
+A filter to apply to the refs (starts with).
+
+```yaml
+Type: string
+```
+
+### -FilterContains
+
+A filter to apply to the refs (contains). (Azure DevOps Service and Azure DevOps Server 2019+ only)
+
+```yaml
+Type: string
+```
+
+### -Top
+
+Maximum number of refs to return. It cannot be bigger than 1000. If it is not provided but continuationToken is, top will default to 100. (Azure DevOps Service and Azure DevOps Server 2019+ only)
+
+```yaml
+Type: int
+```
+
+### -ContinuationToken
+
+The continuation token used for pagination. (Azure DevOps Service and Azure DevOps Server 2019+ only)
+
+```yaml
+Type: string
+```
+
## INPUTS
## OUTPUTS
diff --git a/docs/Get-VSTeamGitStat.md b/docs/Get-VSTeamGitStat.md
new file mode 100644
index 000000000..af10cfca1
--- /dev/null
+++ b/docs/Get-VSTeamGitStat.md
@@ -0,0 +1,122 @@
+
+
+
+# Get-VSTeamGitStat
+
+## SYNOPSIS
+
+Retrieves statistics about branches within a repository.
+
+## SYNTAX
+
+## DESCRIPTION
+
+Retrieves statistics about branches within a repository.
+
+## EXAMPLES
+
+### -------------------------- EXAMPLE 1 --------------------------
+
+```PowerShell
+PS C:\> Get-VSTeamGitStat -ProjectName Demo -RepositoryId 011E421A-2A54-4491-B370-9256AD8A1BDD
+```
+
+This command returns all the Git stats for the entire repository
+
+### -------------------------- EXAMPLE 2 --------------------------
+
+```PowerShell
+PS C:\> Get-VSTeamGitStat -ProjectName Demo -RepositoryId 011E421A-2A54-4491-B370-9256AD8A1BDD -BranchName develop
+```
+
+This command returns all the Git stats for a specific branch
+
+### -------------------------- EXAMPLE 3 --------------------------
+
+```PowerShell
+PS C:\> Get-VSTeamGitStat -ProjectName Demo -RepositoryId 011E421A-2A54-4491-B370-9256AD8A1BDD -BranchName develop -VersionType branch -Version 67cae2b029dff7eb3dc062b49403aaedca5bad8d
+```
+
+This command returns all the Git stats for a specific commit
+
+## PARAMETERS
+
+### -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)
+```
+
+### -RepositoryId
+
+Specifies the ID of the repository.
+
+```yaml
+Type: Guid
+Aliases: ID
+Required: true
+Accept pipeline input: true (ByPropertyName)
+```
+
+### -BranchName
+
+Name of the branch.
+
+```yaml
+Type: String
+Required: true
+```
+
+### -VersionOptions
+
+Version options - Specify additional modifiers to version (e.g Previous). Valid options for this parameter are:
+
+- firstParent
+- none
+- previousChange
+
+```yaml
+Type: String
+Parameter Sets: ByVersion
+```
+
+### -Version
+
+Version string identifier (name of tag/branch, SHA1 of commit)
+
+```yaml
+Type: String
+Parameter Sets: ByVersion
+```
+
+### -VersionType
+
+Version type (branch, tag, or commit). Determines how Id is interpreted. Valid options for this parameter are:
+
+- branch
+- commit
+- tag
+
+```yaml
+Type: String
+Parameter Sets: ByVersion
+```
+
+## INPUTS
+
+## OUTPUTS
+
+## NOTES
+
+## RELATED LINKS
+
diff --git a/docs/Get-VSTeamPullRequest.md b/docs/Get-VSTeamPullRequest.md
index 9918329ce..faabf6f92 100644
--- a/docs/Get-VSTeamPullRequest.md
+++ b/docs/Get-VSTeamPullRequest.md
@@ -33,6 +33,22 @@ This command returns all the open pull requests for the Demo team project.
### -------------------------- EXAMPLE 3 --------------------------
+```PowerShell
+PS C:\> Get-VSTeamPullRequest -ProjectName Demo -All
+```
+
+This command returns all pull requests for the Demo team project.
+
+### -------------------------- EXAMPLE 4 --------------------------
+
+```PowerShell
+PS C:\> Get-VSTeamPullRequest -ProjectName Demo -TargetBranchRef "refs/heads/mybranch"
+```
+
+This command returns all open pull requests for a specific branch
+
+### -------------------------- EXAMPLE 5 --------------------------
+
```PowerShell
PS C:\> Get-VSTeamPullRequest -Id 123
```
@@ -65,6 +81,83 @@ Specifies the pull request by ID.
Type: String
Aliases: PullRequestId
Accept pipeline input: true (ByPropertyName)
+Parameter Sets: ById
+```
+
+### -RepositoryId
+
+The repository ID of the pull request's target branch.
+
+```yaml
+Type: Guid
+Parameter Sets: SearchCriteriaWithStatus, SearchCriteriaWithAll
+```
+
+### -SourceRepositoryId
+
+If set, search for pull requests whose source branch is in this repository.
+
+```yaml
+Type: Guid
+Parameter Sets: SearchCriteriaWithStatus, SearchCriteriaWithAll
+```
+
+### -SourceBranchRef
+
+If set, search for pull requests from this branch.
+
+```yaml
+Type: String
+Parameter Sets: SearchCriteriaWithStatus, SearchCriteriaWithAll
+```
+
+### -TargetBranchRef
+
+If set, search for pull requests into this branch.
+
+```yaml
+Type: String
+Parameter Sets: SearchCriteriaWithStatus, SearchCriteriaWithAll
+```
+
+### -Status
+
+If set, search for pull requests that are in this state. Defaults to Active if unset. Valid values for this parameter are:
+
+- abandoned
+- active
+- all
+- completed
+- notSet
+
+```yaml
+Type: String
+Parameter Sets: SearchCriteriaWithStatus
+```
+
+### -All
+
+```yaml
+Type: Switch
+Parameter Sets: SearchCriteriaWithAll
+```
+
+### -Top
+
+The number of pull requests to retrieve.
+
+```yaml
+Type: Int32
+Parameter Sets: SearchCriteriaWithStatus, SearchCriteriaWithAll
+```
+
+### -Skip
+
+The number of pull requests to ignore. For example, to retrieve results 101-150, set top to 50 and skip to 100.
+
+```yaml
+Type: Int32
+Parameter Sets: SearchCriteriaWithStatus, SearchCriteriaWithAll
```
## INPUTS
@@ -76,4 +169,6 @@ Accept pipeline input: true (ByPropertyName)
## RELATED LINKS
[Show-VSTeamPullRequest](Show-VSTeamPullRequest.md)
+[Add-VSTeamPullRequest](Add-VSTeamPullRequest.md)
+[Update-VSTeamPullRequest](Update-VSTeamPullRequest.md)
diff --git a/docs/Invoke-VSTeamRequest.md b/docs/Invoke-VSTeamRequest.md
index 6c04ef2ca..028ce5039 100644
--- a/docs/Invoke-VSTeamRequest.md
+++ b/docs/Invoke-VSTeamRequest.md
@@ -159,6 +159,14 @@ Converts the PowerShell object into JSON and displays in the console.
Type: Switch
```
+### -AdditionalHeaders
+
+Adds additional headers to the request
+
+```yaml
+Type: Hashtable
+```
+
## INPUTS
### System.String
diff --git a/docs/Remove-VSTeamAccessControlEntry.md b/docs/Remove-VSTeamAccessControlEntry.md
index 747c44b44..f01b2b264 100644
--- a/docs/Remove-VSTeamAccessControlEntry.md
+++ b/docs/Remove-VSTeamAccessControlEntry.md
@@ -1,11 +1,12 @@
-
+
+
# Remove-VSTeamAccessControlEntry
## SYNOPSIS
-Removes specified ACEs in the ACL for the provided token. The request URI contains the namespace ID, the target token, and a single or list of descriptors that should be removed. Only supports removing AzD based users/groups.
+Removes specified ACEs in the ACL for the provided token. The request URI contains the namespace ID, the target token, and a single or list of descriptors that should be removed. Only supports removing AzD based users/groups.
## SYNTAX
@@ -13,54 +14,54 @@ Removes specified ACEs in the ACL for the provided token. The request URI contai
Removes specified ACEs in the ACL for the provided token. The request URI contains the namespace ID, the target token, and a single or list of descriptors that should be removed. Only supports removing AzD based users/groups.
-## EXAMPLES
-### -------------------------- EXAMPLE 1 --------------------------
-
-```PowerShell
-PS C:\> Remove-VSTeamAccessControlEntry -securityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -token "repov2/$projectid/$repoid" -descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0xMzk4ODc2NjMwLTEwMTQ0ODQ4MTMtMzE5MDA4NTI4Ny0xNDU4NTkwODY1LTEtMzE1MjE3NTkwMy03NjE1NjY3OTMtMjgwMTUwMjI2Ny0zMjU5Mjg5MTIy")
-```
-
-This will remove the specified descriptor from the specified repository, using the security namespace id, while confirming for the remove action.
-
-### -------------------------- EXAMPLE 2 --------------------------
-
-```PowerShell
-PS C:\> Remove-VSTeamAccessControlEntry -securityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -token "repov2/$projectid/$repoid" -descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0xMzk4ODc2NjMwLTEwMTQ0ODQ4MTMtMzE5MDA4NTI4Ny0xNDU4NTkwODY1LTEtMzE1MjE3NTkwMy03NjE1NjY3OTMtMjgwMTUwMjI2Ny0zMjU5Mjg5MTIy") -confirm:$false
-```
-
-This will remove the specified descriptor from the specified repository, using the security namespace id, with no confirmation for the remove action.
-
-### -------------------------- EXAMPLE 3 --------------------------
-
-```PowerShell
-PS C:\> Remove-VSTeamAccessControlEntry -securityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -token "repov2/$projectid/$repoid" -descriptor @("descriptor1","descriptor2")
-```
-
-This will remove multiple descriptors from the specified repository, using the security namespace id, while confirming for the remove action.
-
-### -------------------------- EXAMPLE 4 --------------------------
-
-```PowerShell
-PS C:\> Remove-VSTeamAccessControlEntry -securityNamespace [VSTeamSecurityNamespace]$securityNamespace -token "repov2/$projectid/$repoid" -descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0xMzk4ODc2NjMwLTEwMTQ0ODQ4MTMtMzE5MDA4NTI4Ny0xNDU4NTkwODY1LTEtMzE1MjE3NTkwMy03NjE1NjY3OTMtMjgwMTUwMjI2Ny0zMjU5Mjg5MTIy")
-```
-
-This will remove the specified descriptor from the specified repository, using a security namespace object, while confirming for the remove action.
-
-### -------------------------- EXAMPLE 5 --------------------------
-
-```PowerShell
-PS C:\> Remove-VSTeamAccessControlEntry -securityNamespace [VSTeamSecurityNamespace]$securityNamespace -token "repov2/$projectid/$repoid" -descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0xMzk4ODc2NjMwLTEwMTQ0ODQ4MTMtMzE5MDA4NTI4Ny0xNDU4NTkwODY1LTEtMzE1MjE3NTkwMy03NjE1NjY3OTMtMjgwMTUwMjI2Ny0zMjU5Mjg5MTIy") -confirm:$false
-```
-
-This will remove the specified descriptor from the specified repository, using a security namespace object, with no confirmation for the remove action.
-
-### -------------------------- EXAMPLE 6 --------------------------
-
-```PowerShell
-PS C:\> Remove-VSTeamAccessControlEntry -securityNamespace [VSTeamSecurityNamespace]$securityNamespace -token "repov2/$projectid/$repoid" -descriptor @("descriptor1","descriptor2")
-```
-
-This will remove multiple descriptors from the specified repository, using a security namespace object, while confirming for the remove action.
+## EXAMPLES
+### -------------------------- EXAMPLE 1 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamAccessControlEntry -securityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -token "repov2/$projectid/$repoid" -descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0xMzk4ODc2NjMwLTEwMTQ0ODQ4MTMtMzE5MDA4NTI4Ny0xNDU4NTkwODY1LTEtMzE1MjE3NTkwMy03NjE1NjY3OTMtMjgwMTUwMjI2Ny0zMjU5Mjg5MTIy")
+```
+
+This will remove the specified descriptor from the specified repository, using the security namespace id, while confirming for the remove action.
+
+### -------------------------- EXAMPLE 2 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamAccessControlEntry -securityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -token "repov2/$projectid/$repoid" -descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0xMzk4ODc2NjMwLTEwMTQ0ODQ4MTMtMzE5MDA4NTI4Ny0xNDU4NTkwODY1LTEtMzE1MjE3NTkwMy03NjE1NjY3OTMtMjgwMTUwMjI2Ny0zMjU5Mjg5MTIy") -confirm:$false
+```
+
+This will remove the specified descriptor from the specified repository, using the security namespace id, with no confirmation for the remove action.
+
+### -------------------------- EXAMPLE 3 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamAccessControlEntry -securityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -token "repov2/$projectid/$repoid" -descriptor @("descriptor1","descriptor2")
+```
+
+This will remove multiple descriptors from the specified repository, using the security namespace id, while confirming for the remove action.
+
+### -------------------------- EXAMPLE 4 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamAccessControlEntry -securityNamespace [VSTeamSecurityNamespace]$securityNamespace -token "repov2/$projectid/$repoid" -descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0xMzk4ODc2NjMwLTEwMTQ0ODQ4MTMtMzE5MDA4NTI4Ny0xNDU4NTkwODY1LTEtMzE1MjE3NTkwMy03NjE1NjY3OTMtMjgwMTUwMjI2Ny0zMjU5Mjg5MTIy")
+```
+
+This will remove the specified descriptor from the specified repository, using a security namespace object, while confirming for the remove action.
+
+### -------------------------- EXAMPLE 5 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamAccessControlEntry -securityNamespace [VSTeamSecurityNamespace]$securityNamespace -token "repov2/$projectid/$repoid" -descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0xMzk4ODc2NjMwLTEwMTQ0ODQ4MTMtMzE5MDA4NTI4Ny0xNDU4NTkwODY1LTEtMzE1MjE3NTkwMy03NjE1NjY3OTMtMjgwMTUwMjI2Ny0zMjU5Mjg5MTIy") -confirm:$false
+```
+
+This will remove the specified descriptor from the specified repository, using a security namespace object, with no confirmation for the remove action.
+
+### -------------------------- EXAMPLE 6 --------------------------
+
+```PowerShell
+PS C:\> Remove-VSTeamAccessControlEntry -securityNamespace [VSTeamSecurityNamespace]$securityNamespace -token "repov2/$projectid/$repoid" -descriptor @("descriptor1","descriptor2")
+```
+
+This will remove multiple descriptors from the specified repository, using a security namespace object, while confirming for the remove action.
## PARAMETERS
@@ -76,91 +77,91 @@ Required: True
### -SecurityNamespaceId
Security namespace identifier.
-
-Valid IDs are:
-
-AzD:
-- Analytics (58450c49-b02d-465a-ab12-59ae512d6531)
-- AnalyticsViews (d34d3680-dfe5-4cc6-a949-7d9c68f73cba)
-- ReleaseManagement (7c7d32f7-0e86-4cd6-892e-b35dbba870bd)
-- ReleaseManagement2 (c788c23e-1b46-4162-8f5e-d7585343b5de)
-- Identity (5a27515b-ccd7-42c9-84f1-54c998f03866)
-- WorkItemTrackingAdministration (445d2788-c5fb-4132-bbef-09c4045ad93f)
-- DistributedTask (101eae8c-1709-47f9-b228-0e476c35b3ba)
-- WorkItemQueryFolders (71356614-aad7-4757-8f2c-0fb3bff6f680)
-- GitRepositories (2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87)
-- VersionControlItems2 (3c15a8b7-af1a-45c2-aa97-2cb97078332e)
-- EventSubscriber (2bf24a2b-70ba-43d3-ad97-3d9e1f75622f)
-- WorkItemTrackingProvision (5a6cd233-6615-414d-9393-48dbb252bd23)
-- ServiceEndpoints (49b48001-ca20-4adc-8111-5b60c903a50c)
-- ServiceHooks (cb594ebe-87dd-4fc9-ac2c-6a10a4c92046)
-- Chat (bc295513-b1a2-4663-8d1a-7017fd760d18)
-- Collection (3e65f728-f8bc-4ecd-8764-7e378b19bfa7)
-- Proxy (cb4d56d2-e84b-457e-8845-81320a133fbb)
-- Plan (bed337f8-e5f3-4fb9-80da-81e17d06e7a8)
-- Process (2dab47f9-bd70-49ed-9bd5-8eb051e59c02)
-- AccountAdminSecurity (11238e09-49f2-40c7-94d0-8f0307204ce4)
-- Library (b7e84409-6553-448a-bbb2-af228e07cbeb)
-- Environment (83d4c2e6-e57d-4d6e-892b-b87222b7ad20)
-- Project (52d39943-cb85-4d7f-8fa8-c6baac873819)
-- EventSubscription (58b176e7-3411-457a-89d0-c6d0ccb3c52b)
-- CSS (83e28ad4-2d72-4ceb-97b0-c7726d5502c3)
-- TeamLabSecurity (9e4894c3-ff9a-4eac-8a85-ce11cafdc6f1)
-- ProjectAnalysisLanguageMetrics (fc5b7b85-5d6b-41eb-8534-e128cb10eb67)
-- Tagging (bb50f182-8e5e-40b8-bc21-e8752a1e7ae2)
-- MetaTask (f6a4de49-dbe2-4704-86dc-f8ec1a294436)
-- Iteration (bf7bfa03-b2b7-47db-8113-fa2e002cc5b1)
-- Favorites (fa557b48-b5bf-458a-bb2b-1b680426fe8b)
-- Registry (4ae0db5d-8437-4ee8-a18b-1f6fb38bd34c)
-- Graph (c2ee56c9-e8fa-4cdd-9d48-2c44f697a58e)
-- ViewActivityPaneSecurity (dc02bf3d-cd48-46c3-8a41-345094ecc94b)
-- Job (2a887f97-db68-4b7c-9ae3-5cebd7add999)
-- WorkItemTracking (73e71c45-d483-40d5-bdba-62fd076f7f87)
-- StrongBox (4a9e8381-289a-4dfd-8460-69028eaa93b3)
-- Server (1f4179b3-6bac-4d01-b421-71ea09171400)
-- TestManagement (e06e1c24-e93d-4e4a-908a-7d951187b483)
-- SettingEntries (6ec4592e-048c-434e-8e6c-8671753a8418)
-- BuildAdministration (302acaca-b667-436d-a946-87133492041c)
-- Location (2725d2bc-7520-4af4-b0e3-8d876494731f)
-- Boards (251e12d9-bea3-43a8-bfdb-901b98c0125e)
-- UtilizationPermissions (83abde3a-4593-424e-b45f-9898af99034d)
-- WorkItemsHub (c0e7a722-1cad-4ae6-b340-a8467501e7ce)
-- WebPlatform (0582eb05-c896-449a-b933-aa3d99e121d6)
-- VersionControlPrivileges (66312704-deb5-43f9-b51c-ab4ff5e351c3)
-- Workspaces (93bafc04-9075-403a-9367-b7164eac6b5c)
-- CrossProjectWidgetView (093cbb02-722b-4ad6-9f88-bc452043fa63)
-- WorkItemTrackingConfiguration (35e35e8e-686d-4b01-aff6-c369d6e36ce0)
-- Discussion Threads (0d140cae-8ac1-4f48-b6d1-c93ce0301a12)
-- BoardsExternalIntegration (5ab15bc8-4ea1-d0f3-8344-cab8fe976877)
-- DataProvider (7ffa7cf4-317c-4fea-8f1d-cfda50cfa956)
-- Social (81c27cc8-7a9f-48ee-b63f-df1e1d0412dd)
-- Security (9a82c708-bfbe-4f31-984c-e860c2196781)
-- IdentityPicker (a60e0d84-c2f8-48e4-9c0c-f32da48d5fd1)
-- ServicingOrchestration (84cc1aa4-15bc-423d-90d9-f97c450fc729)
-- Build (33344d9c-fc72-4d6f-aba5-fa317101a7e9)
-- DashboardsPrivileges (8adf73b7-389a-4276-b638-fe1653f7efc7)
-- VersionControlItems (a39371cf-0841-4c16-bbd3-276e341bc052)
-
-VSSPS:
-- EventSubscriber (2bf24a2b-70ba-43d3-ad97-3d9e1f75622f) (VSSPS)
-- EventSubscription (58b176e7-3411-457a-89d0-c6d0ccb3c52b) (VSSPS)
-- Registry (4ae0db5d-8437-4ee8-a18b-1f6fb38bd34c) (VSSPS)
-- Graph (c2ee56c9-e8fa-4cdd-9d48-2c44f697a58e) (VSSPS)
-- Invitation (ea0b4d1e-577a-4797-97b5-2f5755e548d5) (VSSPS)
-- SystemGraph (b24dfdf1-285a-4ea6-a55b-32549a68121d) (VSSPS)
-- Job (2a887f97-db68-4b7c-9ae3-5cebd7add999) (VSSPS)
-- CommerceCollectionSecurity (307be2d3-12ed-45c2-aacf-6598760efca7) (VSSPS)
-- StrongBox (4a9e8381-289a-4dfd-8460-69028eaa93b3) (VSSPS)
-- GroupLicensing (c6a4fd35-b508-49eb-8ea7-7189df5f3698) (VSSPS)
-- Server (1f4179b3-6bac-4d01-b421-71ea09171400) (VSSPS)
-- SettingEntries (6ec4592e-048c-434e-8e6c-8671753a8418) (VSSPS)
-- RemotableTemplateTest (ccdcb71c-4780-4a42-9bb4-8bce07a7628f) (VSSPS)
-- Location (2725d2bc-7520-4af4-b0e3-8d876494731f) (VSSPS)
-- WebPlatform (0582eb05-c896-449a-b933-aa3d99e121d6) (VSSPS)
-- DataProvider (7ffa7cf4-317c-4fea-8f1d-cfda50cfa956) (VSSPS)
-- Security (9a82c708-bfbe-4f31-984c-e860c2196781) (VSSPS)
-- IdentityPicker (a60e0d84-c2f8-48e4-9c0c-f32da48d5fd1) (VSSPS)
-- ServicingOrchestration (84cc1aa4-15bc-423d-90d9-f97c450fc729) (VSSPS)
+
+Valid IDs are:
+
+AzD:
+- Analytics (58450c49-b02d-465a-ab12-59ae512d6531)
+- AnalyticsViews (d34d3680-dfe5-4cc6-a949-7d9c68f73cba)
+- ReleaseManagement (7c7d32f7-0e86-4cd6-892e-b35dbba870bd)
+- ReleaseManagement2 (c788c23e-1b46-4162-8f5e-d7585343b5de)
+- Identity (5a27515b-ccd7-42c9-84f1-54c998f03866)
+- WorkItemTrackingAdministration (445d2788-c5fb-4132-bbef-09c4045ad93f)
+- DistributedTask (101eae8c-1709-47f9-b228-0e476c35b3ba)
+- WorkItemQueryFolders (71356614-aad7-4757-8f2c-0fb3bff6f680)
+- GitRepositories (2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87)
+- VersionControlItems2 (3c15a8b7-af1a-45c2-aa97-2cb97078332e)
+- EventSubscriber (2bf24a2b-70ba-43d3-ad97-3d9e1f75622f)
+- WorkItemTrackingProvision (5a6cd233-6615-414d-9393-48dbb252bd23)
+- ServiceEndpoints (49b48001-ca20-4adc-8111-5b60c903a50c)
+- ServiceHooks (cb594ebe-87dd-4fc9-ac2c-6a10a4c92046)
+- Chat (bc295513-b1a2-4663-8d1a-7017fd760d18)
+- Collection (3e65f728-f8bc-4ecd-8764-7e378b19bfa7)
+- Proxy (cb4d56d2-e84b-457e-8845-81320a133fbb)
+- Plan (bed337f8-e5f3-4fb9-80da-81e17d06e7a8)
+- Process (2dab47f9-bd70-49ed-9bd5-8eb051e59c02)
+- AccountAdminSecurity (11238e09-49f2-40c7-94d0-8f0307204ce4)
+- Library (b7e84409-6553-448a-bbb2-af228e07cbeb)
+- Environment (83d4c2e6-e57d-4d6e-892b-b87222b7ad20)
+- Project (52d39943-cb85-4d7f-8fa8-c6baac873819)
+- EventSubscription (58b176e7-3411-457a-89d0-c6d0ccb3c52b)
+- CSS (83e28ad4-2d72-4ceb-97b0-c7726d5502c3)
+- TeamLabSecurity (9e4894c3-ff9a-4eac-8a85-ce11cafdc6f1)
+- ProjectAnalysisLanguageMetrics (fc5b7b85-5d6b-41eb-8534-e128cb10eb67)
+- Tagging (bb50f182-8e5e-40b8-bc21-e8752a1e7ae2)
+- MetaTask (f6a4de49-dbe2-4704-86dc-f8ec1a294436)
+- Iteration (bf7bfa03-b2b7-47db-8113-fa2e002cc5b1)
+- Favorites (fa557b48-b5bf-458a-bb2b-1b680426fe8b)
+- Registry (4ae0db5d-8437-4ee8-a18b-1f6fb38bd34c)
+- Graph (c2ee56c9-e8fa-4cdd-9d48-2c44f697a58e)
+- ViewActivityPaneSecurity (dc02bf3d-cd48-46c3-8a41-345094ecc94b)
+- Job (2a887f97-db68-4b7c-9ae3-5cebd7add999)
+- WorkItemTracking (73e71c45-d483-40d5-bdba-62fd076f7f87)
+- StrongBox (4a9e8381-289a-4dfd-8460-69028eaa93b3)
+- Server (1f4179b3-6bac-4d01-b421-71ea09171400)
+- TestManagement (e06e1c24-e93d-4e4a-908a-7d951187b483)
+- SettingEntries (6ec4592e-048c-434e-8e6c-8671753a8418)
+- BuildAdministration (302acaca-b667-436d-a946-87133492041c)
+- Location (2725d2bc-7520-4af4-b0e3-8d876494731f)
+- Boards (251e12d9-bea3-43a8-bfdb-901b98c0125e)
+- UtilizationPermissions (83abde3a-4593-424e-b45f-9898af99034d)
+- WorkItemsHub (c0e7a722-1cad-4ae6-b340-a8467501e7ce)
+- WebPlatform (0582eb05-c896-449a-b933-aa3d99e121d6)
+- VersionControlPrivileges (66312704-deb5-43f9-b51c-ab4ff5e351c3)
+- Workspaces (93bafc04-9075-403a-9367-b7164eac6b5c)
+- CrossProjectWidgetView (093cbb02-722b-4ad6-9f88-bc452043fa63)
+- WorkItemTrackingConfiguration (35e35e8e-686d-4b01-aff6-c369d6e36ce0)
+- Discussion Threads (0d140cae-8ac1-4f48-b6d1-c93ce0301a12)
+- BoardsExternalIntegration (5ab15bc8-4ea1-d0f3-8344-cab8fe976877)
+- DataProvider (7ffa7cf4-317c-4fea-8f1d-cfda50cfa956)
+- Social (81c27cc8-7a9f-48ee-b63f-df1e1d0412dd)
+- Security (9a82c708-bfbe-4f31-984c-e860c2196781)
+- IdentityPicker (a60e0d84-c2f8-48e4-9c0c-f32da48d5fd1)
+- ServicingOrchestration (84cc1aa4-15bc-423d-90d9-f97c450fc729)
+- Build (33344d9c-fc72-4d6f-aba5-fa317101a7e9)
+- DashboardsPrivileges (8adf73b7-389a-4276-b638-fe1653f7efc7)
+- VersionControlItems (a39371cf-0841-4c16-bbd3-276e341bc052)
+
+VSSPS:
+- EventSubscriber (2bf24a2b-70ba-43d3-ad97-3d9e1f75622f) (VSSPS)
+- EventSubscription (58b176e7-3411-457a-89d0-c6d0ccb3c52b) (VSSPS)
+- Registry (4ae0db5d-8437-4ee8-a18b-1f6fb38bd34c) (VSSPS)
+- Graph (c2ee56c9-e8fa-4cdd-9d48-2c44f697a58e) (VSSPS)
+- Invitation (ea0b4d1e-577a-4797-97b5-2f5755e548d5) (VSSPS)
+- SystemGraph (b24dfdf1-285a-4ea6-a55b-32549a68121d) (VSSPS)
+- Job (2a887f97-db68-4b7c-9ae3-5cebd7add999) (VSSPS)
+- CommerceCollectionSecurity (307be2d3-12ed-45c2-aacf-6598760efca7) (VSSPS)
+- StrongBox (4a9e8381-289a-4dfd-8460-69028eaa93b3) (VSSPS)
+- GroupLicensing (c6a4fd35-b508-49eb-8ea7-7189df5f3698) (VSSPS)
+- Server (1f4179b3-6bac-4d01-b421-71ea09171400) (VSSPS)
+- SettingEntries (6ec4592e-048c-434e-8e6c-8671753a8418) (VSSPS)
+- RemotableTemplateTest (ccdcb71c-4780-4a42-9bb4-8bce07a7628f) (VSSPS)
+- Location (2725d2bc-7520-4af4-b0e3-8d876494731f) (VSSPS)
+- WebPlatform (0582eb05-c896-449a-b933-aa3d99e121d6) (VSSPS)
+- DataProvider (7ffa7cf4-317c-4fea-8f1d-cfda50cfa956) (VSSPS)
+- Security (9a82c708-bfbe-4f31-984c-e860c2196781) (VSSPS)
+- IdentityPicker (a60e0d84-c2f8-48e4-9c0c-f32da48d5fd1) (VSSPS)
+- ServicingOrchestration (84cc1aa4-15bc-423d-90d9-f97c450fc729) (VSSPS)
```yaml
Type: String
@@ -170,25 +171,25 @@ Required: True
### -Token
The security Token
-
-Valid token formats are:
-
-- Git Repository (repov2/$projectID/$repositoryID)
-- Build Definition ($projectID/$buildDefinitionID)
-- Release Definition ($projectID/$releaseDefinitionID, $projectID/Path/to/Release/$releaseDefinitionID)
+
+Valid token formats are:
+
+- Git Repository (repov2/$projectID/$repositoryID)
+- Build Definition ($projectID/$buildDefinitionID)
+- Release Definition ($projectID/$releaseDefinitionID, $projectID/Path/to/Release/$releaseDefinitionID)
```yaml
Type: String
Required: True
-```
-
-### -Descriptor
-
-An array of descriptors of users/groups to be removed
-
-```yaml
-Type: System.Array
-Required: True
+```
+
+### -Descriptor
+
+An array of descriptors of users/groups to be removed
+
+```yaml
+Type: System.Array
+Required: True
```
## INPUTS
@@ -196,8 +197,8 @@ Required: True
## OUTPUTS
## NOTES
-
-### This function outputs a non-terminating error if the ACE removal from the ACL returns $False. This can be due to the wrong descriptor being provided, or the descriptor already not being on the ACL.
+
+This function outputs a non-terminating error if the ACE removal from the ACL returns $False. This can be due to the wrong descriptor being provided, or the descriptor already not being on the ACL.
## RELATED LINKS
-
+
diff --git a/docs/Team.md b/docs/Team.md
index 210531b78..47869c693 100644
--- a/docs/Team.md
+++ b/docs/Team.md
@@ -84,6 +84,10 @@ Adds a Team Project to your account.
Add Permissions on Project Level
+### [Add-VSTeamPullRequest](Add-VSTeamPullRequest.md)
+
+Create a new Pull Request
+
### [Add-VSTeamRelease](Add-VSTeamRelease.md)
Queues a new release
@@ -196,6 +200,10 @@ Get the installed extensions in the specified Azure DevOps or Team Foundation Se
Returns a list of package feeds for the account.
+### [Get-VSTeamGitCommit](Get-VSTeamGitCommit.md)
+
+Retrieve git commits for a project
+
### [Get-VSTeamGitRef](Get-VSTeamGitRef.md)
Queries the provided repository for its refs and returns them.
@@ -204,6 +212,10 @@ Queries the provided repository for its refs and returns them.
Get all the repositories in your Azure DevOps or Team Foundation Server account, or a specific project.
+### [Get-VSTeamGitStat](Get-VSTeamGitStat.md)
+
+Retrieves statistics about branches within a repository.
+
### [Get-VSTeamGroup](Get-VSTeamGroup.md)
Returns a Group or List of Groups.
@@ -332,6 +344,10 @@ Allows you to call any TFS/AzD REST API. All the Auth and Route Structure is tak
Removes a team from a project.
+### [Remove-VSTeamAccessControlEntry](Remove-VSTeamAccessControlEntry.md)
+
+Removes specified ACEs in the ACL for the provided token. The request URI contains the namespace ID, the target token, and a single or list of descriptors that should be removed. Only supports removing AzD based users/groups.
+
### [Remove-VSTeamAccessControlList](Remove-VSTeamAccessControlList.md)
Remove access control lists under the specified security namespace.
@@ -523,6 +539,10 @@ Allows you to update the Personal Access Token for your profile.
Updates the project name, description or both.
+### [Update-VSTeamPullRequest](Update-VSTeamPullRequest.md)
+
+Update a pull request
+
### [Update-VSTeamRelease](Update-VSTeamRelease.md)
Allows you to update release variables for future stages to read.
diff --git a/docs/Update-VSTeamPullRequest.md b/docs/Update-VSTeamPullRequest.md
new file mode 100644
index 000000000..eb869af82
--- /dev/null
+++ b/docs/Update-VSTeamPullRequest.md
@@ -0,0 +1,160 @@
+
+
+
+# Update-VSTeamPullRequest
+
+## SYNOPSIS
+
+Update a pull request
+
+## SYNTAX
+
+## DESCRIPTION
+
+Update a pull request
+
+## EXAMPLES
+
+### -------------------------- EXAMPLE 1 --------------------------
+
+```PowerShell
+PS C:\> Set-VSTeamAccount -Account mydemos -Token $(System.AccessToken) -UseBearerToken
+PS C:\> $r = Get-VSTeamGitRepository -ProjectName project -Name demorepo
+PS C:\> Update-VSTeamPullRequest -RepositoryId $r.RepositoryId -Draft
+```
+
+Set the pull request to be a draft
+
+### -------------------------- EXAMPLE 2 --------------------------
+
+```PowerShell
+PS C:\> Set-VSTeamAccount -Account mydemos -Token $(System.AccessToken) -UseBearerToken
+PS C:\> $r = Get-VSTeamGitRepository -ProjectName project -Name demorepo
+PS C:\> Update-VSTeamPullRequest -RepositoryId $r.RepositoryId -Status abandoned
+```
+
+Abandon a pull request
+
+## PARAMETERS
+
+### -RepositoryId
+
+The id of the repository
+
+```yaml
+Type: Guid
+Required: True
+Aliases: Id
+Accept pipeline input: true (ByPropertyName)
+Parameter Sets: Draft, Publish, Status, EnableAutoComplete, DisableAutoComplete
+```
+
+### -PullRequestId
+
+The id of the pull request
+
+```yaml
+Type: Int32
+Required: True
+Parameter Sets: Draft, Publish, Status, EnableAutoComplete, DisableAutoComplete
+```
+
+### -Status
+
+The status to set the pull request to. Valid values for this are:
+
+- abandoned
+- active
+- completed
+- notSet
+
+```yaml
+Type: String
+Parameter Sets: Status
+```
+
+### -EnableAutoComplete
+
+Set the pull requests auto complete status
+
+```yaml
+Type: Switch
+Parameter Sets: EnableAutoComplete
+```
+
+### -AutoCompleteIdentity
+
+The identity that enabled autocomplete. This is mandatory if -AutoComplete is set to $true
+
+```yaml
+Type: VSTeamUser
+Parameter Sets: EnableAutoComplete
+```
+
+### -DisableAutoComplete
+
+Unset the pull requests auto complete status
+
+```yaml
+Type: Switch
+Parameter Sets: DisableAutoComplete
+```
+
+### -Draft
+
+Set the pull request as a draft
+
+```yaml
+Type: Switch
+Parameter Sets: Draft
+```
+
+### -Confirm
+
+Prompts you for confirmation before running the function.
+
+```yaml
+Type: SwitchParameter
+Required: false
+Position: Named
+Accept pipeline input: false
+Parameter Sets: (All)
+Aliases: cf
+```
+
+### -Force
+
+Forces the function without confirmation
+
+```yaml
+Type: SwitchParameter
+Required: false
+Position: Named
+Accept pipeline input: false
+Parameter Sets: (All)
+```
+
+### -WhatIf
+
+Shows what would happen if the function runs.
+The function is not run.
+
+```yaml
+Type: SwitchParameter
+Required: false
+Position: Named
+Accept pipeline input: false
+Parameter Sets: (All)
+Aliases: wi
+```
+
+## INPUTS
+
+## OUTPUTS
+
+### Team.PullRequest
+
+## NOTES
+
+## RELATED LINKS
+
diff --git a/docs/_config.yml b/docs/_config.yml
new file mode 100644
index 000000000..c74188174
--- /dev/null
+++ b/docs/_config.yml
@@ -0,0 +1 @@
+theme: jekyll-theme-slate
\ No newline at end of file
diff --git a/docs/readme.md b/docs/readme.md
index 1d2c84f7e..32e07b1ae 100644
--- a/docs/readme.md
+++ b/docs/readme.md
@@ -89,6 +89,10 @@ Adds a Team Project to your account.
Add Permissions on Project Level
+### [Add-VSTeamPullRequest](Add-VSTeamPullRequest.md)
+
+Create a new Pull Request
+
### [Add-VSTeamRelease](Add-VSTeamRelease.md)
Queues a new release
@@ -201,6 +205,10 @@ Get the installed extensions in the specified Azure DevOps or Team Foundation Se
Returns a list of package feeds for the account.
+### [Get-VSTeamGitCommit](Get-VSTeamGitCommit.md)
+
+Retrieve git commits for a project
+
### [Get-VSTeamGitRef](Get-VSTeamGitRef.md)
Queries the provided repository for its refs and returns them.
@@ -209,6 +217,10 @@ Queries the provided repository for its refs and returns them.
Get all the repositories in your Azure DevOps or Team Foundation Server account, or a specific project.
+### [Get-VSTeamGitStat](Get-VSTeamGitStat.md)
+
+Retrieves statistics about branches within a repository.
+
### [Get-VSTeamGroup](Get-VSTeamGroup.md)
Returns a Group or List of Groups.
@@ -337,6 +349,10 @@ Allows you to call any TFS/AzD REST API. All the Auth and Route Structure is tak
Removes a team from a project.
+### [Remove-VSTeamAccessControlEntry](Remove-VSTeamAccessControlEntry.md)
+
+Removes specified ACEs in the ACL for the provided token. The request URI contains the namespace ID, the target token, and a single or list of descriptors that should be removed. Only supports removing AzD based users/groups.
+
### [Remove-VSTeamAccessControlList](Remove-VSTeamAccessControlList.md)
Remove access control lists under the specified security namespace.
@@ -528,6 +544,10 @@ Allows you to update the Personal Access Token for your profile.
Updates the project name, description or both.
+### [Update-VSTeamPullRequest](Update-VSTeamPullRequest.md)
+
+Update a pull request
+
### [Update-VSTeamRelease](Update-VSTeamRelease.md)
Allows you to update release variables for future stages to read.
diff --git a/integration/test/010_projects.Tests.ps1 b/integration/test/010_projects.Tests.ps1
index 8e5ec6907..ddd4f9ccb 100644
--- a/integration/test/010_projects.Tests.ps1
+++ b/integration/test/010_projects.Tests.ps1
@@ -449,7 +449,7 @@ InModuleScope VSTeam {
It 'Add-VSTeamUserEntitlement should add a user with MSDN license' {
Add-VSTeamUserEntitlement -Email $email -License none -LicensingSource msdn -MSDNLicenseType professional | Should not be $null
- (Get-VSTeamUserEntitlement).Count | Should Be 4
+ (Get-VSTeamUserEntitlement).Count | Should Be 3
}
}
}
diff --git a/unit/test/Add-VSTeamPullRequest.Tests.ps1 b/unit/test/Add-VSTeamPullRequest.Tests.ps1
index 3d7e45571..f4ff47585 100644
--- a/unit/test/Add-VSTeamPullRequest.Tests.ps1
+++ b/unit/test/Add-VSTeamPullRequest.Tests.ps1
@@ -5,7 +5,7 @@ InModuleScope VSTeam {
Describe 'Pull Requests' {
. "$PSScriptRoot\mocks\mockProjectNameDynamicParamNoPSet.ps1"
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
# You have to set the version or the api-version will not be added when
# [VSTeamVersions]::Core = ''
diff --git a/unit/test/Approvals.Tests.ps1 b/unit/test/Approvals.Tests.ps1
index 3817d760e..b6e617e34 100644
--- a/unit/test/Approvals.Tests.ps1
+++ b/unit/test/Approvals.Tests.ps1
@@ -3,12 +3,11 @@ Set-StrictMode -Version Latest
# The InModuleScope command allows you to perform white-box unit testing on the
# internal (non-exported) code of a Script Module.
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'
-
Describe 'Approvals' -Tag 'unit', 'approvals' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' }
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
@@ -34,6 +33,9 @@ InModuleScope VSTeam {
Context 'Get-VSTeamApproval' {
# Arrange
Mock Invoke-RestMethod {
+ # If this test fails uncomment the line below to see how the mock was called.
+ # Write-Host $args
+
return @{
count = 1
value = @(
@@ -66,8 +68,6 @@ InModuleScope VSTeam {
Mock Invoke-RestMethod {
# If this test fails uncomment the line below to see how the mock was called.
# Write-Host $args
- # Write-Host $([VSTeamVersions]::Release)
- # Write-Host $([VSTeamVersions]::Account)
return @{
count = 1
@@ -200,11 +200,13 @@ InModuleScope VSTeam {
}
Context 'Get-VSTeamApproval TFS' {
- [VSTeamVersions]::Account = 'http://localhost:8080/tfs/defaultcollection'
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' }
Mock Invoke-RestMethod {
# If this test fails uncomment the line below to see how the mock was called.
- #Write-Host $args
+ # Write-Host $args
return @{
count = 1
diff --git a/unit/test/Get-VSTeamBuildDefinition.Tests.ps1 b/unit/test/Get-VSTeamBuildDefinition.Tests.ps1
index ef65141fb..8d27a693d 100644
--- a/unit/test/Get-VSTeamBuildDefinition.Tests.ps1
+++ b/unit/test/Get-VSTeamBuildDefinition.Tests.ps1
@@ -4,8 +4,6 @@ Set-StrictMode -Version Latest
Add-Type -AssemblyName 'System.Web'
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
-
$resultsVSTS = Get-Content "$PSScriptRoot\sampleFiles\buildDefvsts.json" -Raw | ConvertFrom-Json
$resultsAzD = Get-Content "$PSScriptRoot\sampleFiles\buildDefAzD.json" -Raw | ConvertFrom-Json
$results2017 = Get-Content "$PSScriptRoot\sampleFiles\buildDef2017.json" -Raw | ConvertFrom-Json
@@ -20,6 +18,8 @@ InModuleScope VSTeam {
. "$PSScriptRoot\mocks\mockProjectNameDynamicParamNoPSet.ps1"
Context 'Get-VSTeamBuildDefinition with no parameters 2017' {
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
+
Mock _useWindowsAuthenticationOnPremise { return $true }
Mock Invoke-RestMethod {
# If this test fails uncomment the line below to see how the mock was called.
@@ -34,7 +34,7 @@ InModuleScope VSTeam {
Get-VSTeamBuildDefinition -projectName project
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
- $Uri -like "*https://dev.azure.com/test/project/_apis/build/definitions*" -and
+ $Uri -like "*http://localhost:8080/tfs/defaultcollection/project/_apis/build/definitions*" -and
$Uri -like "*api-version=$([VSTeamVersions]::Build)*" -and
$Uri -like "*type=All*"
}
@@ -42,6 +42,8 @@ InModuleScope VSTeam {
}
Context 'Get-VSTeamBuildDefinition with no parameters 2018' {
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
+
Mock _useWindowsAuthenticationOnPremise { return $true }
Mock Invoke-RestMethod {
return $results2018
@@ -51,7 +53,7 @@ InModuleScope VSTeam {
Get-VSTeamBuildDefinition -projectName project
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
- $Uri -like "*https://dev.azure.com/test/project/_apis/build/definitions*" -and
+ $Uri -like "*http://localhost:8080/tfs/defaultcollection/project/_apis/build/definitions*" -and
$Uri -like "*api-version=$([VSTeamVersions]::Build)*" -and
$Uri -like "*type=All*"
}
@@ -59,6 +61,8 @@ InModuleScope VSTeam {
}
Context 'Get-VSTeamBuildDefinition with no parameters AzD v5.0 of API' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
Mock Invoke-RestMethod {
return $resultsAzD
}
@@ -75,6 +79,8 @@ InModuleScope VSTeam {
}
Context 'Get-VSTeamBuildDefinition with no parameters VSTS' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
Mock Invoke-RestMethod {
return $resultsVSTS
}
@@ -91,6 +97,8 @@ InModuleScope VSTeam {
}
Context 'Get-VSTeamBuildDefinition with no parameters VSTS yaml ' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
Mock Invoke-RestMethod {
return $resultsVSTS
}
@@ -107,6 +115,8 @@ InModuleScope VSTeam {
}
Context 'Get-VSTeamBuildDefinition with type parameter' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
Mock Invoke-RestMethod {
return $resultsVSTS
}
@@ -123,6 +133,8 @@ InModuleScope VSTeam {
}
Context 'Get-VSTeamBuildDefinition with filter parameter' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
Mock Invoke-RestMethod { return $resultsVSTS }
It 'should return build definitions by filter' {
@@ -138,6 +150,8 @@ InModuleScope VSTeam {
}
Context 'Get-VSTeamBuildDefinition with both parameters' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
Mock Invoke-RestMethod { return $resultsVSTS }
It 'should return build definitions by filter' {
@@ -153,6 +167,8 @@ InModuleScope VSTeam {
}
Context 'Get-VSTeamBuildDefinition by ID' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
Mock Invoke-RestMethod { return $resultsVSTS.value }
It 'should return build definition' {
@@ -167,6 +183,8 @@ InModuleScope VSTeam {
}
Context 'Get-VSTeamBuildDefinition by ID -Raw' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
Mock Invoke-RestMethod { return $resultsVSTS.value }
It 'should return build definition' {
@@ -181,6 +199,8 @@ InModuleScope VSTeam {
}
Context 'Get-VSTeamBuildDefinition by ID -Json' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
Mock Invoke-RestMethod { return $resultsVSTS.value }
It 'should return build definition' {
@@ -195,6 +215,8 @@ InModuleScope VSTeam {
}
Context 'Get-VSTeamBuildDefinition by ID local auth' {
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
+
Mock _useWindowsAuthenticationOnPremise { return $true }
Mock Invoke-RestMethod { return $resultsVSTS.value }
@@ -202,12 +224,14 @@ InModuleScope VSTeam {
Get-VSTeamBuildDefinition -projectName project -id 15
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
- $Uri -eq "https://dev.azure.com/test/project/_apis/build/definitions/15?api-version=$([VSTeamVersions]::Build)"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/project/_apis/build/definitions/15?api-version=$([VSTeamVersions]::Build)"
}
}
}
Context 'Get-VSTeamBuildDefinition with revision parameter' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
Mock Invoke-RestMethod { return $resultsVSTS.value }
It 'should return build definitions by revision' {
diff --git a/unit/test/Get-VSTeamGitCommit.Tests.ps1 b/unit/test/Get-VSTeamGitCommit.Tests.ps1
index ec98a139f..6df754692 100644
--- a/unit/test/Get-VSTeamGitCommit.Tests.ps1
+++ b/unit/test/Get-VSTeamGitCommit.Tests.ps1
@@ -1,60 +1,59 @@
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'
-
$results = [PSCustomObject]@{
count = 2
value = @(
[PSCustomObject]@{
- author = [PSCustomObject]@{
- date = '2020-02-19T15:12:01Z'
+ author = [PSCustomObject]@{
+ date = '2020-02-19T15:12:01Z'
email = 'test@test.com'
- name = 'Test User'
+ name = 'Test User'
}
changeCounts = [PSCustomObject]@{
- Add = 2
+ Add = 2
Delete = 0
- Edit = 1
+ Edit = 1
}
- comment = 'Just a test commit'
- commitId = '1234567890abcdef1234567890abcdef'
- committer = [PSCustomObject]@{
- date = '2020-02-19T15:12:01Z'
+ comment = 'Just a test commit'
+ commitId = '1234567890abcdef1234567890abcdef'
+ committer = [PSCustomObject]@{
+ date = '2020-02-19T15:12:01Z'
email = 'test@test.com'
- name = 'Test User'
+ name = 'Test User'
}
- remoteUrl = 'https://dev.azure.com/test/test/_git/test/commit/1234567890abcdef1234567890abcdef'
- url = 'https://dev.azure.com/test/21AF684D-AFFB-4F9A-9D49-866EF24D6A4A/_apid/git/repositories/06E176BE-D3D2-41C2-AB34-5F4D79AEC86B/commits/1234567890abcdef1234567890abcdef'
+ remoteUrl = 'https://dev.azure.com/test/test/_git/test/commit/1234567890abcdef1234567890abcdef'
+ url = 'https://dev.azure.com/test/21AF684D-AFFB-4F9A-9D49-866EF24D6A4A/_apid/git/repositories/06E176BE-D3D2-41C2-AB34-5F4D79AEC86B/commits/1234567890abcdef1234567890abcdef'
},
[PSCustomObject]@{
- author = [PSCustomObject]@{
- date = '2020-02-20T01:00:01Z'
+ author = [PSCustomObject]@{
+ date = '2020-02-20T01:00:01Z'
email = 'eample@example.com'
- name = 'Example User'
+ name = 'Example User'
}
changeCounts = [PSCustomObject]@{
- Add = 8
+ Add = 8
Delete = 1
- Edit = 0
+ Edit = 0
}
- comment = 'Just another test commit'
- commitId = 'abcdef1234567890abcdef1234567890'
- committer = [PSCustomObject]@{
- date = '2020-02-20T01:00:01Z'
+ comment = 'Just another test commit'
+ commitId = 'abcdef1234567890abcdef1234567890'
+ committer = [PSCustomObject]@{
+ date = '2020-02-20T01:00:01Z'
email = 'eample@example.com'
- name = 'Example User'
+ name = 'Example User'
}
- remoteUrl = 'https://dev.azure.com/test/test/_git/test/commit/abcdef1234567890abcdef1234567890'
- url = 'https://dev.azure.com/test/21AF684D-AFFB-4F9A-9D49-866EF24D6A4A/_apid/git/repositories/06E176BE-D3D2-41C2-AB34-5F4D79AEC86B/commits/abcdef1234567890abcdef1234567890'
+ remoteUrl = 'https://dev.azure.com/test/test/_git/test/commit/abcdef1234567890abcdef1234567890'
+ url = 'https://dev.azure.com/test/21AF684D-AFFB-4F9A-9D49-866EF24D6A4A/_apid/git/repositories/06E176BE-D3D2-41C2-AB34-5F4D79AEC86B/commits/abcdef1234567890abcdef1234567890'
}
)
}
Describe "Git VSTS" {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/Get-VSTeamGitStat.Tests.ps1 b/unit/test/Get-VSTeamGitStat.Tests.ps1
index 6bb9a1e53..77f2f9372 100644
--- a/unit/test/Get-VSTeamGitStat.Tests.ps1
+++ b/unit/test/Get-VSTeamGitStat.Tests.ps1
@@ -1,30 +1,25 @@
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'
-
$singleResult = [PSCustomObject]@{
- commit = [PSCustomObject]@{
- commitId = '67cae2b029dff7eb3dc062b49403aaedca5bad8d'
- author = [PSCustomObject]@{
- name = '"Chuck Reinhart'
+ commit = [PSCustomObject]@{
+ commitId = '67cae2b029dff7eb3dc062b49403aaedca5bad8d'
+ author = [PSCustomObject]@{
+ name = '"Chuck Reinhart'
email = 'fabrikamfiber3@hotmail.com'
- date = '2014-01-29T23:52:56Z'
+ date = '2014-01-29T23:52:56Z'
}
committer = [PSCustomObject]@{
- name = '"Chuck Reinhart'
+ name = '"Chuck Reinhart'
email = 'fabrikamfiber3@hotmail.com'
- date = '2014-01-29T23:52:56Z'
+ date = '2014-01-29T23:52:56Z'
}
- comment = 'home page'
- url = 'https://dev.azure.com/fabrikam/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/67cae2b029dff7eb3dc062b49403aaedca5bad8d'
+ comment = 'home page'
+ url = 'https://dev.azure.com/fabrikam/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/67cae2b029dff7eb3dc062b49403aaedca5bad8d'
}
- name = 'develop'
- aheadCount = 1
- behindCount = 17
+ name = 'develop'
+ aheadCount = 1
+ behindCount = 17
isBaseVersion = $false
}
@@ -32,76 +27,80 @@ InModuleScope VSTeam {
count = 3
value = @(
[PSCustomObject]@{
- commit = [PSCustomObject]@{
- commitId = '67cae2b029dff7eb3dc062b49403aaedca5bad8d'
- author = [PSCustomObject]@{
- name = '"Chuck Reinhart'
+ commit = [PSCustomObject]@{
+ commitId = '67cae2b029dff7eb3dc062b49403aaedca5bad8d'
+ author = [PSCustomObject]@{
+ name = '"Chuck Reinhart'
email = 'fabrikamfiber3@hotmail.com'
- date = '2014-01-29T23:52:56Z'
+ date = '2014-01-29T23:52:56Z'
}
committer = [PSCustomObject]@{
- name = '"Chuck Reinhart'
+ name = '"Chuck Reinhart'
email = 'fabrikamfiber3@hotmail.com'
- date = '2014-01-29T23:52:56Z'
+ date = '2014-01-29T23:52:56Z'
}
- comment = 'home page'
- url = 'https://dev.azure.com/fabrikam/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/67cae2b029dff7eb3dc062b49403aaedca5bad8d'
+ comment = 'home page'
+ url = 'https://dev.azure.com/fabrikam/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/67cae2b029dff7eb3dc062b49403aaedca5bad8d'
}
- name = 'develop'
- aheadCount = 1
- behindCount = 17
+ name = 'develop'
+ aheadCount = 1
+ behindCount = 17
isBaseVersion = $false
},
[PSCustomObject]@{
- commit = [PSCustomObject]@{
- parents = @('fe17a84cc2dfe0ea3a2202ab4dbac0706058e41f')
- treeId = '8263e7232a2331c563d737e4fc4e9c66a8286c63'
- commitId = '23d0bc5b128a10056dc68afece360d8a0fabb014'
- author = [PSCustomObject]@{
- name = 'Norman Paulk'
+ commit = [PSCustomObject]@{
+ parents = @('fe17a84cc2dfe0ea3a2202ab4dbac0706058e41f')
+ treeId = '8263e7232a2331c563d737e4fc4e9c66a8286c63'
+ commitId = '23d0bc5b128a10056dc68afece360d8a0fabb014'
+ author = [PSCustomObject]@{
+ name = 'Norman Paulk'
email = 'Fabrikamfiber16@hotmail.com'
- date = '2014-06-30T18:10:55Z'
+ date = '2014-06-30T18:10:55Z'
}
committer = [PSCustomObject]@{
- name = 'Norman Paulk'
+ name = 'Norman Paulk'
email = 'Fabrikamfiber16@hotmail.com'
- date = '2014-06-30T18:10:55Z'
+ date = '2014-06-30T18:10:55Z'
}
- comment = 'Better description for hello world\n'
- url = 'https://dev.azure.com/fabrikam/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/23d0bc5b128a10056dc68afece360d8a0fabb014'
+ comment = 'Better description for hello world\n'
+ url = 'https://dev.azure.com/fabrikam/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/23d0bc5b128a10056dc68afece360d8a0fabb014'
}
- name = 'master'
- aheadCount = 0
- behindCount = 0
+ name = 'master'
+ aheadCount = 0
+ behindCount = 0
isBaseVersion = $true
},
[PSCustomObject]@{
- commit = [PSCustomObject]@{
- parents = @('fe17a84cc2dfe0ea3a2202ab4dbac0706058e41f')
- treeId = '8263e7232a2331c563d737e4fc4e9c66a8286c63'
- commitId = '23d0bc5b128a10056dc68afece360d8a0fabb014'
- author = [PSCustomObject]@{
- name = 'Norman Paulk'
+ commit = [PSCustomObject]@{
+ parents = @('fe17a84cc2dfe0ea3a2202ab4dbac0706058e41f')
+ treeId = '8263e7232a2331c563d737e4fc4e9c66a8286c63'
+ commitId = '23d0bc5b128a10056dc68afece360d8a0fabb014'
+ author = [PSCustomObject]@{
+ name = 'Norman Paulk'
email = 'Fabrikamfiber16@hotmail.com'
- date = '2014-06-30T18:10:55Z'
+ date = '2014-06-30T18:10:55Z'
}
committer = [PSCustomObject]@{
- name = 'Norman Paulk'
+ name = 'Norman Paulk'
email = 'Fabrikamfiber16@hotmail.com'
- date = '2014-06-30T18:10:55Z'
+ date = '2014-06-30T18:10:55Z'
}
- comment = 'Better description for hello world\n'
- url = 'https://dev.azure.com/fabrikam/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/23d0bc5b128a10056dc68afece360d8a0fabb014'
+ comment = 'Better description for hello world\n'
+ url = 'https://dev.azure.com/fabrikam/_apis/git/repositories/278d5cd2-584d-4b63-824a-2ba458937249/commits/23d0bc5b128a10056dc68afece360d8a0fabb014'
}
- name = 'npaulk/feature'
- aheadCount = 0
- behindCount = 0
+ name = 'npaulk/feature'
+ aheadCount = 0
+ behindCount = 0
isBaseVersion = $true
}
)
}
Describe "Git VSTS" {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/Get-VSTeamJobRequest.Tests.ps1 b/unit/test/Get-VSTeamJobRequest.Tests.ps1
index e82ebed12..c8bbc3643 100644
--- a/unit/test/Get-VSTeamJobRequest.Tests.ps1
+++ b/unit/test/Get-VSTeamJobRequest.Tests.ps1
@@ -17,7 +17,9 @@ Describe "Get-VSTeamJobRequest" {
Context "2017" {
# Set the account to use for testing. A normal user would do this
# using the Set-VSTeamAccount function.
- [VSTeamVersions]::Account = 'http://localhost:8080/tfs/defaultcollection'
+ Remove-VSTeamAccount
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
+
Mock Invoke-RestMethod {
# If this test fails uncomment the line below to see how the mock was called.
# Write-Host $args
@@ -56,10 +58,12 @@ Describe "Get-VSTeamJobRequest" {
Context "AzD" {
# 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'
+ Remove-VSTeamAccount
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
Mock Invoke-RestMethod {
# If this test fails uncomment the line below to see how the mock was called.
- #Write-Host $args
+ # Write-Host $args
return $resultsAzD
}
diff --git a/unit/test/Get-VSTeamPermissionInheritance.Tests.ps1 b/unit/test/Get-VSTeamPermissionInheritance.Tests.ps1
index 10b43e238..c7999c34b 100644
--- a/unit/test/Get-VSTeamPermissionInheritance.Tests.ps1
+++ b/unit/test/Get-VSTeamPermissionInheritance.Tests.ps1
@@ -21,8 +21,6 @@ $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
# Loading System.Web avoids issues finding System.Web.HttpUtility
Add-Type -AssemblyName 'System.Web'
-[VSTeamVersions]::Account = 'https://dev.azure.com/test'
-
$buildDefresults = Get-Content "$PSScriptRoot\sampleFiles\buildDefAzD.json" -Raw | ConvertFrom-Json
$releaseDefresults = Get-Content "$PSScriptRoot\sampleFiles\releaseDefAzD.json" -Raw | ConvertFrom-Json
$gitRepoResult = Get-Content "$PSScriptRoot\sampleFiles\singleGitRepo.json" -Raw | ConvertFrom-Json
@@ -43,6 +41,9 @@ $singleResult = [PSCustomObject]@{
}
Describe 'Get-VSTeamPermissionInheritance' {
+ Remove-VSTeamAccount
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/Get-VSTeamProcess.Tests.ps1 b/unit/test/Get-VSTeamProcess.Tests.ps1
index 4193bb0ab..43f723012 100644
--- a/unit/test/Get-VSTeamProcess.Tests.ps1
+++ b/unit/test/Get-VSTeamProcess.Tests.ps1
@@ -11,7 +11,7 @@ $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
. "$here/../../Source/Public/$sut"
Describe 'Get-VSTeamProcess' {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
. "$PSScriptRoot\mocks\mockProcessNameDynamicParam.ps1"
$results = [PSCustomObject]@{
diff --git a/unit/test/Get-VSTeamRelease.Tests.ps1 b/unit/test/Get-VSTeamRelease.Tests.ps1
index ae8a5654f..c39135c52 100644
--- a/unit/test/Get-VSTeamRelease.Tests.ps1
+++ b/unit/test/Get-VSTeamRelease.Tests.ps1
@@ -4,9 +4,6 @@ Set-StrictMode -Version Latest
Add-Type -AssemblyName 'System.Web'
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
- [VSTeamVersions]::Release = '1.0-unittest'
-
$results = [PSCustomObject]@{
value = [PSCustomObject]@{
environments = [PSCustomObject]@{}
@@ -31,6 +28,9 @@ InModuleScope VSTeam {
}
Describe 'Releases' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+ [VSTeamVersions]::Release = '1.0-unittest'
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/Get-VSTeamReleaseDefinition.Tests.ps1 b/unit/test/Get-VSTeamReleaseDefinition.Tests.ps1
index cc99d3c90..40bb9e760 100644
--- a/unit/test/Get-VSTeamReleaseDefinition.Tests.ps1
+++ b/unit/test/Get-VSTeamReleaseDefinition.Tests.ps1
@@ -15,13 +15,12 @@ $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
# Loading System.Web avoids issues finding System.Web.HttpUtility
Add-Type -AssemblyName 'System.Web'
-
-[VSTeamVersions]::Account = 'https://dev.azure.com/test'
-[VSTeamVersions]::Release = '1.0-unittest'
-
$results = Get-Content "$PSScriptRoot\sampleFiles\releaseDefAzD.json" -Raw | ConvertFrom-Json
Describe 'Get-VSTeamReleaseDefinition' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+ [VSTeamVersions]::Release = '1.0-unittest'
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/Remove-VSTeamAccessControlEntry.Tests.ps1 b/unit/test/Remove-VSTeamAccessControlEntry.Tests.ps1
index 569636813..2d43ca7e1 100644
--- a/unit/test/Remove-VSTeamAccessControlEntry.Tests.ps1
+++ b/unit/test/Remove-VSTeamAccessControlEntry.Tests.ps1
@@ -1,13 +1,8 @@
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'
-
-$securityNamespace =
-@"
+ $securityNamespace =
+ @"
{
"namespaceId": "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87",
"name": "Git Repositories",
@@ -107,64 +102,68 @@ $securityNamespace =
}
"@ | ConvertFrom-Json
- Describe 'AccessControlEntry VSTS'{
- # You have to set the version or the api-version will not be Removed when
- # [VSTeamVersions]::Core = ''
- [VSTeamVersions]::Core = '5.1'
+ Describe 'AccessControlEntry VSTS' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
+ # You have to set the version or the api-version will not be Removed when
+ # [VSTeamVersions]::Core = ''
+ [VSTeamVersions]::Core = '5.1'
- Mock Get-VSTeamSecurityNamespace { return $securityNamespace }
+ Mock Get-VSTeamSecurityNamespace { return $securityNamespace }
- Context 'Remove-VSTeamAccessControlEntry by SecurityNamespaceId'{
- It 'Should succeed with a properly formatted descriptor if descriptor is on ACL'{
- Mock _callAPI { return $true } -Verifiable
- Remove-VSTeamAccessControlEntry -SecurityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -Descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTkxNDc4NTk1LTU1MDM1MzIxOC0yNDM3MjM2NDgzLTQyMjkyNzUyNDktMC0wLTAtOC04") -Token xyz -confirm:$false | Should be "Removal of ACE from ACL succeeded."
- }
- It 'Should fail with a properly formatted descriptor if descriptor is not on ACL already'{
- Mock _callAPI { return $false } -Verifiable
- Remove-VSTeamAccessControlEntry -SecurityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -Descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTkxNDc4NTk1LTU1MDM1MzIxOC0yNDM3MjM2NDgzLTQyMjkyNzUyNDktMC0wLTAtOC04") -Token xyz -confirm:$false -ErrorVariable err -ErrorAction SilentlyContinue
- $err.count | should be 1
- $err[0].Exception.Message | Should Be "Removal of ACE from ACL failed. Ensure descriptor and token are correct."
- $err
- }
- It 'Should fail with an improperly formatted descriptor'{
- Remove-VSTeamAccessControlEntry -SecurityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -Descriptor @("vssgp.NotARealDescriptor") -Token xyz -confirm:$false -ErrorVariable err -ErrorAction SilentlyContinue
- $err.count | should be 2
- $err[1].Exception.Message | Should Be "Could not convert base64 string to string."
- }
- It 'Should fail if the REST API gives a non true/false response'{
- Mock _callAPI { return "Not a valid return" } -Verifiable
- Remove-VSTeamAccessControlEntry -SecurityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -Descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTkxNDc4NTk1LTU1MDM1MzIxOC0yNDM3MjM2NDgzLTQyMjkyNzUyNDktMC0wLTAtOC04") -Token xyz -confirm:$false -ErrorVariable err -ErrorAction SilentlyContinue
- $err.count | should be 1
- $err[0].Exception.Message | Should Be "Unexpected response from REST API."
- }
- }
+ Context 'Remove-VSTeamAccessControlEntry by SecurityNamespaceId' {
+ It 'Should succeed with a properly formatted descriptor if descriptor is on ACL' {
+ Mock _callAPI { return $true } -Verifiable
+ Remove-VSTeamAccessControlEntry -SecurityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -Descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTkxNDc4NTk1LTU1MDM1MzIxOC0yNDM3MjM2NDgzLTQyMjkyNzUyNDktMC0wLTAtOC04") -Token xyz -confirm:$false | Should be "Removal of ACE from ACL succeeded."
+ }
+ It 'Should fail with a properly formatted descriptor if descriptor is not on ACL already' {
+ Mock _callAPI { return $false } -Verifiable
+ Remove-VSTeamAccessControlEntry -SecurityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -Descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTkxNDc4NTk1LTU1MDM1MzIxOC0yNDM3MjM2NDgzLTQyMjkyNzUyNDktMC0wLTAtOC04") -Token xyz -confirm:$false -ErrorVariable err -ErrorAction SilentlyContinue
+ $err.count | should be 1
+ $err[0].Exception.Message | Should Be "Removal of ACE from ACL failed. Ensure descriptor and token are correct."
+ $err
+ }
+ It 'Should fail with an improperly formatted descriptor' {
+ Remove-VSTeamAccessControlEntry -SecurityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -Descriptor @("vssgp.NotARealDescriptor") -Token xyz -confirm:$false -ErrorVariable err -ErrorAction SilentlyContinue
+ $err.count | should be 2
+ $err[1].Exception.Message | Should Be "Could not convert base64 string to string."
+ }
+ It 'Should fail if the REST API gives a non true/false response' {
+ Mock _callAPI { return "Not a valid return" } -Verifiable
+ Remove-VSTeamAccessControlEntry -SecurityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -Descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTkxNDc4NTk1LTU1MDM1MzIxOC0yNDM3MjM2NDgzLTQyMjkyNzUyNDktMC0wLTAtOC04") -Token xyz -confirm:$false -ErrorVariable err -ErrorAction SilentlyContinue
+ $err.count | should be 1
+ $err[0].Exception.Message | Should Be "Unexpected response from REST API."
+ }
+ }
- Context 'Remove-VSTeamAccessControlEntry by SecurityNamespace'{
- It 'Should succeed with a properly formatted descriptor if descriptor is on ACL'{
- $securityNamespace = Get-VSTeamSecurityNamespace -Id "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87"
- Mock _callAPI { return $true } -Verifiable
- Remove-VSTeamAccessControlEntry -SecurityNamespace $securityNamespace -Descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTkxNDc4NTk1LTU1MDM1MzIxOC0yNDM3MjM2NDgzLTQyMjkyNzUyNDktMC0wLTAtOC04") -Token xyz -confirm:$false | Should be "Removal of ACE from ACL succeeded."
- }
- It 'Should fail with a properly formatted descriptor if descriptor is not on ACL already'{
- $securityNamespace = Get-VSTeamSecurityNamespace -Id "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87"
- Mock _callAPI { return $false } -Verifiable
- Remove-VSTeamAccessControlEntry -SecurityNamespace $securityNamespace -Descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTkxNDc4NTk1LTU1MDM1MzIxOC0yNDM3MjM2NDgzLTQyMjkyNzUyNDktMC0wLTAtOC04") -Token xyz -confirm:$false -ErrorVariable err -ErrorAction SilentlyContinue
- $err.count | should be 1
- $err[0].Exception.Message | Should Be "Removal of ACE from ACL failed. Ensure descriptor and token are correct."
- }
- It 'Should fail with an improperly formatted descriptor'{
- $securityNamespace = Get-VSTeamSecurityNamespace -Id "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87"
- Remove-VSTeamAccessControlEntry -SecurityNamespace $securityNamespace -Descriptor @("vssgp.NotARealDescriptor") -Token xyz -confirm:$false -ErrorVariable err -ErrorAction SilentlyContinue
- $err.count | should be 2
- $err[1].Exception.Message | Should Be "Could not convert base64 string to string."
- }
- It 'Should fail if the REST API gives a non true/false response'{
- Mock _callAPI { return "Not a valid return" } -Verifiable
- Remove-VSTeamAccessControlEntry -SecurityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -Descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTkxNDc4NTk1LTU1MDM1MzIxOC0yNDM3MjM2NDgzLTQyMjkyNzUyNDktMC0wLTAtOC04") -Token xyz -confirm:$false -ErrorVariable err -ErrorAction SilentlyContinue
- $err.count | should be 1
- $err[0].Exception.Message | Should Be "Unexpected response from REST API."
- }
- }
- }
+ Context 'Remove-VSTeamAccessControlEntry by SecurityNamespace' {
+ It 'Should succeed with a properly formatted descriptor if descriptor is on ACL' {
+ $securityNamespace = Get-VSTeamSecurityNamespace -Id "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87"
+ Mock _callAPI { return $true } -Verifiable
+ Remove-VSTeamAccessControlEntry -SecurityNamespace $securityNamespace -Descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTkxNDc4NTk1LTU1MDM1MzIxOC0yNDM3MjM2NDgzLTQyMjkyNzUyNDktMC0wLTAtOC04") -Token xyz -confirm:$false | Should be "Removal of ACE from ACL succeeded."
+ }
+ It 'Should fail with a properly formatted descriptor if descriptor is not on ACL already' {
+ $securityNamespace = Get-VSTeamSecurityNamespace -Id "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87"
+ Mock _callAPI { return $false } -Verifiable
+ Remove-VSTeamAccessControlEntry -SecurityNamespace $securityNamespace -Descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTkxNDc4NTk1LTU1MDM1MzIxOC0yNDM3MjM2NDgzLTQyMjkyNzUyNDktMC0wLTAtOC04") -Token xyz -confirm:$false -ErrorVariable err -ErrorAction SilentlyContinue
+ $err.count | should be 1
+ $err[0].Exception.Message | Should Be "Removal of ACE from ACL failed. Ensure descriptor and token are correct."
+ }
+ It 'Should fail with an improperly formatted descriptor' {
+ $securityNamespace = Get-VSTeamSecurityNamespace -Id "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87"
+ Remove-VSTeamAccessControlEntry -SecurityNamespace $securityNamespace -Descriptor @("vssgp.NotARealDescriptor") -Token xyz -confirm:$false -ErrorVariable err -ErrorAction SilentlyContinue
+ $err.count | should be 2
+ $err[1].Exception.Message | Should Be "Could not convert base64 string to string."
+ }
+ It 'Should fail if the REST API gives a non true/false response' {
+ Mock _callAPI { return "Not a valid return" } -Verifiable
+ Remove-VSTeamAccessControlEntry -SecurityNamespaceId "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87" -Descriptor @("vssgp.Uy0xLTktMTU1MTM3NDI0NS0yMTkxNDc4NTk1LTU1MDM1MzIxOC0yNDM3MjM2NDgzLTQyMjkyNzUyNDktMC0wLTAtOC04") -Token xyz -confirm:$false -ErrorVariable err -ErrorAction SilentlyContinue
+ $err.count | should be 1
+ $err[0].Exception.Message | Should Be "Unexpected response from REST API."
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/unit/test/Remove-VSTeamWorkItem.Tests.ps1 b/unit/test/Remove-VSTeamWorkItem.Tests.ps1
index 800fb0a2b..7e8635546 100644
--- a/unit/test/Remove-VSTeamWorkItem.Tests.ps1
+++ b/unit/test/Remove-VSTeamWorkItem.Tests.ps1
@@ -1,9 +1,10 @@
Set-StrictMode -Version Latest
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
-
+
Describe 'workitems' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/Set-VSTeamAccount.Tests.ps1 b/unit/test/Set-VSTeamAccount.Tests.ps1
index a7b557b4c..6f7ac6bd5 100644
--- a/unit/test/Set-VSTeamAccount.Tests.ps1
+++ b/unit/test/Set-VSTeamAccount.Tests.ps1
@@ -31,6 +31,10 @@ InModuleScope VSTeam {
]
"@
+ AfterAll {
+ Remove-VSTeamAccount
+ }
+
Context 'You cannot use -UseWindowsAuthentication with Azd' {
# This is only supported on a Windows machine. So we have
# to Mock the call to _isOnWindows so you can develop on a
diff --git a/unit/test/Set-VSTeamPermissionInheritance.Tests.ps1 b/unit/test/Set-VSTeamPermissionInheritance.Tests.ps1
index f804e2615..5c55b79ae 100644
--- a/unit/test/Set-VSTeamPermissionInheritance.Tests.ps1
+++ b/unit/test/Set-VSTeamPermissionInheritance.Tests.ps1
@@ -21,29 +21,30 @@ $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
# Loading System.Web avoids issues finding System.Web.HttpUtility
Add-Type -AssemblyName 'System.Web'
-[VSTeamVersions]::Account = 'https://dev.azure.com/test'
-
-$buildDefresults = Get-Content "$PSScriptRoot\sampleFiles\buildDefAzD.json" -Raw | ConvertFrom-Json
-$releaseDefresults = Get-Content "$PSScriptRoot\sampleFiles\releaseDefAzD.json" -Raw | ConvertFrom-Json
-$gitRepoResult = Get-Content "$PSScriptRoot\sampleFiles\singleGitRepo.json" -Raw | ConvertFrom-Json
-$gitRepoHierarchyUpdateResults = Get-Content "$PSScriptRoot\sampleFiles\gitReopHierarchyQuery_Update.json" -Raw | ConvertFrom-Json
-$buildDefHierarchyUpdateResults = Get-Content "$PSScriptRoot\sampleFiles\buildDefHierarchyQuery_Update.json" -Raw | ConvertFrom-Json
-$accesscontrollistsResult = Get-Content "$PSScriptRoot\sampleFiles\repoAccesscontrollists.json" -Raw | ConvertFrom-Json
-$releaseDefHierarchyUpdateResults = Get-Content "$PSScriptRoot\sampleFiles\releaseDefHierarchyQuery_Update.json" -Raw | ConvertFrom-Json
-
-$singleResult = [PSCustomObject]@{
- name = 'Project'
- description = ''
- url = ''
- id = '123-5464-dee43'
- state = ''
- visibility = ''
- revision = 0
- defaultTeam = [PSCustomObject]@{}
- _links = [PSCustomObject]@{}
-}
-
Describe 'Set-VSTeamPermissionInheritance' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
+ $buildDefresults = Get-Content "$PSScriptRoot\sampleFiles\buildDefAzD.json" -Raw | ConvertFrom-Json
+ $releaseDefresults = Get-Content "$PSScriptRoot\sampleFiles\releaseDefAzD.json" -Raw | ConvertFrom-Json
+ $gitRepoResult = Get-Content "$PSScriptRoot\sampleFiles\singleGitRepo.json" -Raw | ConvertFrom-Json
+ $gitRepoHierarchyUpdateResults = Get-Content "$PSScriptRoot\sampleFiles\gitReopHierarchyQuery_Update.json" -Raw | ConvertFrom-Json
+ $buildDefHierarchyUpdateResults = Get-Content "$PSScriptRoot\sampleFiles\buildDefHierarchyQuery_Update.json" -Raw | ConvertFrom-Json
+ $accesscontrollistsResult = Get-Content "$PSScriptRoot\sampleFiles\repoAccesscontrollists.json" -Raw | ConvertFrom-Json
+ $releaseDefHierarchyUpdateResults = Get-Content "$PSScriptRoot\sampleFiles\releaseDefHierarchyQuery_Update.json" -Raw | ConvertFrom-Json
+
+ $singleResult = [PSCustomObject]@{
+ name = 'Project'
+ description = ''
+ url = ''
+ id = '123-5464-dee43'
+ state = ''
+ visibility = ''
+ revision = 0
+ defaultTeam = [PSCustomObject]@{}
+ _links = [PSCustomObject]@{}
+ }
+
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/Test-VSTeamYamlPipeline.Tests.ps1 b/unit/test/Test-VSTeamYamlPipeline.Tests.ps1
new file mode 100644
index 000000000..cdcaa48f7
--- /dev/null
+++ b/unit/test/Test-VSTeamYamlPipeline.Tests.ps1
@@ -0,0 +1,80 @@
+Set-StrictMode -Version Latest
+
+$here = Split-Path -Parent $MyInvocation.MyCommand.Path
+$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
+
+. "$here/../../Source/Classes/VSTeamVersions.ps1"
+. "$here/../../Source/Classes/VSTeamProjectCache.ps1"
+. "$here/../../Source/Private/applyTypes.ps1"
+. "$here/../../Source/Private/common.ps1"
+. "$here/../../Source/Public/$sut"
+
+$resultsAzD = Get-Content "$PSScriptRoot\sampleFiles\pipelineDefYamlResult.json" -Raw | ConvertFrom-Json
+
+Describe 'Test-VSTeamYamlPipeline' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
+ # 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"
+ $testYamlPath = "$PSScriptRoot\sampleFiles\azure-pipelines.test.yml"
+
+ Context 'Yaml Pipeline Checks AzD Services' {
+ Mock Invoke-RestMethod {
+ # If this test fails uncomment the line below to see how the mock was called.
+ # Write-Host $args
+ # Write-Host $([VSTeamVersions]::Build)
+ # Write-Host $([VSTeamVersions]::Account)
+
+ return $resultsAzD
+ }
+
+ It 'With Pipeline with PipelineID and without extra YAML' {
+ Test-VSTeamYamlPipeline -projectName project -PipelineId 24
+
+ Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
+
+ $Uri -like "*https://dev.azure.com/test/project/_apis/pipelines/24/runs*" -and
+ $Uri -like "*api-version=$([VSTeamVersions]::Build)*" -and
+ $Body -like '*"PreviewRun":*true*' -and
+ $Body -notlike '*YamlOverride*'
+ }
+ }
+
+ It 'With Pipeline with PipelineID and YAML file path' {
+
+ Test-VSTeamYamlPipeline -projectName project -PipelineId 24 -FilePath $testYamlPath
+
+ Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
+
+ $Uri -like "*https://dev.azure.com/test/project/_apis/pipelines/24/runs*" -and
+ $Uri -like "*api-version=$([VSTeamVersions]::Build)*" -and
+ $Body -like '*"PreviewRun":*true*' -and
+ $Body -like '*YamlOverride*'
+ }
+ }
+
+ It 'With Pipeline with PipelineID and YAML code' {
+
+ $yamlOverride = [string](Get-Content -raw $testYamlPath)
+ Test-VSTeamYamlPipeline -projectName project -PipelineId 24 -YamlOverride $yamlOverride
+
+ Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
+
+ $Uri -like "*https://dev.azure.com/test/project/_apis/pipelines/24/runs*" -and
+ $Uri -like "*api-version=$([VSTeamVersions]::Build)*" -and
+ $Body -like '*"PreviewRun":*true*' -and
+ $Body -like '*YamlOverride*'
+ }
+ }
+
+ $yamlResult = Test-VSTeamYamlPipeline -projectName project -PipelineId 24 -FilePath $testYamlPath
+
+ It 'Should create Yaml result' {
+ $yamlResult | Should Not be $null
+ }
+ }
+}
\ No newline at end of file
diff --git a/unit/test/Update-VSTeamAgent.Tests.ps1 b/unit/test/Update-VSTeamAgent.Tests.ps1
new file mode 100644
index 000000000..46973644f
--- /dev/null
+++ b/unit/test/Update-VSTeamAgent.Tests.ps1
@@ -0,0 +1,40 @@
+Set-StrictMode -Version Latest
+
+$here = Split-Path -Parent $MyInvocation.MyCommand.Path
+$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
+
+. "$here/../../Source/Classes/VSTeamVersions.ps1"
+. "$here/../../Source/Classes/VSTeamProjectCache.ps1"
+. "$here/../../Source/Private/common.ps1"
+. "$here/../../Source/Public/$sut"
+
+Describe 'Update-VSTeamAgent' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+ [VSTeamVersions]::DistributedTask = '1.0-unitTest'
+
+ Context 'Update-VSTeamAgent by ID' {
+ Mock Invoke-RestMethod {
+ # If this test fails uncomment the line below to see how the mock was called.
+ # Write-Host $args
+ }
+
+ It 'should update the agent with passed in Id' {
+ Update-VSTeamAgent -Pool 36 -Id 950 -Force
+
+ Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
+ $Method -eq 'Post' -and
+ $Uri -like "*https://dev.azure.com/test/_apis/distributedtask/pools/36/messages*" -and
+ $Uri -like "*api-version=$([VSTeamVersions]::DistributedTask)*" -and
+ $Uri -like "*agentId=950*"
+ }
+ }
+ }
+
+ Context 'Update-VSTeamAgent throws' {
+ Mock Invoke-RestMethod { throw 'boom' }
+
+ It 'should update the agent with passed in Id' {
+ { Update-VSTeamAgent -Pool 36 -Id 950 -Force } | Should Throw
+ }
+ }
+}
\ No newline at end of file
diff --git a/unit/test/Update-VSTeamBuildDefinition.Tests.ps1 b/unit/test/Update-VSTeamBuildDefinition.Tests.ps1
index 3f042b994..c7b257890 100644
--- a/unit/test/Update-VSTeamBuildDefinition.Tests.ps1
+++ b/unit/test/Update-VSTeamBuildDefinition.Tests.ps1
@@ -14,10 +14,11 @@ Describe "Update-VSTeamBuildDefinition" {
Context "AzD" {
# 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'
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
Mock Invoke-RestMethod {
# If this test fails uncomment the line below to see how the mock was called.
- #Write-Host $args
+ # Write-Host $args
return $resultsAzD
}
@@ -50,9 +51,19 @@ Describe "Update-VSTeamBuildDefinition" {
}
Context 'TFS local Auth' {
- Mock Invoke-RestMethod { return $resultsAzD }
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Remove-VSTeamAccount
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
+
Mock _useWindowsAuthenticationOnPremise { return $true }
- [VSTeamVersions]::Account = 'http://localhost:8080/tfs/defaultcollection'
+
+ Mock Invoke-RestMethod {
+ # If this test fails uncomment the line below to see how the mock was called.
+ # Write-Host $args
+
+ return $resultsAzD
+ }
Update-VSTeamBuildDefinition -projectName project -id 2 -inFile 'sampleFiles/builddef.json' -Force
diff --git a/unit/test/Update-VSTeamPullRequest.Tests.ps1 b/unit/test/Update-VSTeamPullRequest.Tests.ps1
index 97ae9f30f..6693bdc73 100644
--- a/unit/test/Update-VSTeamPullRequest.Tests.ps1
+++ b/unit/test/Update-VSTeamPullRequest.Tests.ps1
@@ -5,7 +5,7 @@ InModuleScope VSTeam {
Describe 'Pull Requests' {
. "$PSScriptRoot\mocks\mockProjectNameDynamicParamNoPSet.ps1"
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
# You have to set the version or the api-version will not be added when
# [VSTeamVersions]::Core = ''
diff --git a/unit/test/Update-VSTeamRelease.Tests.ps1 b/unit/test/Update-VSTeamRelease.Tests.ps1
index 700a17209..bb22b8d96 100644
--- a/unit/test/Update-VSTeamRelease.Tests.ps1
+++ b/unit/test/Update-VSTeamRelease.Tests.ps1
@@ -4,23 +4,23 @@ Set-StrictMode -Version Latest
Add-Type -AssemblyName 'System.Web'
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
- [VSTeamVersions]::Release = '1.0-unittest'
-
- $singleResult = [PSCustomObject]@{
- environments = [PSCustomObject]@{}
- variables = [PSCustomObject]@{
- BrowserToUse = [PSCustomObject]@{
- value = "phantomjs"
+ Describe 'Releases' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+ [VSTeamVersions]::Release = '1.0-unittest'
+
+ $singleResult = [PSCustomObject]@{
+ environments = [PSCustomObject]@{}
+ variables = [PSCustomObject]@{
+ BrowserToUse = [PSCustomObject]@{
+ value = "phantomjs"
+ }
+ }
+ _links = [PSCustomObject]@{
+ self = [PSCustomObject]@{}
+ web = [PSCustomObject]@{}
}
}
- _links = [PSCustomObject]@{
- self = [PSCustomObject]@{}
- web = [PSCustomObject]@{}
- }
- }
-
- Describe 'Releases' {
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/accessControlEntry.Tests.ps1 b/unit/test/accessControlEntry.Tests.ps1
index 301239e3c..bef327edf 100644
--- a/unit/test/accessControlEntry.Tests.ps1
+++ b/unit/test/accessControlEntry.Tests.ps1
@@ -2,12 +2,8 @@ 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'
-
$accessControlEntryResult =
-@"
+ @"
{
"count": 1,
"value": [
@@ -22,7 +18,7 @@ InModuleScope VSTeam {
"@ | ConvertFrom-Json
$securityNamespace =
-@"
+ @"
{
"count": 1,
"value": [
@@ -80,6 +76,10 @@ InModuleScope VSTeam {
$securityNamespaceObject = [VSTeamSecurityNamespace]::new($securityNamespace.value)
Describe 'AccessControlEntry VSTS' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' }
+
# You have to set the version or the api-version will not be added when
# [VSTeamVersions]::Core = ''
[VSTeamVersions]::Core = '5.0'
diff --git a/unit/test/accessControlList.Tests.ps1 b/unit/test/accessControlList.Tests.ps1
index 3bf923a24..4c2e7bc17 100644
--- a/unit/test/accessControlList.Tests.ps1
+++ b/unit/test/accessControlList.Tests.ps1
@@ -2,10 +2,6 @@ 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'
-
$accessControlListResult =
@"
{
@@ -154,6 +150,10 @@ InModuleScope VSTeam {
$securityNamespaceObject = [VSTeamSecurityNamespace]::new($securityNamespace.value)
Describe 'AccessControlList VSTS' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# You have to set the version or the api-version will not be added when
# [VSTeamVersions]::Core = ''
[VSTeamVersions]::Core = '5.0'
diff --git a/unit/test/agents.Tests.ps1 b/unit/test/agents.Tests.ps1
index bfb8fdc5a..eeee864ec 100644
--- a/unit/test/agents.Tests.ps1
+++ b/unit/test/agents.Tests.ps1
@@ -1,9 +1,6 @@
Set-StrictMode -Version Latest
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
- [VSTeamVersions]::DistributedTask = '1.0-unitTest'
-
$testAgent = [PSCustomObject]@{
_links = [PSCustomObject]@{}
createdOn = '2018-03-28T16:48:58.317Z'
@@ -19,6 +16,9 @@ InModuleScope VSTeam {
}
Describe 'agents' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+ [VSTeamVersions]::DistributedTask = '1.0-unitTest'
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/buildDefinitions.Tests.ps1 b/unit/test/buildDefinitions.Tests.ps1
index d02ed2f60..99d8fd559 100644
--- a/unit/test/buildDefinitions.Tests.ps1
+++ b/unit/test/buildDefinitions.Tests.ps1
@@ -4,11 +4,11 @@ Set-StrictMode -Version Latest
Add-Type -AssemblyName 'System.Web'
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
-
$resultsVSTS = Get-Content "$PSScriptRoot\sampleFiles\buildDefvsts.json" -Raw | ConvertFrom-Json
Describe 'BuildDefinitions' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
@@ -118,7 +118,7 @@ InModuleScope VSTeam {
Context 'Add-VSTeamBuildDefinition on TFS local Auth' {
Mock Invoke-RestMethod { return $resultsVSTS }
Mock _useWindowsAuthenticationOnPremise { return $true }
- [VSTeamVersions]::Account = 'http://localhost:8080/tfs/defaultcollection'
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
it 'Should add build' {
Add-VSTeamBuildDefinition -projectName project -inFile 'sampleFiles/builddef.json'
@@ -134,7 +134,7 @@ InModuleScope VSTeam {
Context 'Remove-VSTeamBuildDefinition on TFS local Auth' {
Mock Invoke-RestMethod { return $resultsVSTS }
Mock _useWindowsAuthenticationOnPremise { return $true }
- [VSTeamVersions]::Account = 'http://localhost:8080/tfs/defaultcollection'
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
Remove-VSTeamBuildDefinition -projectName project -id 2 -Force
diff --git a/unit/test/builds.Tests.ps1 b/unit/test/builds.Tests.ps1
index 0bb44e3f8..cf048cb68 100644
--- a/unit/test/builds.Tests.ps1
+++ b/unit/test/builds.Tests.ps1
@@ -57,7 +57,7 @@ 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'
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
@@ -354,7 +354,7 @@ InModuleScope VSTeam {
# Remove any previously loaded accounts
Remove-VSTeamAccount
- [VSTeamVersions]::Account = 'http://localhost:8080/tfs/defaultcollection'
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
Context 'Get Build Log with index on TFS local Auth' {
Mock Invoke-RestMethod { return @{ value = @{} } } -Verifiable -ParameterFilter { $Uri -eq "http://localhost:8080/tfs/defaultcollection/project/_apis/build/builds/1/logs/2?api-version=$([VSTeamVersions]::Build)" }
diff --git a/unit/test/classificationNodes.Tests.ps1 b/unit/test/classificationNodes.Tests.ps1
index 77ea93cf7..bb9cdb2ab 100644
--- a/unit/test/classificationNodes.Tests.ps1
+++ b/unit/test/classificationNodes.Tests.ps1
@@ -2,12 +2,8 @@ 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'
-
$classificationNodeResult =
-@"
+ @"
{
"id": 16,
"identifier": "dfa90792-403a-4119-a52b-bd142c08291b",
@@ -81,8 +77,8 @@ InModuleScope VSTeam {
"@ | ConvertFrom-Json
-$withoutChildNode =
-@"
+ $withoutChildNode =
+ @"
{
"count": 2,
"value": [
@@ -125,6 +121,15 @@ $withoutChildNode =
"@ | ConvertFrom-Json
Describe 'ClassificationNodes VSTS' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
+ # Mock the call to Get-Projects by the dynamic parameter for ProjectName
+ Mock Invoke-RestMethod { return @() } -ParameterFilter {
+ $Uri -like "*_apis/projects*"
+ }
+
# You have to set the version or the api-version will not be added when
# [VSTeamVersions]::Core = ''
[VSTeamVersions]::Core = '5.0'
@@ -177,7 +182,7 @@ $withoutChildNode =
Context 'Get-VSTeamClassificationNode by Ids' {
Mock Invoke-RestMethod { return $classificationNodeResult } -Verifiable
- Get-VSTeamClassificationNode -ProjectName "Public Demo" -Ids @(1,2,3,4)
+ Get-VSTeamClassificationNode -ProjectName "Public Demo" -Ids @(1, 2, 3, 4)
It 'Should return Nodes' {
Assert-MockCalled Invoke-RestMethod -Exactly 1 -ParameterFilter {
@@ -191,7 +196,7 @@ $withoutChildNode =
Context 'Get-VSTeamClassificationNode by Ids returns no child node' {
Mock Invoke-RestMethod { return $withoutChildNode } -Verifiable
- Get-VSTeamClassificationNode -ProjectName "Public Demo" -Ids @(43,44)
+ Get-VSTeamClassificationNode -ProjectName "Public Demo" -Ids @(43, 44)
It 'Should return Nodes' {
Assert-MockCalled Invoke-RestMethod -Exactly 1 -ParameterFilter {
diff --git a/unit/test/cloudSubscriptions.Tests.ps1 b/unit/test/cloudSubscriptions.Tests.ps1
index e87246f48..890ffe046 100644
--- a/unit/test/cloudSubscriptions.Tests.ps1
+++ b/unit/test/cloudSubscriptions.Tests.ps1
@@ -8,7 +8,7 @@ InModuleScope VSTeam {
$Uri -like "*_apis/projects*"
}
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
Context 'Get-VSTeamCloudSubscription' {
Mock Invoke-RestMethod {
@@ -32,7 +32,7 @@ InModuleScope VSTeam {
}
Mock _useWindowsAuthenticationOnPremise { return $true }
- [VSTeamVersions]::Account = 'http://localhost:8080/tfs/defaultcollection'
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
Context 'Get-VSTeamCloudSubscription' {
Mock Invoke-RestMethod { return @{value = 'subs'}}
diff --git a/unit/test/common.Tests.ps1 b/unit/test/common.Tests.ps1
index dc0d6d3ae..4c296bbb0 100644
--- a/unit/test/common.Tests.ps1
+++ b/unit/test/common.Tests.ps1
@@ -149,10 +149,11 @@ InModuleScope VSTeam {
}
Context '_getWorkItemTypes' {
- [VSTeamVersions]::Account = $null
+ Mock _getInstance { return $null } -Verifiable
It 'should return empty array' {
_getWorkItemTypes -ProjectName test | Should be @()
+ Assert-VerifiableMock
}
}
diff --git a/unit/test/descriptor.Tests.ps1 b/unit/test/descriptor.Tests.ps1
index 77a014001..2db845911 100644
--- a/unit/test/descriptor.Tests.ps1
+++ b/unit/test/descriptor.Tests.ps1
@@ -2,29 +2,28 @@ 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'
-
$result = Get-Content "$PSScriptRoot\sampleFiles\descriptor.scope.TestProject.json" -Raw | ConvertFrom-Json
Describe "Groups TFS Errors" {
Context 'Get-VSTeamDescriptor' {
- Mock _callAPI { throw 'Should not be called' } -Verifiable
+ Mock _callAPI { throw 'Should not be called' } -Verifiable
- It 'Should throw' {
- Set-VSTeamAPIVersion TFS2017
+ It 'Should throw' {
+ Set-VSTeamAPIVersion TFS2017
- { Get-VSTeamDescriptor -StorageKey '010d06f0-00d5-472a-bb47-58947c230876' } | Should Throw
- }
+ { Get-VSTeamDescriptor -StorageKey '010d06f0-00d5-472a-bb47-58947c230876' } | Should Throw
+ }
- It '_callAPI should not be called' {
- Assert-MockCalled _callAPI -Exactly 0
- }
- }
- }
+ It '_callAPI should not be called' {
+ Assert-MockCalled _callAPI -Exactly 0
+ }
+ }
+ }
Describe 'Descriptor VSTS' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
# You have to set the version or the api-version will not be added when
# [VSTeamVersions]::Graph = ''
diff --git a/unit/test/extensions.tests.ps1 b/unit/test/extensions.tests.ps1
index d4adbf655..a9a28d5d6 100644
--- a/unit/test/extensions.tests.ps1
+++ b/unit/test/extensions.tests.ps1
@@ -1,9 +1,9 @@
Set-StrictMode -Version Latest
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
Describe 'Extension' {
-
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
$results = [PSCustomObject]@{
count = 1
value = [PSCustomObject]@{
diff --git a/unit/test/feeds.Tests.ps1 b/unit/test/feeds.Tests.ps1
index cdf12abf9..ea6465463 100644
--- a/unit/test/feeds.Tests.ps1
+++ b/unit/test/feeds.Tests.ps1
@@ -1,11 +1,11 @@
Set-StrictMode -Version Latest
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
-
$results = Get-Content "$PSScriptRoot\sampleFiles\feeds.json" -Raw | ConvertFrom-Json
Describe 'Feeds' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/gitRepositoryPermissions.Tests.ps1 b/unit/test/gitRepositoryPermissions.Tests.ps1
index 4fed0c7f0..3055e8f96 100644
--- a/unit/test/gitRepositoryPermissions.Tests.ps1
+++ b/unit/test/gitRepositoryPermissions.Tests.ps1
@@ -1,11 +1,6 @@
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'
-
$userSingleResult = Get-Content "$PSScriptRoot\sampleFiles\users.single.json" -Raw | ConvertFrom-Json
$userSingleResultObject = [VSTeamUser]::new($userSingleResult)
@@ -27,7 +22,7 @@ InModuleScope VSTeam {
$projectResultObject = [VSTeamProject]::new($projectResult)
$accessControlEntryResult =
-@"
+ @"
{
"count": 1,
"value": [
@@ -42,6 +37,10 @@ InModuleScope VSTeam {
"@ | ConvertFrom-Json
Describe 'GitRepositoryPermissions VSTS' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# You have to set the version or the api-version will not be added when
# [VSTeamVersions]::Core = ''
[VSTeamVersions]::Core = '5.0'
diff --git a/unit/test/groups.Tests.ps1 b/unit/test/groups.Tests.ps1
index f8ba78906..5f28d611f 100644
--- a/unit/test/groups.Tests.ps1
+++ b/unit/test/groups.Tests.ps1
@@ -1,11 +1,6 @@
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'
-
$projectResult = [PSCustomObject]@{
name = 'Test Project Public'
description = ''
@@ -24,7 +19,11 @@ InModuleScope VSTeam {
# The Graph API is not supported on TFS
Describe "Groups TFS Errors" {
- Context 'Get-VSTeamGroup' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
+ Context 'Get-VSTeamGroup' {
Mock _callAPI { throw 'Should not be called' } -Verifiable
It 'Should throw' {
@@ -40,6 +39,10 @@ InModuleScope VSTeam {
}
Describe 'Groups VSTS' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# You have to set the version or the api-version will not be added when
# [VSTeamVersions]::Graph = ''
[VSTeamVersions]::Graph = '5.0'
@@ -88,7 +91,7 @@ InModuleScope VSTeam {
Context 'Get-VSTeamGroup by subjectTypes' {
Mock Invoke-RestMethod { return $groupListResult } -Verifiable
- Get-VSTeamGroup -SubjectTypes vssgp,aadgp
+ Get-VSTeamGroup -SubjectTypes vssgp, aadgp
It 'Should return groups' {
Assert-MockCalled Invoke-RestMethod -Exactly 1 -ParameterFilter {
@@ -102,7 +105,7 @@ InModuleScope VSTeam {
Context 'Get-VSTeamGroup by subjectTypes and scopeDescriptor' {
Mock Invoke-RestMethod { return $groupListResult } -Verifiable
- Get-VSTeamGroup -ScopeDescriptor scp.ZGU5ODYwOWEtZjRiMC00YWEzLTgzOTEtODI4ZDU2MDI0MjU2 -SubjectTypes vssgp,aadgp
+ Get-VSTeamGroup -ScopeDescriptor scp.ZGU5ODYwOWEtZjRiMC00YWEzLTgzOTEtODI4ZDU2MDI0MjU2 -SubjectTypes vssgp, aadgp
It 'Should return groups' {
Assert-MockCalled Invoke-RestMethod -Exactly 1 -ParameterFilter {
diff --git a/unit/test/membership.Tests.ps1 b/unit/test/membership.Tests.ps1
index 4febc65fd..28dc90128 100644
--- a/unit/test/membership.Tests.ps1
+++ b/unit/test/membership.Tests.ps1
@@ -1,12 +1,11 @@
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'
-
Describe 'Users VSTS' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# You have to set the version or the api-version will not be added when
# [VSTeamVersions]::Graph = ''
[VSTeamVersions]::Graph = '5.0'
diff --git a/unit/test/policies.Tests.ps1 b/unit/test/policies.Tests.ps1
index 4bf840f57..1f0322238 100644
--- a/unit/test/policies.Tests.ps1
+++ b/unit/test/policies.Tests.ps1
@@ -1,16 +1,14 @@
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'
-
- $results = [PSCustomObject]@{
- value = [PSCustomObject]@{ }
- }
-
Describe 'Policies VSTS' {
+ $results = [PSCustomObject]@{
+ value = [PSCustomObject]@{ }
+ }
+
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
diff --git a/unit/test/policyTypes.Tests.ps1 b/unit/test/policyTypes.Tests.ps1
index 43f0105ee..b3e798bac 100644
--- a/unit/test/policyTypes.Tests.ps1
+++ b/unit/test/policyTypes.Tests.ps1
@@ -1,18 +1,16 @@
Set-StrictMode -Version Latest
InModuleScope VSTeam {
+ Describe "Policies VSTS" {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
- # 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'
-
- $results = [PSCustomObject]@{
- value = [PSCustomObject]@{ }
- }
-
- $singleResult = [PSCustomObject]@{ }
+ $results = [PSCustomObject]@{
+ value = [PSCustomObject]@{ }
+ }
- Describe "Policies VSTS" {
+ $singleResult = [PSCustomObject]@{ }
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
diff --git a/unit/test/pools.Tests.ps1 b/unit/test/pools.Tests.ps1
index dba0d22dc..e0d8bc902 100644
--- a/unit/test/pools.Tests.ps1
+++ b/unit/test/pools.Tests.ps1
@@ -1,44 +1,44 @@
Set-StrictMode -Version Latest
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
- [VSTeamVersions]::DistributedTask = '1.0-unitTest'
+ Describe 'pools' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+ [VSTeamVersions]::DistributedTask = '1.0-unitTest'
- $hostedPool = [PSCustomObject]@{
- owner = [PSCustomObject]@{
- displayName = 'Test User'
- id = '1'
- uniqueName = 'test@email.com'
- }
- createdBy = [PSCustomObject]@{
- displayName = 'Test User'
- id = '1'
- uniqueName = 'test@email.com'
+ $hostedPool = [PSCustomObject]@{
+ owner = [PSCustomObject]@{
+ displayName = 'Test User'
+ id = '1'
+ uniqueName = 'test@email.com'
+ }
+ createdBy = [PSCustomObject]@{
+ displayName = 'Test User'
+ id = '1'
+ uniqueName = 'test@email.com'
+ }
+ id = 1
+ size = 1
+ isHosted = $true
+ Name = 'Hosted'
}
- id = 1
- size = 1
- isHosted = $true
- Name = 'Hosted'
- }
- $privatePool = [PSCustomObject]@{
- owner = [PSCustomObject]@{
- displayName = 'Test User'
- id = '1'
- uniqueName = 'test@email.com'
- }
- createdBy = [PSCustomObject]@{
- displayName = 'Test User'
- id = '1'
- uniqueName = 'test@email.com'
+ $privatePool = [PSCustomObject]@{
+ owner = [PSCustomObject]@{
+ displayName = 'Test User'
+ id = '1'
+ uniqueName = 'test@email.com'
+ }
+ createdBy = [PSCustomObject]@{
+ displayName = 'Test User'
+ id = '1'
+ uniqueName = 'test@email.com'
+ }
+ id = 1
+ size = 1
+ isHosted = $false
+ Name = 'Default'
}
- id = 1
- size = 1
- isHosted = $false
- Name = 'Default'
- }
-
- Describe 'pools' {
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/projectPermissions.Tests.ps1 b/unit/test/projectPermissions.Tests.ps1
index 54ea75777..16b80d774 100644
--- a/unit/test/projectPermissions.Tests.ps1
+++ b/unit/test/projectPermissions.Tests.ps1
@@ -1,33 +1,33 @@
Set-StrictMode -Version Latest
InModuleScope VSTeam {
+ Describe 'ProjectPermissions VSTS' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
+ $userSingleResult = Get-Content "$PSScriptRoot\sampleFiles\users.single.json" -Raw | ConvertFrom-Json
+ $userSingleResultObject = [VSTeamUser]::new($userSingleResult)
+
+ $groupSingleResult = Get-Content "$PSScriptRoot\sampleFiles\groupsSingle.json" -Raw | ConvertFrom-Json
+ $groupSingleResultObject = [VSTeamGroup]::new($groupSingleResult)
+
+ $projectResult = [PSCustomObject]@{
+ name = 'Test Project Public'
+ description = ''
+ url = ''
+ id = '010d06f0-00d5-472a-bb47-58947c230876'
+ state = ''
+ visibility = ''
+ revision = 0
+ defaultTeam = [PSCustomObject]@{}
+ _links = [PSCustomObject]@{}
+ }
- # 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'
-
- $userSingleResult = Get-Content "$PSScriptRoot\sampleFiles\users.single.json" -Raw | ConvertFrom-Json
- $userSingleResultObject = [VSTeamUser]::new($userSingleResult)
-
- $groupSingleResult = Get-Content "$PSScriptRoot\sampleFiles\groupsSingle.json" -Raw | ConvertFrom-Json
- $groupSingleResultObject = [VSTeamGroup]::new($groupSingleResult)
-
- $projectResult = [PSCustomObject]@{
- name = 'Test Project Public'
- description = ''
- url = ''
- id = '010d06f0-00d5-472a-bb47-58947c230876'
- state = ''
- visibility = ''
- revision = 0
- defaultTeam = [PSCustomObject]@{}
- _links = [PSCustomObject]@{}
- }
-
- $projectResultObject = [VSTeamProject]::new($projectResult)
+ $projectResultObject = [VSTeamProject]::new($projectResult)
- $accessControlEntryResult =
-@"
+ $accessControlEntryResult =
+ @"
{
"count": 1,
"value": [
@@ -40,8 +40,7 @@ InModuleScope VSTeam {
]
}
"@ | ConvertFrom-Json
-
- Describe 'ProjectPermissions VSTS' {
+
# You have to set the version or the api-version will not be added when
# [VSTeamVersions]::Core = ''
[VSTeamVersions]::Core = '5.0'
diff --git a/unit/test/projects.Tests.ps1 b/unit/test/projects.Tests.ps1
index 1b0a01bc3..46c0cfb2e 100644
--- a/unit/test/projects.Tests.ps1
+++ b/unit/test/projects.Tests.ps1
@@ -1,9 +1,9 @@
Set-StrictMode -Version Latest
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
-
Describe 'Project' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
. "$PSScriptRoot\mocks\mockProjectNameDynamicParam.ps1"
. "$PSScriptRoot\mocks\mockProcessNameDynamicParam.ps1"
@@ -21,7 +21,7 @@ InModuleScope VSTeam {
Mock Show-Browser
It 'Show call open' {
- Show-VSTeamProject -ProjectName MyProject
+ Show-VSTeamProject -ProjectName ShowProject
Assert-MockCalled Show-Browser
}
@@ -31,7 +31,7 @@ InModuleScope VSTeam {
Mock Show-Browser
It 'Show call open' {
- Show-VSTeamProject MyProject
+ Show-VSTeamProject ShowProject
Assert-MockCalled Show-Browser
}
@@ -330,14 +330,18 @@ InModuleScope VSTeam {
}
Context 'Set-VSTeamDefaultProject' {
+ AfterAll {
+ $Global:PSDefaultParameterValues.Remove("*:projectName")
+ }
+
It 'should set default project' {
- Set-VSTeamDefaultProject 'MyProject'
+ Set-VSTeamDefaultProject 'DefaultProject'
- $Global:PSDefaultParameterValues['*:projectName'] | Should be 'MyProject'
+ $Global:PSDefaultParameterValues['*:projectName'] | Should be 'DefaultProject'
}
It 'should update default project' {
- $Global:PSDefaultParameterValues['*:projectName'] = 'MyProject'
+ $Global:PSDefaultParameterValues['*:projectName'] = 'DefaultProject'
Set-VSTeamDefaultProject -Project 'NextProject'
@@ -346,6 +350,10 @@ InModuleScope VSTeam {
}
Context 'Set-VSTeamDefaultProject on Non Windows' {
+ AfterAll {
+ $Global:PSDefaultParameterValues.Remove("*:projectName")
+ }
+
Mock _isOnWindows { return $false } -Verifiable
It 'should set default project' {
@@ -357,6 +365,10 @@ InModuleScope VSTeam {
}
Context 'Set-VSTeamDefaultProject As Admin on Windows' {
+ AfterAll {
+ $Global:PSDefaultParameterValues.Remove("*:projectName")
+ }
+
Mock _isOnWindows { return $true }
Mock _testAdministrator { return $true } -Verifiable
@@ -369,6 +381,10 @@ InModuleScope VSTeam {
}
Context 'Clear-VSTeamDefaultProject on Non Windows' {
+ AfterAll {
+ $Global:PSDefaultParameterValues.Remove("*:projectName")
+ }
+
Mock _isOnWindows { return $false } -Verifiable
It 'should clear default project' {
@@ -381,6 +397,10 @@ InModuleScope VSTeam {
}
Context 'Clear-VSTeamDefaultProject as Non-Admin on Windows' {
+ AfterAll {
+ $Global:PSDefaultParameterValues.Remove("*:projectName")
+ }
+
Mock _isOnWindows { return $true }
Mock _testAdministrator { return $false }
@@ -394,6 +414,10 @@ InModuleScope VSTeam {
}
Context 'Clear-VSTeamDefaultProject as Admin on Windows' {
+ AfterAll {
+ $Global:PSDefaultParameterValues.Remove("*:projectName")
+ }
+
Mock _isOnWindows { return $true }
Mock _testAdministrator { return $true } -Verifiable
diff --git a/unit/test/pullrequest.Tests.ps1 b/unit/test/pullrequest.Tests.ps1
index e8c52aa64..e43b98c54 100644
--- a/unit/test/pullrequest.Tests.ps1
+++ b/unit/test/pullrequest.Tests.ps1
@@ -5,7 +5,7 @@ InModuleScope VSTeam {
Describe 'Pull Requests' {
. "$PSScriptRoot\mocks\mockProjectNameDynamicParamNoPSet.ps1"
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
# You have to set the version or the api-version will not be added when
# [VSTeamVersions]::Core = ''
@@ -36,7 +36,7 @@ InModuleScope VSTeam {
Show-VSTeamPullRequest -Id 1
Assert-MockCalled Show-Browser -Exactly -Scope It -Times 1 -ParameterFilter {
- $url -eq "$([VSTeamVersions]::Account)/testproject/_git/testreponame/pullrequest/1"
+ $url -eq "https://dev.azure.com/test/testproject/_git/testreponame/pullrequest/1"
}
}
@@ -57,7 +57,7 @@ InModuleScope VSTeam {
Get-VSTeamPullRequest
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/git/pullRequests?api-version=$([VSTeamVersions]::Git)"
+ $Uri -eq "https://dev.azure.com/test/_apis/git/pullRequests?api-version=$([VSTeamVersions]::Git)"
}
}
@@ -68,7 +68,7 @@ InModuleScope VSTeam {
Get-VSTeamPullRequest -ProjectName testproject
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/testproject/_apis/git/pullRequests?api-version=$([VSTeamVersions]::Git)"
+ $Uri -eq "https://dev.azure.com/test/testproject/_apis/git/pullRequests?api-version=$([VSTeamVersions]::Git)"
}
}
@@ -79,7 +79,7 @@ InModuleScope VSTeam {
Get-VSTeamPullRequest -ProjectName testproject
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/testproject/_apis/git/pullRequests?api-version=$([VSTeamVersions]::Git)"
+ $Uri -eq "https://dev.azure.com/test/testproject/_apis/git/pullRequests?api-version=$([VSTeamVersions]::Git)"
}
}
@@ -89,7 +89,7 @@ InModuleScope VSTeam {
Get-VSTeamPullRequest -Id 1
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/git/pullRequests/1?api-version=$([VSTeamVersions]::Git)"
+ $Uri -eq "https://dev.azure.com/test/_apis/git/pullRequests/1?api-version=$([VSTeamVersions]::Git)"
}
}
diff --git a/unit/test/queues.Tests.ps1 b/unit/test/queues.Tests.ps1
index 753669c03..5f13cbf32 100644
--- a/unit/test/queues.Tests.ps1
+++ b/unit/test/queues.Tests.ps1
@@ -1,9 +1,9 @@
Set-StrictMode -Version Latest
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
-
Describe 'Queues' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/refs.Tests.ps1 b/unit/test/refs.Tests.ps1
index a918fe81f..424a7f389 100644
--- a/unit/test/refs.Tests.ps1
+++ b/unit/test/refs.Tests.ps1
@@ -1,24 +1,23 @@
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'
-
- $results = [PSCustomObject]@{
- value = [PSCustomObject]@{
- objectId = '6f365a7143e492e911c341451a734401bcacadfd'
- name = 'refs/heads/master'
- creator = [PSCustomObject]@{
- displayName = 'Microsoft.VisualStudio.Services.TFS'
- id = '1'
- uniqueName = 'some@email.com'
+ Describe "Git VSTS" {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
+ $results = [PSCustomObject]@{
+ value = [PSCustomObject]@{
+ objectId = '6f365a7143e492e911c341451a734401bcacadfd'
+ name = 'refs/heads/master'
+ creator = [PSCustomObject]@{
+ displayName = 'Microsoft.VisualStudio.Services.TFS'
+ id = '1'
+ uniqueName = 'some@email.com'
+ }
}
}
- }
-
- Describe "Git VSTS" {
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/release.Tests.ps1 b/unit/test/release.Tests.ps1
index be414c6d0..c1750445e 100644
--- a/unit/test/release.Tests.ps1
+++ b/unit/test/release.Tests.ps1
@@ -4,23 +4,23 @@ Set-StrictMode -Version Latest
Add-Type -AssemblyName 'System.Web'
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
- [VSTeamVersions]::Release = '1.0-unittest'
-
- $singleResult = [PSCustomObject]@{
- environments = [PSCustomObject]@{}
- variables = [PSCustomObject]@{
- BrowserToUse = [PSCustomObject]@{
- value = "phantomjs"
+ Describe 'Releases' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+ [VSTeamVersions]::Release = '1.0-unittest'
+
+ $singleResult = [PSCustomObject]@{
+ environments = [PSCustomObject]@{}
+ variables = [PSCustomObject]@{
+ BrowserToUse = [PSCustomObject]@{
+ value = "phantomjs"
+ }
+ }
+ _links = [PSCustomObject]@{
+ self = [PSCustomObject]@{}
+ web = [PSCustomObject]@{}
}
}
- _links = [PSCustomObject]@{
- self = [PSCustomObject]@{}
- web = [PSCustomObject]@{}
- }
- }
-
- Describe 'Releases' {
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/releaseDefinitions.Tests.ps1 b/unit/test/releaseDefinitions.Tests.ps1
index 6f8bd743a..776b47a41 100644
--- a/unit/test/releaseDefinitions.Tests.ps1
+++ b/unit/test/releaseDefinitions.Tests.ps1
@@ -4,25 +4,25 @@ Set-StrictMode -Version Latest
Add-Type -AssemblyName 'System.Web'
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
- [VSTeamVersions]::Release = '1.0-unittest'
-
- $results = [PSCustomObject]@{
- value = [PSCustomObject]@{
- queue = [PSCustomObject]@{ name = 'Default' }
- _links = [PSCustomObject]@{
- self = [PSCustomObject]@{}
- web = [PSCustomObject]@{}
+ Describe 'ReleaseDefinitions' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+ [VSTeamVersions]::Release = '1.0-unittest'
+
+ $results = [PSCustomObject]@{
+ value = [PSCustomObject]@{
+ queue = [PSCustomObject]@{ name = 'Default' }
+ _links = [PSCustomObject]@{
+ self = [PSCustomObject]@{}
+ web = [PSCustomObject]@{}
+ }
+ retentionPolicy = [PSCustomObject]@{}
+ lastRelease = [PSCustomObject]@{}
+ artifacts = [PSCustomObject]@{}
+ modifiedBy = [PSCustomObject]@{ name = 'project' }
+ createdBy = [PSCustomObject]@{ name = 'test'}
}
- retentionPolicy = [PSCustomObject]@{}
- lastRelease = [PSCustomObject]@{}
- artifacts = [PSCustomObject]@{}
- modifiedBy = [PSCustomObject]@{ name = 'project' }
- createdBy = [PSCustomObject]@{ name = 'test'}
}
- }
-
- Describe 'ReleaseDefinitions' {
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
@@ -74,7 +74,7 @@ InModuleScope VSTeam {
Context 'Add-VSTeamReleaseDefinition on TFS local Auth' {
Mock Invoke-RestMethod { return $results }
Mock _useWindowsAuthenticationOnPremise { return $true }
- [VSTeamVersions]::Account = 'http://localhost:8080/tfs/defaultcollection'
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
it 'Should add Release' {
Add-VSTeamReleaseDefinition -projectName project -inFile 'Releasedef.json'
@@ -90,7 +90,7 @@ InModuleScope VSTeam {
Context 'Remove-VSTeamReleaseDefinition on TFS local Auth' {
Mock Invoke-RestMethod { return $results }
Mock _useWindowsAuthenticationOnPremise { return $true }
- [VSTeamVersions]::Account = 'http://localhost:8080/tfs/defaultcollection'
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
Remove-VSTeamReleaseDefinition -projectName project -id 2 -Force
diff --git a/unit/test/repositories.Tests.ps1 b/unit/test/repositories.Tests.ps1
index a255f91ae..20f35caa9 100644
--- a/unit/test/repositories.Tests.ps1
+++ b/unit/test/repositories.Tests.ps1
@@ -1,11 +1,6 @@
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'
-
$results = [PSCustomObject]@{
value = [PSCustomObject]@{
id = ''
@@ -45,8 +40,12 @@ InModuleScope VSTeam {
visibility = ''
}
}
-
+
Describe "Git VSTS" {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
@@ -153,6 +152,8 @@ InModuleScope VSTeam {
}
Describe "Git TFS" {
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
@@ -160,8 +161,6 @@ InModuleScope VSTeam {
Mock _useWindowsAuthenticationOnPremise { return $true }
- [VSTeamVersions]::Account = 'http://localhost:8080/tfs/defaultcollection'
-
Context 'Get-VSTeamGitRepository no parameters' {
Mock Invoke-RestMethod { return $results } -Verifiable
diff --git a/unit/test/sampleFiles/azure-pipelines.test.yml b/unit/test/sampleFiles/azure-pipelines.test.yml
new file mode 100644
index 000000000..1c09aebad
--- /dev/null
+++ b/unit/test/sampleFiles/azure-pipelines.test.yml
@@ -0,0 +1,32 @@
+name: Test-Yaml-Pipeline
+
+trigger:
+- master
+
+resources:
+- repo: self
+
+stages:
+- stage: Build
+ displayName: Build Stage
+
+ jobs:
+
+ - job: Windows_Phase
+ displayName: Build Windows
+ pool:
+ vmImage: 'windows-latest'
+
+ steps:
+ - task: CopyFiles@2
+ displayName: 'Copy Module to Artifacts Folder'
+ inputs:
+ Contents: '**'
+ TargetFolder: '$(build.artifactstagingdirectory)'
+ flattenFolders: false
+
+ - task: PublishPipelineArtifact@1
+ displayName: 'Publish Module'
+ inputs:
+ targetPath: '$(Build.ArtifactStagingDirectory)'
+ artifact: 'module'
diff --git a/unit/test/sampleFiles/pipelineDefYamlResult.json b/unit/test/sampleFiles/pipelineDefYamlResult.json
new file mode 100644
index 000000000..cda758bf5
--- /dev/null
+++ b/unit/test/sampleFiles/pipelineDefYamlResult.json
@@ -0,0 +1,50 @@
+{
+ "_links": {
+ "self": {
+ "href": "https://dev.azure.com/testorg/7f3c0007-705f-4e27-a2b7-0d6acfe16adf/_apis/pipelines/25/runs/-1"
+ },
+ "web": {
+ "href": "https://dev.azure.com/testorg/7f3c0007-705f-4e27-a2b7-0d6acfe16adf/_build/results?buildId=-1"
+ },
+ "pipeline.web": {
+ "href": "https://dev.azure.com/testorg/7f3c0007-705f-4e27-a2b7-0d6acfe16adf/_build/definition?definitionId=25"
+ },
+ "pipeline": {
+ "href": "https://dev.azure.com/testorg/7f3c0007-705f-4e27-a2b7-0d6acfe16adf/_apis/pipelines/25?revision=1"
+ }
+ },
+ "pipeline": {
+ "url": "https://dev.azure.com/testorg/7f3c0007-705f-4e27-a2b7-0d6acfe16adf/_apis/pipelines/25?revision=1",
+ "id": 25,
+ "revision": 1,
+ "name": "preview",
+ "folder": "/"
+ },
+ "state": "unknown",
+ "url": "https://dev.azure.com/testorg/7f3c0007-705f-4e27-a2b7-0d6acfe16adf/_apis/pipelines/25/runs/-1",
+ "finalYaml": "name: $(Build.BuildID)\r\ntrigger:\r\n branches:\r\n include:\r\n - master\r\nresources:\r\n repositories:\r\n - repository: self\r\nvariables:\r\n- name: Folder\r\n value: dist\r\n- name: TEAM_CIBUILD\r\n value: true\r\nstages:\r\n- stage: Build\r\n displayName: Build Stage\r\n jobs:\r\n - job: Windows_Phase\r\n displayName: Build Windows\r\n pool:\r\n vmImage: windows-latest\r\n steps:\r\n - task: PowerShell@2\r\n displayName: Install PSScriptAnalyzer\r\n inputs:\r\n targetType: inline\r\n script: Install-Module -Name PSScriptAnalyzer -Repository PSGallery -Force -Scope CurrentUser -Verbose\r\n - task: PowerShell@2\r\n displayName: Run Static Code Analysis\r\n inputs:\r\n targetType: inline\r\n script: \u003e\r\n # Has to happen in this task for it to take effect\r\n\r\n # Load the psd1 file so you can read the required modules and import them\r\n\r\n
+ $manifest = Import-PowerShellDataFile .\\dist\\*.psd1\r\n\r\n\r\n # Import each module\r\n\r\n $manifest.RequiredModules | ForEach-Object { Import-Module -Name $_ }\r\n\r\n\r\n $r = Invoke-ScriptAnalyzer -Path ./dist -Recurse | Where-Object severity -ne \"Information\"\r\n\r\n $r | ForEach-Object {Write-Host \"##vso[task.logissue type=$($_.Severity);sourcepath=$($_.ScriptPath);linenumber=$($_.Line);columnnumber=$($_.Column);]$($_.Message)\"}\r\n
+- task: CopyFiles@2\r\n displayName: Copy Module to Artifacts Folder\r\n inputs:\r\n Contents: \u003e\r\n README.md\r\n\r\n .gitignore\r\n\r\n dist\\**\r\n TargetFolder: $(build.artifactstagingdirectory)/VSTeam\r\n flattenFolders: false\r\n condition: and(succeeded(), eq(variables[\u0027System.PullRequest.IsFork\u0027], false))\r\n - task: PublishPipelineArtifact@1\r\n displayName: Publish Module\r\n inputs:\r\n
+ targetPath: $(Build.ArtifactStagingDirectory)/VSTeam\r\n artifact: module\r\n condition: and(succeeded(), eq(variables[\u0027System.PullRequest.IsFork\u0027], false))\r\n - task: CopyFiles@2\r\n displayName: Copy Integration Tests Artifacts Folder\r\n inputs:\r\n Contents: \u003e\r\n dist\\*.psd1\r\n\r\n integration\\**\r\n TargetFolder: $(build.artifactstagingdirectory)/Tests\r\n condition: and(succeeded(), eq(variables[\u0027System.PullRequest.IsFork\u0027], false))\r\n - task: PublishPipelineArtifact@1\r\n displayName: Publish Tests\r\n inputs:\r\n targetPath: $(Build.ArtifactStagingDirectory)/Tests\r\n artifact: test\r\n condition: and(succeeded(), eq(variables[\u0027System.PullRequest.IsFork\u0027], false))\r\n- stage: Package\r\n displayName: Package Management\r\n dependsOn:\r\n - Build\r\n condition: and(succeeded(), eq(variables[\u0027System.PullRequest.IsFork\u0027], false))\r\n jobs:\r\n - deployment: Deploy\r\n displayName: Package Management\r\n pool:\r\n vmImage: ubuntu-16.04\r\n environment:\r\n name: Default\r\n strategy:\r\n runOnce:\r\n deploy:\r\n steps:\r\n - task: NuGetToolInstaller@0\r\n displayName: Install NuGet 5.2.0\r\n inputs:\r\n versionSpec: 5.2.0\r\n - task: PowerShell@2\r\n displayName: Install Module Dependencies\r\n
+ inputs:\r\n targetType: inline\r\n script: \u003e\r\n # Load the psd1 file so you can read the required modules and install them\r\n\r\n $manifest = Import-PowerShellDataFile .\\$(Folder)\\*.psd1\r\n\r\n\r\n # Install each module\r\n\r\n $manifest.RequiredModules | ForEach-Object { Install-Module -Name $_ -Repository PSGallery -F -Scope CurrentUser }\r\n workingDirectory: $(Pipeline.Workspace)/Module\r\n - task: PowerShell@2\r\n displayName: Compute Version Number\r\n inputs:\r\n targetType: inline\r\n script: \u003e\r\n # Load the psd1 file so you can
+read the version\r\n\r\n $manifest = Import-PowerShellDataFile .\\$(Folder)\\*.psd1\r\n\r\n\r\n Write-Host \"##vso[task.setvariable variable=PACKAGE_VERSION;isOutput=false]$($manifest.ModuleVersion).$(Build.BuildId)\"\r\n workingDirectory: $(Pipeline.Workspace)/Module\r\n - task: PowerShell@2\r\n displayName: Create NuSpec from PSD1\r\n inputs:\r\n targetType: inline\r\n script: \u003e\r\n
+ Install-Module -Name Trackyon.Nuget -Scope CurrentUser -Force -Verbose\r\n\r\n ConvertTo-NuSpec -Path ./$(Folder)/VSTeam.psd1\r\n workingDirectory: $(Pipeline.Workspace)/Module\r\n - task: NuGetCommand@2\r\n displayName: Pack Module\r\n inputs:\r\n command: pack\r\n packagesToPack: $(Pipeline.Workspace)/Module/$(Folder)/VSTeam.nuspec\r\n packDestination: $(Pipeline.Workspace)/Module/$(Folder)\r\n versioningScheme: byEnvVar\r\n versionEnvVar: PACKAGE_VERSION\r\n - task: NuGetCommand@2\r\n displayName: Push Module\r\n inputs:\r\n command: push\r\n
+ packagesToPush: $(Pipeline.Workspace)/Module/$(Folder)/*.nupkg\r\n publishVstsFeed: vsteam\r\n allowPackageConflicts: true\r\n- stage: Production\r\n displayName: PowerShell Gallery / GitHub Release\r\n jobs:\r\n
+- deployment: Deploy\r\n displayName: PowerShell Gallery / GitHub Release\r\n pool:\r\n vmImage: windows-latest\r\n environment:\r\n name: PowerShell Gallery\r\n strategy:\r\n runOnce:\r\n deploy:\r\n steps:\r\n - task: NuGetToolInstaller@0\r\n displayName: Install NuGet 5.2.0\r\n inputs:\r\n versionSpec: 5.2.0\r\n - task: PowerShell@2\r\n displayName: Install Module Dependencies\r\n inputs:\r\n targetType: inline\r\n script: \u003e\r\n # Load the psd1 file so you can read the required modules and install them\r\n\r\n $manifest = Import-PowerShellDataFile .\\$(Folder)\\*.psd1\r\n\r\n\r\n # Install each module\r\n\r\n $manifest.RequiredModules | ForEach-Object { Install-Module -Name $_ -Repository PSGallery -F -Scope CurrentUser }\r\n workingDirectory: $(Pipeline.Workspace)/Module\r\n - task: PowerShell@2\r\n displayName: Create NuSpec from PSD1\r\n inputs:\r\n targetType: inline\r\n script: \u003e\r\n Install-Module -Name Trackyon.Nuget -Scope CurrentUser -Force -Verbose\r\n\r\n ConvertTo-NuSpec -Path ./$(Folder)/VSTeam.psd1\r\n workingDirectory: $(Pipeline.Workspace)/Module\r\n - task: NuGetCommand@2\r\n displayName: Pack Module\r\n inputs:\r\n command: pack\r\n packagesToPack: $(Pipeline.Workspace)/Module/$(Folder)/VSTeam.nuspec\r\n packDestination: $(Pipeline.Workspace)/Module/$(Folder)\r\n - task: NuGetCommand@2\r\n displayName: Push Module\r\n inputs:\r\n command: push\r\n packagesToPush: $(Pipeline.Workspace)/Module/$(Folder)/*.nupkg\r\n nuGetFeedType: external\r\n publishFeedCredentials: PowerShell Gallery\r\n - task: GithubRelease@0\r\n displayName: Create GitHub Release\r\n inputs:\r\n gitHubConnection: Darquewarrior\r\n repositoryName: DarqueWarrior/vsteam\r\n tagSource: manual\r\n tag: v$(PACKAGE_VERSION)\r\n addChangeLog: true\r\n compareWith: lastFullRelease\r\n assets: \u003e\r\n $(Pipeline.Workspace)/Module/$(Folder)/*.nupkg\r\n\n",
+ "id": -1,
+ "name": null,
+ "links": {
+ "self": {
+ "href": "https://dev.azure.com/testorg/7f3c0007-705f-4e27-a2b7-0d6acfe16adf/_apis/pipelines/25/runs/-1"
+ },
+ "web": {
+ "href": "https://dev.azure.com/testorg/7f3c0007-705f-4e27-a2b7-0d6acfe16adf/_build/results?buildId=-1"
+ },
+ "pipeline.web": {
+ "href": "https://dev.azure.com/testorg/7f3c0007-705f-4e27-a2b7-0d6acfe16adf/_build/definition?definitionId=25"
+ },
+ "pipeline": {
+ "href": "https://dev.azure.com/razorspoint/7f3c0007-705f-4e27-a2b7-0d6acfe16adf/_apis/pipelines/25?revision=1"
+ }
+ }
+}
\ No newline at end of file
diff --git a/unit/test/securityNamespace.Tests.ps1 b/unit/test/securityNamespace.Tests.ps1
index 57a6b7c47..444d814b5 100644
--- a/unit/test/securityNamespace.Tests.ps1
+++ b/unit/test/securityNamespace.Tests.ps1
@@ -1,15 +1,11 @@
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'
-
- $securityNamespaceListResult = Get-Content "$PSScriptRoot\sampleFiles\securityNamespaces.json" -Raw | ConvertFrom-Json
- $securityNamespaceSingleResult = Get-Content "$PSScriptRoot\sampleFiles\securityNamespace.single.json" -Raw | ConvertFrom-Json
-
Describe "SecurityNamespace TFS Errors" {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
@@ -30,8 +26,14 @@ InModuleScope VSTeam {
}
}
-
Describe 'SecurityNamespace VSTS' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
+ $securityNamespaceListResult = Get-Content "$PSScriptRoot\sampleFiles\securityNamespaces.json" -Raw | ConvertFrom-Json
+ $securityNamespaceSingleResult = Get-Content "$PSScriptRoot\sampleFiles\securityNamespace.single.json" -Raw | ConvertFrom-Json
+
# You have to set the version or the api-version will not be added when
# [VSTeamVersions]::Core = ''
Set-VSTeamAPIVersion AzD
diff --git a/unit/test/serviceendpoints.Tests.ps1 b/unit/test/serviceendpoints.Tests.ps1
index 46560a6dc..0cb3a6112 100644
--- a/unit/test/serviceendpoints.Tests.ps1
+++ b/unit/test/serviceendpoints.Tests.ps1
@@ -1,9 +1,9 @@
Set-StrictMode -Version Latest
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
-
Describe 'ServiceEndpoints TFS2017 throws' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
@@ -27,6 +27,8 @@ InModuleScope VSTeam {
}
Describe 'ServiceEndpoints TFS' {
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
@@ -53,7 +55,7 @@ InModuleScope VSTeam {
Get-VSTeamServiceEndpoint -projectName project -Verbose
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
- $Uri -eq "https://dev.azure.com/test/project/_apis/distributedtask/serviceendpoints?api-version=$([VSTeamVersions]::DistributedTask)"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/project/_apis/distributedtask/serviceendpoints?api-version=$([VSTeamVersions]::DistributedTask)"
}
}
}
@@ -65,7 +67,7 @@ InModuleScope VSTeam {
Remove-VSTeamServiceEndpoint -projectName project -id 5 -Force
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
- $Uri -eq "https://dev.azure.com/test/project/_apis/distributedtask/serviceendpoints/5?api-version=$([VSTeamVersions]::DistributedTask)" -and
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/project/_apis/distributedtask/serviceendpoints/5?api-version=$([VSTeamVersions]::DistributedTask)" -and
$Method -eq 'Delete'
}
}
@@ -232,6 +234,8 @@ InModuleScope VSTeam {
}
Describe 'ServiceEndpoints VSTS' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
. "$PSScriptRoot\mocks\mockProjectNameDynamicParamNoPSet.ps1"
[VSTeamVersions]::ServiceFabricEndpoint = '4.1-preview'
diff --git a/unit/test/serviceendpointsTypes.Tests.ps1 b/unit/test/serviceendpointsTypes.Tests.ps1
index 7b9650b62..4aae94c28 100644
--- a/unit/test/serviceendpointsTypes.Tests.ps1
+++ b/unit/test/serviceendpointsTypes.Tests.ps1
@@ -1,11 +1,11 @@
Set-StrictMode -Version Latest
InModuleScope VSTeam {
- $sampleFile = "$PSScriptRoot\sampleFiles\serviceEndpointTypeSample.json"
-
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
-
Describe 'serviceendpointTypes' {
+ $sampleFile = "$PSScriptRoot\sampleFiles\serviceEndpointTypeSample.json"
+
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/taskGroups.Tests.ps1 b/unit/test/taskGroups.Tests.ps1
index d149782ad..59c3bbb43 100644
--- a/unit/test/taskGroups.Tests.ps1
+++ b/unit/test/taskGroups.Tests.ps1
@@ -1,14 +1,14 @@
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' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/project*"
@@ -62,7 +62,7 @@ InModuleScope VSTeam {
$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)"
+ $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.
@@ -103,11 +103,11 @@ InModuleScope VSTeam {
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 {
+ 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"
- }
+ }
}
}
@@ -133,11 +133,11 @@ InModuleScope VSTeam {
Update-VSTeamTaskGroup -ProjectName $projectName -InFile $taskGroupJson -Id $taskGroupToUpdate.id
- Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
+ 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"
- }
+ }
}
}
}
diff --git a/unit/test/team.Tests.ps1 b/unit/test/team.Tests.ps1
index 860e0bfed..936c88dd8 100644
--- a/unit/test/team.Tests.ps1
+++ b/unit/test/team.Tests.ps1
@@ -10,7 +10,7 @@ InModuleScope VSTeam {
Mock Write-Host
Context 'Invoke-VSTeamRequest Options' {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
Mock Invoke-RestMethod { Write-Host $args }
Invoke-VSTeamRequest -Method Options
@@ -21,7 +21,7 @@ InModuleScope VSTeam {
}
Context 'Invoke-VSTeamRequest Release' {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
Mock Invoke-RestMethod { Write-Host $args } -Verifiable
Invoke-VSTeamRequest -Area release -Resource releases -Id 1 -SubDomain vsrm -Version '4.1-preview' -ProjectName testproject -JSON
@@ -32,7 +32,7 @@ InModuleScope VSTeam {
}
Context 'Invoke-VSTeamRequest AdditionalHeaders' {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
Mock Invoke-RestMethod { return @() } -Verifiable -ParameterFilter {
$Headers["Test"] -eq 'Test'
}
@@ -54,14 +54,18 @@ InModuleScope VSTeam {
. "$PSScriptRoot\mocks\mockProjectDynamicParamMandatoryFalse.ps1"
Context 'Get-VSTeamInfo' {
+ AfterAll {
+ $Global:PSDefaultParameterValues.Remove("*:projectName")
+ }
+
It 'should return account and default project' {
[VSTeamVersions]::Account = "mydemos"
- $Global:PSDefaultParameterValues['*:projectName'] = 'MyProject'
+ $Global:PSDefaultParameterValues['*:projectName'] = 'TestProject'
$info = Get-VSTeamInfo
$info.Account | Should Be "mydemos"
- $info.DefaultProject | Should Be "MyProject"
+ $info.DefaultProject | Should Be "TestProject"
}
}
@@ -91,7 +95,7 @@ InModuleScope VSTeam {
Context 'Get-VSTeamOption' {
# 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'
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
Mock Invoke-RestMethod { return @{
count = 1
diff --git a/unit/test/teammembers.Tests.ps1 b/unit/test/teammembers.Tests.ps1
index 0580bcd10..32642e942 100644
--- a/unit/test/teammembers.Tests.ps1
+++ b/unit/test/teammembers.Tests.ps1
@@ -1,9 +1,9 @@
Set-StrictMode -Version Latest
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
-
Describe "TeamMembers" {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
. "$PSScriptRoot\mocks\mockProjectNameDynamicParam.ps1"
Context 'Get-VSTeamMember for specific project and team' {
diff --git a/unit/test/teams.Tests.ps1 b/unit/test/teams.Tests.ps1
index 87958e7cd..396ceb3b7 100644
--- a/unit/test/teams.Tests.ps1
+++ b/unit/test/teams.Tests.ps1
@@ -1,8 +1,6 @@
Set-StrictMode -Version Latest
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
-
$results = [PSCustomObject]@{
value = [PSCustomObject]@{
id = '6f365a7143e492e911c341451a734401bcacadfd'
@@ -16,8 +14,10 @@ InModuleScope VSTeam {
name = 'refs/heads/master'
description = 'team description'
}
-
+
Describe "Teams VSTS" {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
. "$PSScriptRoot\mocks\mockProjectNameDynamicParam.ps1"
Context 'Get-VSTeam with project name' {
@@ -246,7 +246,7 @@ InModuleScope VSTeam {
Mock _useWindowsAuthenticationOnPremise { return $true }
- [VSTeamVersions]::Account = 'http://localhost:8080/tfs/defaultcollection'
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
Context 'Get-VSTeam with project name on TFS local Auth' {
Mock Invoke-RestMethod { return $results }
diff --git a/unit/test/teamspsdrive.Tests.ps1 b/unit/test/teamspsdrive.Tests.ps1
index e3ed06419..f804d6e97 100644
--- a/unit/test/teamspsdrive.Tests.ps1
+++ b/unit/test/teamspsdrive.Tests.ps1
@@ -1,11 +1,11 @@
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'
-
Describe 'VSTeam Classes' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
Context 'VSTeamUserEntitlement ToString' {
$obj = [PSCustomObject]@{
displayName = 'Test User'
@@ -46,6 +46,8 @@ InModuleScope VSTeam {
$buildDefResultsAzD = Get-Content "$PSScriptRoot\sampleFiles\buildDefAzD.json" -Raw | ConvertFrom-Json
Describe 'TFS 2017 Build Definition' {
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/tfvc.Tests.ps1 b/unit/test/tfvc.Tests.ps1
index 4dbc06c9a..5e6e635b4 100644
--- a/unit/test/tfvc.Tests.ps1
+++ b/unit/test/tfvc.Tests.ps1
@@ -3,7 +3,7 @@ Set-StrictMode -Version Latest
InModuleScope VSTeam {
$singleResult = [PSCustomObject]@{
- path = "$/MyProject/Master";
+ path = "$/TfvcProject/Master";
description = 'desc';
children = @();
}
@@ -11,7 +11,7 @@ InModuleScope VSTeam {
$multipleResults = [PSCustomObject]@{
value = @(
[PSCustomObject]@{
- path = '$/MyProject/Master';
+ path = '$/TfvcProject/Master';
description = 'desc';
children = @();
},
@@ -29,10 +29,15 @@ InModuleScope VSTeam {
$Uri -like "*_apis/projects*"
}
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
Context 'Get-VSTeamTfvcRootBranch with no parameters and single result' {
- Mock Invoke-RestMethod { return $singleResult } -Verifiable
+ Mock Invoke-RestMethod {
+ # If this test fails uncomment the line below to see how the mock was called.
+ # Write-Host $args
+
+ return $singleResult
+ } -Verifiable
$res = Get-VSTeamTfvcRootBranch
@@ -42,7 +47,7 @@ InModuleScope VSTeam {
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)"
+ $Uri -eq "https://dev.azure.com/test/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)"
}
}
}
@@ -60,7 +65,7 @@ InModuleScope VSTeam {
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)"
+ $Uri -eq "https://dev.azure.com/test/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)"
}
}
}
@@ -72,7 +77,7 @@ InModuleScope VSTeam {
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)&includeChildren=True"
+ $Uri -eq "https://dev.azure.com/test/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)&includeChildren=True"
}
}
}
@@ -84,7 +89,7 @@ InModuleScope VSTeam {
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)&includeDeleted=True"
+ $Uri -eq "https://dev.azure.com/test/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)&includeDeleted=True"
}
}
}
@@ -96,7 +101,7 @@ InModuleScope VSTeam {
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)&includeChildren=True&includeDeleted=True"
+ $Uri -eq "https://dev.azure.com/test/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)&includeChildren=True&includeDeleted=True"
}
}
}
@@ -108,7 +113,7 @@ InModuleScope VSTeam {
$Uri -like "*_apis/projects*"
}
- [VSTeamVersions]::Account = 'http://localhost:8080/tfs/defaultcollection'
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' }
Mock _useWindowsAuthenticationOnPremise { return $true }
Context 'Get-VSTeamTfvcRootBranch with no parameters and single result' {
@@ -122,7 +127,7 @@ InModuleScope VSTeam {
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)"
}
}
}
@@ -140,7 +145,7 @@ InModuleScope VSTeam {
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)"
}
}
}
@@ -152,7 +157,7 @@ InModuleScope VSTeam {
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)&includeChildren=True"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)&includeChildren=True"
}
}
}
@@ -164,7 +169,7 @@ InModuleScope VSTeam {
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)&includeDeleted=True"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)&includeDeleted=True"
}
}
}
@@ -176,7 +181,7 @@ InModuleScope VSTeam {
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)&includeChildren=True&includeDeleted=True"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/_apis/tfvc/branches?api-version=$([VSTeamVersions]::Tfvc)&includeChildren=True&includeDeleted=True"
}
}
}
@@ -193,17 +198,22 @@ InModuleScope VSTeam {
@{ a = 'http://localhost:8080/tfs/defaultcollection'; t = 'tfs' }
)
- Mock Invoke-RestMethod { return $singleResult } -Verifiable
+ Mock Invoke-RestMethod {
+ # If this test fails uncomment the line below to see how the mock was called.
+ # Write-Host $args
+
+ return $singleResult
+ } -Verifiable
It 'should call the REST endpoint with correct parameters for ' -TestCases $testCases {
param ($a)
- [VSTeamVersions]::Account = $a
+ Mock _getInstance { return $a }
- Get-VSTeamTfvcBranch -Path $/MyProject/Master
+ Get-VSTeamTfvcBranch -Path $/TfvcProject/Master
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches/$/MyProject/Master?api-version=$([VSTeamVersions]::Tfvc)"
+ $Uri -eq "$a/_apis/tfvc/branches/$/TfvcProject/Master?api-version=$([VSTeamVersions]::Tfvc)"
}
}
}
@@ -214,16 +224,16 @@ InModuleScope VSTeam {
$Uri -like "*_apis/projects*"
}
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
Context 'Get-VSTeamTfvcBranch with one path' {
Mock Invoke-RestMethod { return $singleResult } -Verifiable
- Get-VSTeamTfvcBranch -Path $/MyProject/Master
+ Get-VSTeamTfvcBranch -Path $/TfvcProject/Master
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches/$/MyProject/Master?api-version=$([VSTeamVersions]::Tfvc)"
+ $Uri -eq "https://dev.azure.com/test/_apis/tfvc/branches/$/TfvcProject/Master?api-version=$([VSTeamVersions]::Tfvc)"
}
}
}
@@ -231,11 +241,11 @@ InModuleScope VSTeam {
Context 'Get-VSTeamTfvcBranch with one path from pipeline' {
Mock Invoke-RestMethod { return $singleResult } -Verifiable
- '$/MyProject/Master' | Get-VSTeamTfvcBranch
+ '$/TfvcProject/Master' | Get-VSTeamTfvcBranch
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches/$/MyProject/Master?api-version=$([VSTeamVersions]::Tfvc)"
+ $Uri -eq "https://dev.azure.com/test/_apis/tfvc/branches/$/TfvcProject/Master?api-version=$([VSTeamVersions]::Tfvc)"
}
}
}
@@ -243,14 +253,14 @@ InModuleScope VSTeam {
Context 'Get-VSTeamTfvcBranch with two paths' {
Mock Invoke-RestMethod { return $multipleResults } -Verifiable
- Get-VSTeamTfvcBranch -Path $/MyProject/Master, $/MyProject/Feature
+ Get-VSTeamTfvcBranch -Path $/TfvcProject/Master, $/TfvcProject/Feature
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches/$/MyProject/Master?api-version=$([VSTeamVersions]::Tfvc)"
+ $Uri -eq "https://dev.azure.com/test/_apis/tfvc/branches/$/TfvcProject/Master?api-version=$([VSTeamVersions]::Tfvc)"
}
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches/$/MyProject/Feature?api-version=$([VSTeamVersions]::Tfvc)"
+ $Uri -eq "https://dev.azure.com/test/_apis/tfvc/branches/$/TfvcProject/Feature?api-version=$([VSTeamVersions]::Tfvc)"
}
}
}
@@ -258,11 +268,11 @@ InModuleScope VSTeam {
Context 'Get-VSTeamTfvcBranch with IncludeChildren' {
Mock Invoke-RestMethod { return $singleResult } -Verifiable
- Get-VSTeamTfvcBranch -Path $/MyProject/Master -IncludeChildren
+ Get-VSTeamTfvcBranch -Path $/TfvcProject/Master -IncludeChildren
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches/$/MyProject/Master?api-version=$([VSTeamVersions]::Tfvc)&includeChildren=True"
+ $Uri -eq "https://dev.azure.com/test/_apis/tfvc/branches/$/TfvcProject/Master?api-version=$([VSTeamVersions]::Tfvc)&includeChildren=True"
}
}
}
@@ -270,11 +280,11 @@ InModuleScope VSTeam {
Context 'Get-VSTeamTfvcBranch with IncludeParent' {
Mock Invoke-RestMethod { return $singleResult } -Verifiable
- Get-VSTeamTfvcBranch -Path $/MyProject/Master -IncludeParent
+ Get-VSTeamTfvcBranch -Path $/TfvcProject/Master -IncludeParent
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches/$/MyProject/Master?api-version=$([VSTeamVersions]::Tfvc)&includeParent=True"
+ $Uri -eq "https://dev.azure.com/test/_apis/tfvc/branches/$/TfvcProject/Master?api-version=$([VSTeamVersions]::Tfvc)&includeParent=True"
}
}
}
@@ -282,11 +292,11 @@ InModuleScope VSTeam {
Context 'Get-VSTeamTfvcBranch with IncludeDeleted' {
Mock Invoke-RestMethod { return $singleResult } -Verifiable
- Get-VSTeamTfvcBranch -Path $/MyProject/Master -IncludeDeleted
+ Get-VSTeamTfvcBranch -Path $/TfvcProject/Master -IncludeDeleted
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches/$/MyProject/Master?api-version=$([VSTeamVersions]::Tfvc)&includeDeleted=True"
+ $Uri -eq "https://dev.azure.com/test/_apis/tfvc/branches/$/TfvcProject/Master?api-version=$([VSTeamVersions]::Tfvc)&includeDeleted=True"
}
}
}
@@ -294,11 +304,11 @@ InModuleScope VSTeam {
Context 'Get-VSTeamTfvcBranch with all switches' {
Mock Invoke-RestMethod { return $singleResult } -Verifiable
- Get-VSTeamTfvcBranch -Path $/MyProject/Master -IncludeChildren -IncludeParent -IncludeDeleted
+ Get-VSTeamTfvcBranch -Path $/TfvcProject/Master -IncludeChildren -IncludeParent -IncludeDeleted
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches/$/MyProject/Master?api-version=$([VSTeamVersions]::Tfvc)&includeChildren=True&includeParent=True&includeDeleted=True"
+ $Uri -eq "https://dev.azure.com/test/_apis/tfvc/branches/$/TfvcProject/Master?api-version=$([VSTeamVersions]::Tfvc)&includeChildren=True&includeParent=True&includeDeleted=True"
}
}
}
@@ -310,17 +320,17 @@ InModuleScope VSTeam {
$Uri -like "*_apis/projects*"
}
- [VSTeamVersions]::Account = 'http://localhost:8080/tfs/defaultcollection'
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
Mock _useWindowsAuthenticationOnPremise { return $true }
Context 'Get-VSTeamTfvcBranch with one path' {
Mock Invoke-RestMethod { return $singleResult } -Verifiable
- Get-VSTeamTfvcBranch -Path $/MyProject/Master
+ Get-VSTeamTfvcBranch -Path $/TfvcProject/Master
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches/$/MyProject/Master?api-version=$([VSTeamVersions]::Tfvc)"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/_apis/tfvc/branches/$/TfvcProject/Master?api-version=$([VSTeamVersions]::Tfvc)"
}
}
}
@@ -328,11 +338,11 @@ InModuleScope VSTeam {
Context 'Get-VSTeamTfvcBranch with one path from pipeline' {
Mock Invoke-RestMethod { return $singleResult } -Verifiable
- '$/MyProject/Master' | Get-VSTeamTfvcBranch
+ '$/TfvcProject/Master' | Get-VSTeamTfvcBranch
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches/$/MyProject/Master?api-version=$([VSTeamVersions]::Tfvc)"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/_apis/tfvc/branches/$/TfvcProject/Master?api-version=$([VSTeamVersions]::Tfvc)"
}
}
}
@@ -340,14 +350,14 @@ InModuleScope VSTeam {
Context 'Get-VSTeamTfvcBranch with two paths' {
Mock Invoke-RestMethod { return $multipleResults } -Verifiable
- Get-VSTeamTfvcBranch -Path $/MyProject/Master, $/MyProject/Feature
+ Get-VSTeamTfvcBranch -Path $/TfvcProject/Master, $/TfvcProject/Feature
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches/$/MyProject/Master?api-version=$([VSTeamVersions]::Tfvc)"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/_apis/tfvc/branches/$/TfvcProject/Master?api-version=$([VSTeamVersions]::Tfvc)"
}
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches/$/MyProject/Feature?api-version=$([VSTeamVersions]::Tfvc)"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/_apis/tfvc/branches/$/TfvcProject/Feature?api-version=$([VSTeamVersions]::Tfvc)"
}
}
}
@@ -355,11 +365,11 @@ InModuleScope VSTeam {
Context 'Get-VSTeamTfvcBranch with IncludeChildren' {
Mock Invoke-RestMethod { return $singleResult } -Verifiable
- Get-VSTeamTfvcBranch -Path $/MyProject/Master -IncludeChildren
+ Get-VSTeamTfvcBranch -Path $/TfvcProject/Master -IncludeChildren
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches/$/MyProject/Master?api-version=$([VSTeamVersions]::Tfvc)&includeChildren=True"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/_apis/tfvc/branches/$/TfvcProject/Master?api-version=$([VSTeamVersions]::Tfvc)&includeChildren=True"
}
}
}
@@ -367,11 +377,11 @@ InModuleScope VSTeam {
Context 'Get-VSTeamTfvcBranch with IncludeParent' {
Mock Invoke-RestMethod { return $singleResult } -Verifiable
- Get-VSTeamTfvcBranch -Path $/MyProject/Master -IncludeParent
+ Get-VSTeamTfvcBranch -Path $/TfvcProject/Master -IncludeParent
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches/$/MyProject/Master?api-version=$([VSTeamVersions]::Tfvc)&includeParent=True"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/_apis/tfvc/branches/$/TfvcProject/Master?api-version=$([VSTeamVersions]::Tfvc)&includeParent=True"
}
}
}
@@ -379,11 +389,11 @@ InModuleScope VSTeam {
Context 'Get-VSTeamTfvcBranch with IncludeDeleted' {
Mock Invoke-RestMethod { return $singleResult } -Verifiable
- Get-VSTeamTfvcBranch -Path $/MyProject/Master -IncludeDeleted
+ Get-VSTeamTfvcBranch -Path $/TfvcProject/Master -IncludeDeleted
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches/$/MyProject/Master?api-version=$([VSTeamVersions]::Tfvc)&includeDeleted=True"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/_apis/tfvc/branches/$/TfvcProject/Master?api-version=$([VSTeamVersions]::Tfvc)&includeDeleted=True"
}
}
}
@@ -391,11 +401,11 @@ InModuleScope VSTeam {
Context 'Get-VSTeamTfvcBranch with all switches' {
Mock Invoke-RestMethod { return $singleResult } -Verifiable
- Get-VSTeamTfvcBranch -Path $/MyProject/Master -IncludeChildren -IncludeParent -IncludeDeleted
+ Get-VSTeamTfvcBranch -Path $/TfvcProject/Master -IncludeChildren -IncludeParent -IncludeDeleted
It 'should call the REST endpoint with correct parameters' {
Assert-MockCalled Invoke-RestMethod -Scope Context -Exactly -Times 1 -ParameterFilter {
- $Uri -eq "$([VSTeamVersions]::Account)/_apis/tfvc/branches/$/MyProject/Master?api-version=$([VSTeamVersions]::Tfvc)&includeChildren=True&includeParent=True&includeDeleted=True"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/_apis/tfvc/branches/$/TfvcProject/Master?api-version=$([VSTeamVersions]::Tfvc)&includeChildren=True&includeParent=True&includeDeleted=True"
}
}
}
diff --git a/unit/test/users.Tests.ps1 b/unit/test/users.Tests.ps1
index c49c2c824..5bff92de5 100644
--- a/unit/test/users.Tests.ps1
+++ b/unit/test/users.Tests.ps1
@@ -2,16 +2,14 @@ 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'
-
$userListResult = Get-Content "$PSScriptRoot\sampleFiles\users.json" -Raw | ConvertFrom-Json
$userSingleResult = Get-Content "$PSScriptRoot\sampleFiles\users.single.json" -Raw | ConvertFrom-Json
# The Graph API is not supported on TFS
Describe "Users TFS Errors" {
- Context 'Get-VSTeamUser' {
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
+
+ Context 'Get-VSTeamUser' {
Mock _callAPI { throw 'Should not be called' } -Verifiable
It 'Should throw' {
@@ -23,6 +21,10 @@ InModuleScope VSTeam {
}
Describe 'Users VSTS' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# You have to set the version or the api-version will not be added when
# [VSTeamVersions]::Graph = ''
[VSTeamVersions]::Graph = '5.0'
@@ -54,7 +56,7 @@ InModuleScope VSTeam {
Context 'Get-VSTeamUser by subjectTypes' {
Mock Invoke-RestMethod { return $userListResult } -Verifiable
- Get-VSTeamUser -SubjectTypes vss,aad
+ Get-VSTeamUser -SubjectTypes vss, aad
It 'Should return users' {
Assert-MockCalled Invoke-RestMethod -Exactly 1 -ParameterFilter {
diff --git a/unit/test/usersentitlement.Tests.ps1 b/unit/test/usersentitlement.Tests.ps1
index 61cf07f94..fd2dbfd67 100644
--- a/unit/test/usersentitlement.Tests.ps1
+++ b/unit/test/usersentitlement.Tests.ps1
@@ -1,9 +1,9 @@
Set-StrictMode -Version Latest
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
-
Describe "Users TFS Errors" {
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
@@ -25,6 +25,8 @@ InModuleScope VSTeam {
}
Describe "Users VSTS" {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/variableGroups.Tests.ps1 b/unit/test/variableGroups.Tests.ps1
index a9bdf526e..c73f9542b 100644
--- a/unit/test/variableGroups.Tests.ps1
+++ b/unit/test/variableGroups.Tests.ps1
@@ -1,12 +1,11 @@
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'
-
$sampleFile2017 = "$PSScriptRoot\sampleFiles\variableGroupSamples2017.json"
+
Describe 'Variable Groups 2017' {
+ Mock _getInstance { return 'http://localhost:8080/tfs/defaultcollection' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/project*"
@@ -29,7 +28,7 @@ InModuleScope VSTeam {
Get-VSTeamVariableGroup -projectName project
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
- $Uri -eq "https://dev.azure.com/test/project/_apis/distributedtask/variablegroups?api-version=$([VSTeamVersions]::VariableGroups)"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/project/_apis/distributedtask/variablegroups?api-version=$([VSTeamVersions]::VariableGroups)"
}
}
}
@@ -47,7 +46,7 @@ InModuleScope VSTeam {
Get-VSTeamVariableGroup -projectName project -id $projectID
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
- $Uri -eq "https://dev.azure.com/test/project/_apis/distributedtask/variablegroups/$($projectID)?api-version=$([VSTeamVersions]::VariableGroups)"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/project/_apis/distributedtask/variablegroups/$($projectID)?api-version=$([VSTeamVersions]::VariableGroups)"
}
}
}
@@ -64,7 +63,7 @@ InModuleScope VSTeam {
Get-VSTeamVariableGroup -projectName project -Name $varGroupName
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
- $Uri -eq "https://dev.azure.com/test/project/_apis/distributedtask/variablegroups?api-version=$([VSTeamVersions]::VariableGroups)&groupName=$varGroupName"
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/project/_apis/distributedtask/variablegroups?api-version=$([VSTeamVersions]::VariableGroups)&groupName=$varGroupName"
}
}
}
@@ -77,7 +76,7 @@ InModuleScope VSTeam {
Remove-VSTeamVariableGroup -projectName project -id $projectID -Force
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
- $Uri -eq "https://dev.azure.com/test/project/_apis/distributedtask/variablegroups/$($projectID)?api-version=$([VSTeamVersions]::VariableGroups)" -and
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/project/_apis/distributedtask/variablegroups/$($projectID)?api-version=$([VSTeamVersions]::VariableGroups)" -and
$Method -eq 'Delete'
}
}
@@ -93,7 +92,7 @@ InModuleScope VSTeam {
It 'should create a new Variable Group' {
$testParameters = @{
- ProjectName = "project"
+ ProjectName = "project"
Name = "TestVariableGroup2"
Description = "A test variable group linked to an Azure KeyVault"
Variables = @{
@@ -119,8 +118,8 @@ InModuleScope VSTeam {
It 'should update an exisiting Variable Group' {
$testParameters = @{
- ProjectName = "project"
- id = 1
+ ProjectName = "project"
+ id = 1
Name = "TestVariableGroup1"
Description = "A test variable group"
Variables = @{
@@ -137,7 +136,7 @@ InModuleScope VSTeam {
Update-VSTeamVariableGroup @testParameters
Assert-MockCalled Invoke-RestMethod -Exactly -Scope It -Times 1 -ParameterFilter {
- $Uri -eq "https://dev.azure.com/test/project/_apis/distributedtask/variablegroups/$($testParameters.id)?api-version=$([VSTeamVersions]::VariableGroups)" -and
+ $Uri -eq "http://localhost:8080/tfs/defaultcollection/project/_apis/distributedtask/variablegroups/$($testParameters.id)?api-version=$([VSTeamVersions]::VariableGroups)" -and
$Method -eq 'Put'
}
}
@@ -146,6 +145,10 @@ InModuleScope VSTeam {
$sampleFileVSTS = "$PSScriptRoot\sampleFiles\variableGroupSamples.json"
Describe 'Variable Groups VSTS' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/project*"
@@ -215,7 +218,7 @@ InModuleScope VSTeam {
It 'should create a new AzureRM Key Vault Variable Group' {
$testParameters = @{
- ProjectName = "project"
+ ProjectName = "project"
Name = "TestVariableGroup2"
Description = "A test variable group linked to an Azure KeyVault"
Type = "AzureKeyVault"
@@ -259,8 +262,8 @@ InModuleScope VSTeam {
It 'should update an exisiting Variable Group' {
$testParameters = @{
- ProjectName = "project"
- Id = 1
+ ProjectName = "project"
+ Id = 1
Name = "TestVariableGroup1"
Description = "A test variable group"
Type = "Vsts"
diff --git a/unit/test/wiql.Tests.ps1 b/unit/test/wiql.Tests.ps1
index b19435b19..f522cfe4e 100644
--- a/unit/test/wiql.Tests.ps1
+++ b/unit/test/wiql.Tests.ps1
@@ -1,9 +1,9 @@
Set-StrictMode -Version Latest
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
-
Describe 'wiql' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
@@ -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/workItemPermissions.Tests.ps1 b/unit/test/workItemPermissions.Tests.ps1
index 6bb649742..bed2bb275 100644
--- a/unit/test/workItemPermissions.Tests.ps1
+++ b/unit/test/workItemPermissions.Tests.ps1
@@ -1,11 +1,6 @@
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'
-
$userSingleResult = Get-Content "$PSScriptRoot\sampleFiles\users.single.json" -Raw | ConvertFrom-Json
$userSingleResultObject = [VSTeamUser]::new($userSingleResult)
@@ -27,7 +22,7 @@ InModuleScope VSTeam {
$projectResultObject = [VSTeamProject]::new($projectResult)
$accessControlEntryResult =
-@"
+ @"
{
"count": 1,
"value": [
@@ -43,8 +38,8 @@ InModuleScope VSTeam {
-$classificationNodeById =
-@"
+ $classificationNodeById =
+ @"
{
"count": 1,
"value": [
@@ -72,7 +67,7 @@ $classificationNodeById =
$classificationNodeByIdObject = [VSTeamClassificationNode]::new($classificationNodeById, "test")
$parentClassificationNode =
-@"
+ @"
{
"count": 1,
"value": [
@@ -101,7 +96,7 @@ $classificationNodeById =
$classificationNodeIterationId =
-@"
+ @"
{
"count": 1,
"value": [
@@ -130,7 +125,7 @@ $classificationNodeById =
$areaRootNode =
-@"
+ @"
{
"id": 24,
"identifier": "b33b12d7-6abb-4b7a-b9d6-2092d0933c99",
@@ -150,7 +145,7 @@ $classificationNodeById =
$areaRootNodeObject = [VSTeamClassificationNode]::new($areaRootNode, "test")
$iterationRootNode =
-@"
+ @"
{
"id": 16,
"identifier": "dfa90792-403a-4119-a52b-bd142c08291b",
@@ -170,6 +165,10 @@ $classificationNodeById =
$iterationRootNodeObject = [VSTeamClassificationNode]::new($iterationRootNode, "test")
Describe 'WorkItem Area/Iteration Permissions VSTS' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# You have to set the version or the api-version will not be added when
# [VSTeamVersions]::Core = ''
[VSTeamVersions]::Core = '5.0'
diff --git a/unit/test/workitem.Tests.ps1 b/unit/test/workitem.Tests.ps1
index 5e7113691..5b9dd50de 100644
--- a/unit/test/workitem.Tests.ps1
+++ b/unit/test/workitem.Tests.ps1
@@ -1,9 +1,9 @@
Set-StrictMode -Version Latest
InModuleScope VSTeam {
- [VSTeamVersions]::Account = 'https://dev.azure.com/test'
-
Describe 'workitems' {
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"
diff --git a/unit/test/workitemTypes.Tests.ps1 b/unit/test/workitemTypes.Tests.ps1
index e20050b66..bb1b9c4eb 100644
--- a/unit/test/workitemTypes.Tests.ps1
+++ b/unit/test/workitemTypes.Tests.ps1
@@ -3,12 +3,11 @@ Set-StrictMode -Version Latest
# The InModuleScope command allows you to perform white-box unit testing on the
# internal (non-exported) code of a Script Module.
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'
-
Describe 'workitemTypes' {
+ # Set the account to use for testing. A normal user would do this
+ # using the Set-VSTeamAccount function.
+ Mock _getInstance { return 'https://dev.azure.com/test' } -Verifiable
+
# Mock the call to Get-Projects by the dynamic parameter for ProjectName
Mock Invoke-RestMethod { return @() } -ParameterFilter {
$Uri -like "*_apis/projects*"