From 1602cb4a39f18d37bc029c397b29cadcdd1e9055 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Thu, 17 Feb 2022 20:26:43 -0800 Subject: [PATCH 001/151] Recategorizing Functions --- Add-ADOAreaPath.ps1 => Functions/AzureDevOps/Add-ADOAreaPath.ps1 | 0 .../AzureDevOps/Add-ADOAttachment.ps1 | 0 .../AzureDevOps/Add-ADODashboard.ps1 | 0 .../AzureDevOps/Add-ADOIterationPath.ps1 | 0 Add-ADOPicklist.ps1 => Functions/AzureDevOps/Add-ADOPicklist.ps1 | 0 Add-ADOTeam.ps1 => Functions/AzureDevOps/Add-ADOTeam.ps1 | 0 Add-ADOWiki.ps1 => Functions/AzureDevOps/Add-ADOWiki.ps1 | 0 .../AzureDevOps/Clear-ADODashboard.ps1 | 0 Connect-ADO.ps1 => Functions/AzureDevOps/Connect-ADO.ps1 | 0 .../AzureDevOps/Convert-ADOPipeline.ps1 | 0 .../AzureDevOps/Disable-ADOExtension.ps1 | 0 Disconnect-ADO.ps1 => Functions/AzureDevOps/Disconnect-ADO.ps1 | 0 .../AzureDevOps/Enable-ADOExtension.ps1 | 0 .../AzureDevOps/Get-ADOAgentPool.ps1 | 0 Get-ADOAreaPath.ps1 => Functions/AzureDevOps/Get-ADOAreaPath.ps1 | 0 .../AzureDevOps/Get-ADOArtifactFeed.ps1 | 0 Get-ADOBuild.ps1 => Functions/AzureDevOps/Get-ADOBuild.ps1 | 0 .../AzureDevOps/Get-ADODashboard.ps1 | 0 .../AzureDevOps/Get-ADOExtension.ps1 | 0 Get-ADOField.ps1 => Functions/AzureDevOps/Get-ADOField.ps1 | 0 Get-ADOIdentity.ps1 => Functions/AzureDevOps/Get-ADOIdentity.ps1 | 0 .../AzureDevOps/Get-ADOIterationPath.ps1 | 0 .../AzureDevOps/Get-ADOPermission.ps1 | 0 Get-ADOPicklist.ps1 => Functions/AzureDevOps/Get-ADOPicklist.ps1 | 0 Get-ADOProject.ps1 => Functions/AzureDevOps/Get-ADOProject.ps1 | 0 .../AzureDevOps/Get-ADORepository.ps1 | 0 .../AzureDevOps/Get-ADOServiceEndpoint.ps1 | 0 .../AzureDevOps/Get-ADOServiceHook.ps1 | 0 Get-ADOTask.ps1 => Functions/AzureDevOps/Get-ADOTask.ps1 | 0 Get-ADOTeam.ps1 => Functions/AzureDevOps/Get-ADOTeam.ps1 | 0 Get-ADOTest.ps1 => Functions/AzureDevOps/Get-ADOTest.ps1 | 0 Get-ADOUser.ps1 => Functions/AzureDevOps/Get-ADOUser.ps1 | 0 Get-ADOWiki.ps1 => Functions/AzureDevOps/Get-ADOWiki.ps1 | 0 Get-ADOWorkItem.ps1 => Functions/AzureDevOps/Get-ADOWorkItem.ps1 | 0 .../AzureDevOps/Get-ADOWorkItemType.ps1 | 0 .../AzureDevOps/Get-ADOWorkProcess.ps1 | 0 Import-ADOProxy.ps1 => Functions/AzureDevOps/Import-ADOProxy.ps1 | 0 .../AzureDevOps/Install-ADOExtension.ps1 | 0 .../AzureDevOps/Invoke-ADORestAPI.ps1 | 0 .../AzureDevOps/New-ADOArtifactFeed.ps1 | 0 New-ADOBuild.ps1 => Functions/AzureDevOps/New-ADOBuild.ps1 | 0 New-ADOField.ps1 => Functions/AzureDevOps/New-ADOField.ps1 | 0 New-ADOPipeline.ps1 => Functions/AzureDevOps/New-ADOPipeline.ps1 | 0 New-ADOProject.ps1 => Functions/AzureDevOps/New-ADOProject.ps1 | 0 .../AzureDevOps/New-ADORepository.ps1 | 0 .../AzureDevOps/New-ADOServiceEndpoint.ps1 | 0 New-ADOWorkItem.ps1 => Functions/AzureDevOps/New-ADOWorkItem.ps1 | 0 .../AzureDevOps/New-ADOWorkItemType.ps1 | 0 .../AzureDevOps/New-ADOWorkProcess.ps1 | 0 .../AzureDevOps/Register-ADOArtifactFeed.ps1 | 0 .../AzureDevOps/Remove-ADOAgentPool.ps1 | 0 .../AzureDevOps/Remove-ADOAreaPath.ps1 | 0 .../AzureDevOps/Remove-ADOArtifactFeed.ps1 | 0 Remove-ADOBuild.ps1 => Functions/AzureDevOps/Remove-ADOBuild.ps1 | 0 .../AzureDevOps/Remove-ADODashboard.ps1 | 0 Remove-ADOField.ps1 => Functions/AzureDevOps/Remove-ADOField.ps1 | 0 .../AzureDevOps/Remove-ADOIterationPath.ps1 | 0 .../AzureDevOps/Remove-ADOPicklist.ps1 | 0 .../AzureDevOps/Remove-ADOProject.ps1 | 0 .../AzureDevOps/Remove-ADORepository.ps1 | 0 .../AzureDevOps/Remove-ADOServiceEndpoint.ps1 | 0 Remove-ADOTeam.ps1 => Functions/AzureDevOps/Remove-ADOTeam.ps1 | 0 Remove-ADOWiki.ps1 => Functions/AzureDevOps/Remove-ADOWiki.ps1 | 0 .../AzureDevOps/Remove-ADOWorkItem.ps1 | 0 .../AzureDevOps/Remove-ADOWorkItemType.ps1 | 0 .../AzureDevOps/Set-ADOArtifactFeed.ps1 | 0 Set-ADOBuild.ps1 => Functions/AzureDevOps/Set-ADOBuild.ps1 | 0 Set-ADOEndpoint.ps1 => Functions/AzureDevOps/Set-ADOEndpoint.ps1 | 0 .../AzureDevOps/Set-ADOExtension.ps1 | 0 .../AzureDevOps/Set-ADOPermission.ps1 | 0 Set-ADOProject.ps1 => Functions/AzureDevOps/Set-ADOProject.ps1 | 0 Set-ADOTeam.ps1 => Functions/AzureDevOps/Set-ADOTeam.ps1 | 0 Set-ADOWorkItem.ps1 => Functions/AzureDevOps/Set-ADOWorkItem.ps1 | 0 .../AzureDevOps/Set-ADOWorkProcess.ps1 | 0 Start-ADOBuild.ps1 => Functions/AzureDevOps/Start-ADOBuild.ps1 | 0 Stop-ADOBuild.ps1 => Functions/AzureDevOps/Stop-ADOBuild.ps1 | 0 .../AzureDevOps/Trace-ADOCommand.ps1 | 0 .../AzureDevOps/Uninstall-ADOExtension.ps1 | 0 Update-ADOBuild.ps1 => Functions/AzureDevOps/Update-ADOBuild.ps1 | 0 .../AzureDevOps/Update-ADODashboard.ps1 | 0 .../AzureDevOps/Update-ADOPicklist.ps1 | 0 Wait-ADOBuild.ps1 => Functions/AzureDevOps/Wait-ADOBuild.ps1 | 0 Write-ADODebug.ps1 => Functions/AzureDevOps/Write-ADODebug.ps1 | 0 Write-ADOError.ps1 => Functions/AzureDevOps/Write-ADOError.ps1 | 0 Write-ADOOutput.ps1 => Functions/AzureDevOps/Write-ADOOutput.ps1 | 0 .../AzureDevOps/Write-ADOProgress.ps1 | 0 .../AzureDevOps/Write-ADOVariable.ps1 | 0 .../AzureDevOps/Write-ADOWarning.ps1 | 0 Add-Git.ps1 => Functions/Git/Add-Git.ps1 | 0 Push-Git.ps1 => Functions/Git/Push-Git.ps1 | 0 Submit-Git.ps1 => Functions/Git/Submit-Git.ps1 | 0 Connect-GitHub.ps1 => Functions/GitHub/Connect-GitHub.ps1 | 0 Disconnect-GitHub.ps1 => Functions/GitHub/Disconnect-GitHub.ps1 | 0 Hide-GitHubOutput.ps1 => Functions/GitHub/Hide-GitHubOutput.ps1 | 0 .../GitHub/Invoke-GitHubRESTApi.ps1 | 0 New-GitHubAction.ps1 => Functions/GitHub/New-GitHubAction.ps1 | 0 New-GitHubWorkflow.ps1 => Functions/GitHub/New-GitHubWorkflow.ps1 | 0 .../GitHub/Trace-GitHubCommand.ps1 | 0 Write-GitHubDebug.ps1 => Functions/GitHub/Write-GitHubDebug.ps1 | 0 Write-GitHubError.ps1 => Functions/GitHub/Write-GitHubError.ps1 | 0 Write-GitHubOutput.ps1 => Functions/GitHub/Write-GitHubOutput.ps1 | 0 .../GitHub/Write-GitHubWarning.ps1 | 0 102 files changed, 0 insertions(+), 0 deletions(-) rename Add-ADOAreaPath.ps1 => Functions/AzureDevOps/Add-ADOAreaPath.ps1 (100%) rename Add-ADOAttachment.ps1 => Functions/AzureDevOps/Add-ADOAttachment.ps1 (100%) rename Add-ADODashboard.ps1 => Functions/AzureDevOps/Add-ADODashboard.ps1 (100%) rename Add-ADOIterationPath.ps1 => Functions/AzureDevOps/Add-ADOIterationPath.ps1 (100%) rename Add-ADOPicklist.ps1 => Functions/AzureDevOps/Add-ADOPicklist.ps1 (100%) rename Add-ADOTeam.ps1 => Functions/AzureDevOps/Add-ADOTeam.ps1 (100%) rename Add-ADOWiki.ps1 => Functions/AzureDevOps/Add-ADOWiki.ps1 (100%) rename Clear-ADODashboard.ps1 => Functions/AzureDevOps/Clear-ADODashboard.ps1 (100%) rename Connect-ADO.ps1 => Functions/AzureDevOps/Connect-ADO.ps1 (100%) rename Convert-ADOPipeline.ps1 => Functions/AzureDevOps/Convert-ADOPipeline.ps1 (100%) rename Disable-ADOExtension.ps1 => Functions/AzureDevOps/Disable-ADOExtension.ps1 (100%) rename Disconnect-ADO.ps1 => Functions/AzureDevOps/Disconnect-ADO.ps1 (100%) rename Enable-ADOExtension.ps1 => Functions/AzureDevOps/Enable-ADOExtension.ps1 (100%) rename Get-ADOAgentPool.ps1 => Functions/AzureDevOps/Get-ADOAgentPool.ps1 (100%) rename Get-ADOAreaPath.ps1 => Functions/AzureDevOps/Get-ADOAreaPath.ps1 (100%) rename Get-ADOArtifactFeed.ps1 => Functions/AzureDevOps/Get-ADOArtifactFeed.ps1 (100%) rename Get-ADOBuild.ps1 => Functions/AzureDevOps/Get-ADOBuild.ps1 (100%) rename Get-ADODashboard.ps1 => Functions/AzureDevOps/Get-ADODashboard.ps1 (100%) rename Get-ADOExtension.ps1 => Functions/AzureDevOps/Get-ADOExtension.ps1 (100%) rename Get-ADOField.ps1 => Functions/AzureDevOps/Get-ADOField.ps1 (100%) rename Get-ADOIdentity.ps1 => Functions/AzureDevOps/Get-ADOIdentity.ps1 (100%) rename Get-ADOIterationPath.ps1 => Functions/AzureDevOps/Get-ADOIterationPath.ps1 (100%) rename Get-ADOPermission.ps1 => Functions/AzureDevOps/Get-ADOPermission.ps1 (100%) rename Get-ADOPicklist.ps1 => Functions/AzureDevOps/Get-ADOPicklist.ps1 (100%) rename Get-ADOProject.ps1 => Functions/AzureDevOps/Get-ADOProject.ps1 (100%) rename Get-ADORepository.ps1 => Functions/AzureDevOps/Get-ADORepository.ps1 (100%) rename Get-ADOServiceEndpoint.ps1 => Functions/AzureDevOps/Get-ADOServiceEndpoint.ps1 (100%) rename Get-ADOServiceHook.ps1 => Functions/AzureDevOps/Get-ADOServiceHook.ps1 (100%) rename Get-ADOTask.ps1 => Functions/AzureDevOps/Get-ADOTask.ps1 (100%) rename Get-ADOTeam.ps1 => Functions/AzureDevOps/Get-ADOTeam.ps1 (100%) rename Get-ADOTest.ps1 => Functions/AzureDevOps/Get-ADOTest.ps1 (100%) rename Get-ADOUser.ps1 => Functions/AzureDevOps/Get-ADOUser.ps1 (100%) rename Get-ADOWiki.ps1 => Functions/AzureDevOps/Get-ADOWiki.ps1 (100%) rename Get-ADOWorkItem.ps1 => Functions/AzureDevOps/Get-ADOWorkItem.ps1 (100%) rename Get-ADOWorkItemType.ps1 => Functions/AzureDevOps/Get-ADOWorkItemType.ps1 (100%) rename Get-ADOWorkProcess.ps1 => Functions/AzureDevOps/Get-ADOWorkProcess.ps1 (100%) rename Import-ADOProxy.ps1 => Functions/AzureDevOps/Import-ADOProxy.ps1 (100%) rename Install-ADOExtension.ps1 => Functions/AzureDevOps/Install-ADOExtension.ps1 (100%) rename Invoke-ADORestAPI.ps1 => Functions/AzureDevOps/Invoke-ADORestAPI.ps1 (100%) rename New-ADOArtifactFeed.ps1 => Functions/AzureDevOps/New-ADOArtifactFeed.ps1 (100%) rename New-ADOBuild.ps1 => Functions/AzureDevOps/New-ADOBuild.ps1 (100%) rename New-ADOField.ps1 => Functions/AzureDevOps/New-ADOField.ps1 (100%) rename New-ADOPipeline.ps1 => Functions/AzureDevOps/New-ADOPipeline.ps1 (100%) rename New-ADOProject.ps1 => Functions/AzureDevOps/New-ADOProject.ps1 (100%) rename New-ADORepository.ps1 => Functions/AzureDevOps/New-ADORepository.ps1 (100%) rename New-ADOServiceEndpoint.ps1 => Functions/AzureDevOps/New-ADOServiceEndpoint.ps1 (100%) rename New-ADOWorkItem.ps1 => Functions/AzureDevOps/New-ADOWorkItem.ps1 (100%) rename New-ADOWorkItemType.ps1 => Functions/AzureDevOps/New-ADOWorkItemType.ps1 (100%) rename New-ADOWorkProcess.ps1 => Functions/AzureDevOps/New-ADOWorkProcess.ps1 (100%) rename Register-ADOArtifactFeed.ps1 => Functions/AzureDevOps/Register-ADOArtifactFeed.ps1 (100%) rename Remove-ADOAgentPool.ps1 => Functions/AzureDevOps/Remove-ADOAgentPool.ps1 (100%) rename Remove-ADOAreaPath.ps1 => Functions/AzureDevOps/Remove-ADOAreaPath.ps1 (100%) rename Remove-ADOArtifactFeed.ps1 => Functions/AzureDevOps/Remove-ADOArtifactFeed.ps1 (100%) rename Remove-ADOBuild.ps1 => Functions/AzureDevOps/Remove-ADOBuild.ps1 (100%) rename Remove-ADODashboard.ps1 => Functions/AzureDevOps/Remove-ADODashboard.ps1 (100%) rename Remove-ADOField.ps1 => Functions/AzureDevOps/Remove-ADOField.ps1 (100%) rename Remove-ADOIterationPath.ps1 => Functions/AzureDevOps/Remove-ADOIterationPath.ps1 (100%) rename Remove-ADOPicklist.ps1 => Functions/AzureDevOps/Remove-ADOPicklist.ps1 (100%) rename Remove-ADOProject.ps1 => Functions/AzureDevOps/Remove-ADOProject.ps1 (100%) rename Remove-ADORepository.ps1 => Functions/AzureDevOps/Remove-ADORepository.ps1 (100%) rename Remove-ADOServiceEndpoint.ps1 => Functions/AzureDevOps/Remove-ADOServiceEndpoint.ps1 (100%) rename Remove-ADOTeam.ps1 => Functions/AzureDevOps/Remove-ADOTeam.ps1 (100%) rename Remove-ADOWiki.ps1 => Functions/AzureDevOps/Remove-ADOWiki.ps1 (100%) rename Remove-ADOWorkItem.ps1 => Functions/AzureDevOps/Remove-ADOWorkItem.ps1 (100%) rename Remove-ADOWorkItemType.ps1 => Functions/AzureDevOps/Remove-ADOWorkItemType.ps1 (100%) rename Set-ADOArtifactFeed.ps1 => Functions/AzureDevOps/Set-ADOArtifactFeed.ps1 (100%) rename Set-ADOBuild.ps1 => Functions/AzureDevOps/Set-ADOBuild.ps1 (100%) rename Set-ADOEndpoint.ps1 => Functions/AzureDevOps/Set-ADOEndpoint.ps1 (100%) rename Set-ADOExtension.ps1 => Functions/AzureDevOps/Set-ADOExtension.ps1 (100%) rename Set-ADOPermission.ps1 => Functions/AzureDevOps/Set-ADOPermission.ps1 (100%) rename Set-ADOProject.ps1 => Functions/AzureDevOps/Set-ADOProject.ps1 (100%) rename Set-ADOTeam.ps1 => Functions/AzureDevOps/Set-ADOTeam.ps1 (100%) rename Set-ADOWorkItem.ps1 => Functions/AzureDevOps/Set-ADOWorkItem.ps1 (100%) rename Set-ADOWorkProcess.ps1 => Functions/AzureDevOps/Set-ADOWorkProcess.ps1 (100%) rename Start-ADOBuild.ps1 => Functions/AzureDevOps/Start-ADOBuild.ps1 (100%) rename Stop-ADOBuild.ps1 => Functions/AzureDevOps/Stop-ADOBuild.ps1 (100%) rename Trace-ADOCommand.ps1 => Functions/AzureDevOps/Trace-ADOCommand.ps1 (100%) rename Uninstall-ADOExtension.ps1 => Functions/AzureDevOps/Uninstall-ADOExtension.ps1 (100%) rename Update-ADOBuild.ps1 => Functions/AzureDevOps/Update-ADOBuild.ps1 (100%) rename Update-ADODashboard.ps1 => Functions/AzureDevOps/Update-ADODashboard.ps1 (100%) rename Update-ADOPicklist.ps1 => Functions/AzureDevOps/Update-ADOPicklist.ps1 (100%) rename Wait-ADOBuild.ps1 => Functions/AzureDevOps/Wait-ADOBuild.ps1 (100%) rename Write-ADODebug.ps1 => Functions/AzureDevOps/Write-ADODebug.ps1 (100%) rename Write-ADOError.ps1 => Functions/AzureDevOps/Write-ADOError.ps1 (100%) rename Write-ADOOutput.ps1 => Functions/AzureDevOps/Write-ADOOutput.ps1 (100%) rename Write-ADOProgress.ps1 => Functions/AzureDevOps/Write-ADOProgress.ps1 (100%) rename Write-ADOVariable.ps1 => Functions/AzureDevOps/Write-ADOVariable.ps1 (100%) rename Write-ADOWarning.ps1 => Functions/AzureDevOps/Write-ADOWarning.ps1 (100%) rename Add-Git.ps1 => Functions/Git/Add-Git.ps1 (100%) rename Push-Git.ps1 => Functions/Git/Push-Git.ps1 (100%) rename Submit-Git.ps1 => Functions/Git/Submit-Git.ps1 (100%) rename Connect-GitHub.ps1 => Functions/GitHub/Connect-GitHub.ps1 (100%) rename Disconnect-GitHub.ps1 => Functions/GitHub/Disconnect-GitHub.ps1 (100%) rename Hide-GitHubOutput.ps1 => Functions/GitHub/Hide-GitHubOutput.ps1 (100%) rename Invoke-GitHubRESTApi.ps1 => Functions/GitHub/Invoke-GitHubRESTApi.ps1 (100%) rename New-GitHubAction.ps1 => Functions/GitHub/New-GitHubAction.ps1 (100%) rename New-GitHubWorkflow.ps1 => Functions/GitHub/New-GitHubWorkflow.ps1 (100%) rename Trace-GitHubCommand.ps1 => Functions/GitHub/Trace-GitHubCommand.ps1 (100%) rename Write-GitHubDebug.ps1 => Functions/GitHub/Write-GitHubDebug.ps1 (100%) rename Write-GitHubError.ps1 => Functions/GitHub/Write-GitHubError.ps1 (100%) rename Write-GitHubOutput.ps1 => Functions/GitHub/Write-GitHubOutput.ps1 (100%) rename Write-GitHubWarning.ps1 => Functions/GitHub/Write-GitHubWarning.ps1 (100%) diff --git a/Add-ADOAreaPath.ps1 b/Functions/AzureDevOps/Add-ADOAreaPath.ps1 similarity index 100% rename from Add-ADOAreaPath.ps1 rename to Functions/AzureDevOps/Add-ADOAreaPath.ps1 diff --git a/Add-ADOAttachment.ps1 b/Functions/AzureDevOps/Add-ADOAttachment.ps1 similarity index 100% rename from Add-ADOAttachment.ps1 rename to Functions/AzureDevOps/Add-ADOAttachment.ps1 diff --git a/Add-ADODashboard.ps1 b/Functions/AzureDevOps/Add-ADODashboard.ps1 similarity index 100% rename from Add-ADODashboard.ps1 rename to Functions/AzureDevOps/Add-ADODashboard.ps1 diff --git a/Add-ADOIterationPath.ps1 b/Functions/AzureDevOps/Add-ADOIterationPath.ps1 similarity index 100% rename from Add-ADOIterationPath.ps1 rename to Functions/AzureDevOps/Add-ADOIterationPath.ps1 diff --git a/Add-ADOPicklist.ps1 b/Functions/AzureDevOps/Add-ADOPicklist.ps1 similarity index 100% rename from Add-ADOPicklist.ps1 rename to Functions/AzureDevOps/Add-ADOPicklist.ps1 diff --git a/Add-ADOTeam.ps1 b/Functions/AzureDevOps/Add-ADOTeam.ps1 similarity index 100% rename from Add-ADOTeam.ps1 rename to Functions/AzureDevOps/Add-ADOTeam.ps1 diff --git a/Add-ADOWiki.ps1 b/Functions/AzureDevOps/Add-ADOWiki.ps1 similarity index 100% rename from Add-ADOWiki.ps1 rename to Functions/AzureDevOps/Add-ADOWiki.ps1 diff --git a/Clear-ADODashboard.ps1 b/Functions/AzureDevOps/Clear-ADODashboard.ps1 similarity index 100% rename from Clear-ADODashboard.ps1 rename to Functions/AzureDevOps/Clear-ADODashboard.ps1 diff --git a/Connect-ADO.ps1 b/Functions/AzureDevOps/Connect-ADO.ps1 similarity index 100% rename from Connect-ADO.ps1 rename to Functions/AzureDevOps/Connect-ADO.ps1 diff --git a/Convert-ADOPipeline.ps1 b/Functions/AzureDevOps/Convert-ADOPipeline.ps1 similarity index 100% rename from Convert-ADOPipeline.ps1 rename to Functions/AzureDevOps/Convert-ADOPipeline.ps1 diff --git a/Disable-ADOExtension.ps1 b/Functions/AzureDevOps/Disable-ADOExtension.ps1 similarity index 100% rename from Disable-ADOExtension.ps1 rename to Functions/AzureDevOps/Disable-ADOExtension.ps1 diff --git a/Disconnect-ADO.ps1 b/Functions/AzureDevOps/Disconnect-ADO.ps1 similarity index 100% rename from Disconnect-ADO.ps1 rename to Functions/AzureDevOps/Disconnect-ADO.ps1 diff --git a/Enable-ADOExtension.ps1 b/Functions/AzureDevOps/Enable-ADOExtension.ps1 similarity index 100% rename from Enable-ADOExtension.ps1 rename to Functions/AzureDevOps/Enable-ADOExtension.ps1 diff --git a/Get-ADOAgentPool.ps1 b/Functions/AzureDevOps/Get-ADOAgentPool.ps1 similarity index 100% rename from Get-ADOAgentPool.ps1 rename to Functions/AzureDevOps/Get-ADOAgentPool.ps1 diff --git a/Get-ADOAreaPath.ps1 b/Functions/AzureDevOps/Get-ADOAreaPath.ps1 similarity index 100% rename from Get-ADOAreaPath.ps1 rename to Functions/AzureDevOps/Get-ADOAreaPath.ps1 diff --git a/Get-ADOArtifactFeed.ps1 b/Functions/AzureDevOps/Get-ADOArtifactFeed.ps1 similarity index 100% rename from Get-ADOArtifactFeed.ps1 rename to Functions/AzureDevOps/Get-ADOArtifactFeed.ps1 diff --git a/Get-ADOBuild.ps1 b/Functions/AzureDevOps/Get-ADOBuild.ps1 similarity index 100% rename from Get-ADOBuild.ps1 rename to Functions/AzureDevOps/Get-ADOBuild.ps1 diff --git a/Get-ADODashboard.ps1 b/Functions/AzureDevOps/Get-ADODashboard.ps1 similarity index 100% rename from Get-ADODashboard.ps1 rename to Functions/AzureDevOps/Get-ADODashboard.ps1 diff --git a/Get-ADOExtension.ps1 b/Functions/AzureDevOps/Get-ADOExtension.ps1 similarity index 100% rename from Get-ADOExtension.ps1 rename to Functions/AzureDevOps/Get-ADOExtension.ps1 diff --git a/Get-ADOField.ps1 b/Functions/AzureDevOps/Get-ADOField.ps1 similarity index 100% rename from Get-ADOField.ps1 rename to Functions/AzureDevOps/Get-ADOField.ps1 diff --git a/Get-ADOIdentity.ps1 b/Functions/AzureDevOps/Get-ADOIdentity.ps1 similarity index 100% rename from Get-ADOIdentity.ps1 rename to Functions/AzureDevOps/Get-ADOIdentity.ps1 diff --git a/Get-ADOIterationPath.ps1 b/Functions/AzureDevOps/Get-ADOIterationPath.ps1 similarity index 100% rename from Get-ADOIterationPath.ps1 rename to Functions/AzureDevOps/Get-ADOIterationPath.ps1 diff --git a/Get-ADOPermission.ps1 b/Functions/AzureDevOps/Get-ADOPermission.ps1 similarity index 100% rename from Get-ADOPermission.ps1 rename to Functions/AzureDevOps/Get-ADOPermission.ps1 diff --git a/Get-ADOPicklist.ps1 b/Functions/AzureDevOps/Get-ADOPicklist.ps1 similarity index 100% rename from Get-ADOPicklist.ps1 rename to Functions/AzureDevOps/Get-ADOPicklist.ps1 diff --git a/Get-ADOProject.ps1 b/Functions/AzureDevOps/Get-ADOProject.ps1 similarity index 100% rename from Get-ADOProject.ps1 rename to Functions/AzureDevOps/Get-ADOProject.ps1 diff --git a/Get-ADORepository.ps1 b/Functions/AzureDevOps/Get-ADORepository.ps1 similarity index 100% rename from Get-ADORepository.ps1 rename to Functions/AzureDevOps/Get-ADORepository.ps1 diff --git a/Get-ADOServiceEndpoint.ps1 b/Functions/AzureDevOps/Get-ADOServiceEndpoint.ps1 similarity index 100% rename from Get-ADOServiceEndpoint.ps1 rename to Functions/AzureDevOps/Get-ADOServiceEndpoint.ps1 diff --git a/Get-ADOServiceHook.ps1 b/Functions/AzureDevOps/Get-ADOServiceHook.ps1 similarity index 100% rename from Get-ADOServiceHook.ps1 rename to Functions/AzureDevOps/Get-ADOServiceHook.ps1 diff --git a/Get-ADOTask.ps1 b/Functions/AzureDevOps/Get-ADOTask.ps1 similarity index 100% rename from Get-ADOTask.ps1 rename to Functions/AzureDevOps/Get-ADOTask.ps1 diff --git a/Get-ADOTeam.ps1 b/Functions/AzureDevOps/Get-ADOTeam.ps1 similarity index 100% rename from Get-ADOTeam.ps1 rename to Functions/AzureDevOps/Get-ADOTeam.ps1 diff --git a/Get-ADOTest.ps1 b/Functions/AzureDevOps/Get-ADOTest.ps1 similarity index 100% rename from Get-ADOTest.ps1 rename to Functions/AzureDevOps/Get-ADOTest.ps1 diff --git a/Get-ADOUser.ps1 b/Functions/AzureDevOps/Get-ADOUser.ps1 similarity index 100% rename from Get-ADOUser.ps1 rename to Functions/AzureDevOps/Get-ADOUser.ps1 diff --git a/Get-ADOWiki.ps1 b/Functions/AzureDevOps/Get-ADOWiki.ps1 similarity index 100% rename from Get-ADOWiki.ps1 rename to Functions/AzureDevOps/Get-ADOWiki.ps1 diff --git a/Get-ADOWorkItem.ps1 b/Functions/AzureDevOps/Get-ADOWorkItem.ps1 similarity index 100% rename from Get-ADOWorkItem.ps1 rename to Functions/AzureDevOps/Get-ADOWorkItem.ps1 diff --git a/Get-ADOWorkItemType.ps1 b/Functions/AzureDevOps/Get-ADOWorkItemType.ps1 similarity index 100% rename from Get-ADOWorkItemType.ps1 rename to Functions/AzureDevOps/Get-ADOWorkItemType.ps1 diff --git a/Get-ADOWorkProcess.ps1 b/Functions/AzureDevOps/Get-ADOWorkProcess.ps1 similarity index 100% rename from Get-ADOWorkProcess.ps1 rename to Functions/AzureDevOps/Get-ADOWorkProcess.ps1 diff --git a/Import-ADOProxy.ps1 b/Functions/AzureDevOps/Import-ADOProxy.ps1 similarity index 100% rename from Import-ADOProxy.ps1 rename to Functions/AzureDevOps/Import-ADOProxy.ps1 diff --git a/Install-ADOExtension.ps1 b/Functions/AzureDevOps/Install-ADOExtension.ps1 similarity index 100% rename from Install-ADOExtension.ps1 rename to Functions/AzureDevOps/Install-ADOExtension.ps1 diff --git a/Invoke-ADORestAPI.ps1 b/Functions/AzureDevOps/Invoke-ADORestAPI.ps1 similarity index 100% rename from Invoke-ADORestAPI.ps1 rename to Functions/AzureDevOps/Invoke-ADORestAPI.ps1 diff --git a/New-ADOArtifactFeed.ps1 b/Functions/AzureDevOps/New-ADOArtifactFeed.ps1 similarity index 100% rename from New-ADOArtifactFeed.ps1 rename to Functions/AzureDevOps/New-ADOArtifactFeed.ps1 diff --git a/New-ADOBuild.ps1 b/Functions/AzureDevOps/New-ADOBuild.ps1 similarity index 100% rename from New-ADOBuild.ps1 rename to Functions/AzureDevOps/New-ADOBuild.ps1 diff --git a/New-ADOField.ps1 b/Functions/AzureDevOps/New-ADOField.ps1 similarity index 100% rename from New-ADOField.ps1 rename to Functions/AzureDevOps/New-ADOField.ps1 diff --git a/New-ADOPipeline.ps1 b/Functions/AzureDevOps/New-ADOPipeline.ps1 similarity index 100% rename from New-ADOPipeline.ps1 rename to Functions/AzureDevOps/New-ADOPipeline.ps1 diff --git a/New-ADOProject.ps1 b/Functions/AzureDevOps/New-ADOProject.ps1 similarity index 100% rename from New-ADOProject.ps1 rename to Functions/AzureDevOps/New-ADOProject.ps1 diff --git a/New-ADORepository.ps1 b/Functions/AzureDevOps/New-ADORepository.ps1 similarity index 100% rename from New-ADORepository.ps1 rename to Functions/AzureDevOps/New-ADORepository.ps1 diff --git a/New-ADOServiceEndpoint.ps1 b/Functions/AzureDevOps/New-ADOServiceEndpoint.ps1 similarity index 100% rename from New-ADOServiceEndpoint.ps1 rename to Functions/AzureDevOps/New-ADOServiceEndpoint.ps1 diff --git a/New-ADOWorkItem.ps1 b/Functions/AzureDevOps/New-ADOWorkItem.ps1 similarity index 100% rename from New-ADOWorkItem.ps1 rename to Functions/AzureDevOps/New-ADOWorkItem.ps1 diff --git a/New-ADOWorkItemType.ps1 b/Functions/AzureDevOps/New-ADOWorkItemType.ps1 similarity index 100% rename from New-ADOWorkItemType.ps1 rename to Functions/AzureDevOps/New-ADOWorkItemType.ps1 diff --git a/New-ADOWorkProcess.ps1 b/Functions/AzureDevOps/New-ADOWorkProcess.ps1 similarity index 100% rename from New-ADOWorkProcess.ps1 rename to Functions/AzureDevOps/New-ADOWorkProcess.ps1 diff --git a/Register-ADOArtifactFeed.ps1 b/Functions/AzureDevOps/Register-ADOArtifactFeed.ps1 similarity index 100% rename from Register-ADOArtifactFeed.ps1 rename to Functions/AzureDevOps/Register-ADOArtifactFeed.ps1 diff --git a/Remove-ADOAgentPool.ps1 b/Functions/AzureDevOps/Remove-ADOAgentPool.ps1 similarity index 100% rename from Remove-ADOAgentPool.ps1 rename to Functions/AzureDevOps/Remove-ADOAgentPool.ps1 diff --git a/Remove-ADOAreaPath.ps1 b/Functions/AzureDevOps/Remove-ADOAreaPath.ps1 similarity index 100% rename from Remove-ADOAreaPath.ps1 rename to Functions/AzureDevOps/Remove-ADOAreaPath.ps1 diff --git a/Remove-ADOArtifactFeed.ps1 b/Functions/AzureDevOps/Remove-ADOArtifactFeed.ps1 similarity index 100% rename from Remove-ADOArtifactFeed.ps1 rename to Functions/AzureDevOps/Remove-ADOArtifactFeed.ps1 diff --git a/Remove-ADOBuild.ps1 b/Functions/AzureDevOps/Remove-ADOBuild.ps1 similarity index 100% rename from Remove-ADOBuild.ps1 rename to Functions/AzureDevOps/Remove-ADOBuild.ps1 diff --git a/Remove-ADODashboard.ps1 b/Functions/AzureDevOps/Remove-ADODashboard.ps1 similarity index 100% rename from Remove-ADODashboard.ps1 rename to Functions/AzureDevOps/Remove-ADODashboard.ps1 diff --git a/Remove-ADOField.ps1 b/Functions/AzureDevOps/Remove-ADOField.ps1 similarity index 100% rename from Remove-ADOField.ps1 rename to Functions/AzureDevOps/Remove-ADOField.ps1 diff --git a/Remove-ADOIterationPath.ps1 b/Functions/AzureDevOps/Remove-ADOIterationPath.ps1 similarity index 100% rename from Remove-ADOIterationPath.ps1 rename to Functions/AzureDevOps/Remove-ADOIterationPath.ps1 diff --git a/Remove-ADOPicklist.ps1 b/Functions/AzureDevOps/Remove-ADOPicklist.ps1 similarity index 100% rename from Remove-ADOPicklist.ps1 rename to Functions/AzureDevOps/Remove-ADOPicklist.ps1 diff --git a/Remove-ADOProject.ps1 b/Functions/AzureDevOps/Remove-ADOProject.ps1 similarity index 100% rename from Remove-ADOProject.ps1 rename to Functions/AzureDevOps/Remove-ADOProject.ps1 diff --git a/Remove-ADORepository.ps1 b/Functions/AzureDevOps/Remove-ADORepository.ps1 similarity index 100% rename from Remove-ADORepository.ps1 rename to Functions/AzureDevOps/Remove-ADORepository.ps1 diff --git a/Remove-ADOServiceEndpoint.ps1 b/Functions/AzureDevOps/Remove-ADOServiceEndpoint.ps1 similarity index 100% rename from Remove-ADOServiceEndpoint.ps1 rename to Functions/AzureDevOps/Remove-ADOServiceEndpoint.ps1 diff --git a/Remove-ADOTeam.ps1 b/Functions/AzureDevOps/Remove-ADOTeam.ps1 similarity index 100% rename from Remove-ADOTeam.ps1 rename to Functions/AzureDevOps/Remove-ADOTeam.ps1 diff --git a/Remove-ADOWiki.ps1 b/Functions/AzureDevOps/Remove-ADOWiki.ps1 similarity index 100% rename from Remove-ADOWiki.ps1 rename to Functions/AzureDevOps/Remove-ADOWiki.ps1 diff --git a/Remove-ADOWorkItem.ps1 b/Functions/AzureDevOps/Remove-ADOWorkItem.ps1 similarity index 100% rename from Remove-ADOWorkItem.ps1 rename to Functions/AzureDevOps/Remove-ADOWorkItem.ps1 diff --git a/Remove-ADOWorkItemType.ps1 b/Functions/AzureDevOps/Remove-ADOWorkItemType.ps1 similarity index 100% rename from Remove-ADOWorkItemType.ps1 rename to Functions/AzureDevOps/Remove-ADOWorkItemType.ps1 diff --git a/Set-ADOArtifactFeed.ps1 b/Functions/AzureDevOps/Set-ADOArtifactFeed.ps1 similarity index 100% rename from Set-ADOArtifactFeed.ps1 rename to Functions/AzureDevOps/Set-ADOArtifactFeed.ps1 diff --git a/Set-ADOBuild.ps1 b/Functions/AzureDevOps/Set-ADOBuild.ps1 similarity index 100% rename from Set-ADOBuild.ps1 rename to Functions/AzureDevOps/Set-ADOBuild.ps1 diff --git a/Set-ADOEndpoint.ps1 b/Functions/AzureDevOps/Set-ADOEndpoint.ps1 similarity index 100% rename from Set-ADOEndpoint.ps1 rename to Functions/AzureDevOps/Set-ADOEndpoint.ps1 diff --git a/Set-ADOExtension.ps1 b/Functions/AzureDevOps/Set-ADOExtension.ps1 similarity index 100% rename from Set-ADOExtension.ps1 rename to Functions/AzureDevOps/Set-ADOExtension.ps1 diff --git a/Set-ADOPermission.ps1 b/Functions/AzureDevOps/Set-ADOPermission.ps1 similarity index 100% rename from Set-ADOPermission.ps1 rename to Functions/AzureDevOps/Set-ADOPermission.ps1 diff --git a/Set-ADOProject.ps1 b/Functions/AzureDevOps/Set-ADOProject.ps1 similarity index 100% rename from Set-ADOProject.ps1 rename to Functions/AzureDevOps/Set-ADOProject.ps1 diff --git a/Set-ADOTeam.ps1 b/Functions/AzureDevOps/Set-ADOTeam.ps1 similarity index 100% rename from Set-ADOTeam.ps1 rename to Functions/AzureDevOps/Set-ADOTeam.ps1 diff --git a/Set-ADOWorkItem.ps1 b/Functions/AzureDevOps/Set-ADOWorkItem.ps1 similarity index 100% rename from Set-ADOWorkItem.ps1 rename to Functions/AzureDevOps/Set-ADOWorkItem.ps1 diff --git a/Set-ADOWorkProcess.ps1 b/Functions/AzureDevOps/Set-ADOWorkProcess.ps1 similarity index 100% rename from Set-ADOWorkProcess.ps1 rename to Functions/AzureDevOps/Set-ADOWorkProcess.ps1 diff --git a/Start-ADOBuild.ps1 b/Functions/AzureDevOps/Start-ADOBuild.ps1 similarity index 100% rename from Start-ADOBuild.ps1 rename to Functions/AzureDevOps/Start-ADOBuild.ps1 diff --git a/Stop-ADOBuild.ps1 b/Functions/AzureDevOps/Stop-ADOBuild.ps1 similarity index 100% rename from Stop-ADOBuild.ps1 rename to Functions/AzureDevOps/Stop-ADOBuild.ps1 diff --git a/Trace-ADOCommand.ps1 b/Functions/AzureDevOps/Trace-ADOCommand.ps1 similarity index 100% rename from Trace-ADOCommand.ps1 rename to Functions/AzureDevOps/Trace-ADOCommand.ps1 diff --git a/Uninstall-ADOExtension.ps1 b/Functions/AzureDevOps/Uninstall-ADOExtension.ps1 similarity index 100% rename from Uninstall-ADOExtension.ps1 rename to Functions/AzureDevOps/Uninstall-ADOExtension.ps1 diff --git a/Update-ADOBuild.ps1 b/Functions/AzureDevOps/Update-ADOBuild.ps1 similarity index 100% rename from Update-ADOBuild.ps1 rename to Functions/AzureDevOps/Update-ADOBuild.ps1 diff --git a/Update-ADODashboard.ps1 b/Functions/AzureDevOps/Update-ADODashboard.ps1 similarity index 100% rename from Update-ADODashboard.ps1 rename to Functions/AzureDevOps/Update-ADODashboard.ps1 diff --git a/Update-ADOPicklist.ps1 b/Functions/AzureDevOps/Update-ADOPicklist.ps1 similarity index 100% rename from Update-ADOPicklist.ps1 rename to Functions/AzureDevOps/Update-ADOPicklist.ps1 diff --git a/Wait-ADOBuild.ps1 b/Functions/AzureDevOps/Wait-ADOBuild.ps1 similarity index 100% rename from Wait-ADOBuild.ps1 rename to Functions/AzureDevOps/Wait-ADOBuild.ps1 diff --git a/Write-ADODebug.ps1 b/Functions/AzureDevOps/Write-ADODebug.ps1 similarity index 100% rename from Write-ADODebug.ps1 rename to Functions/AzureDevOps/Write-ADODebug.ps1 diff --git a/Write-ADOError.ps1 b/Functions/AzureDevOps/Write-ADOError.ps1 similarity index 100% rename from Write-ADOError.ps1 rename to Functions/AzureDevOps/Write-ADOError.ps1 diff --git a/Write-ADOOutput.ps1 b/Functions/AzureDevOps/Write-ADOOutput.ps1 similarity index 100% rename from Write-ADOOutput.ps1 rename to Functions/AzureDevOps/Write-ADOOutput.ps1 diff --git a/Write-ADOProgress.ps1 b/Functions/AzureDevOps/Write-ADOProgress.ps1 similarity index 100% rename from Write-ADOProgress.ps1 rename to Functions/AzureDevOps/Write-ADOProgress.ps1 diff --git a/Write-ADOVariable.ps1 b/Functions/AzureDevOps/Write-ADOVariable.ps1 similarity index 100% rename from Write-ADOVariable.ps1 rename to Functions/AzureDevOps/Write-ADOVariable.ps1 diff --git a/Write-ADOWarning.ps1 b/Functions/AzureDevOps/Write-ADOWarning.ps1 similarity index 100% rename from Write-ADOWarning.ps1 rename to Functions/AzureDevOps/Write-ADOWarning.ps1 diff --git a/Add-Git.ps1 b/Functions/Git/Add-Git.ps1 similarity index 100% rename from Add-Git.ps1 rename to Functions/Git/Add-Git.ps1 diff --git a/Push-Git.ps1 b/Functions/Git/Push-Git.ps1 similarity index 100% rename from Push-Git.ps1 rename to Functions/Git/Push-Git.ps1 diff --git a/Submit-Git.ps1 b/Functions/Git/Submit-Git.ps1 similarity index 100% rename from Submit-Git.ps1 rename to Functions/Git/Submit-Git.ps1 diff --git a/Connect-GitHub.ps1 b/Functions/GitHub/Connect-GitHub.ps1 similarity index 100% rename from Connect-GitHub.ps1 rename to Functions/GitHub/Connect-GitHub.ps1 diff --git a/Disconnect-GitHub.ps1 b/Functions/GitHub/Disconnect-GitHub.ps1 similarity index 100% rename from Disconnect-GitHub.ps1 rename to Functions/GitHub/Disconnect-GitHub.ps1 diff --git a/Hide-GitHubOutput.ps1 b/Functions/GitHub/Hide-GitHubOutput.ps1 similarity index 100% rename from Hide-GitHubOutput.ps1 rename to Functions/GitHub/Hide-GitHubOutput.ps1 diff --git a/Invoke-GitHubRESTApi.ps1 b/Functions/GitHub/Invoke-GitHubRESTApi.ps1 similarity index 100% rename from Invoke-GitHubRESTApi.ps1 rename to Functions/GitHub/Invoke-GitHubRESTApi.ps1 diff --git a/New-GitHubAction.ps1 b/Functions/GitHub/New-GitHubAction.ps1 similarity index 100% rename from New-GitHubAction.ps1 rename to Functions/GitHub/New-GitHubAction.ps1 diff --git a/New-GitHubWorkflow.ps1 b/Functions/GitHub/New-GitHubWorkflow.ps1 similarity index 100% rename from New-GitHubWorkflow.ps1 rename to Functions/GitHub/New-GitHubWorkflow.ps1 diff --git a/Trace-GitHubCommand.ps1 b/Functions/GitHub/Trace-GitHubCommand.ps1 similarity index 100% rename from Trace-GitHubCommand.ps1 rename to Functions/GitHub/Trace-GitHubCommand.ps1 diff --git a/Write-GitHubDebug.ps1 b/Functions/GitHub/Write-GitHubDebug.ps1 similarity index 100% rename from Write-GitHubDebug.ps1 rename to Functions/GitHub/Write-GitHubDebug.ps1 diff --git a/Write-GitHubError.ps1 b/Functions/GitHub/Write-GitHubError.ps1 similarity index 100% rename from Write-GitHubError.ps1 rename to Functions/GitHub/Write-GitHubError.ps1 diff --git a/Write-GitHubOutput.ps1 b/Functions/GitHub/Write-GitHubOutput.ps1 similarity index 100% rename from Write-GitHubOutput.ps1 rename to Functions/GitHub/Write-GitHubOutput.ps1 diff --git a/Write-GitHubWarning.ps1 b/Functions/GitHub/Write-GitHubWarning.ps1 similarity index 100% rename from Write-GitHubWarning.ps1 rename to Functions/GitHub/Write-GitHubWarning.ps1 From 671658480bf43be8505b5edc702298568cf7a2d1 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Thu, 17 Feb 2022 20:27:19 -0800 Subject: [PATCH 002/151] Updating Location where Functions are Imported --- PSDevOps.psm1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PSDevOps.psm1 b/PSDevOps.psm1 index ca3569a9..d0ac5995 100644 --- a/PSDevOps.psm1 +++ b/PSDevOps.psm1 @@ -2,7 +2,8 @@ [Diagnostics.CodeAnalysis.SuppressMessageAttribute("Test-ForSlowScript", "", Justification="Performance is not a priority for this module")] param() #region Import Functions -foreach ($file in Get-ChildItem -Path $psScriptRoot -Filter *-*.ps1) { +$functionsRoot = Join-Path $psScriptRoot Functions +foreach ($file in Get-ChildItem -Path $functionsRoot.Fullname -Filter *-*.ps1 -Recurse) { . $file.FullName } #endregion Import Functions From 79fca874971b258d5fef1ff166d230f15e3c2123 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Thu, 17 Feb 2022 20:54:19 -0800 Subject: [PATCH 003/151] Moving BuildStep functions into Functions directory --- Get-BuildStep.ps1 => Functions/Get-BuildStep.ps1 | 0 Import-BuildStep.ps1 => Functions/Import-BuildStep.ps1 | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename Get-BuildStep.ps1 => Functions/Get-BuildStep.ps1 (100%) rename Import-BuildStep.ps1 => Functions/Import-BuildStep.ps1 (100%) diff --git a/Get-BuildStep.ps1 b/Functions/Get-BuildStep.ps1 similarity index 100% rename from Get-BuildStep.ps1 rename to Functions/Get-BuildStep.ps1 diff --git a/Import-BuildStep.ps1 b/Functions/Import-BuildStep.ps1 similarity index 100% rename from Import-BuildStep.ps1 rename to Functions/Import-BuildStep.ps1 From 0a7246d4a2c72b0323a80b759683fd1b93ce5c3f Mon Sep 17 00:00:00 2001 From: James Brundage Date: Thu, 17 Feb 2022 20:55:28 -0800 Subject: [PATCH 004/151] Moving BuildStep functions into Functions directory --- Convert-BuildStep.ps1 => Functions/Convert-BuildStep.ps1 | 0 Expand-BuildStep.ps1 => Functions/Expand-BuildStep.ps1 | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename Convert-BuildStep.ps1 => Functions/Convert-BuildStep.ps1 (100%) rename Expand-BuildStep.ps1 => Functions/Expand-BuildStep.ps1 (100%) diff --git a/Convert-BuildStep.ps1 b/Functions/Convert-BuildStep.ps1 similarity index 100% rename from Convert-BuildStep.ps1 rename to Functions/Convert-BuildStep.ps1 diff --git a/Expand-BuildStep.ps1 b/Functions/Expand-BuildStep.ps1 similarity index 100% rename from Expand-BuildStep.ps1 rename to Functions/Expand-BuildStep.ps1 From 117548c2c5ac9de74db6aee40b5a31b39e0a2b0d Mon Sep 17 00:00:00 2001 From: James Brundage Date: Thu, 17 Feb 2022 21:00:17 -0800 Subject: [PATCH 005/151] Moving Get-PSDevOps into Functions --- Get-PSDevOps.ps1 => Functions/Get-PSDevOps.ps1 | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Get-PSDevOps.ps1 => Functions/Get-PSDevOps.ps1 (100%) diff --git a/Get-PSDevOps.ps1 b/Functions/Get-PSDevOps.ps1 similarity index 100% rename from Get-PSDevOps.ps1 rename to Functions/Get-PSDevOps.ps1 From a6da3ba13432c39d68038e4bd29080c0fc0211d3 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Thu, 17 Feb 2022 21:01:25 -0800 Subject: [PATCH 006/151] Removing ReleaseNotes.md (supplanted by CHANGELOG) --- ReleaseNotes.md | 280 ------------------------------------------------ 1 file changed, 280 deletions(-) delete mode 100644 ReleaseNotes.md diff --git a/ReleaseNotes.md b/ReleaseNotes.md deleted file mode 100644 index 8477aebf..00000000 --- a/ReleaseNotes.md +++ /dev/null @@ -1,280 +0,0 @@ -0.5.3 ---- -* Get-ADORepository : Adding -PullRequestID -* New/Set-ADOWorkItem: Fixing pipelining issue - -0.5.2 ---- -* Get-ADOTeam: Adding alias -AreaPath for -TeamFieldValue, carrying on team property -* Set-ADOTeam: Support for -DefaultAreaPath/-AreaPath (TeamFieldValues api, fixing issue #92) -* Get-ADOTest: Enabling pagination and filtering of results. -** Invoke-ADORestAPI: Fixing -Cache(ing) correctly (#88) -** Invoke-GitHubRESTAPI: Only using .ContentEncoding if present in results (PowerShell core fix) -* Get-ADOWorkItem: -** Fixing -Related (#79) -** Fixing -Comment errors when there are no commments (#80) -* New/Set-ADOWorkItem: -** Adding -Relationship and -Comment (#81) -** Improving Formatting of Work Items (#82) -** Adding -Tag -* Invoke-ADORestAPI: Fixing issue with -QueryParameter - -0.5.1 ---- -* Bugfixes: -** Get-ADOTest: Fixing parameter sets and adding formatting. -** Invoke-GitHubRESTAPI: Only using .ContentEncoding when present. -0.5 ---- -* Improved Git Functionality -** New-GitHubAction -** Invoke-GitHubRESTApi -** Connect/Disconnect-GitHub (enabling smart aliases like api.github.com/zen and api.github.com/repos//) -** Formatting for GitHub Issues and Repos -* Azure DevOps Additions/Fixes -** Invoke-ADORestAPI -AsJob - -** Get-ADOArtifactFeed now has -Metric, -PackageList, -PackageVersionList, -Provenance -** Get-ADOIdentity [new] -** Get-ADOProject now has -Board, -TestVariable, -TestConfiguration -** Get-ADOPermission is now more API-complete and has parameter sets for permission types -** Set-ADOPermission -** Get-ADOExtension can now read extension data -** Set-ADOExtension can now set extension data -** Get-ADOTest [new] -** New-ADOPipeline now has -RootDirectory -** Tons of New Type Definitions and Formatters - -0.4.9 ---- -* New Command: Wait-ADOBuild -* Start-ADOBuild -** Supports -Debug (to start a build with extra tracing) -** Allows parameters as PSObject -* Get-ADORepository: Added -IncludeHidden, -IncludeRemoteURL, -IncludeLink -* Improvements to Pipelines and Workflows: -** Pester, PSScriptAnalyzer, and ScriptCop now produce output variables -** PSDevOps now includes a file to generate it's own build -** PublishTest/CodeCoverage Results steps will always() run -** Convert-BuildStep will add a .Name to each script step. -0.4.8 ---- -* Improved Tracing -** New Commands: Write-ADOOutput, Trace-ADOCommand/GitHubCommand -** Renaming Command / Adding Parameters: Set-ADOVariable -> Write-ADOVariable. Added -IsOutput & -IsReadOnly. -** Adding Trace-GitHubCommand/ADOCommand -** Improved logging of parameters in Convert-BuildStep -* New Functionality in Azure DevOps: -** Get-ADOProject now has -TestRun, -TestPlan, -Release, and -PendingApproval (and better progress bars) -** Get-ADOWorkItemType now has -Field -** Commands for Picklists: Add/Get/Remove/Update-ADOPicklist -0.4.7 ----- -* New Commands: -** Add/Get/Remove-ADOWiki -** Get-ADOPermission -* Bugfixes: -** Honoring Get-ADOBuild -DefinitionName -* Disconnect-ADO is now run prior at the start of Connect-ADO, and on module unload. -0.4.6 ---- -* New-ADOPipeline/New-GitHubWorkflow: Adding -BuildScript -* Connect-ADO: Auto-detecting connected user's teams and adding tab completion for -Project/-ProjectID/-Team/-TeamID -* Convert-BuildStep: Re-ordering YAML for GitHub Workflows (putting .runs last) -* Convert-ADOPipeline: Not returning .inputs when there are no .inputs -* Get-ADOProject: Adding -PolicyType and -PolicyConfiguration -* Get-ADORepository: Adding -PullRequest, -SourceReference, -TargetReference, -ReviewerIdentity, -CreatorIdentity. -* Get-ADOBuild: Adding -DefinitionName -* Invoke-ADORestAPI: Passing content length of 0 when body is empty. -* Updating README - - -0.4.5 ---- -* New Commands: -** Connect/Disconnect-ADO: Caching connection info and saving default parameters! -** New-ADOBuild : Create build definitions! -** Remove-ADOAgentPool : Cleaning up pools, queues, and agents. -* Core Improvements -** Invoke-ADORestApi -*** Now supports -ContinuationToken (and auto-continues unless passed a $first or $top query parameter) -*** Caches access tokens. -*** BREAKING: Invoke-ADORestApi No longer has -Proxy* parameters. -* Updated Commands: -** Get-ADOUser/Get-ADOTeam : Additional Graph scenarios added. -** New/Set-ADOWorkItem : Added -BypassRule, -ValidateOnly, -SkipNotification -0.4.4 ---- -* Get-ADOTask: Adding -YAMLSchema. -* Get-ADOTeam: Adding -Setting/-FieldValue/-Iteration/-Board. -* Get-ADOAreaPath/ADOIterationPath: Making parameter names match cmdlet. Honoring -AreaPath/-IterationPath. -* Get-ADOProject: Adding -ProcessConfiguration, -Plan, -PlanID, and -DeliveryTimeline. -* New Command: Set-ADOTeam -0.4.3 ---- -*Renaming commands: -** New-ADODashboard -> Add-ADODashboard -** New-ADOTeam -> Add-ADOTeam -* Add-ADOTeam can now add members to a team -* Get-ADOTeam can now get an -Identity -* New Command: Get-ADOUser -* Get-ADOAgentPool: Fixed pipelining bug, added -AgentName/-IncludeCapability/-IncludeLastCompletedRequest/-IncludeAssignedRequest. -* Set-ADOProject: Can now -EnableFeature and -DisableFeature -0.4.2 ---- -* Build Step Improvements: -** New-ADOPipeline now has -PowerShellCore and -WindowsPowerShell -** Import-BuildStep now has parameter sets -** New-ADOPipeline/New-GitHubWorkflow now refer to a metadata collection based off of their noun. -** BuildStep directories can be aliased: -*** ADOPipeline directories can be: ADOPipeline, ADO, AzDo, and AzureDevOps. -*** GitHubWorkflow directories can be: GitHubWorkflow, GitHubWorkflows, and GitHub. -* New Dashboard Commands: Clear/Update-ADODashboard -* New Extension Commands: Enable/Disbale-ADOExtension -* Improved formatting/types for Extensions. -* Breaking change: Install/Uninstall-ADOExtension now accept -PublisherID and -ExtensionID, not -PublisherName and -ExtensionName. -0.4.1 ---- -* More GitHub Functionality: -** Write-GitHubDebug -** Write-GitHubOutput -** Hide-GitHubOutput -** New-GitHubWorkflow allows for more complex event mapping. -* Azure DevOps Pipeline Changes -** Convert-BuildStep once again converts using ${{parameters}} syntax -* New/Improved Azure DevOps Cmdlets -** Get/New/Remove-ADODashboard -** Get-ADOAgentPool now supports -PoolID -** Set-ADOProject -** Repositories returned from a build definition are now decorated as PSDevOps.Repository -* Improved testing and static analysis compliance -0.4 ---- -* Overhaul of GitHub Workflow functionality. -** New-GitHubAction renamed to New-GitHubWorkflow -** /GitHubActions renamed to /GitHub -** Added -EventParameter to allow for parameters from events such as workflow_dispatch -** Added Write-GitHubError/GitHubWarning (updating Write-ADOError/Write-ADOWarning for consistency) -** Cleaning up GitHub Workflow parts -* Get-ADOTask no longer has -ApiVersion parameter -0.3.9 ---- -* New/Get/Remove-ADOWorkItemType: Create/get/remove work custom work item types, states, rules, and behaviors. -* Added Get-ADOBuild -IncludeAllProperty/-IncludeLatestBuild. -* ScriptCop Integration: PowerShelllStaticAnalysis stage now runs ScriptCop as well. -* Improved ScriptAnalyzer Integration: Rule name is now outputted. -0.3.8 ---- -* Add/Remove-ADOAreaPath -* Formatter for AreaPaths - -0.3.7 ---- -* Convert-ADOPipeline now has -Passthru and -Wherefore -* Get-ADOWorkProcess now has -Behavior and -WorkItemType -* Get-ADOWorkItem now has -Mine, -CurrentIteration, -Comment, -Update, -Revision. - -0.3.6.1 ---- -* Convert-ADOPipeline now binds to .Variables property -* Fixing bug in PSDevOps.WorkItem types file, which displayed in formatting. -0.3.6 ---- -* Added: Get-ADOTask, Convert-ADOPipeline -0.3.5 ---- -* New Command: Get-ADOTeam -* Get-ADOBuild -CodeCoverage -* Progress bars on Get-ADORepository -* Slight refactoring to make progress bars easier in any function - -0.3.4.1 ---- -* Removing supplied parameters in commands generated by Import-ADOProxy. -0.3.4 ---- -* New capability: Import-ADOProxy (Import a proxy module with for your ADO / TFS instance) -* New REST Commands: Get-ADOAreaPath, Get-ADOIterationPath, Get-ADOExtension -* More Features: Get-ADORepository -FileList -* Massive Internal Refactoring (switching to dynamic parameters for -PersonalAccessToken etc, standardizing pstypenames) -0.3.3 ---- -* Now Caching Personal Access Tokens! -* URLEncoding all segments in Parts/ReplaceRouteParameter. -* Ensuring all Azure DevOps YAML Parameters are wrapped in a string. -0.3.2 ---- -* Pester workarounds - Steps/InstallPester and Steps/RunPester now accept a PesterMaxVersion (defaulting to 4.99.99) -* Convert-BuildStep handles blank parameter defaults correctly -* Get-ADOBuild can get yaml definitions directly, e.g Get-ADOBuild -DefinitionID 123 -DefinitionYaml -0.3.1 ---- -* Bugfixes and Improvements to Convert/Import/Expand-BuildStep: -1. Enforcing pluralization of certain fields within Azure DevOps -2. Handling [string[]], [int[]], [float[]], or [ScriptBlock] parameters -* Allowing lists of primitives to not be indented in YAML. -0.3.0 ---- -* Added Convert/Import/Expand-BuildStep -* Allowing build steps to be defined in functions -* Automagically importing build step parameters -0.2.9 ---- -* Get/New/Remove-ADORepository -* Get/New/Remove-ADOServiceEndpoint -* Get-ADOAgentPool -** Improvements to New-ADOPipeline to avoid unexpected singletons -0.2.8 ---- -* Get/New/Update-ADOBuild -* Improving New-ADOPipeline: -** Unknown -InputObject properties will no longer be pluralized -** Added 'Pool' to list of known singletons -0.2.7 ---- -* New Cmdlet: Set-ADOArtifactFeed -* Improvements to New/Get/Remove-ADOArtifactFeed (better pipelining, renaming -FullyQualifiedID to -FeedID) -0.2.6 ---- -* New Cmdlets: -** New/Get/Remove-ADOArtifactFeed -** New/Remove-ADOProject -** New-GitHubAction -0.2.5 ---- -* Improving Get-ADOWorkItem: -** -Title allows getting work items by title -** -NoDetail allows for queries to only return IDs -** Passing -Field will skip formatting -** WorkItemsBatch will be used for query results. -** Passing an old -ApiVersion will not use workItemsBatch -** Formatting improved -* Adding Get-ADOWorkProcess -* Fixing issues with -ADOField commands when not provided a -Project -0.2.4 ---- -* Adding Adding -CanSortBy, -IsQueryable, and -ReadOnly to New-ADOField. -* Adding parameter help to New-ADOField -0.2.3 ---- -* Adding New/Remove-ADOField -* Adding help to Get-ADOField -* Adding formatting for fields -0.2.2 ---- -* Adding New/Set/Remove-ADOWorkItem -* Adding Get-ADOField -* New Parameter: Get-ADOWorkItem -WorkItemType -* New Parameter: New-ADOPipeline -Option -* Initial formatting -* Switching Parts to use latest VMImage - -0.2.1 : -* Added Get-ADOWorkItem ---- -0.2 : ---- -* Added Invoke-ADORestAPI -0.1 : ---- -Initial Commit From 8282f067c26968ccf73be1068c47953f95faf985 Mon Sep 17 00:00:00 2001 From: James Brundage Date: Thu, 17 Feb 2022 21:10:53 -0800 Subject: [PATCH 007/151] Adding Get-PSDevOpsExtension: Thanks to [https://github.com/StartAutomating/Piecemeal](https://github.com/StartAutomating/Piecemeal) --- Functions/Get-PSDevOpsExtension.ps1 | 454 ++++++++++++++++++++++++++++ 1 file changed, 454 insertions(+) create mode 100644 Functions/Get-PSDevOpsExtension.ps1 diff --git a/Functions/Get-PSDevOpsExtension.ps1 b/Functions/Get-PSDevOpsExtension.ps1 new file mode 100644 index 00000000..515a5771 --- /dev/null +++ b/Functions/Get-PSDevOpsExtension.ps1 @@ -0,0 +1,454 @@ +#region Piecemeal [ 0.1.3 ] : Easy Extensible Plugins for PowerShell +# (Install-Module Piecemeal; Install-Piecemeal -ExtensionModule 'PSDevOps' -ExtensionModuleAlias 'psdo' -ExtensionTypeName 'PSDevOps.Extension' -OutputPath '.\Get-PSDevOpsExtension.ps1' ) +function Get-PSDevOpsExtension +{ + <# + .Synopsis + Gets Extensions + .Description + Gets Extensions. + + PSDevOps Extensions can be found in: + + * Any module that includes -ExtensionModuleName in it's tags. + * The directory specified in -ExtensionPath + .Example + Get-PSDevOpsExtension + #> + [OutputType('Extension')] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSReviewUnusedParameter", "", Justification="PSScriptAnalyzer cannot handle nested scoping")] + param( + # If provided, will look beneath a specific path for extensions. + [Parameter(ValueFromPipelineByPropertyName)] + [Alias('Fullname')] + [string] + $ExtensionPath, + + # If set, will clear caches of extensions, forcing a refresh. + [switch] + $Force, + + # If provided, will get PSDevOps Extensions that extend a given command + [Parameter(ValueFromPipelineByPropertyName)] + [Alias('ThatExtends', 'For')] + [string[]] + $CommandName, + + # If set, will return the dynamic parameters object of all the PSDevOps Extensions for a given command. + [Parameter(ValueFromPipelineByPropertyName)] + [switch] + $DynamicParameter, + + # If set, will return if the extension could run + [Parameter(ValueFromPipelineByPropertyName)] + [Alias('CanRun')] + [switch] + $CouldRun, + + # If set, will run the extension. If -Stream is passed, results will be directly returned. + # By default, extension results are wrapped in a return object. + [Parameter(ValueFromPipelineByPropertyName)] + [switch] + $Run, + + # If set, will stream output from running the extension. + # By default, extension results are wrapped in a return object. + [Parameter(ValueFromPipelineByPropertyName)] + [switch] + $Stream, + + # If set, will return the dynamic parameters of all PSDevOps Extensions for a given command, using the provided DynamicParameterSetName. + # Implies -DynamicParameter. + [Parameter(ValueFromPipelineByPropertyName)] + [string] + $DynamicParameterSetName, + + + # If provided, will return the dynamic parameters of all PSDevOps Extensions for a given command, with all positional parameters offset. + # Implies -DynamicParameter. + [Parameter(ValueFromPipelineByPropertyName)] + [int] + $DynamicParameterPositionOffset = 0, + + # If set, will return the dynamic parameters of all PSDevOps Extensions for a given command, with all mandatory parameters marked as optional. + # Implies -DynamicParameter. Does not actually prevent the parameter from being Mandatory on the Extension. + [Parameter(ValueFromPipelineByPropertyName)] + [Alias('NoMandatoryDynamicParameters')] + [switch] + $NoMandatoryDynamicParameter, + + # The parameters to the extension. Only used when determining if the extension -CouldRun. + [Parameter(ValueFromPipelineByPropertyName)] + [Collections.IDictionary] + [Alias('Parameters','ExtensionParameter','ExtensionParameters')] + $Parameter = @{} + ) + + begin { + $ExtensionNameRegEx = '(? in Irregular (https://github.com/StartAutomating/Irregular) + [Regex]::new(' + \.(?Description) # Field Start + \s{0,} # Optional Whitespace + (?(.|\s)+?(?=(\.\w+|\#\>))) # Anything until the next .\field or end of the comment block + ', 'IgnoreCase,IgnorePatternWhitespace', [Timespan]::FromSeconds(1)).Match( + $this.ScriptBlock + ).Groups["Content"].Value + } + )) + + + $extCmd.PSObject.Properties.Add([PSScriptProperty]::new( + 'Synopsis', { + # From ? in Irregular (https://github.com/StartAutomating/Irregular) + [Regex]::new(' + \.(?Synopsis) # Field Start + \s{0,} # Optional Whitespace + (?(.|\s)+?(?=(\.\w+|\#\>))) # Anything until the next .\field or end of the comment block + ', 'IgnoreCase,IgnorePatternWhitespace', [Timespan]::FromSeconds(1)).Match( + $this.ScriptBlock + ).Groups["Content"].Value + })) + + $extCmd.PSObject.Methods.Add([PSScriptMethod]::new('GetDynamicParameters', { + param( + [string] + $ParameterSetName, + + [int] + $PositionOffset, + + [switch] + $NoMandatory + ) + + $ExtensionDynamicParameters = [Management.Automation.RuntimeDefinedParameterDictionary]::new() + $Extension = $this + foreach ($in in @(([Management.Automation.CommandMetaData]$Extension).Parameters.Keys)) { + $attrList = [Collections.Generic.List[Attribute]]::new() + foreach ($attr in $extension.Parameters[$in].attributes) { + if ($attr -isnot [Management.Automation.ParameterAttribute]) { + # we can passthru any non-parameter attributes + $attrList.Add($attr) + } else { + # but parameter attributes need to copied. + $attrCopy = [Management.Automation.ParameterAttribute]::new() + # (Side note: without a .Clone, copying is tedious.) + foreach ($prop in $attrCopy.GetType().GetProperties('Instance,Public')) { + if (-not $prop.CanWrite) { continue } + if ($null -ne $attr.($prop.Name)) { + $attrCopy.($prop.Name) = $attr.($prop.Name) + } + } + + + $attrCopy.ParameterSetName = + if ($ParameterSetName) { + $ParameterSetName + } + else { + $defaultParamSetName = + foreach ($extAttr in $Extension.ScriptBlock.Attributes) { + if ($extAttr.DefaultParameterSetName) { + $extAttr.DefaultParameterSetName + break + } + } + if ($defaultParamSetName) { + $defaultParamSetName + } + elseif ($this -is [Management.Automation.FunctionInfo]) { + $this.Name + } elseif ($this -is [Management.Automation.ExternalScriptInfo]) { + $this.Source + } + } + + if ($NoMandatory -and $attrCopy.Mandatory) { + $attrCopy.Mandatory = $false + } + + if ($PositionOffset -and $attr.Position -ge 0) { + $attrCopy.Position += $PositionOffset + } + $attrList.Add($attrCopy) + } + } + + $ExtensionDynamicParameters.Add($in, [Management.Automation.RuntimeDefinedParameter]::new( + $Extension.Parameters[$in].Name, + $Extension.Parameters[$in].ParameterType, + $attrList + )) + } + + $ExtensionDynamicParameters + + })) + + $extCmd.PSObject.Methods.Add([PSScriptMethod]::new('CouldRun', { + param([Collections.IDictionary]$params) + + $mappedParams = [Ordered]@{} # Create a collection of mapped parameters + $mandatories = # Walk thru each parameter of this command + @(foreach ($myParam in $this.Parameters.GetEnumerator()) { + if ($params.Contains($myParam.Key)) { # If this was in Params, + $mappedParams[$myParam.Key] = $params[$myParam.Key] # then map it. + } else { + foreach ($paramAlias in $myParam.Value.Aliases) { # Otherwise, check the aliases + if ($params.Contains($paramAlias)) { # and map it if the parameters had the alias. + $mappedParams[$myParam.Key] = $params[$paramAlias] + break + } + } + } + if ($myParam.value.Attributes.Mandatory) { # If the parameter was mandatory, + $myParam.Key # keep track of it. + } + }) + + foreach ($mandatoryParam in $mandatories) { # Walk thru each mandatory parameter. + if (-not $params.Contains($mandatoryParam)) { # If it wasn't in the parameters. + return $false # return $false (note, for now, this prevents parameter sets from working in extensions) + } + } + return $mappedParams + + + })) + + $extCmd.pstypenames.clear() + if ($ExtensionTypeName) { + $extCmd.pstypenames.add($ExtensionTypeName) + } else { + $extCmd.pstypenames.add('Extension') + } + + $extCmd + } + function OutputExtension { + begin { + $allDynamicParameters = [Management.Automation.RuntimeDefinedParameterDictionary]::new() + } + process { + $extCmd = $_ + if ($DynamicParameter -or $DynamicParameterSetName -or $DynamicParameterPositionOffset -or $NoMandatoryDynamicParameter) { + $extensionParams = $extCmd.GetDynamicParameters($DynamicParameterSetName, $DynamicParameterPositionOffset, $NoMandatoryDynamicParameter) + foreach ($kv in $extensionParams.GetEnumerator()) { + if ($commandExtended -and ([Management.Automation.CommandMetaData]$commandExtended).Parameters.$($kv.Key)) { + continue + } + if ($allDynamicParameters.ContainsKey($kv.Key)) { + if ($kv.Value.ParameterType -ne $allDynamicParameters[$kv.Key].ParameterType) { + Write-Verbose "Extension '$extCmd' Parameter '$($kv.Key)' Type Conflict, making type PSObject" + $allDynamicParameters[$kv.Key].ParameterType = [PSObject] + } + foreach ($attr in $kv.Value.Attributes) { + if ($allDynamicParameters[$kv.Key].Attributes.Contains($attr)) { + continue + } + $allDynamicParameters[$kv.Key].Attributes.Add($attr) + } + } else { + $allDynamicParameters[$kv.Key] = $kv.Value + } + } + } + elseif ($CouldRun) { + + $couldRunExt = $extCmd.CouldRun($Parameter) + if (-not $couldRunExt) { return } + [PSCustomObject][Ordered]@{ + ExtensionCommand = $extCmd + CommandName = $CommandName + ExtensionParameter = $couldRunExt + } + + return + } + elseif ($Run) { + $couldRunExt = $extCmd.CouldRun($Parameter) + if (-not $couldRunExt) { return } + if ($extCmd.InheritanceLevel -eq 'InheritedReadOnly') { return } + if ($Stream) { + & $extCmd @couldRunExt + } else { + [PSCustomObject][Ordered]@{ + CommandName = $CommandName + ExtensionCommand = $extCmd + ExtensionOutput = & $extCmd @couldRunExt + Done = $extCmd.InheritanceLevel -eq 'NotInherited' + } + } + return + } + else { + return $extCmd + } + } + end { + if ($DynamicParameter) { + return $allDynamicParameters + } + } + } + #endregion Define Inner Functions + + + $extensionFullRegex = + if ($ExtensionModule) { + "\.(?>$(@(@($ExtensionModule) + $ExtensionModuleAlias) -join '|'))\." + $ExtensionNameRegEx + } else { + $ExtensionNameRegEx + } + + #region Find Extensions + $loadedModules = @(Get-Module) + $myInv = $MyInvocation + $myModuleName = if ($ExtensionModule) { $ExtensionModule } else {$MyInvocation.MyCommand.Module.Name } + if ($myInv.MyCommand.Module -and $loadedModules -notcontains $myInv.MyCommand.Module) { + $loadedModules = @($myInv.MyCommand.Module) + $loadedModules + } + $getCmd = $ExecutionContext.SessionState.InvokeCommand.GetCommand + + if ($Force) { + $script:PSDevOpsExtensions = $null + } + if (-not $script:PSDevOpsExtensions) + { + $script:PSDevOpsExtensions = + @( + #region Find PSDevOps Extensions in Loaded Modules + foreach ($loadedModule in $loadedModules) { # Walk over all modules. + if ( # If the module has PrivateData keyed to this module + $loadedModule.PrivateData.$myModuleName + ) { + # Determine the root of the module with private data. + $thisModuleRoot = [IO.Path]::GetDirectoryName($loadedModule.Path) + # and get the extension data + $extensionData = $loadedModule.PrivateData.$myModuleName + if ($extensionData -is [Hashtable]) { # If it was a hashtable + foreach ($ed in $extensionData.GetEnumerator()) { # walk each key + + $extensionCmd = + if ($ed.Value -like '*.ps1') { # If the key was a .ps1 file + $getCmd.Invoke( # treat it as a relative path to the .ps1 + [IO.Path]::Combine($thisModuleRoot, $ed.Value), + 'ExternalScript' + ) + } else { # Otherwise, treat it as the name of an exported command. + $loadedModule.ExportedCommands[$ed.Value] + } + if ($extensionCmd) { # If we've found a valid extension command + $extensionCmd | ConvertToExtension # return it as an extension. + } + } + } + } + elseif ($loadedModule.PrivateData.Tags -contains $myModuleName -or $loadedModule.Name -eq $myModuleName) { + $loadedModule | + Split-Path | + Get-ChildItem -Recurse | + Where-Object Name -Match $extensionFullRegex | + ConvertToExtension + } + } + #endregion Find PSDevOps Extensions in Loaded Modules + ) + } + #endregion Find Extensions + } + + process { + + if ($ExtensionPath) { + Get-ChildItem -Recurse -Path $ExtensionPath | + Where-Object Name -Match $extensionFullRegex | + ConvertToExtension | + . WhereExtends $CommandName | + OutputExtension + } else { + $script:PSDevOpsExtensions | + . WhereExtends $CommandName | + OutputExtension + } + } +} +#endregion Piecemeal [ 0.1.3 ] : Easy Extensible Plugins for PowerShell + From e54a4de5c901f4eab7d72a99d455cc91009e1e0d Mon Sep 17 00:00:00 2001 From: James Brundage Date: Thu, 17 Feb 2022 21:14:22 -0800 Subject: [PATCH 008/151] Adding README.md --- Functions/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Functions/README.md diff --git a/Functions/README.md b/Functions/README.md new file mode 100644 index 00000000..5b2ed6f9 --- /dev/null +++ b/Functions/README.md @@ -0,0 +1,9 @@ +This directory and it's subdirectories contains the functions exported from PSDevOps. + +Common functionality resides in this directory. + +There are many functions in categorized subdirectories: + +* [AzureDevOps](AzureDevOps) +* [Git](Git) +* [GitHub](GitHub) From 5fd2a390d8a7c84267ee191703e69abd86df7ac5 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Thu, 3 Mar 2022 16:17:55 -0800 Subject: [PATCH 009/151] Updating Get-PSDevOpsExtension [Piecemeal 0.1.6] --- Functions/Get-PSDevOpsExtension.ps1 | 135 +++++++++++++++++++++++++--- 1 file changed, 124 insertions(+), 11 deletions(-) diff --git a/Functions/Get-PSDevOpsExtension.ps1 b/Functions/Get-PSDevOpsExtension.ps1 index 515a5771..ec9440f1 100644 --- a/Functions/Get-PSDevOpsExtension.ps1 +++ b/Functions/Get-PSDevOpsExtension.ps1 @@ -1,4 +1,4 @@ -#region Piecemeal [ 0.1.3 ] : Easy Extensible Plugins for PowerShell +#region Piecemeal [ 0.1.6 ] : Easy Extensible Plugins for PowerShell # (Install-Module Piecemeal; Install-Piecemeal -ExtensionModule 'PSDevOps' -ExtensionModuleAlias 'psdo' -ExtensionTypeName 'PSDevOps.Extension' -OutputPath '.\Get-PSDevOpsExtension.ps1' ) function Get-PSDevOpsExtension { @@ -34,6 +34,22 @@ function Get-PSDevOpsExtension [string[]] $CommandName, + # The name of an extension + [Parameter(ValueFromPipelineByPropertyName)] + [ValidateNotNullOrEmpty()] + [string[]] + $ExtensionName, + + # If provided, will treat -ExtensionName as a wildcard. + [Parameter(ValueFromPipelineByPropertyName)] + [switch] + $Like, + + # If provided, will treat -ExtensionName as a regular expression. + [Parameter(ValueFromPipelineByPropertyName)] + [switch] + $Match, + # If set, will return the dynamic parameters object of all the PSDevOps Extensions for a given command. [Parameter(ValueFromPipelineByPropertyName)] [switch] @@ -77,6 +93,11 @@ function Get-PSDevOpsExtension [switch] $NoMandatoryDynamicParameter, + # If set, will validate this input against [ValidateScript], [ValidatePattern], and [ValidateSet] attributes found on an extension. + [Parameter(ValueFromPipelineByPropertyName)] + [PSObject] + $ValidateInput, + # The parameters to the extension. Only used when determining if the extension -CouldRun. [Parameter(ValueFromPipelineByPropertyName)] [Collections.IDictionary] @@ -85,7 +106,7 @@ function Get-PSDevOpsExtension ) begin { - $ExtensionNameRegEx = '(?$(@(@($ExtensionModule) + $ExtensionModuleAlias) -join '|'))\." + $ExtensionNameRegEx + "\.(?>$(@(@($ExtensionModule) + $ExtensionModuleAlias) -join '|'))\." + $ExtensionPattern } else { - $ExtensionNameRegEx + $ExtensionPattern } #region Find Extensions @@ -442,13 +553,15 @@ function Get-PSDevOpsExtension Where-Object Name -Match $extensionFullRegex | ConvertToExtension | . WhereExtends $CommandName | + Sort-Object Rank, Name | OutputExtension } else { $script:PSDevOpsExtensions | - . WhereExtends $CommandName | + . WhereExtends $CommandName | + Sort-Object Rank, Name | OutputExtension } } } -#endregion Piecemeal [ 0.1.3 ] : Easy Extensible Plugins for PowerShell +#endregion Piecemeal [ 0.1.6 ] : Easy Extensible Plugins for PowerShell From 0d96fe18a65cc088fc35a0cb61326ad5f442595c Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Thu, 3 Mar 2022 16:24:47 -0800 Subject: [PATCH 010/151] Get/Set-ADOPermission: Repov2 issue (#140) --- Functions/AzureDevOps/Get-ADOPermission.ps1 | 3 +-- Functions/AzureDevOps/Set-ADOPermission.ps1 | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Functions/AzureDevOps/Get-ADOPermission.ps1 b/Functions/AzureDevOps/Get-ADOPermission.ps1 index 55816a56..cee93c2a 100644 --- a/Functions/AzureDevOps/Get-ADOPermission.ps1 +++ b/Functions/AzureDevOps/Get-ADOPermission.ps1 @@ -377,8 +377,7 @@ $q.Enqueue(@{ NamespaceID = '2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87' - SecurityToken = "repo$( -if ($psCmdlet.ParameterSetName -eq 'AllRepositories') {'s'})V2$( + SecurityToken = "reposV2$( if ($ProjectID) { '/' + $projectId} )$( if ($repositoryID) {'/' + $repositoryID} diff --git a/Functions/AzureDevOps/Set-ADOPermission.ps1 b/Functions/AzureDevOps/Set-ADOPermission.ps1 index 68da958e..dbc0e6f3 100644 --- a/Functions/AzureDevOps/Set-ADOPermission.ps1 +++ b/Functions/AzureDevOps/Set-ADOPermission.ps1 @@ -325,8 +325,7 @@ 'RepositoryID|AllRepositories|ProjectRepository' { $q.Enqueue(@{ NamespaceID = '2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87' - SecurityToken = "repo$( -if ($psCmdlet.ParameterSetName -eq 'AllRepositories') {'s'})V2$( + SecurityToken = "repoV2$( if ($ProjectID) { '/' + $projectId} )$( if ($repositoryID) {'/' + $repositoryID} From e06f37b47f39698994ef1f2b28d9cd4af803c94e Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Thu, 3 Mar 2022 17:52:34 -0800 Subject: [PATCH 011/151] Get-ADOBuild: Passing along ProjectID and ProjectName --- Functions/AzureDevOps/Get-ADOBuild.ps1 | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Functions/AzureDevOps/Get-ADOBuild.ps1 b/Functions/AzureDevOps/Get-ADOBuild.ps1 index acc54390..4cb29eec 100644 --- a/Functions/AzureDevOps/Get-ADOBuild.ps1 +++ b/Functions/AzureDevOps/Get-ADOBuild.ps1 @@ -355,10 +355,21 @@ "$Organization.$project.Repository", "$Organization.Repository", "PSDevOps.Repository" } + if (-not ($Project -as [guid])) { + $ProjectName = $Project + $projectID = Get-ADOProject -Organization $Organization -Project $Project -Cache | + Select-Object -ExpandProperty ProjectID + } else { + $ProjectName = Get-ADOProject -Organization $Organization -Project $Project -Cache | + Select-Object -ExpandProperty ProjectName + $ProjectId = $Project + } $invokeParams.Property = @{ Organization = $Organization - Project = $Project - Server = $Server + Project = $Project + ProjectID = $projectID + ProjectName = $ProjectName + Server = $Server } if ($BuildID) { From bde13a1a0e111cdd3ea47851036efc2ec443f66b Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Thu, 3 Mar 2022 18:00:37 -0800 Subject: [PATCH 012/151] Get-ADOPermission: fixing repov2 issue (#140) --- Functions/AzureDevOps/Get-ADOPermission.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Functions/AzureDevOps/Get-ADOPermission.ps1 b/Functions/AzureDevOps/Get-ADOPermission.ps1 index cee93c2a..6b02b29b 100644 --- a/Functions/AzureDevOps/Get-ADOPermission.ps1 +++ b/Functions/AzureDevOps/Get-ADOPermission.ps1 @@ -297,7 +297,7 @@ } + $PSBoundParameters) $q.Enqueue(@{ NamespaceID = '2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87' # Repositories - SecurityToken = "reposV2/$projectId" + SecurityToken = "repoV2/$projectId" Recurse = $true } + $PSBoundParameters) $q.Enqueue(@{ @@ -377,7 +377,7 @@ $q.Enqueue(@{ NamespaceID = '2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87' - SecurityToken = "reposV2$( + SecurityToken = "repoV2$( if ($ProjectID) { '/' + $projectId} )$( if ($repositoryID) {'/' + $repositoryID} From 574bc7cf393ebe110ba68d6080adfe78fd6707cf Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Thu, 3 Mar 2022 18:49:39 -0800 Subject: [PATCH 013/151] Get-PSDevOpsExtension: Using New Piecemeal Version [0.1.7] --- Functions/Get-PSDevOpsExtension.ps1 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Functions/Get-PSDevOpsExtension.ps1 b/Functions/Get-PSDevOpsExtension.ps1 index ec9440f1..bcf07fea 100644 --- a/Functions/Get-PSDevOpsExtension.ps1 +++ b/Functions/Get-PSDevOpsExtension.ps1 @@ -1,4 +1,4 @@ -#region Piecemeal [ 0.1.6 ] : Easy Extensible Plugins for PowerShell +#region Piecemeal [ 0.1.7 ] : Easy Extensible Plugins for PowerShell # (Install-Module Piecemeal; Install-Piecemeal -ExtensionModule 'PSDevOps' -ExtensionModuleAlias 'psdo' -ExtensionTypeName 'PSDevOps.Extension' -OutputPath '.\Get-PSDevOpsExtension.ps1' ) function Get-PSDevOpsExtension { @@ -243,7 +243,7 @@ function Get-PSDevOpsExtension foreach ($attr in $this.ScriptBlock.Attributes) { if ($attr -is [Management.Automation.ValidateSetAttribute]) { if ($ValidateInput -notin $attr.ValidValues) { - throw "'$ValidateInput' is not a valid value. Valid values are '$(@($attr.ValueValues) -join "','")'" + throw "'$ValidateInput' is not a valid value. Valid values are '$(@($attr.ValidValues) -join "','")'" } } if ($attr -is [Management.Automation.ValidatePatternAttribute]) { @@ -319,7 +319,10 @@ function Get-PSDevOpsExtension break } } - if ($defaultParamSetName) { + if ($attrCopy.ParameterSetName -ne '__AllParameterSets') { + $attrCopy.ParameterSetName + } + elseif ($defaultParamSetName) { $defaultParamSetName } elseif ($this -is [Management.Automation.FunctionInfo]) { @@ -563,5 +566,5 @@ function Get-PSDevOpsExtension } } } -#endregion Piecemeal [ 0.1.6 ] : Easy Extensible Plugins for PowerShell +#endregion Piecemeal [ 0.1.7 ] : Easy Extensible Plugins for PowerShell From ec7479223b8b862eb52714bf539ae0922adaea15 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Thu, 3 Mar 2022 20:20:04 -0800 Subject: [PATCH 014/151] Get-PSDevOpsExtension: Updating Piecemeal Version [0.1.9] --- Functions/Get-PSDevOpsExtension.ps1 | 50 +++++++++++++++-------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/Functions/Get-PSDevOpsExtension.ps1 b/Functions/Get-PSDevOpsExtension.ps1 index bcf07fea..ee04aacd 100644 --- a/Functions/Get-PSDevOpsExtension.ps1 +++ b/Functions/Get-PSDevOpsExtension.ps1 @@ -1,5 +1,7 @@ -#region Piecemeal [ 0.1.7 ] : Easy Extensible Plugins for PowerShell -# (Install-Module Piecemeal; Install-Piecemeal -ExtensionModule 'PSDevOps' -ExtensionModuleAlias 'psdo' -ExtensionTypeName 'PSDevOps.Extension' -OutputPath '.\Get-PSDevOpsExtension.ps1' ) +#region Piecemeal [ 0.1.9 ] : Easy Extensible Plugins for PowerShell +# Install-Module Piecemeal -Scope CurrentUser +# Import-Module Piecemeal +# Install-Piecemeal -ExtensionModule 'PSDevOps' -ExtensionModuleAlias 'psdo' -ExtensionTypeName 'PSDevOps.Extension' -OutputPath '.\Get-PSDevOpsExtension.ps1' function Get-PSDevOpsExtension { <# @@ -366,32 +368,32 @@ function Get-PSDevOpsExtension $extCmd.PSObject.Methods.Add([PSScriptMethod]::new('CouldRun', { param([Collections.IDictionary]$params) - $mappedParams = [Ordered]@{} # Create a collection of mapped parameters - $mandatories = # Walk thru each parameter of this command - @(foreach ($myParam in $this.Parameters.GetEnumerator()) { - if ($params.Contains($myParam.Key)) { # If this was in Params, - $mappedParams[$myParam.Key] = $params[$myParam.Key] # then map it. - } else { - foreach ($paramAlias in $myParam.Value.Aliases) { # Otherwise, check the aliases - if ($params.Contains($paramAlias)) { # and map it if the parameters had the alias. - $mappedParams[$myParam.Key] = $params[$paramAlias] - break + :nextParameterSet foreach ($paramSet in $this.ParameterSets) { + $mappedParams = [Ordered]@{} # Create a collection of mapped parameters + $mandatories = # Walk thru each parameter of this command + @(foreach ($myParam in $paramSet.Parameters) { + if ($params.Contains($myParam.Name)) { # If this was in Params, + $mappedParams[$myParam.Name] = $params[$myParam.Name] # then map it. + } else { + foreach ($paramAlias in $myParam.Aliases) { # Otherwise, check the aliases + if ($params.Contains($paramAlias)) { # and map it if the parameters had the alias. + $mappedParams[$myParam.Name] = $params[$paramAlias] + break + } } } + if ($myParam.IsMandatory) { # If the parameter was mandatory, + $myParam.Name # keep track of it. + } + }) + foreach ($mandatoryParam in $mandatories) { # Walk thru each mandatory parameter. + if (-not $params.Contains($mandatoryParam)) { # If it wasn't in the parameters. + continue nextParameterSet } - if ($myParam.value.Attributes.Mandatory) { # If the parameter was mandatory, - $myParam.Key # keep track of it. - } - }) - - foreach ($mandatoryParam in $mandatories) { # Walk thru each mandatory parameter. - if (-not $params.Contains($mandatoryParam)) { # If it wasn't in the parameters. - return $false # return $false (note, for now, this prevents parameter sets from working in extensions) } + return $mappedParams } - return $mappedParams - - + return $false })) $extCmd.pstypenames.clear() @@ -566,5 +568,5 @@ function Get-PSDevOpsExtension } } } -#endregion Piecemeal [ 0.1.7 ] : Easy Extensible Plugins for PowerShell +#endregion Piecemeal [ 0.1.9 ] : Easy Extensible Plugins for PowerShell From a7db7a959d46190fd0eb5c66bacdd18633932eb0 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Thu, 3 Mar 2022 20:20:35 -0800 Subject: [PATCH 015/151] Updating GetInvokeParameters: Adding Extension Parameters --- Parts/GetInvokeParameters.ps1 | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Parts/GetInvokeParameters.ps1 b/Parts/GetInvokeParameters.ps1 index 649a2267..2e55c12f 100644 --- a/Parts/GetInvokeParameters.ps1 +++ b/Parts/GetInvokeParameters.ps1 @@ -14,7 +14,11 @@ $InvokeParameter, [Parameter(Mandatory,ParameterSetName='GetDynamicParameters')] [Alias('DynamicParameters')] [switch] -$DynamicParameter +$DynamicParameter, + +[Parameter(ParameterSetName='GetDynamicParameters')] +[string] +$CommandName ) begin { @@ -47,8 +51,18 @@ process { if ($attr.ValueFromPipelineByPropertyName) {$attr.ValueFromPipelineByPropertyName = $false} } } + } + if (-not $CommandName) { + return $script:InvokeADORestAPIParams + } + $extensionDynamicParameters = Get-PSDevOpsExtension -CommandName $CommandName -DynamicParameter + if (-not $extensionDynamicParameters.Count) { return $script:InvokeADORestAPIParams } + foreach ($dp in $script:InvokeADORestAPIParams.GetEnumerator()) { + if (-not $extensionDynamicParameters[$dp.Key]) { + $extensionDynamicParameters[$dp.Key] = $dp.value + } } - return $script:InvokeADORestAPIParams + return $extensionDynamicParameters } if ($PSCmdlet.ParameterSetName -eq 'GetParameterValues') { $invokeParams = [Ordered]@{} + $InvokeParameter # Then we copy our parameters From ff77bae6105771a91d6721cb5575e881d2b7bdfe Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Thu, 3 Mar 2022 20:31:35 -0800 Subject: [PATCH 016/151] Get-ADOTest: Refactoring for Extensibility --- Functions/AzureDevOps/Get-ADOTest.ps1 | 94 +++++++++------------------ 1 file changed, 32 insertions(+), 62 deletions(-) diff --git a/Functions/AzureDevOps/Get-ADOTest.ps1 b/Functions/AzureDevOps/Get-ADOTest.ps1 index 30764af0..d2402d7f 100644 --- a/Functions/AzureDevOps/Get-ADOTest.ps1 +++ b/Functions/AzureDevOps/Get-ADOTest.ps1 @@ -19,9 +19,15 @@ .Link https://docs.microsoft.com/en-us/rest/api/azure/devops/testplan/test%20%20suites/get%20test%20suites%20for%20plan #> - [OutputType('PSDevOps.Project','PSDevOps.Property')] + [OutputType('PSDevOps.TestPlan','PSDevOps.TestRun', 'PSDevOps.TestSuite', 'PSDevOps.TestPoint','PSDevOps.TestCase')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("Test-ForParameterSetAmbiguity", "", Justification="Ambiguity Desired.")] param( + # The Organization + [Parameter(Mandatory,ValueFromPipelineByPropertyName)] + [Alias('Org')] + [string] + $Organization, + # The project identifier. [Parameter(Mandatory,ValueFromPipelineByPropertyName)] [string] @@ -39,23 +45,7 @@ [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='/{ProjectID}/_apis/test/runs/{TestRunID}/results')] [string] $TestRunID, - - # If set, will return the test plans associated with a project. - [Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans')] - [Alias('TestPlans')] - [switch] - $TestPlan, - - # If set, will return results related to a specific test plan. - [Parameter(Mandatory,ValueFromPipelineByPropertyName, - ParameterSetName='/{ProjectID}/_apis/testplan/{TestPlanID}')] - [Parameter(Mandatory,ValueFromPipelineByPropertyName, - ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites')] - [Parameter(Mandatory,ValueFromPipelineByPropertyName, - ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}/TestPoint')] - [string] - $TestPlanID, - + # If set, will return the test variables associated with a project. [Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/test/variables')] [Alias('TestVariables')] @@ -68,34 +58,6 @@ [switch] $TestConfiguration, - # If set, will list test suites related to a plan. - [Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites')] - [Alias('TestSuites')] - [switch] - $TestSuite, - - # If set, will return results related to a particular test suite. - [Parameter(Mandatory,ValueFromPipelineByPropertyName, - ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}')] - [Parameter(Mandatory,ValueFromPipelineByPropertyName, - ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}/TestPoint')] - [string] - $TestSuiteID, - - # If set, will return test points within a suite. - [Parameter(Mandatory, - ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}/TestPoint')] - [Alias('TestPoints')] - [switch] - $TestPoint, - - # If set, will return test results within a run. - [Parameter(Mandatory, - ParameterSetName='/{ProjectID}/_apis/test/runs/{TestRunID}/results')] - [Alias('TestResults')] - [switch] - $TestResult, - # If set, will return the first N results within a test run. [Parameter(ValueFromPipelineByPropertyName,ParameterSetName='/{ProjectID}/_apis/test/runs/{TestRunID}/results')] [Alias('Top')] @@ -128,12 +90,6 @@ [switch] $TestAttachment, - # The Organization - [Parameter(Mandatory,ValueFromPipelineByPropertyName)] - [Alias('Org')] - [string] - $Organization, - # If set, will always retrieve fresh data. # By default, cached data will be returned. [switch] @@ -152,18 +108,30 @@ $ApiVersion = "5.1-preview" ) - dynamicParam { . $GetInvokeParameters -DynamicParameter } + dynamicParam { . $GetInvokeParameters -CommandName $MyInvocation.MyCommand.Name -DynamicParameter } begin { #region Copy Invoke-ADORestAPI parameters $invokeParams = . $getInvokeParameters $PSBoundParameters #endregion Copy Invoke-ADORestAPI parameters - $q = [Collections.Queue]::new() + $q = [Collections.Queue]::new() + $rq = [Collections.Queue]::new() } process { - $q.Enqueue(@{PSParameterSet=$psCmdlet.ParameterSetName;InputObject=$_} + $PSBoundParameters) + $in = $_ + $paramCopy = [Ordered]@{} + $psBoundParameters + $myCommandName = $MyInvocation.MyCommand.name + $extensionOutput = Get-PSDevOpsExtension -Run -CommandName $myCommandName -Parameter $paramCopy -Stream + if ($extensionOutput) { + foreach ($extOut in $extensionOutput) { + $rq.Enqueue($extOut) + } + } else { + $q.Enqueue(@{PSParameterSet=$psCmdlet.ParameterSetName;InputObject=$in} + $paramCopy) + } } end { - $c, $t, $progId = 0, $q.Count, [Random]::new().Next() + $c, $t, $progId = 0, ($q.Count + $rq.Count), [Random]::new().Next() + . $flushRequestQueue -Invoker Invoke-ADORestAPI while ($q.Count) { . $dq $q @@ -196,10 +164,7 @@ Project = $Project Server = $Server } - if ($ProjectID) { $additionalProperty.ProjectID = $ProjectID } - if ($TestPlanID) { - $additionalProperty.TestPlanID = $TestPlanID - } + if ($ProjectID) { $additionalProperty.ProjectID = $ProjectID } if ($inputObject.TestPlanName) { $additionalProperty['TestPlanName'] = $inputObject.TestPlanName } @@ -233,12 +198,17 @@ $resultBatch } } while ($resultBatch -and ($count -lt $Total)) + Write-Progress "Getting Results" " [$Count/$total] $uri" -Completed -ParentId $progId -Id $innerProgressId } else { Invoke-ADORestAPI @invokeParams } } - - Write-Progress "Getting" "[$c/$t]" -Completed -Id $progId + if ($c -gt 0) { + Write-Progress "$($MyInvocation.MyCommand)" "[$c/$t]" -Completed -Id $progId + } + } } + + From bf66d94dc8a7b0e5898ff05541e439083f2ee040 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Thu, 3 Mar 2022 20:31:54 -0800 Subject: [PATCH 017/151] Add-ADOTest: Initial Commit --- Functions/AzureDevOps/Add-ADOTest.ps1 | 68 +++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Functions/AzureDevOps/Add-ADOTest.ps1 diff --git a/Functions/AzureDevOps/Add-ADOTest.ps1 b/Functions/AzureDevOps/Add-ADOTest.ps1 new file mode 100644 index 00000000..243858f9 --- /dev/null +++ b/Functions/AzureDevOps/Add-ADOTest.ps1 @@ -0,0 +1,68 @@ +function Add-ADOTest { + <# + .Synopsis + Creates tests in Azure DevOps. + .Description + Creates test plans, suites, points, and results in Azure DevOps or TFS. + .Link + Get-ADOProject + .Link + https://docs.microsoft.com/en-us/rest/api/azure/devops/test/runs/list + .Link + https://docs.microsoft.com/en-us/rest/api/azure/devops/test/results/list + .Link + https://docs.microsoft.com/en-us/rest/api/azure/devops/test/test%20%20suites/list + .Link + https://docs.microsoft.com/en-us/rest/api/azure/devops/testplan/test%20%20suites/get%20test%20suites%20for%20plan + #> + [OutputType('PSDevOps.TestPlan','PSDevOps.TestRun', 'PSDevOps.TestSuite', 'PSDevOps.TestPoint','PSDevOps.TestCase')] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("Test-ForParameterSetAmbiguity", "", Justification="Ambiguity Desired.")] + param( + # The Organization + [Parameter(Mandatory,ValueFromPipelineByPropertyName)] + [Alias('Org')] + [string] + $Organization, + + # The project identifier. + [Parameter(Mandatory,ValueFromPipelineByPropertyName)] + [string] + $ProjectID, + + # The server. By default https://dev.azure.com/. + # To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + [Parameter(ValueFromPipelineByPropertyName)] + [uri] + $Server = "https://dev.azure.com/", + + # The api version. By default, 5.1-preview. + # If targeting TFS, this will need to change to match your server version. + # See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + [string] + $ApiVersion = "5.1" + ) + + dynamicParam { . $GetInvokeParameters -CommandName $MyInvocation.MyCommand.Name -DynamicParameter } + begin { + #region Copy Invoke-ADORestAPI parameters + $invokeParams = . $getInvokeParameters $PSBoundParameters + #endregion Copy Invoke-ADORestAPI parameters + $q = [Collections.Queue]::new() + $rq = [Collections.Queue]::new() + } + process { + $in = $_ + $paramCopy = [Ordered]@{} + $psBoundParameters + $extensionOutput = Get-PSDevOpsExtension -Run -CommandName $MyInvocation.MyCommand.Name -Parameter $paramCopy -Stream + if ($extensionOutput) { + foreach ($extOut in $extensionOutput) { + $rq.Enqueue($extOut) + } + } else { + $q.Enqueue(@{PSParameterSet=$psCmdlet.ParameterSetName;InputObject=$in} + $paramCopy) + } + } + end { + . $flushRequestQueue -Invoker Invoke-ADORestApi + } +} From c0c698067df4ac59fd2d3dba9dd418d6952a811f Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Thu, 3 Mar 2022 20:32:16 -0800 Subject: [PATCH 018/151] Adding Initial Extensions (related to -ADOTest commands) --- Extensions/TestPlan.PSDevOps.Extension.ps1 | 164 ++++++++++++++++++++ Extensions/TestPoint.PSDevOps.Extension.ps1 | 63 ++++++++ Extensions/TestSuite.PSDevOps.Extension.ps1 | 138 ++++++++++++++++ 3 files changed, 365 insertions(+) create mode 100644 Extensions/TestPlan.PSDevOps.Extension.ps1 create mode 100644 Extensions/TestPoint.PSDevOps.Extension.ps1 create mode 100644 Extensions/TestSuite.PSDevOps.Extension.ps1 diff --git a/Extensions/TestPlan.PSDevOps.Extension.ps1 b/Extensions/TestPlan.PSDevOps.Extension.ps1 new file mode 100644 index 00000000..24cb57e5 --- /dev/null +++ b/Extensions/TestPlan.PSDevOps.Extension.ps1 @@ -0,0 +1,164 @@ +<# +.Synopsis + Test Plans Extension +.Description + Gets, Creates, or Updates test plans +#> +[CmdletBinding(DefaultParameterSetName='/{ProjectID}/_apis/testplan/plans')] +[Management.Automation.Cmdlet("Get","ADOTest")] +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[Management.Automation.Cmdlet("Remove","ADOTest")] +param( +# If set, will return test results within a run. +[Management.Automation.Cmdlet("Get","ADOTest")] +[Parameter(Mandatory)] +[Alias('TestPlans')] +[switch] +$TestPlan, + +# The test plan ID +[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] +[string] +$TestPlanID, + +# The name of the test plan +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] +[Alias('PlanName')] +[string] +$TestPlanName, + +# A description of the test plan +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] +[Alias('PlanDescription')] +[string] +$TestPlanDescription, + +# The build identifier +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] +[Alias('BuildID')] +[int] +$TestBuildID, + +# The area path for the test plan +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] +[Alias('AreaPath')] +[string] +$TestPlanAreaPath, + +# The iteration path for the test plan +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] +[Alias('IterationPath')] +[string] +$TestPlanIteratonPath, + +# The start date for the test plan +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] +[Alias('StartDate')] +[DateTime] +$TestPlanStartDate, + +# The end date for the test plan +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] +[Alias('EndDate')] +[DateTime] +$TestPlanEndDate, + +# The build definiton ID. +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] +[Alias('DefinitionID')] +[int] +$BuildDefinitionID, + +# The build definition name. +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] +[int] +$BuildDefinitionName +) + +process { + $carryOn = @{ + ProjectID = $ProjectID + Organization = $organization + } + if ($TestPlanID) { + $carryOn += @{TestPlanID=$TestPlanID} + } + $invokeSplat = @{ + Uri = $PSCmdlet.ParameterSetName + UrlParameter = $carryOn + Activity = "Test Plans" + PSTypeName = @( + "$organization.$ProjectID.TestPlan" + "$organization.TestPlan" + "PSDevOps.TestPlan" + ) + Property = $carryOn + } + + if ($commandName -in 'Add-ADOTest', 'Set-ADOTest') { + if ($commandName -eq 'Add-ADOTest') { + $invokeSplat.Method = 'POST' + } + if ($commandName -eq 'Set-ADOTest') { + $invokeSplat.Method = 'PATCH' + $invokeSplat.UrlParameter += @{ + PlanID = $TestPlanID + } + } + $body = [Ordered]@{} + if ($TestPlanName) { $body.name = $TestPlanName } + if ($TestPlanDescription) { $body.description = $TestPlanDescription } + if ($TestPlanAreaPath) { $body.areaPath = $TestPlanAreaPath } + if ($TestPlanIterationPath) { $body.iterationPath = $TestPlanIterationPath } + if ($TestBuildID) { $body.buildID = $TestBuildID } + if ($TestPlanStartDate) { $body.startDate = $TestPlanStartDate.ToString('o') } + if ($TestPlanEndDate) { $body.endDate = $TestPlanEndDate.ToString('o') } + if ($TestPlanOwner) { $body.owner = $TestPlanOwner | Select-Object -Property _links, descriptor, id, isDeletedInOrigin } + if ($BuildDefinitionID) { + if (-not $body.buildDefinition) { + $body.buildDefinition = @{} + } + $body.buildDefinition.id = $BuildDefinitionID + } + if ($BuildDefinitionName) { + if (-not $body.buildDefinition) { + $body.buildDefinition = @{} + } + $body.buildDefinition.name = $BuildDefinitionName + } + $invokeSplat.Body = $body + } + + if ($commandName -eq 'Remove-ADOTest') { + $invokeSplat.Method = 'DELETE' + } + $invokeSplat +} \ No newline at end of file diff --git a/Extensions/TestPoint.PSDevOps.Extension.ps1 b/Extensions/TestPoint.PSDevOps.Extension.ps1 new file mode 100644 index 00000000..dd0250a5 --- /dev/null +++ b/Extensions/TestPoint.PSDevOps.Extension.ps1 @@ -0,0 +1,63 @@ +<# +.SYNOPSIS + Test Points Extension +.DESCRIPTION + Gets, Creates, or Updates test points +#> +[CmdletBinding(DefaultParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}/TestPoint')] +[Management.Automation.Cmdlet("Get","ADOTest")] +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[Management.Automation.Cmdlet("Remove","ADOTest")] +param( +[Parameter(Mandatory,ValueFromPipelineByPropertyName)] +[string] +$TestPlanID, + +[Parameter(Mandatory,ValueFromPipelineByPropertyName)] +[string] +$TestSuiteID, + +[Parameter(Mandatory,ValueFromPipelineByPropertyName)] +[Alias('TestPoints')] +[switch] +$TestPoint +) + + +process { + $invokeSplat = @{ + Uri = $PSCmdlet.ParameterSetName + UrlParameter = @{ + ProjectID = $ProjectID + Organization = $organization + TestPlanID = $TestPlanID + TestSuiteID = $TestSuiteID + } + Activity = "Test Points" + PSTypeName = @( + "$organization.$ProjectID.TestPoint" + "$organization.TestPoint" + "PSDevOps.TestPoint" + ) + } + + if ($commandName -in 'Add-ADOTest', 'Set-ADOTest') { + if ($commandName -eq 'Add-ADOTest') { + $invokeSplat.Method = 'POST' + } + if ($commandName -eq 'Set-ADOTest') { + $invokeSplat.Method = 'PATCH' + $invokeSplat.UrlParameter += @{ + TestSuiteID = $TestSuiteID + } + } + $body = [Ordered]@{} + $invokeSplat.Body = $body + } + + if ($commandName -eq 'Remove-ADOTest') { + $invokeSplat.Method = 'DELETE' + } + $invokeSplat +} \ No newline at end of file diff --git a/Extensions/TestSuite.PSDevOps.Extension.ps1 b/Extensions/TestSuite.PSDevOps.Extension.ps1 new file mode 100644 index 00000000..ac7c43ef --- /dev/null +++ b/Extensions/TestSuite.PSDevOps.Extension.ps1 @@ -0,0 +1,138 @@ +<# +.Synopsis + Test Suite Extension +.Description + Gets, Creates, or Updates test suites +#> +[CmdletBinding(DefaultParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites')] +[Management.Automation.Cmdlet("Get","ADOTest")] +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[Management.Automation.Cmdlet("Remove","ADOTest")] +param( +# The Test Plan ID +[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] +[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] +[string] +$TestPlanID, + +# If set, will list test suites. +[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites')] +[Alias('TestSuites')] +[Management.Automation.Cmdlet("Get","ADOTest")] +[switch] +$TestSuite, + +# The test suite identifier. +[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] +[Management.Automation.Cmdlet("Set","ADOTest")] +[Management.Automation.Cmdlet("Remove","ADOTest")] +[string] +$TestSuiteID, + +# The name of the test suite. +[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] +[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[string] +$TestSuiteName, + +# The parent test suite ID +[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] +[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[string] +$ParentTestSuiteID, + +# If set, will inherit the default configuration. +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[Alias('inheritDefaultConfigurations')] +[switch] +$InheritDefaultConfiguration, + +# The test suite type. +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[ValidateSet("DynamicTestSuite","RequirementTestSuite","StaticTestSuite","None")] +[string] +$TestSuiteType, + +# One or requirement identifiers. +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[string] +$RequirementId, + +# A test query +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[string] +$QueryString, + +# One or more test configuration identifiers. +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] +[Management.Automation.Cmdlet("Add","ADOTest")] +[Management.Automation.Cmdlet("Set","ADOTest")] +[string[]] +$TestConfigurationID +) + +process { + $carryOn = @{ + ProjectID = $ProjectID + Organization = $organization + TestPlanID = $TestPlanID + } + $invokeSplat = @{ + Uri = $PSCmdlet.ParameterSetName + UrlParameter = $carryOn + Activity = "Test Plans" + PSTypeName = @( + "$organization.$ProjectID.TestSuite" + "$organization.TestSuite" + "PSDevOps.TestSuite" + ) + Property = $carryOn + } + + if ($commandName -in 'Add-ADOTest', 'Set-ADOTest') { + if ($commandName -eq 'Add-ADOTest') { + $invokeSplat.Method = 'POST' + } + if ($commandName -eq 'Set-ADOTest') { + $invokeSplat.Method = 'PATCH' + $invokeSplat.UrlParameter += @{ + TestSuiteID = $TestSuiteID + } + } + $body = [Ordered]@{} + if ($TestSuiteName) { $body.name = $TestSuiteName } + if ($TestSuiteType) { $body.suiteType = $TestSuiteType } + if ($ParentTestSuiteID) { $body.parentSuite = @{id=$ParentTestSuiteID}} + if ($RequirementId) { $body.requirementID = $RequirementId } + if ($QueryString) { $body.queryString = $QueryString } + if ($TestConfigurationID) { + $body.defaultConfigurations = @(foreach ($tci in $TestConfigurationID) { @{id=$tci}}) + } + + $body.inheritDefaultConfigurations = $InheritDefaultConfiguration -as [bool] + $invokeSplat.Body = $body + } + + if ($commandName -eq 'Remove-ADOTest') { + $invokeSplat.Method = 'DELETE' + } + $invokeSplat +} \ No newline at end of file From 499b708f35d6483fa3d7e3cfedfcc3f4c0a8b567 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Thu, 3 Mar 2022 20:38:41 -0800 Subject: [PATCH 019/151] Fixing Refactoring Related Import Issue --- PSDevOps.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSDevOps.psm1 b/PSDevOps.psm1 index d0ac5995..36ab64dd 100644 --- a/PSDevOps.psm1 +++ b/PSDevOps.psm1 @@ -3,7 +3,7 @@ param() #region Import Functions $functionsRoot = Join-Path $psScriptRoot Functions -foreach ($file in Get-ChildItem -Path $functionsRoot.Fullname -Filter *-*.ps1 -Recurse) { +foreach ($file in Get-ChildItem -Path "$functionsRoot" -Filter *-*.ps1 -Recurse) { . $file.FullName } #endregion Import Functions From 309532473a133b35bc4aa33bfb9a1d22d0f8c6d1 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Thu, 3 Mar 2022 20:42:04 -0800 Subject: [PATCH 020/151] Adding FlushRequestQueue Part --- Parts/FlushRequestQueue.ps1 | 83 +++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 Parts/FlushRequestQueue.ps1 diff --git a/Parts/FlushRequestQueue.ps1 b/Parts/FlushRequestQueue.ps1 new file mode 100644 index 00000000..304f4fa4 --- /dev/null +++ b/Parts/FlushRequestQueue.ps1 @@ -0,0 +1,83 @@ +<# +.Synopsis + Flushes the Request Queue +.Description + Flushes the Queue of pending Invoke-ADORestApi calls. +#> +param( +# The name of the invoker command +[Parameter(Mandatory)] +[ValidateSet('Invoke-ADORestAPI','Invoke-GitHubRESTApi')] +[string] +$Invoker +) +if ((-not $t) -or (-not $progId)) { + $c, $t, $progId = 0, $rq.Count, $(Get-Random) +} + +while ($rq.Count) { + $invokeSplat = $rq.Dequeue() + + if ($invokeParams) { + $invokeSplat += $invokeParams + } + $invokeSplatUrl = $invokeSplat.Url, $invokeSplat.uri -ne $null + if ("$invokeSplatUrl".StartsWith('/')) { + $invokeSplatUrl = + @( + "$server".TrimEnd('/') # * The Server + "/$organization" + $invokeSplatUrl + ) -join '' + $invokeSplat.Remove('Url') + $invokeSplat.Remove('Uri') + $invokeSplat.Url = $invokeSplatUrl + } + if ($ApiVersion -and -not $invokeSplat.QueryParameter.apiVersion) { + if (-not $invokeSplat.QueryParameter) { + $invokeSplat.QueryParameter = @{} + } + $invokeSplat.QueryParameter.'api-version' = $ApiVersion + } + + $status = + if ($invokeSplat.Status) { + $invokeSplat.Status + $invokeSplat.Remove('Status') + } + elseif ($invokeSplat.Method) { + $invokeSplat.Method + } else + { + "GET" + } + + $activity = + if ($invokeSplat.Activity) { + $invokeSplat.Activity + $invokeSplat.Remove('Activity') + } + elseif ($invokeSplatUrl) { + $invokeSplatUrl + } else + { + " " + } + + if (-not $InvokeSplat.Property) { + $InvokeSplat.Property = [Ordered]@{} + } + if ($organization -and -not $InvokeSplat.Property.Organization) { + $InvokeSplat.Property.Organization = $organization + } + if ($ProjectID -and -not $InvokeSplat.Property.Organization) { + $InvokeSplat.Property.ProjectID = $ProjectID + } + $c++ + $p = $c* 100/$t + Write-Progress $status $activity -PercentComplete $p -Id $progId + & $ExecutionContext.SessionState.InvokeCommand.GetCommand($Invoker, 'Function') @invokeSplat +} +if ($c -eq $t) { + Write-Progress $status $activity -Completed $progId +} \ No newline at end of file From 86637be682987ed67e947ac76bdf42ef51b87a0f Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Wed, 9 Mar 2022 00:14:16 -0800 Subject: [PATCH 021/151] Get-ADOTest: Re-adding -TestPlan and -TestSuite as key parameters. --- Functions/AzureDevOps/Get-ADOTest.ps1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Functions/AzureDevOps/Get-ADOTest.ps1 b/Functions/AzureDevOps/Get-ADOTest.ps1 index d2402d7f..2194b104 100644 --- a/Functions/AzureDevOps/Get-ADOTest.ps1 +++ b/Functions/AzureDevOps/Get-ADOTest.ps1 @@ -39,6 +39,19 @@ [switch] $TestRun, + + # If set, will return the test plans associated with a project. + [Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans')] + [Alias('TestPlans')] + [switch] + $TestPlan, + + # If set, will return the test suites associated with a project and plan. + [Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites')] + [Alias('TestSuites')] + [switch] + $TestSuite, + # If set, will return results related to a specific test run. [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='/{ProjectID}/_apis/test/runs/{TestRunID}')] [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='/{ProjectID}/_apis/test/runs/{TestRunID}/attachments')] From cd30fed3c833f89d88091ab8fbf4c5daefc7216a Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Wed, 9 Mar 2022 00:15:04 -0800 Subject: [PATCH 022/151] Updating TestPlan extension (removing mandatory switch) --- Extensions/TestPlan.PSDevOps.Extension.ps1 | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Extensions/TestPlan.PSDevOps.Extension.ps1 b/Extensions/TestPlan.PSDevOps.Extension.ps1 index 24cb57e5..fc5a6d6f 100644 --- a/Extensions/TestPlan.PSDevOps.Extension.ps1 +++ b/Extensions/TestPlan.PSDevOps.Extension.ps1 @@ -10,13 +10,6 @@ [Management.Automation.Cmdlet("Set","ADOTest")] [Management.Automation.Cmdlet("Remove","ADOTest")] param( -# If set, will return test results within a run. -[Management.Automation.Cmdlet("Get","ADOTest")] -[Parameter(Mandatory)] -[Alias('TestPlans')] -[switch] -$TestPlan, - # The test plan ID [Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] [string] From 8fe0551d530dbe7f239aa47c10f017da358f2e61 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Wed, 9 Mar 2022 00:18:12 -0800 Subject: [PATCH 023/151] TestSuite Extension: Removing Excess Mandatories --- Extensions/TestSuite.PSDevOps.Extension.ps1 | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/Extensions/TestSuite.PSDevOps.Extension.ps1 b/Extensions/TestSuite.PSDevOps.Extension.ps1 index ac7c43ef..76102d6d 100644 --- a/Extensions/TestSuite.PSDevOps.Extension.ps1 +++ b/Extensions/TestSuite.PSDevOps.Extension.ps1 @@ -16,13 +16,6 @@ param( [string] $TestPlanID, -# If set, will list test suites. -[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites')] -[Alias('TestSuites')] -[Management.Automation.Cmdlet("Get","ADOTest")] -[switch] -$TestSuite, - # The test suite identifier. [Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] [Management.Automation.Cmdlet("Set","ADOTest")] @@ -31,16 +24,16 @@ $TestSuite, $TestSuiteID, # The name of the test suite. -[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] -[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] [Management.Automation.Cmdlet("Add","ADOTest")] [Management.Automation.Cmdlet("Set","ADOTest")] [string] $TestSuiteName, # The parent test suite ID -[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] -[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] +[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] [Management.Automation.Cmdlet("Add","ADOTest")] [Management.Automation.Cmdlet("Set","ADOTest")] [string] From 10e67ada30de302b37b5c7cd929db960ccc73566 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Wed, 9 Mar 2022 00:19:37 -0800 Subject: [PATCH 024/151] Add-ADOTest: Adding -TestPlan and -TestSuite as anchor parameters --- Functions/AzureDevOps/Add-ADOTest.ps1 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Functions/AzureDevOps/Add-ADOTest.ps1 b/Functions/AzureDevOps/Add-ADOTest.ps1 index 243858f9..c02d74d9 100644 --- a/Functions/AzureDevOps/Add-ADOTest.ps1 +++ b/Functions/AzureDevOps/Add-ADOTest.ps1 @@ -23,6 +23,16 @@ [Alias('Org')] [string] $Organization, + + [Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans')] + [Alias('TestPlans')] + [switch] + $TestPlan, + + [Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites')] + [Alias('TestSuites')] + [switch] + $TestSuite, # The project identifier. [Parameter(Mandatory,ValueFromPipelineByPropertyName)] @@ -52,7 +62,7 @@ } process { $in = $_ - $paramCopy = [Ordered]@{} + $psBoundParameters + $paramCopy = [Ordered]@{} + $psBoundParameters $extensionOutput = Get-PSDevOpsExtension -Run -CommandName $MyInvocation.MyCommand.Name -Parameter $paramCopy -Stream if ($extensionOutput) { foreach ($extOut in $extensionOutput) { From ddde3de6a4cc7b68a8768e558b620cc880937a5a Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Wed, 9 Mar 2022 01:15:25 -0800 Subject: [PATCH 025/151] Updating Get-PSDevOpsExtension --- Functions/Get-PSDevOpsExtension.ps1 | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Functions/Get-PSDevOpsExtension.ps1 b/Functions/Get-PSDevOpsExtension.ps1 index ee04aacd..55018a22 100644 --- a/Functions/Get-PSDevOpsExtension.ps1 +++ b/Functions/Get-PSDevOpsExtension.ps1 @@ -1,4 +1,4 @@ -#region Piecemeal [ 0.1.9 ] : Easy Extensible Plugins for PowerShell +#region Piecemeal [ 0.1.10 ] : Easy Extensible Plugins for PowerShell # Install-Module Piecemeal -Scope CurrentUser # Import-Module Piecemeal # Install-Piecemeal -ExtensionModule 'PSDevOps' -ExtensionModuleAlias 'psdo' -ExtensionTypeName 'PSDevOps.Extension' -OutputPath '.\Get-PSDevOpsExtension.ps1' @@ -62,7 +62,7 @@ function Get-PSDevOpsExtension [Alias('CanRun')] [switch] $CouldRun, - + # If set, will run the extension. If -Stream is passed, results will be directly returned. # By default, extension results are wrapped in a return object. [Parameter(ValueFromPipelineByPropertyName)] @@ -100,6 +100,11 @@ function Get-PSDevOpsExtension [PSObject] $ValidateInput, + # The name of the parameter set. This is used by -CouldRun and -Run to enforce a single specific parameter set. + [Parameter(ValueFromPipelineByPropertyName)] + [string] + $ParameterSetName, + # The parameters to the extension. Only used when determining if the extension -CouldRun. [Parameter(ValueFromPipelineByPropertyName)] [Collections.IDictionary] @@ -366,9 +371,10 @@ function Get-PSDevOpsExtension })) $extCmd.PSObject.Methods.Add([PSScriptMethod]::new('CouldRun', { - param([Collections.IDictionary]$params) + param([Collections.IDictionary]$params, [string]$ParameterSetName) :nextParameterSet foreach ($paramSet in $this.ParameterSets) { + if ($ParameterSetName -and $paramSet.Name -ne $ParameterSetName) { continue } $mappedParams = [Ordered]@{} # Create a collection of mapped parameters $mandatories = # Walk thru each parameter of this command @(foreach ($myParam in $paramSet.Parameters) { @@ -447,7 +453,7 @@ function Get-PSDevOpsExtension } elseif ($CouldRun) { if (-not $extCmd) { return } - $couldRunExt = $extCmd.CouldRun($Parameter) + $couldRunExt = $extCmd.CouldRun($Parameter, $ParameterSetName) if (-not $couldRunExt) { return } [PSCustomObject][Ordered]@{ ExtensionCommand = $extCmd @@ -459,7 +465,7 @@ function Get-PSDevOpsExtension } elseif ($Run) { if (-not $extCmd) { return } - $couldRunExt = $extCmd.CouldRun($Parameter) + $couldRunExt = $extCmd.CouldRun($Parameter, $ParameterSetName) if (-not $couldRunExt) { return } if ($extCmd.InheritanceLevel -eq 'InheritedReadOnly') { return } if ($Stream) { @@ -568,5 +574,5 @@ function Get-PSDevOpsExtension } } } -#endregion Piecemeal [ 0.1.9 ] : Easy Extensible Plugins for PowerShell +#endregion Piecemeal [ 0.1.10 ] : Easy Extensible Plugins for PowerShell From ae4dc0b1a898b058c2fecd98b86a1a468a837717 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Wed, 9 Mar 2022 11:37:06 -0800 Subject: [PATCH 026/151] Get-PSDevOpsExtension: Updating Piecemeal Version [0.1.10] --- Functions/Get-PSDevOpsExtension.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Functions/Get-PSDevOpsExtension.ps1 b/Functions/Get-PSDevOpsExtension.ps1 index 55018a22..9feb0544 100644 --- a/Functions/Get-PSDevOpsExtension.ps1 +++ b/Functions/Get-PSDevOpsExtension.ps1 @@ -1,6 +1,6 @@ #region Piecemeal [ 0.1.10 ] : Easy Extensible Plugins for PowerShell # Install-Module Piecemeal -Scope CurrentUser -# Import-Module Piecemeal +# Import-Module Piecemeal -Force # Install-Piecemeal -ExtensionModule 'PSDevOps' -ExtensionModuleAlias 'psdo' -ExtensionTypeName 'PSDevOps.Extension' -OutputPath '.\Get-PSDevOpsExtension.ps1' function Get-PSDevOpsExtension { From b29394d7b51cb3fbb815874a8ff41e3e41577777 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Wed, 9 Mar 2022 11:39:13 -0800 Subject: [PATCH 027/151] Add-ADOTest: Only using extensions from the current parameterset --- Functions/AzureDevOps/Add-ADOTest.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Functions/AzureDevOps/Add-ADOTest.ps1 b/Functions/AzureDevOps/Add-ADOTest.ps1 index c02d74d9..f3a0d02e 100644 --- a/Functions/AzureDevOps/Add-ADOTest.ps1 +++ b/Functions/AzureDevOps/Add-ADOTest.ps1 @@ -63,7 +63,7 @@ process { $in = $_ $paramCopy = [Ordered]@{} + $psBoundParameters - $extensionOutput = Get-PSDevOpsExtension -Run -CommandName $MyInvocation.MyCommand.Name -Parameter $paramCopy -Stream + $extensionOutput = Get-PSDevOpsExtension -Run -CommandName $MyInvocation.MyCommand.Name -Parameter $paramCopy -Stream -ParameterSetName $psCmdlet.ParameterSetName if ($extensionOutput) { foreach ($extOut in $extensionOutput) { $rq.Enqueue($extOut) From 5d6e0942db13510fd5a576f2b7815ff626fc417a Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Tue, 15 Mar 2022 17:52:42 -0700 Subject: [PATCH 028/151] Set-ADOPermission: Fixing help typo --- Functions/AzureDevOps/Set-ADOPermission.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Functions/AzureDevOps/Set-ADOPermission.ps1 b/Functions/AzureDevOps/Set-ADOPermission.ps1 index dbc0e6f3..0c96ec82 100644 --- a/Functions/AzureDevOps/Set-ADOPermission.ps1 +++ b/Functions/AzureDevOps/Set-ADOPermission.ps1 @@ -4,7 +4,7 @@ .Synopsis Sets Azure DevOps Permissions .Description - Gets Azure DevOps security permissions. + Sets Azure DevOps security permissions. .Example Set-ADOPermission -Organization MyOrganization -Project MyProject -PersonalAccessToken $pat .Link From 738e2287aebfdeebd82024048ebec584ac821089 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Tue, 15 Mar 2022 17:53:07 -0700 Subject: [PATCH 029/151] Adding Remove-ADOPermission (#143) --- .../AzureDevOps/Remove-ADOPermission.ps1 | 436 ++++++++++++++++++ 1 file changed, 436 insertions(+) create mode 100644 Functions/AzureDevOps/Remove-ADOPermission.ps1 diff --git a/Functions/AzureDevOps/Remove-ADOPermission.ps1 b/Functions/AzureDevOps/Remove-ADOPermission.ps1 new file mode 100644 index 00000000..67b20b99 --- /dev/null +++ b/Functions/AzureDevOps/Remove-ADOPermission.ps1 @@ -0,0 +1,436 @@ +function Remove-ADOPermission +{ + <# + .Synopsis + Removes Azure DevOps Permissions + .Description + Removes Azure DevOps security permissions. + .Example + Remove-ADOPermission -Organization MyOrganization -Project MyProject -PersonalAccessToken $pat + .Link + https://docs.microsoft.com/en-us/rest/api/azure/devops/security/access%20control%20entries/set%20access%20control%20entries + .Link + https://docs.microsoft.com/en-us/azure/devops/organizations/security/namespace-reference + #> + [CmdletBinding(SupportsShouldProcess,ConfirmImpact='High')] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("Test-ForParameterSetAmbiguity", "", Justification="Ambiguity Desired.")] + [OutputType('PSDevOps.SecurityNamespace', 'PSDevOps.AccessControlList')] + param( + # The Organization. + [Parameter(Mandatory,ValueFromPipelineByPropertyName)] + [Alias('Org')] + [string] + $Organization, + + # The Project ID. + # If this is provided without anything else, will get permissions for the projectID + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='Project')] + [Parameter(ValueFromPipelineByPropertyName,ParameterSetName='Analytics')] + [Parameter(ValueFromPipelineByPropertyName,ParameterSetName='EndpointID')] + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='AreaPath')] + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='Dashboard')] + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='IterationPath')] + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='Tagging')] + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='ManageTFVC')] + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='BuildDefinition')] + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='BuildPermission')] + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='RepositoryID')] + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='ProjectRepository')] + [Alias('Project')] + [string] + $ProjectID, + + # If provided, will set permissions related to a given teamID. ( see Get-ADOTeam) + [Parameter(ValueFromPipelineByPropertyName,ParameterSetName='Dashboard')] + [string] + $TeamID, + + # If provided, will set permissions related to an Area Path. ( see Get-ADOAreaPath ) + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='AreaPath')] + [string] + $AreaPath, + + # If provided, will set permissions related to an Iteration Path. ( see Get-ADOIterationPath ) + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='IterationPath')] + [string] + $IterationPath, + + # The Build Definition ID + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='BuildDefinition')] + [string] + $DefinitionID, + + # The path to the build. + [Parameter(ValueFromPipelineByPropertyName,ParameterSetName='BuildDefinition')] + [string] + $BuildPath ='/', + + # If set, will set build and release permissions for a given project. + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='BuildPermission')] + [switch] + $BuildPermission, + + # If set, will set permissions for repositories within a project + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='ProjectRepository')] + [Alias('ProjectRepositories')] + [switch] + $ProjectRepository, + + # If provided, will set permissions for a given repositoryID + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='RepositoryID')] + [string] + $RepositoryID, + + # If provided, will set permissions for a given branch within a repository + [Parameter(ValueFromPipelineByPropertyName,ParameterSetName='RepositoryID')] + [Parameter(ValueFromPipelineByPropertyName,ParameterSetName='AllRepositories')] + [string] + $BranchName, + + # If set, will set permissions for all repositories within a project + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='AllRepositories')] + [Alias('AllRepositories')] + [switch] + $AllRepository, + + # If set, will set permissions for tagging related to the current project. + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='Tagging')] + [switch] + $Tagging, + + + # If set, will set permissions for Team Foundation Version Control related to the current project. + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='ManageTFVC')] + [switch] + $ManageTFVC, + + # If set, will set permissions for Delivery Plans. + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='Plan')] + [switch] + $Plan, + + # If set, will set dashboard permissions related to the current project. + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='Dashboard')] + [Alias('Dashboards')] + [switch] + $Dashboard, + + # If set, will set endpoint permissions related to a particular endpoint. + [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='EndpointID')] + [string] + $EndpointID, + + # The Security Namespace ID. + [Parameter(Mandatory,ValueFromPipelineByPropertyName, + ParameterSetName='accesscontrolentries/{NamespaceId}')] + [string] + $NamespaceID, + + # The Security Token. + [Parameter(Mandatory,ValueFromPipelineByPropertyName, + ParameterSetName='accesscontrolentries/{NamespaceId}')] + [string] + $SecurityToken, + + # One or more descriptors + [Parameter(ValueFromPipelineByPropertyName, + ParameterSetName='accesscontrolentries/{NamespaceId}')] + [string[]] + $Descriptor, + + # One or more identities. Identities will be converted into descriptors. + [Parameter(ValueFromPipelineByPropertyName)] + [string[]] + $Identity, + + # One or more allow permissions. + [Parameter(ValueFromPipelineByPropertyName)] + [string[]] + $Permission, + + # The server. By default https://dev.azure.com/. + # To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + [Parameter(ValueFromPipelineByPropertyName)] + [uri] + $Server = "https://dev.azure.com/", + + # The api version. By default, 5.1-preview. + # If targeting TFS, this will need to change to match your server version. + # See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + [string] + $ApiVersion = "5.1-preview") + dynamicParam { . $GetInvokeParameters -DynamicParameter } + begin { + #region Copy Invoke-ADORestAPI parameters + $invokeParams = . $getInvokeParameters $PSBoundParameters + #endregion Copy Invoke-ADORestAPI parameters + $q = [Collections.Queue]::new() + + $cachedNamespaces = @{} + $originalInvokeParams = @{} + $invokeParams + + $resolveIdentity = { + param( + [Parameter(Mandatory,Position=0,ValueFromPipelineByPropertyName)] + [string]$Identity) + + begin { + if (-not $script:CachedIdentities) { $script:CachedIdentities = @{}} + } + + process { + if (-not $script:CachedIdentities[$Identity]) { + $searchUri = + "https://vssps.dev.azure.com/$Organization/_apis/identities?api-version=6.0&searchfilter=General&filterValue=$Identity" + $script:CachedIdentities[$Identity] = Invoke-ADORestAPI -Uri $searchUri + } + $script:CachedIdentities[$Identity] + } + } + } + + process { + $ParameterSet = $psCmdlet.ParameterSetName + if ($psCmdlet.ParameterSetName -notin 'securitynamespaces', 'accesscontrolentries/{NamespaceId}') { + if ($ProjectID -and -not ($ProjectID -as [guid])) { + $oldProgressPref = $ProgressPreference; $ProgressPreference = 'silentlycontinue' + $projectID = Get-ADOProject -Organization $Organization -Project $projectID | Select-Object -ExpandProperty ProjectID + $ProgressPreference = $oldProgressPref + if (-not $ProjectID) { return } + } + $psBoundParameters['ParameterSet']='accesscontrolentries/{NamespaceId}' + switch -Regex ($psCmdlet.ParameterSetName) { + Project { + $null = $PSBoundParameters.Remove('ProjectID') + $q.Enqueue(@{ + NamespaceID = '52d39943-cb85-4d7f-8fa8-c6baac873819' + SecurityToken = "`$PROJECT:vstfs:///Classification/TeamProject/$ProjectID" + } + $PSBoundParameters) + } + Analytics { + $null = $PSBoundParameters.Remove('ProjectID') + $q.Enqueue(@{ + NamespaceID = if ($ProjectID) { '58450c49-b02d-465a-ab12-59ae512d6531' } else { 'd34d3680-dfe5-4cc6-a949-7d9c68f73cba'} + SecurityToken = "`$/$(if ($ProjectID) { $ProjectID } else { 'Shared' })" + } + $PSBoundParameters) + } + 'AreaPath|IterationPath' { + $gotPath = + if ($psCmdlet.ParameterSetName -eq 'AreaPath') { + Get-ADOAreaPath -Organization $Organization -Project $ProjectID -AreaPath $AreaPath + } else { + Get-ADOIterationPath -Organization $Organization -Project $ProjectID -IterationPath $iterationPath + } + + if (-not $gotPath) { + continue + } + $PathIdList = @( + $gotPath.Identifier + $parentUri = $gotPath._links.parent.href + while ($parentUri) { + $parentPath = Invoke-ADORestAPI -Uri $parentUri + $parentPath.identifier + $parentUri = $parentPath._links.parent.href + } + ) + + [Array]::Reverse($PathIdList) + + $null = $PSBoundParameters.Remove('ProjectID') + + $q.Enqueue(@{ + NamespaceID = + if ($psCmdlet.ParameterSetName -eq 'AreaPath') { + '83e28ad4-2d72-4ceb-97b0-c7726d5502c3' + } else { + 'bf7bfa03-b2b7-47db-8113-fa2e002cc5b1' + } + SecurityToken = @(foreach($PathId in $PathIdList) { + "vstfs:///Classification/Node/$PathId" + }) -join ':' + } + $PSBoundParameters) + } + Dashboard { + $null = $PSBoundParameters.Remove('ProjectID') + $q.Enqueue(@{ + NamespaceID = '8adf73b7-389a-4276-b638-fe1653f7efc7' + SecurityToken = "$/$(if ($ProjectID) { $ProjectID })/$(if ($teamID) { $teamid } else { [guid]::Empty } )" + } + $PSBoundParameters) + } + Plan { + $q.Enqueue(@{ + NamespaceID = 'bed337f8-e5f3-4fb9-80da-81e17d06e7a8' + SecurityToken = "Plan" + } + $PSBoundParameters) + } + EndpointID { + $q.Enqueue(@{ + NamespaceID = '49b48001-ca20-4adc-8111-5b60c903a50c' + SecurityToken = "endpoints/$( + if ($ProjectID) {"$ProjectID/"} else { "Collection/"} + )$( + if ($EndpointID) {$EndpointID} + )" + } + $PSBoundParameters) + } + Tagging { + $q.Enqueue(@{ + NamespaceID = 'bb50f182-8e5e-40b8-bc21-e8752a1e7ae2' + SecurityToken = "/$ProjectID" + } + $PSBoundParameters) + } + ManageTFVC { + $q.Enqueue(@{ + NamespaceID = 'a39371cf-0841-4c16-bbd3-276e341bc052' + SecurityToken = "/$ProjectID" + } + $PSBoundParameters) + } + 'BuildDefinition|BuildPermission' { + + $q.Enqueue(@{ + NamespaceID = 'a39371cf-0841-4c16-bbd3-276e341bc052' + SecurityToken = "$ProjectID$(($BuildPath -replace '\\','/').TrimEnd('/'))/$DefinitionID" + } + $PSBoundParameters) + $q.Enqueue(@{ + NamespaceID = 'c788c23e-1b46-4162-8f5e-d7585343b5de' + SecurityToken = "$ProjectID$(($BuildPath -replace '\\','/').TrimEnd('/'))/$DefinitionID" + } + $PSBoundParameters) + } + 'RepositoryID|AllRepositories|ProjectRepository' { + $q.Enqueue(@{ + NamespaceID = '2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87' + SecurityToken = "repoV2$( +if ($ProjectID) { '/' + $projectId} +)$( +if ($repositoryID) {'/' + $repositoryID} +)$( +if ($BranchName) { + '/refs/heads/' + ([BitConverter]::ToString([Text.Encoding]::Unicode.GetBytes($BranchName)).Replace('-','').ToLower()) +} +)" + + } + $PSBoundParameters) + } + } + } else { + $q.Enqueue(@{ParameterSet=$ParameterSet} + $PSBoundParameters) + } + } + end { + $c, $t, $progId = 0, $q.Count, [Random]::new().Next() + + while ($q.Count) { + . $DQ $q # Pop one off the queue and declare all of it's variables (see /parts/DQ.ps1). + + $uri = # The URI is comprised of + @( + "$server".TrimEnd('/') # the Server (minus any trailing slashes), + $Organization # the Organization, + '_apis' # the API Root ('_apis'), + (. $ReplaceRouteParameter $ParameterSet) + # and any parameterized URLs in this parameter set. + ) -as [string[]] -ne '' -join '/' + + $uri += '?' # The URI has a query string containing: + $uri += @( + if ($Server -ne 'https://dev.azure.com/' -and + -not $PSBoundParameters.ApiVersion) { + $ApiVersion = '2.0' + } + if ($ApiVersion) { # the api-version + "api-version=$apiVersion" + } + ) -join '&' + + $realAllow = 0 + $realDeny = 0 + if (-not $cachedNamespaces.$namespaceID) { + $cachedNamespaces.$namespaceID = + Get-ADOPermission -Organization $Organization -PersonalAccessToken $psboundParameters["PersonalAccessToken"] -PermissionType | + Where-Object NamespaceID -EQ $NamespaceID | + Select-Object -First 1 + } + + if (-not $cachedNamespaces.$namespaceID) { continue } + + $Descriptors = @($Descriptor) + @( + foreach ($id in $Identity) { + $realId = @(& $resolveIdentity $id) + if (-not $realID) { + Write-Warning "Could not find Identity: '$realId'" + continue + } + if ($realId.Length -gt 1) { + Write-Warning "Ambiguous Identity found: '$id' could be '$($realId -join "','")'" + continue + } + $realId.descriptor + } + ) + + $realPermission = 0 + $friendlyPermission = @(:nextPerm foreach ($perm in $Permission) { + if ($perm -match '^\d+$') { + $realPermission = $realPermission -bor $perm + } else { + foreach ($act in $cachedNamespaces.$namespaceID.actions) { + if ($act.Name -like $perm -or $act.DisplayName -like $perm) { + $Permission = $realPermission -bor $act.bit + $act.Name + continue nextPerm + } + } + Write-Warning "Permission '$perm' not found in '$($cachedNamespaces.$NamespaceID.Name)'. +$($cachedNamespaces.$namespaceID.actions | Format-Table -Property Name, DisplayName | Out-String)" + } + }) + + + $c++ + + + if (-not $Descriptors) { + Write-Error "No -Descriptor or -Identity provided" + return + } + + if (-not $realPermission) { + Write-Error "Must provide valid -Permission" + return + } + + # We want to decorate our return value. Handily enough, both URIs contain a distinct name in the last URL segment. + $typename = @($parameterSet -split '/' -notlike '{*}')[-1] -replace 'ies', 'y' # We just need to drop the 's' + $typeNames = @( + "$organization.$typename" + if ($Project) { "$organization.$Project.$typename" } + "PSDevOps.$typename" + ) + $invokeParams.Method = 'DELETE' + foreach ($desc in $Descriptors) { + Write-Progress "Removing Permissions for $desc" " (Removing: $friendlyPermission on $SecurityToken ) " -Id $progId -PercentComplete ($c * 100/$t) + if ($invokeParams.Uri -notlike "*/$realPermission") { + $invokeParams.Uri += "/*/$realPermission" + } + + $invokeParams.QueryParameter = @{ + token = $SecurityToken + descriptor = $Descriptor + } + + $additionalProperties = @{Organization=$Organization;Server=$Server;SecurityToken=$SecurityToken} + if ($WhatIfPreference) { + $invokeParams + continue + } + + if ($psCmdlet.ShouldProcess("Remove $($cachedNamespaces.$namespaceID.Name) Permissions")) { + Invoke-ADORestAPI -Uri $uri @invokeParams -PSTypeName $typenames -Property $additionalProperties + } + } + } + + Write-Progress "Remove Permissions" " " -Id $progId -Completed + } +} \ No newline at end of file From b27d0a619c8754360726703a06e1ede6c7064916 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Tue, 15 Mar 2022 18:15:18 -0700 Subject: [PATCH 030/151] Initial Version of PSDevOps Action (#144) --- action.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 action.yml diff --git a/action.yml b/action.yml new file mode 100644 index 00000000..4cc8a21c --- /dev/null +++ b/action.yml @@ -0,0 +1,20 @@ + +name: UsePSDevOps +description: PowerShell Tools for DevOps (including a PowerShell wrapper for the GitHub REST API) +branding: + icon: github + color: blue +outputs: + + PSDevOpsScriptRuntime: + description: The time it took the .PSDevOpsScript parameter to run + value: ${{steps.PSDevOpsAction.outputs.PSDevOpsScriptRuntime}} + PSDevOpsPS1Runtime: + description: The time it took all .PSDevOps.ps1 files to run + value: ${{steps.PSDevOpsAction.outputs.PSDevOpsPS1Runtime}} + PSDevOpsPS1Files: + description: The .PSDevOps.ps1 files that were run (separated by semicolons) + value: ${{steps.PSDevOpsAction.outputs.PSDevOpsPS1Files}} + PSDevOpsPS1Count: + description: The number of .PSDevOps.ps1 files that were run + value: ${{steps.PSDevOpsAction.outputs.PSDevOpsPS1Count}} From dc60aec20fc78627ffe031c064c41f73a1a25a37 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Mon, 4 Apr 2022 14:39:48 -0700 Subject: [PATCH 031/151] Get-ADOTest: Removing Extensibility --- Functions/AzureDevOps/Get-ADOTest.ps1 | 107 +++++++++++++++----------- 1 file changed, 62 insertions(+), 45 deletions(-) diff --git a/Functions/AzureDevOps/Get-ADOTest.ps1 b/Functions/AzureDevOps/Get-ADOTest.ps1 index 2194b104..30764af0 100644 --- a/Functions/AzureDevOps/Get-ADOTest.ps1 +++ b/Functions/AzureDevOps/Get-ADOTest.ps1 @@ -19,15 +19,9 @@ .Link https://docs.microsoft.com/en-us/rest/api/azure/devops/testplan/test%20%20suites/get%20test%20suites%20for%20plan #> - [OutputType('PSDevOps.TestPlan','PSDevOps.TestRun', 'PSDevOps.TestSuite', 'PSDevOps.TestPoint','PSDevOps.TestCase')] + [OutputType('PSDevOps.Project','PSDevOps.Property')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute("Test-ForParameterSetAmbiguity", "", Justification="Ambiguity Desired.")] param( - # The Organization - [Parameter(Mandatory,ValueFromPipelineByPropertyName)] - [Alias('Org')] - [string] - $Organization, - # The project identifier. [Parameter(Mandatory,ValueFromPipelineByPropertyName)] [string] @@ -39,26 +33,29 @@ [switch] $TestRun, - - # If set, will return the test plans associated with a project. - [Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans')] - [Alias('TestPlans')] - [switch] - $TestPlan, - - # If set, will return the test suites associated with a project and plan. - [Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites')] - [Alias('TestSuites')] - [switch] - $TestSuite, - # If set, will return results related to a specific test run. [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='/{ProjectID}/_apis/test/runs/{TestRunID}')] [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='/{ProjectID}/_apis/test/runs/{TestRunID}/attachments')] [Parameter(Mandatory,ValueFromPipelineByPropertyName,ParameterSetName='/{ProjectID}/_apis/test/runs/{TestRunID}/results')] [string] $TestRunID, - + + # If set, will return the test plans associated with a project. + [Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans')] + [Alias('TestPlans')] + [switch] + $TestPlan, + + # If set, will return results related to a specific test plan. + [Parameter(Mandatory,ValueFromPipelineByPropertyName, + ParameterSetName='/{ProjectID}/_apis/testplan/{TestPlanID}')] + [Parameter(Mandatory,ValueFromPipelineByPropertyName, + ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites')] + [Parameter(Mandatory,ValueFromPipelineByPropertyName, + ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}/TestPoint')] + [string] + $TestPlanID, + # If set, will return the test variables associated with a project. [Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/test/variables')] [Alias('TestVariables')] @@ -71,6 +68,34 @@ [switch] $TestConfiguration, + # If set, will list test suites related to a plan. + [Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites')] + [Alias('TestSuites')] + [switch] + $TestSuite, + + # If set, will return results related to a particular test suite. + [Parameter(Mandatory,ValueFromPipelineByPropertyName, + ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}')] + [Parameter(Mandatory,ValueFromPipelineByPropertyName, + ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}/TestPoint')] + [string] + $TestSuiteID, + + # If set, will return test points within a suite. + [Parameter(Mandatory, + ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}/TestPoint')] + [Alias('TestPoints')] + [switch] + $TestPoint, + + # If set, will return test results within a run. + [Parameter(Mandatory, + ParameterSetName='/{ProjectID}/_apis/test/runs/{TestRunID}/results')] + [Alias('TestResults')] + [switch] + $TestResult, + # If set, will return the first N results within a test run. [Parameter(ValueFromPipelineByPropertyName,ParameterSetName='/{ProjectID}/_apis/test/runs/{TestRunID}/results')] [Alias('Top')] @@ -103,6 +128,12 @@ [switch] $TestAttachment, + # The Organization + [Parameter(Mandatory,ValueFromPipelineByPropertyName)] + [Alias('Org')] + [string] + $Organization, + # If set, will always retrieve fresh data. # By default, cached data will be returned. [switch] @@ -121,30 +152,18 @@ $ApiVersion = "5.1-preview" ) - dynamicParam { . $GetInvokeParameters -CommandName $MyInvocation.MyCommand.Name -DynamicParameter } + dynamicParam { . $GetInvokeParameters -DynamicParameter } begin { #region Copy Invoke-ADORestAPI parameters $invokeParams = . $getInvokeParameters $PSBoundParameters #endregion Copy Invoke-ADORestAPI parameters - $q = [Collections.Queue]::new() - $rq = [Collections.Queue]::new() + $q = [Collections.Queue]::new() } process { - $in = $_ - $paramCopy = [Ordered]@{} + $psBoundParameters - $myCommandName = $MyInvocation.MyCommand.name - $extensionOutput = Get-PSDevOpsExtension -Run -CommandName $myCommandName -Parameter $paramCopy -Stream - if ($extensionOutput) { - foreach ($extOut in $extensionOutput) { - $rq.Enqueue($extOut) - } - } else { - $q.Enqueue(@{PSParameterSet=$psCmdlet.ParameterSetName;InputObject=$in} + $paramCopy) - } + $q.Enqueue(@{PSParameterSet=$psCmdlet.ParameterSetName;InputObject=$_} + $PSBoundParameters) } end { - $c, $t, $progId = 0, ($q.Count + $rq.Count), [Random]::new().Next() - . $flushRequestQueue -Invoker Invoke-ADORestAPI + $c, $t, $progId = 0, $q.Count, [Random]::new().Next() while ($q.Count) { . $dq $q @@ -177,7 +196,10 @@ Project = $Project Server = $Server } - if ($ProjectID) { $additionalProperty.ProjectID = $ProjectID } + if ($ProjectID) { $additionalProperty.ProjectID = $ProjectID } + if ($TestPlanID) { + $additionalProperty.TestPlanID = $TestPlanID + } if ($inputObject.TestPlanName) { $additionalProperty['TestPlanName'] = $inputObject.TestPlanName } @@ -211,17 +233,12 @@ $resultBatch } } while ($resultBatch -and ($count -lt $Total)) - Write-Progress "Getting Results" " [$Count/$total] $uri" -Completed -ParentId $progId -Id $innerProgressId } else { Invoke-ADORestAPI @invokeParams } } - if ($c -gt 0) { - Write-Progress "$($MyInvocation.MyCommand)" "[$c/$t]" -Completed -Id $progId - } - + + Write-Progress "Getting" "[$c/$t]" -Completed -Id $progId } } - - From af69cca18e74c6d851bce6a6f269049bc4ffd37f Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Tue, 26 Apr 2022 10:29:35 -0700 Subject: [PATCH 032/151] Updating GitHub Workflow steps/jobs - adding support for HelpOut and EZOut --- GitHub/Jobs/HelpOut.psd1 | 14 ++++++++++++++ GitHub/Jobs/HelpOutWiki.psd1 | 25 +++++++++++++++++++++++++ GitHub/Jobs/RunEZOut.psd1 | 17 +++++++++++++++++ GitHub/Steps/RunEZOut.psd1 | 4 ++++ GitHub/Steps/RunHelpOut.psd1 | 4 ++++ 5 files changed, 64 insertions(+) create mode 100644 GitHub/Jobs/HelpOut.psd1 create mode 100644 GitHub/Jobs/HelpOutWiki.psd1 create mode 100644 GitHub/Jobs/RunEZOut.psd1 create mode 100644 GitHub/Steps/RunEZOut.psd1 create mode 100644 GitHub/Steps/RunHelpOut.psd1 diff --git a/GitHub/Jobs/HelpOut.psd1 b/GitHub/Jobs/HelpOut.psd1 new file mode 100644 index 00000000..81f04a75 --- /dev/null +++ b/GitHub/Jobs/HelpOut.psd1 @@ -0,0 +1,14 @@ +@{ + "runs-on" = "ubuntu-latest" + if = '${{ success() }}' + steps = @( + @{ + name = 'Check out repository' + uses = 'actions/checkout@v2' + }, + 'RunHelpOut' + ) +} + + + diff --git a/GitHub/Jobs/HelpOutWiki.psd1 b/GitHub/Jobs/HelpOutWiki.psd1 new file mode 100644 index 00000000..54b37e22 --- /dev/null +++ b/GitHub/Jobs/HelpOutWiki.psd1 @@ -0,0 +1,25 @@ +@{ + "runs-on" = "ubuntu-latest" + if = '${{ success() }}' + steps = @( + @{ + name = 'Check out repository' + uses = 'actions/checkout@v2' + with = @{ + repository = '${{ github.repository }}.wiki' + path = 'wiki' + persistCredentials = $true + } + + }, + @{ + name = 'Check out repository' + uses = 'actions/checkout@v2' + persistCredentials = $true + } + 'RunHelpOut' + ) +} + + + diff --git a/GitHub/Jobs/RunEZOut.psd1 b/GitHub/Jobs/RunEZOut.psd1 new file mode 100644 index 00000000..e99e0a4e --- /dev/null +++ b/GitHub/Jobs/RunEZOut.psd1 @@ -0,0 +1,17 @@ +@{ + "runs-on" = "ubuntu-latest" + if = '${{ success() }}' + steps = @( + @{ + name = 'Check out repository' + uses = 'actions/checkout@v2' + }, 'RunEZOut', @{ + name = 'Push Changes' + shell = 'pwsh' + run = 'git push; exit 0' + } + ) +} + + + diff --git a/GitHub/Steps/RunEZOut.psd1 b/GitHub/Steps/RunEZOut.psd1 new file mode 100644 index 00000000..6536c1b4 --- /dev/null +++ b/GitHub/Steps/RunEZOut.psd1 @@ -0,0 +1,4 @@ +@{ + name = "UseEZOut" + uses = "StartAutomating/EZOut@master" +} diff --git a/GitHub/Steps/RunHelpOut.psd1 b/GitHub/Steps/RunHelpOut.psd1 new file mode 100644 index 00000000..2ddc3c3b --- /dev/null +++ b/GitHub/Steps/RunHelpOut.psd1 @@ -0,0 +1,4 @@ +@{ + name = "UseHelpOut" + uses = "StartAutomating/HelpOut@master" +} From dbcf98ee18326bc746916a33134af68b2b8d83d1 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Tue, 7 Jun 2022 14:25:32 -0700 Subject: [PATCH 033/151] Updating action (pushing changes) #144 --- GitHub/Actions/PSDevOpsAction.ps1 | 172 ++++++++++++++++++++++ action.yml | 231 ++++++++++++++++++++++++++++++ 2 files changed, 403 insertions(+) create mode 100644 GitHub/Actions/PSDevOpsAction.ps1 diff --git a/GitHub/Actions/PSDevOpsAction.ps1 b/GitHub/Actions/PSDevOpsAction.ps1 new file mode 100644 index 00000000..26724fb6 --- /dev/null +++ b/GitHub/Actions/PSDevOpsAction.ps1 @@ -0,0 +1,172 @@ +<# +.Synopsis + GitHub Action for PSDevOps +.Description + GitHub Action for PSDevOps. This will: + + * Import PSDevOps and Connect-GitHub (giving easy access to every GitHub API) + * Run all *.PSDevOps.ps1 files beneath the workflow directory + * Run a .PSDevOpsScript parameter. + + + If you will be making changes using the GitHubAPI, you should provide a -GitHubToken + If none is provided, and ENV:GITHUB_TOKEN is set, this will be used instead. + Any files changed can be outputted by the script, and those changes can be checked back into the repo. + Make sure to use the "persistCredentials" option with checkout. + +#> + +param( +# A PowerShell Script that uses PSDevOps. +# Any files outputted from the script will be added to the repository. +# If those files have a .Message attached to them, they will be committed with that message. +[string] +$PSDevOpsScript, + +# If set, will not process any files named *.PSDevOps.ps1 +[switch] +$SkipPSDevOpsPS1, + +# If provided, will use this GitHubToken when running Connect-GitHub +[string] +$GitHubToken, + +[PSObject] +$Parameter, + +# If provided, will commit any remaining changes made to the workspace with this commit message. +[string] +$CommitMessage, + +# The user email associated with a git commit. +[string] +$UserEmail, + +# The user name associated with a git commit. +[string] +$UserName +) + +"::group::Parameters" | Out-Host +[PSCustomObject]$PSBoundParameters | Format-List | Out-Host +"::endgroup::" | Out-Host + +if ($env:GITHUB_ACTION_PATH) { + $PSDevOpsModulePath = Join-Path $env:GITHUB_ACTION_PATH 'PSDevOps.psd1' + if (Test-path $PSDevOpsModulePath) { + Import-Module $PSDevOpsModulePath -Force -PassThru | Out-String + } else { + throw "PSDevOps not found" + } +} elseif (-not (Get-Module PSDevOps)) { + throw "Action Path not found" +} + +"::notice title=ModuleLoaded::PSDevOps Loaded from Path - $($PSDevOpsModulePath)" | Out-Host + + +$ght = + if ($GitHubToken) { + $GitHubToken + } elseif ($env:GITHUB_TOKEN) { + $env:GITHUB_TOKEN + } +"::group::Connecting to Github" | Out-Host +$connectStart = [DateTime]::now +Connect-GitHub -PersonalAccessToken $GitHubToken -PassThru | + ForEach-Object { + $githubModule = $_ + "::notice title=Connected::Connect-GitHub finished - $($githubModule.ExportedCommands.Count) Commands Imported" | Out-Host + $githubModule.ExportedCommands.Keys -join [Environment]::Newline | Out-Host + } | + Out-Host +"::endgroup::" | Out-Host + +$anyFilesChanged = $false +$processScriptOutput = { process { + $out = $_ + $outItem = Get-Item -Path $out -ErrorAction SilentlyContinue + $fullName, $shouldCommit = + if ($out -is [IO.FileInfo]) { + $out.FullName, (git status $out.Fullname -s) + } elseif ($outItem) { + $outItem.FullName, (git status $outItem.Fullname -s) + } + if ($shouldCommit) { + git add $fullName + if ($out.Message) { + git commit -m "$($out.Message)" + } elseif ($out.CommitMessage) { + git commit -m "$($out.CommitMessage)" + } + $anyFilesChanged = $true + } + $out +} } + + +if (-not $UserName) { $UserName = $env:GITHUB_ACTOR } +if (-not $UserEmail) { $UserEmail = "$UserName@github.com" } +git config --global user.email $UserEmail +git config --global user.name $UserName + +if (-not $env:GITHUB_WORKSPACE) { throw "No GitHub workspace" } + +git pull | Out-Host + +$PSDevOpsScriptStart = [DateTime]::Now +if ($PSDevOpsScript) { + Invoke-Expression -Command $PSDevOpsScript | + . $processScriptOutput | + Out-Host +} +$PSDevOpsScriptTook = [Datetime]::Now - $PSDevOpsScriptStart +"::set-output name=PSDevOpsScriptRuntime::$($PSDevOpsScriptTook.TotalMilliseconds)" | Out-Host + +$PSDevOpsPS1Start = [DateTime]::Now +$PSDevOpsPS1List = @() +if (-not $SkipPSDevOpsPS1) { + Get-ChildItem -Recurse -Path $env:GITHUB_WORKSPACE | + Where-Object Name -Match '\.PSDevOps\.ps1$' | + + ForEach-Object { + $PSDevOpsPS1List += $_.FullName.Replace($env:GITHUB_WORKSPACE, '').TrimStart('/') + $PSDevOpsPS1Count++ + "::notice title=Running::$($_.Fullname)" | Out-Host + . $_.FullName | + . $processScriptOutput | + Out-Host + } +} +$PSDevOpsPS1EndStart = [DateTime]::Now +$PSDevOpsPS1Took = [Datetime]::Now - $PSDevOpsPS1Start +"::set-output name=PSDevOpsPS1Count::$($PSDevOpsPS1List.Length)" | Out-Host +"::set-output name=PSDevOpsPS1Files::$($PSDevOpsPS1List -join ';')" | Out-Host +"::set-output name=PSDevOpsPS1Runtime::$($PSDevOpsPS1Took.TotalMilliseconds)" | Out-Host +if ($CommitMessage -or $anyFilesChanged) { + if ($CommitMessage) { + dir $env:GITHUB_WORKSPACE -Recurse | + ForEach-Object { + $gitStatusOutput = git status $_.Fullname -s + if ($gitStatusOutput) { + git add $_.Fullname + } + } + + git commit -m $ExecutionContext.SessionState.InvokeCommand.ExpandString($CommitMessage) + } + + + + + $checkDetached = git symbolic-ref -q HEAD + if (-not $LASTEXITCODE) { + "::notice::Pushing Changes" | Out-Host + $gitPushed = git push + "Git Push Output: $($gitPushed | Out-String)" + } else { + "::notice::Not pushing changes (on detached head)" | Out-Host + $LASTEXITCODE = 0 + exit 0 + } +} diff --git a/action.yml b/action.yml index 4cc8a21c..9f62403c 100644 --- a/action.yml +++ b/action.yml @@ -1,6 +1,30 @@ name: UsePSDevOps description: PowerShell Tools for DevOps (including a PowerShell wrapper for the GitHub REST API) +inputs: + PSDevOpsScript: + required: false + description: | + A PowerShell Script that uses PSDevOps. + Any files outputted from the script will be added to the repository. + If those files have a .Message attached to them, they will be committed with that message. + SkipPSDevOpsPS1: + required: false + description: 'If set, will not process any files named *.PSDevOps.ps1' + GitHubToken: + required: false + description: If provided, will use this GitHubToken when running Connect-GitHub + Parameter: + required: false + CommitMessage: + required: false + description: If provided, will commit any remaining changes made to the workspace with this commit message. + UserEmail: + required: false + description: The user email associated with a git commit. + UserName: + required: false + description: The user name associated with a git commit. branding: icon: github color: blue @@ -18,3 +42,210 @@ outputs: PSDevOpsPS1Count: description: The number of .PSDevOps.ps1 files that were run value: ${{steps.PSDevOpsAction.outputs.PSDevOpsPS1Count}} +runs: + using: composite + steps: + - name: PSDevOpsAction + id: PSDevOpsAction + shell: pwsh + env: + GitHubToken: ${{inputs.GitHubToken}} + Parameter: ${{inputs.Parameter}} + UserEmail: ${{inputs.UserEmail}} + CommitMessage: ${{inputs.CommitMessage}} + PSDevOpsScript: ${{inputs.PSDevOpsScript}} + UserName: ${{inputs.UserName}} + SkipPSDevOpsPS1: ${{inputs.SkipPSDevOpsPS1}} + run: | + $Parameters = @{} + $Parameters.PSDevOpsScript = ${env:PSDevOpsScript} + $Parameters.SkipPSDevOpsPS1 = ${env:SkipPSDevOpsPS1} + $Parameters.SkipPSDevOpsPS1 = $parameters.SkipPSDevOpsPS1 -match 'true'; + $Parameters.GitHubToken = ${env:GitHubToken} + $Parameters.Parameter = ${env:Parameter} + $Parameters.Parameter = ConvertFrom-JSON @' + ${{parameters.$ParameterName}} + '@ + $Parameters.CommitMessage = ${env:CommitMessage} + $Parameters.UserEmail = ${env:UserEmail} + $Parameters.UserName = ${env:UserName} + foreach ($k in @($parameters.Keys)) { + if ([String]::IsNullOrEmpty($parameters[$k])) { + $parameters.Remove($k) + } + } + Write-Host "::debug:: PSDevOpsAction $(@(foreach ($p in $Parameters.GetEnumerator()) {'-' + $p.Key + ' ' + $p.Value}) -join ' ')" + & {<# + .Synopsis + GitHub Action for PSDevOps + .Description + GitHub Action for PSDevOps. This will: + + * Import PSDevOps and Connect-GitHub (giving easy access to every GitHub API) + * Run all *.PSDevOps.ps1 files beneath the workflow directory + * Run a .PSDevOpsScript parameter. + + + If you will be making changes using the GitHubAPI, you should provide a -GitHubToken + If none is provided, and ENV:GITHUB_TOKEN is set, this will be used instead. + Any files changed can be outputted by the script, and those changes can be checked back into the repo. + Make sure to use the "persistCredentials" option with checkout. + + #> + + param( + # A PowerShell Script that uses PSDevOps. + # Any files outputted from the script will be added to the repository. + # If those files have a .Message attached to them, they will be committed with that message. + [string] + $PSDevOpsScript, + + # If set, will not process any files named *.PSDevOps.ps1 + [switch] + $SkipPSDevOpsPS1, + + # If provided, will use this GitHubToken when running Connect-GitHub + [string] + $GitHubToken, + + [PSObject] + $Parameter, + + # If provided, will commit any remaining changes made to the workspace with this commit message. + [string] + $CommitMessage, + + # The user email associated with a git commit. + [string] + $UserEmail, + + # The user name associated with a git commit. + [string] + $UserName + ) + + "::group::Parameters" | Out-Host + [PSCustomObject]$PSBoundParameters | Format-List | Out-Host + "::endgroup::" | Out-Host + + if ($env:GITHUB_ACTION_PATH) { + $PSDevOpsModulePath = Join-Path $env:GITHUB_ACTION_PATH 'PSDevOps.psd1' + if (Test-path $PSDevOpsModulePath) { + Import-Module $PSDevOpsModulePath -Force -PassThru | Out-String + } else { + throw "PSDevOps not found" + } + } elseif (-not (Get-Module PSDevOps)) { + throw "Action Path not found" + } + + "::notice title=ModuleLoaded::PSDevOps Loaded from Path - $($PSDevOpsModulePath)" | Out-Host + + + $ght = + if ($GitHubToken) { + $GitHubToken + } elseif ($env:GITHUB_TOKEN) { + $env:GITHUB_TOKEN + } + "::group::Connecting to Github" | Out-Host + $connectStart = [DateTime]::now + Connect-GitHub -PersonalAccessToken $GitHubToken -PassThru | + ForEach-Object { + $githubModule = $_ + "::notice title=Connected::Connect-GitHub finished - $($githubModule.ExportedCommands.Count) Commands Imported" | Out-Host + $githubModule.ExportedCommands.Keys -join [Environment]::Newline | Out-Host + } | + Out-Host + "::endgroup::" | Out-Host + + $anyFilesChanged = $false + $processScriptOutput = { process { + $out = $_ + $outItem = Get-Item -Path $out -ErrorAction SilentlyContinue + $fullName, $shouldCommit = + if ($out -is [IO.FileInfo]) { + $out.FullName, (git status $out.Fullname -s) + } elseif ($outItem) { + $outItem.FullName, (git status $outItem.Fullname -s) + } + if ($shouldCommit) { + git add $fullName + if ($out.Message) { + git commit -m "$($out.Message)" + } elseif ($out.CommitMessage) { + git commit -m "$($out.CommitMessage)" + } + $anyFilesChanged = $true + } + $out + } } + + + if (-not $UserName) { $UserName = $env:GITHUB_ACTOR } + if (-not $UserEmail) { $UserEmail = "$UserName@github.com" } + git config --global user.email $UserEmail + git config --global user.name $UserName + + if (-not $env:GITHUB_WORKSPACE) { throw "No GitHub workspace" } + + git pull | Out-Host + + $PSDevOpsScriptStart = [DateTime]::Now + if ($PSDevOpsScript) { + Invoke-Expression -Command $PSDevOpsScript | + . $processScriptOutput | + Out-Host + } + $PSDevOpsScriptTook = [Datetime]::Now - $PSDevOpsScriptStart + "::set-output name=PSDevOpsScriptRuntime::$($PSDevOpsScriptTook.TotalMilliseconds)" | Out-Host + + $PSDevOpsPS1Start = [DateTime]::Now + $PSDevOpsPS1List = @() + if (-not $SkipPSDevOpsPS1) { + Get-ChildItem -Recurse -Path $env:GITHUB_WORKSPACE | + Where-Object Name -Match '\.PSDevOps\.ps1$' | + + ForEach-Object { + $PSDevOpsPS1List += $_.FullName.Replace($env:GITHUB_WORKSPACE, '').TrimStart('/') + $PSDevOpsPS1Count++ + "::notice title=Running::$($_.Fullname)" | Out-Host + . $_.FullName | + . $processScriptOutput | + Out-Host + } + } + $PSDevOpsPS1EndStart = [DateTime]::Now + $PSDevOpsPS1Took = [Datetime]::Now - $PSDevOpsPS1Start + "::set-output name=PSDevOpsPS1Count::$($PSDevOpsPS1List.Length)" | Out-Host + "::set-output name=PSDevOpsPS1Files::$($PSDevOpsPS1List -join ';')" | Out-Host + "::set-output name=PSDevOpsPS1Runtime::$($PSDevOpsPS1Took.TotalMilliseconds)" | Out-Host + if ($CommitMessage -or $anyFilesChanged) { + if ($CommitMessage) { + dir $env:GITHUB_WORKSPACE -Recurse | + ForEach-Object { + $gitStatusOutput = git status $_.Fullname -s + if ($gitStatusOutput) { + git add $_.Fullname + } + } + + git commit -m $ExecutionContext.SessionState.InvokeCommand.ExpandString($CommitMessage) + } + + + + + $checkDetached = git symbolic-ref -q HEAD + if (-not $LASTEXITCODE) { + "::notice::Pushing Changes" | Out-Host + $gitPushed = git push + "Git Push Output: $($gitPushed | Out-String)" + } else { + "::notice::Not pushing changes (on detached head)" | Out-Host + $LASTEXITCODE = 0 + exit 0 + } + } + } @Parameters + From 3f06a72288a196b04e43b9c9002c17cf46e006b0 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Tue, 7 Jun 2022 14:31:39 -0700 Subject: [PATCH 034/151] Removing extensibility from GetInvokeParameters --- Parts/GetInvokeParameters.ps1 | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Parts/GetInvokeParameters.ps1 b/Parts/GetInvokeParameters.ps1 index 2e55c12f..52037b82 100644 --- a/Parts/GetInvokeParameters.ps1 +++ b/Parts/GetInvokeParameters.ps1 @@ -55,14 +55,6 @@ process { if (-not $CommandName) { return $script:InvokeADORestAPIParams } - $extensionDynamicParameters = Get-PSDevOpsExtension -CommandName $CommandName -DynamicParameter - if (-not $extensionDynamicParameters.Count) { return $script:InvokeADORestAPIParams } - foreach ($dp in $script:InvokeADORestAPIParams.GetEnumerator()) { - if (-not $extensionDynamicParameters[$dp.Key]) { - $extensionDynamicParameters[$dp.Key] = $dp.value - } - } - return $extensionDynamicParameters } if ($PSCmdlet.ParameterSetName -eq 'GetParameterValues') { $invokeParams = [Ordered]@{} + $InvokeParameter # Then we copy our parameters From e54a423af896cf38d24519fe31028e377d5ae1e9 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Tue, 7 Jun 2022 14:31:57 -0700 Subject: [PATCH 035/151] Removing extensibility (for now) --- Functions/Get-PSDevOpsExtension.ps1 | 578 ---------------------------- 1 file changed, 578 deletions(-) delete mode 100644 Functions/Get-PSDevOpsExtension.ps1 diff --git a/Functions/Get-PSDevOpsExtension.ps1 b/Functions/Get-PSDevOpsExtension.ps1 deleted file mode 100644 index 9feb0544..00000000 --- a/Functions/Get-PSDevOpsExtension.ps1 +++ /dev/null @@ -1,578 +0,0 @@ -#region Piecemeal [ 0.1.10 ] : Easy Extensible Plugins for PowerShell -# Install-Module Piecemeal -Scope CurrentUser -# Import-Module Piecemeal -Force -# Install-Piecemeal -ExtensionModule 'PSDevOps' -ExtensionModuleAlias 'psdo' -ExtensionTypeName 'PSDevOps.Extension' -OutputPath '.\Get-PSDevOpsExtension.ps1' -function Get-PSDevOpsExtension -{ - <# - .Synopsis - Gets Extensions - .Description - Gets Extensions. - - PSDevOps Extensions can be found in: - - * Any module that includes -ExtensionModuleName in it's tags. - * The directory specified in -ExtensionPath - .Example - Get-PSDevOpsExtension - #> - [OutputType('Extension')] - [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSReviewUnusedParameter", "", Justification="PSScriptAnalyzer cannot handle nested scoping")] - param( - # If provided, will look beneath a specific path for extensions. - [Parameter(ValueFromPipelineByPropertyName)] - [Alias('Fullname')] - [string] - $ExtensionPath, - - # If set, will clear caches of extensions, forcing a refresh. - [switch] - $Force, - - # If provided, will get PSDevOps Extensions that extend a given command - [Parameter(ValueFromPipelineByPropertyName)] - [Alias('ThatExtends', 'For')] - [string[]] - $CommandName, - - # The name of an extension - [Parameter(ValueFromPipelineByPropertyName)] - [ValidateNotNullOrEmpty()] - [string[]] - $ExtensionName, - - # If provided, will treat -ExtensionName as a wildcard. - [Parameter(ValueFromPipelineByPropertyName)] - [switch] - $Like, - - # If provided, will treat -ExtensionName as a regular expression. - [Parameter(ValueFromPipelineByPropertyName)] - [switch] - $Match, - - # If set, will return the dynamic parameters object of all the PSDevOps Extensions for a given command. - [Parameter(ValueFromPipelineByPropertyName)] - [switch] - $DynamicParameter, - - # If set, will return if the extension could run - [Parameter(ValueFromPipelineByPropertyName)] - [Alias('CanRun')] - [switch] - $CouldRun, - - # If set, will run the extension. If -Stream is passed, results will be directly returned. - # By default, extension results are wrapped in a return object. - [Parameter(ValueFromPipelineByPropertyName)] - [switch] - $Run, - - # If set, will stream output from running the extension. - # By default, extension results are wrapped in a return object. - [Parameter(ValueFromPipelineByPropertyName)] - [switch] - $Stream, - - # If set, will return the dynamic parameters of all PSDevOps Extensions for a given command, using the provided DynamicParameterSetName. - # Implies -DynamicParameter. - [Parameter(ValueFromPipelineByPropertyName)] - [string] - $DynamicParameterSetName, - - - # If provided, will return the dynamic parameters of all PSDevOps Extensions for a given command, with all positional parameters offset. - # Implies -DynamicParameter. - [Parameter(ValueFromPipelineByPropertyName)] - [int] - $DynamicParameterPositionOffset = 0, - - # If set, will return the dynamic parameters of all PSDevOps Extensions for a given command, with all mandatory parameters marked as optional. - # Implies -DynamicParameter. Does not actually prevent the parameter from being Mandatory on the Extension. - [Parameter(ValueFromPipelineByPropertyName)] - [Alias('NoMandatoryDynamicParameters')] - [switch] - $NoMandatoryDynamicParameter, - - # If set, will validate this input against [ValidateScript], [ValidatePattern], and [ValidateSet] attributes found on an extension. - [Parameter(ValueFromPipelineByPropertyName)] - [PSObject] - $ValidateInput, - - # The name of the parameter set. This is used by -CouldRun and -Run to enforce a single specific parameter set. - [Parameter(ValueFromPipelineByPropertyName)] - [string] - $ParameterSetName, - - # The parameters to the extension. Only used when determining if the extension -CouldRun. - [Parameter(ValueFromPipelineByPropertyName)] - [Collections.IDictionary] - [Alias('Parameters','ExtensionParameter','ExtensionParameters')] - $Parameter = @{} - ) - - begin { - $ExtensionPattern = '(? in Irregular (https://github.com/StartAutomating/Irregular) - [Regex]::new(' - \.(?Description) # Field Start - \s{0,} # Optional Whitespace - (?(.|\s)+?(?=(\.\w+|\#\>))) # Anything until the next .\field or end of the comment block - ', 'IgnoreCase,IgnorePatternWhitespace', [Timespan]::FromSeconds(1)).Match( - $this.ScriptBlock - ).Groups["Content"].Value - } - )) - - - $extCmd.PSObject.Properties.Add([PSScriptProperty]::new( - 'Synopsis', { - # From ? in Irregular (https://github.com/StartAutomating/Irregular) - [Regex]::new(' - \.(?Synopsis) # Field Start - \s{0,} # Optional Whitespace - (?(.|\s)+?(?=(\.\w+|\#\>))) # Anything until the next .\field or end of the comment block - ', 'IgnoreCase,IgnorePatternWhitespace', [Timespan]::FromSeconds(1)).Match( - $this.ScriptBlock - ).Groups["Content"].Value - })) - - $extCmd.PSObject.Methods.Add([psscriptmethod]::new('Validate', { - param([PSObject]$ValidateInput) - - try { - # We can attempt to create a variable using our attributes and $validateInput - [psvariable]::new("validating", $ValidateInput, 'None', $this.Attributes) - } catch { - $ex = $_ # If this throws an exception, we may wish to clean it up. - foreach ($attr in $this.ScriptBlock.Attributes) { - if ($attr -is [Management.Automation.ValidateSetAttribute]) { - if ($ValidateInput -notin $attr.ValidValues) { - throw "'$ValidateInput' is not a valid value. Valid values are '$(@($attr.ValidValues) -join "','")'" - } - } - if ($attr -is [Management.Automation.ValidatePatternAttribute]) { - $matched = [Regex]::new($attr.RegexPattern, $attr.Options, [Timespan]::FromSeconds(1)).Match($ValidateInput) - if (-not $matched.Success) { - throw "'$ValidateInput' is not a valid value. Valid values must match the pattern '$($attr.RegexPattern)'" - } - } - if ($attr -is [Management.Automation.ValidateRangeAttribute]) { - if ($null -ne $attr.MinRange -and $validateInput -lt $attr.MinRange) { - throw "'$ValidateInput' is below the minimum range [ $($attr.MinRange)-$($attr.MaxRange) ]" - } - if ($null -ne $attr.MaxRange -and $validateInput -gt $attr.MaxRange) { - throw "'$ValidateInput' is above the maximum range [ $($attr.MinRange)-$($attr.MaxRange) ]" - } - } - } - throw $ex.Exception - } - return $true - })) - - $extCmd.PSObject.Methods.Add([PSScriptMethod]::new('GetDynamicParameters', { - param( - [string] - $ParameterSetName, - - [int] - $PositionOffset, - - [switch] - $NoMandatory, - - [string[]] - $commandList - ) - - $ExtensionDynamicParameters = [Management.Automation.RuntimeDefinedParameterDictionary]::new() - $Extension = $this - - :nextDynamicParameter foreach ($in in @(([Management.Automation.CommandMetaData]$Extension).Parameters.Keys)) { - $attrList = [Collections.Generic.List[Attribute]]::new() - $validCommandNames = @() - foreach ($attr in $extension.Parameters[$in].attributes) { - if ($attr -isnot [Management.Automation.ParameterAttribute]) { - # we can passthru any non-parameter attributes - $attrList.Add($attr) - if ($attr -is [Management.Automation.CmdletAttribute] -and $commandList) { - $validCommandNames += ( - ($attr.VerbName -replace '\s') + '-' + ($attr.NounName -replace '\s') - ) -replace '^\-' -replace '\-$' - } - } else { - # but parameter attributes need to copied. - $attrCopy = [Management.Automation.ParameterAttribute]::new() - # (Side note: without a .Clone, copying is tedious.) - foreach ($prop in $attrCopy.GetType().GetProperties('Instance,Public')) { - if (-not $prop.CanWrite) { continue } - if ($null -ne $attr.($prop.Name)) { - $attrCopy.($prop.Name) = $attr.($prop.Name) - } - } - - $attrCopy.ParameterSetName = - if ($ParameterSetName) { - $ParameterSetName - } - else { - $defaultParamSetName = - foreach ($extAttr in $Extension.ScriptBlock.Attributes) { - if ($extAttr.DefaultParameterSetName) { - $extAttr.DefaultParameterSetName - break - } - } - if ($attrCopy.ParameterSetName -ne '__AllParameterSets') { - $attrCopy.ParameterSetName - } - elseif ($defaultParamSetName) { - $defaultParamSetName - } - elseif ($this -is [Management.Automation.FunctionInfo]) { - $this.Name - } elseif ($this -is [Management.Automation.ExternalScriptInfo]) { - $this.Source - } - } - - if ($NoMandatory -and $attrCopy.Mandatory) { - $attrCopy.Mandatory = $false - } - - if ($PositionOffset -and $attr.Position -ge 0) { - $attrCopy.Position += $PositionOffset - } - $attrList.Add($attrCopy) - } - } - - - if ($commandList -and $validCommandNames) { - :CheckCommandValidity do { - foreach ($vc in $validCommandNames) { - if ($commandList -contains $vc) { break CheckCommandValidity } - } - continue nextDynamicParameter - } while ($false) - } - $ExtensionDynamicParameters.Add($in, [Management.Automation.RuntimeDefinedParameter]::new( - $Extension.Parameters[$in].Name, - $Extension.Parameters[$in].ParameterType, - $attrList - )) - } - - $ExtensionDynamicParameters - - })) - - $extCmd.PSObject.Methods.Add([PSScriptMethod]::new('CouldRun', { - param([Collections.IDictionary]$params, [string]$ParameterSetName) - - :nextParameterSet foreach ($paramSet in $this.ParameterSets) { - if ($ParameterSetName -and $paramSet.Name -ne $ParameterSetName) { continue } - $mappedParams = [Ordered]@{} # Create a collection of mapped parameters - $mandatories = # Walk thru each parameter of this command - @(foreach ($myParam in $paramSet.Parameters) { - if ($params.Contains($myParam.Name)) { # If this was in Params, - $mappedParams[$myParam.Name] = $params[$myParam.Name] # then map it. - } else { - foreach ($paramAlias in $myParam.Aliases) { # Otherwise, check the aliases - if ($params.Contains($paramAlias)) { # and map it if the parameters had the alias. - $mappedParams[$myParam.Name] = $params[$paramAlias] - break - } - } - } - if ($myParam.IsMandatory) { # If the parameter was mandatory, - $myParam.Name # keep track of it. - } - }) - foreach ($mandatoryParam in $mandatories) { # Walk thru each mandatory parameter. - if (-not $params.Contains($mandatoryParam)) { # If it wasn't in the parameters. - continue nextParameterSet - } - } - return $mappedParams - } - return $false - })) - - $extCmd.pstypenames.clear() - if ($ExtensionTypeName) { - $extCmd.pstypenames.add($ExtensionTypeName) - } else { - $extCmd.pstypenames.add('Extension') - } - - $extCmd - } - function OutputExtension { - begin { - $allDynamicParameters = [Management.Automation.RuntimeDefinedParameterDictionary]::new() - } - process { - $extCmd = $_ - if ($ValidateInput) { - try { - if (-not $extCmd.Validate($ValidateInput)) { - return - } - } catch { - Write-Error $_ - return - } - } - - - if ($DynamicParameter -or $DynamicParameterSetName -or $DynamicParameterPositionOffset -or $NoMandatoryDynamicParameter) { - $extensionParams = $extCmd.GetDynamicParameters($DynamicParameterSetName, $DynamicParameterPositionOffset, $NoMandatoryDynamicParameter, $CommandName) - foreach ($kv in $extensionParams.GetEnumerator()) { - if ($commandExtended -and ([Management.Automation.CommandMetaData]$commandExtended).Parameters.$($kv.Key)) { - continue - } - if ($allDynamicParameters.ContainsKey($kv.Key)) { - if ($kv.Value.ParameterType -ne $allDynamicParameters[$kv.Key].ParameterType) { - Write-Verbose "Extension '$extCmd' Parameter '$($kv.Key)' Type Conflict, making type PSObject" - $allDynamicParameters[$kv.Key].ParameterType = [PSObject] - } - foreach ($attr in $kv.Value.Attributes) { - if ($allDynamicParameters[$kv.Key].Attributes.Contains($attr)) { - continue - } - $allDynamicParameters[$kv.Key].Attributes.Add($attr) - } - } else { - $allDynamicParameters[$kv.Key] = $kv.Value - } - } - } - elseif ($CouldRun) { - if (-not $extCmd) { return } - $couldRunExt = $extCmd.CouldRun($Parameter, $ParameterSetName) - if (-not $couldRunExt) { return } - [PSCustomObject][Ordered]@{ - ExtensionCommand = $extCmd - CommandName = $CommandName - ExtensionParameter = $couldRunExt - } - - return - } - elseif ($Run) { - if (-not $extCmd) { return } - $couldRunExt = $extCmd.CouldRun($Parameter, $ParameterSetName) - if (-not $couldRunExt) { return } - if ($extCmd.InheritanceLevel -eq 'InheritedReadOnly') { return } - if ($Stream) { - & $extCmd @couldRunExt - } else { - [PSCustomObject][Ordered]@{ - CommandName = $CommandName - ExtensionCommand = $extCmd - ExtensionOutput = & $extCmd @couldRunExt - Done = $extCmd.InheritanceLevel -eq 'NotInherited' - } - } - return - } - else { - return $extCmd - } - } - end { - if ($DynamicParameter) { - return $allDynamicParameters - } - } - } - #endregion Define Inner Functions - - - $extensionFullRegex = - if ($ExtensionModule) { - "\.(?>$(@(@($ExtensionModule) + $ExtensionModuleAlias) -join '|'))\." + $ExtensionPattern - } else { - $ExtensionPattern - } - - #region Find Extensions - $loadedModules = @(Get-Module) - $myInv = $MyInvocation - $myModuleName = if ($ExtensionModule) { $ExtensionModule } else {$MyInvocation.MyCommand.Module.Name } - if ($myInv.MyCommand.Module -and $loadedModules -notcontains $myInv.MyCommand.Module) { - $loadedModules = @($myInv.MyCommand.Module) + $loadedModules - } - $getCmd = $ExecutionContext.SessionState.InvokeCommand.GetCommand - - if ($Force) { - $script:PSDevOpsExtensions = $null - } - if (-not $script:PSDevOpsExtensions) - { - $script:PSDevOpsExtensions = - @( - #region Find PSDevOps Extensions in Loaded Modules - foreach ($loadedModule in $loadedModules) { # Walk over all modules. - if ( # If the module has PrivateData keyed to this module - $loadedModule.PrivateData.$myModuleName - ) { - # Determine the root of the module with private data. - $thisModuleRoot = [IO.Path]::GetDirectoryName($loadedModule.Path) - # and get the extension data - $extensionData = $loadedModule.PrivateData.$myModuleName - if ($extensionData -is [Hashtable]) { # If it was a hashtable - foreach ($ed in $extensionData.GetEnumerator()) { # walk each key - - $extensionCmd = - if ($ed.Value -like '*.ps1') { # If the key was a .ps1 file - $getCmd.Invoke( # treat it as a relative path to the .ps1 - [IO.Path]::Combine($thisModuleRoot, $ed.Value), - 'ExternalScript' - ) - } else { # Otherwise, treat it as the name of an exported command. - $loadedModule.ExportedCommands[$ed.Value] - } - if ($extensionCmd) { # If we've found a valid extension command - $extensionCmd | ConvertToExtension # return it as an extension. - } - } - } - } - elseif ($loadedModule.PrivateData.Tags -contains $myModuleName -or $loadedModule.Name -eq $myModuleName) { - $loadedModule | - Split-Path | - Get-ChildItem -Recurse | - Where-Object Name -Match $extensionFullRegex | - ConvertToExtension - } - } - #endregion Find PSDevOps Extensions in Loaded Modules - ) - } - #endregion Find Extensions - } - - process { - - if ($ExtensionPath) { - Get-ChildItem -Recurse -Path $ExtensionPath | - Where-Object Name -Match $extensionFullRegex | - ConvertToExtension | - . WhereExtends $CommandName | - Sort-Object Rank, Name | - OutputExtension - } else { - $script:PSDevOpsExtensions | - . WhereExtends $CommandName | - Sort-Object Rank, Name | - OutputExtension - } - } -} -#endregion Piecemeal [ 0.1.10 ] : Easy Extensible Plugins for PowerShell - From 333b88f35babaad91cf90b74157924d5b323a06c Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Tue, 7 Jun 2022 15:37:42 -0700 Subject: [PATCH 036/151] Removing extensions for TestPlan, Point, and Suite --- Extensions/TestPlan.PSDevOps.Extension.ps1 | 157 -------------------- Extensions/TestPoint.PSDevOps.Extension.ps1 | 63 -------- Extensions/TestSuite.PSDevOps.Extension.ps1 | 131 ---------------- 3 files changed, 351 deletions(-) delete mode 100644 Extensions/TestPlan.PSDevOps.Extension.ps1 delete mode 100644 Extensions/TestPoint.PSDevOps.Extension.ps1 delete mode 100644 Extensions/TestSuite.PSDevOps.Extension.ps1 diff --git a/Extensions/TestPlan.PSDevOps.Extension.ps1 b/Extensions/TestPlan.PSDevOps.Extension.ps1 deleted file mode 100644 index fc5a6d6f..00000000 --- a/Extensions/TestPlan.PSDevOps.Extension.ps1 +++ /dev/null @@ -1,157 +0,0 @@ -<# -.Synopsis - Test Plans Extension -.Description - Gets, Creates, or Updates test plans -#> -[CmdletBinding(DefaultParameterSetName='/{ProjectID}/_apis/testplan/plans')] -[Management.Automation.Cmdlet("Get","ADOTest")] -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[Management.Automation.Cmdlet("Remove","ADOTest")] -param( -# The test plan ID -[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] -[string] -$TestPlanID, - -# The name of the test plan -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] -[Alias('PlanName')] -[string] -$TestPlanName, - -# A description of the test plan -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] -[Alias('PlanDescription')] -[string] -$TestPlanDescription, - -# The build identifier -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] -[Alias('BuildID')] -[int] -$TestBuildID, - -# The area path for the test plan -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] -[Alias('AreaPath')] -[string] -$TestPlanAreaPath, - -# The iteration path for the test plan -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] -[Alias('IterationPath')] -[string] -$TestPlanIteratonPath, - -# The start date for the test plan -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] -[Alias('StartDate')] -[DateTime] -$TestPlanStartDate, - -# The end date for the test plan -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] -[Alias('EndDate')] -[DateTime] -$TestPlanEndDate, - -# The build definiton ID. -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] -[Alias('DefinitionID')] -[int] -$BuildDefinitionID, - -# The build definition name. -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans',ValueFromPipelineByPropertyName)] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}',ValueFromPipelineByPropertyName)] -[int] -$BuildDefinitionName -) - -process { - $carryOn = @{ - ProjectID = $ProjectID - Organization = $organization - } - if ($TestPlanID) { - $carryOn += @{TestPlanID=$TestPlanID} - } - $invokeSplat = @{ - Uri = $PSCmdlet.ParameterSetName - UrlParameter = $carryOn - Activity = "Test Plans" - PSTypeName = @( - "$organization.$ProjectID.TestPlan" - "$organization.TestPlan" - "PSDevOps.TestPlan" - ) - Property = $carryOn - } - - if ($commandName -in 'Add-ADOTest', 'Set-ADOTest') { - if ($commandName -eq 'Add-ADOTest') { - $invokeSplat.Method = 'POST' - } - if ($commandName -eq 'Set-ADOTest') { - $invokeSplat.Method = 'PATCH' - $invokeSplat.UrlParameter += @{ - PlanID = $TestPlanID - } - } - $body = [Ordered]@{} - if ($TestPlanName) { $body.name = $TestPlanName } - if ($TestPlanDescription) { $body.description = $TestPlanDescription } - if ($TestPlanAreaPath) { $body.areaPath = $TestPlanAreaPath } - if ($TestPlanIterationPath) { $body.iterationPath = $TestPlanIterationPath } - if ($TestBuildID) { $body.buildID = $TestBuildID } - if ($TestPlanStartDate) { $body.startDate = $TestPlanStartDate.ToString('o') } - if ($TestPlanEndDate) { $body.endDate = $TestPlanEndDate.ToString('o') } - if ($TestPlanOwner) { $body.owner = $TestPlanOwner | Select-Object -Property _links, descriptor, id, isDeletedInOrigin } - if ($BuildDefinitionID) { - if (-not $body.buildDefinition) { - $body.buildDefinition = @{} - } - $body.buildDefinition.id = $BuildDefinitionID - } - if ($BuildDefinitionName) { - if (-not $body.buildDefinition) { - $body.buildDefinition = @{} - } - $body.buildDefinition.name = $BuildDefinitionName - } - $invokeSplat.Body = $body - } - - if ($commandName -eq 'Remove-ADOTest') { - $invokeSplat.Method = 'DELETE' - } - $invokeSplat -} \ No newline at end of file diff --git a/Extensions/TestPoint.PSDevOps.Extension.ps1 b/Extensions/TestPoint.PSDevOps.Extension.ps1 deleted file mode 100644 index dd0250a5..00000000 --- a/Extensions/TestPoint.PSDevOps.Extension.ps1 +++ /dev/null @@ -1,63 +0,0 @@ -<# -.SYNOPSIS - Test Points Extension -.DESCRIPTION - Gets, Creates, or Updates test points -#> -[CmdletBinding(DefaultParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}/TestPoint')] -[Management.Automation.Cmdlet("Get","ADOTest")] -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[Management.Automation.Cmdlet("Remove","ADOTest")] -param( -[Parameter(Mandatory,ValueFromPipelineByPropertyName)] -[string] -$TestPlanID, - -[Parameter(Mandatory,ValueFromPipelineByPropertyName)] -[string] -$TestSuiteID, - -[Parameter(Mandatory,ValueFromPipelineByPropertyName)] -[Alias('TestPoints')] -[switch] -$TestPoint -) - - -process { - $invokeSplat = @{ - Uri = $PSCmdlet.ParameterSetName - UrlParameter = @{ - ProjectID = $ProjectID - Organization = $organization - TestPlanID = $TestPlanID - TestSuiteID = $TestSuiteID - } - Activity = "Test Points" - PSTypeName = @( - "$organization.$ProjectID.TestPoint" - "$organization.TestPoint" - "PSDevOps.TestPoint" - ) - } - - if ($commandName -in 'Add-ADOTest', 'Set-ADOTest') { - if ($commandName -eq 'Add-ADOTest') { - $invokeSplat.Method = 'POST' - } - if ($commandName -eq 'Set-ADOTest') { - $invokeSplat.Method = 'PATCH' - $invokeSplat.UrlParameter += @{ - TestSuiteID = $TestSuiteID - } - } - $body = [Ordered]@{} - $invokeSplat.Body = $body - } - - if ($commandName -eq 'Remove-ADOTest') { - $invokeSplat.Method = 'DELETE' - } - $invokeSplat -} \ No newline at end of file diff --git a/Extensions/TestSuite.PSDevOps.Extension.ps1 b/Extensions/TestSuite.PSDevOps.Extension.ps1 deleted file mode 100644 index 76102d6d..00000000 --- a/Extensions/TestSuite.PSDevOps.Extension.ps1 +++ /dev/null @@ -1,131 +0,0 @@ -<# -.Synopsis - Test Suite Extension -.Description - Gets, Creates, or Updates test suites -#> -[CmdletBinding(DefaultParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites')] -[Management.Automation.Cmdlet("Get","ADOTest")] -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[Management.Automation.Cmdlet("Remove","ADOTest")] -param( -# The Test Plan ID -[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] -[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] -[string] -$TestPlanID, - -# The test suite identifier. -[Parameter(Mandatory,ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] -[Management.Automation.Cmdlet("Set","ADOTest")] -[Management.Automation.Cmdlet("Remove","ADOTest")] -[string] -$TestSuiteID, - -# The name of the test suite. -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[string] -$TestSuiteName, - -# The parent test suite ID -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[string] -$ParentTestSuiteID, - -# If set, will inherit the default configuration. -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[Alias('inheritDefaultConfigurations')] -[switch] -$InheritDefaultConfiguration, - -# The test suite type. -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[ValidateSet("DynamicTestSuite","RequirementTestSuite","StaticTestSuite","None")] -[string] -$TestSuiteType, - -# One or requirement identifiers. -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[string] -$RequirementId, - -# A test query -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[string] -$QueryString, - -# One or more test configuration identifiers. -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites',ValueFromPipelineByPropertyName)] -[Parameter(ParameterSetName='/{ProjectID}/_apis/testplan/plans/{TestPlanID}/suites/{TestSuiteID}',ValueFromPipelineByPropertyName)] -[Management.Automation.Cmdlet("Add","ADOTest")] -[Management.Automation.Cmdlet("Set","ADOTest")] -[string[]] -$TestConfigurationID -) - -process { - $carryOn = @{ - ProjectID = $ProjectID - Organization = $organization - TestPlanID = $TestPlanID - } - $invokeSplat = @{ - Uri = $PSCmdlet.ParameterSetName - UrlParameter = $carryOn - Activity = "Test Plans" - PSTypeName = @( - "$organization.$ProjectID.TestSuite" - "$organization.TestSuite" - "PSDevOps.TestSuite" - ) - Property = $carryOn - } - - if ($commandName -in 'Add-ADOTest', 'Set-ADOTest') { - if ($commandName -eq 'Add-ADOTest') { - $invokeSplat.Method = 'POST' - } - if ($commandName -eq 'Set-ADOTest') { - $invokeSplat.Method = 'PATCH' - $invokeSplat.UrlParameter += @{ - TestSuiteID = $TestSuiteID - } - } - $body = [Ordered]@{} - if ($TestSuiteName) { $body.name = $TestSuiteName } - if ($TestSuiteType) { $body.suiteType = $TestSuiteType } - if ($ParentTestSuiteID) { $body.parentSuite = @{id=$ParentTestSuiteID}} - if ($RequirementId) { $body.requirementID = $RequirementId } - if ($QueryString) { $body.queryString = $QueryString } - if ($TestConfigurationID) { - $body.defaultConfigurations = @(foreach ($tci in $TestConfigurationID) { @{id=$tci}}) - } - - $body.inheritDefaultConfigurations = $InheritDefaultConfiguration -as [bool] - $invokeSplat.Body = $body - } - - if ($commandName -eq 'Remove-ADOTest') { - $invokeSplat.Method = 'DELETE' - } - $invokeSplat -} \ No newline at end of file From 7a7b62bb7ae210df7da4a8d876cfa259a2582d9a Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Tue, 7 Jun 2022 15:43:19 -0700 Subject: [PATCH 037/151] Adding support for HelpOut (#147) --- .github/workflows/TestAndPublish.yml | 2 +- PSDevOps.HelpOut.ps1 | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 PSDevOps.HelpOut.ps1 diff --git a/.github/workflows/TestAndPublish.yml b/.github/workflows/TestAndPublish.yml index c0bdd72e..b5b48b8a 100644 --- a/.github/workflows/TestAndPublish.yml +++ b/.github/workflows/TestAndPublish.yml @@ -1,4 +1,4 @@ - + name: Analyze, Test, Tag, and Publish on: push: diff --git a/PSDevOps.HelpOut.ps1 b/PSDevOps.HelpOut.ps1 new file mode 100644 index 00000000..77df575f --- /dev/null +++ b/PSDevOps.HelpOut.ps1 @@ -0,0 +1,13 @@ +$PSDevOpsLoaded = Get-Module PSDevOps +if (-not $PSDevOpsLoaded) { + $PSDevOpsLoaded = Get-ChildItem -Recurse -Filter "*.psd1" | Where-Object Name -like 'PSDevOps*' | Import-Module -Name { $_.FullName } -Force -PassThru +} +if ($PSDevOpsLoaded) { + "::notice title=ModuleLoaded::PSDevOps Loaded" | Out-Host +} else { + "::error:: PSDevOps not loaded" |Out-Host +} +if ($PSDevOpsLoaded) { + Save-MarkdownHelp -Module $PSDevOpsLoaded.Name -PassThru | + Add-Member ScriptProperty CommitMessage {"Updating $($this.Name)" } -Force -PassThru +} From 1901651b5d5ba0352fd3324708c66cb4a1a4d592 Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Tue, 7 Jun 2022 15:45:00 -0700 Subject: [PATCH 038/151] Adding support for HelpOut (#147) --- .github/workflows/TestAndPublish.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/TestAndPublish.yml b/.github/workflows/TestAndPublish.yml index b5b48b8a..8572953c 100644 --- a/.github/workflows/TestAndPublish.yml +++ b/.github/workflows/TestAndPublish.yml @@ -485,6 +485,14 @@ jobs: } } } @Parameters + HelpOut: + runs-on: ubuntu-latest + if: ${{ success() }} + steps: + - name: Check out repository + uses: actions/checkout@v2 + - name: UseHelpOut + uses: StartAutomating/HelpOut@master env: SYSTEM_ACCESSTOKEN: ${{ secrets.AZUREDEVOPSPAT }} NoCoverage: true From b1f75919ea30bfc1c94840380549546239906b78 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:22 +0000 Subject: [PATCH 039/151] Updating Add-ADOAreaPath.md --- docs/Add-ADOAreaPath.md | 107 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 docs/Add-ADOAreaPath.md diff --git a/docs/Add-ADOAreaPath.md b/docs/Add-ADOAreaPath.md new file mode 100644 index 00000000..503c1739 --- /dev/null +++ b/docs/Add-ADOAreaPath.md @@ -0,0 +1,107 @@ + +Add-ADOAreaPath +--------------- +### Synopsis +Adds an Azure DevOps AreaPath + +--- +### Description + +Adds an Azure DevOps AreaPath. AreaPaths are used to logically group work items within a project. + +--- +### Related Links +* [Get-ADOAreaPath](Get-ADOAreaPath.md) +* [Remove-ADOAreaPath](Remove-ADOAreaPath.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Add-ADOAreaPath -Organization MyOrg -Project MyProject -AreaPath MyAreaPath +``` + +#### EXAMPLE 2 +```PowerShell +Add-ADOAreaPath -Organization MyOrg -Project MyProject -AreaPath MyAreaPath\MyNestedPath +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **Project** + +The Project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |2 |true (ByPropertyName)| +--- +#### **AreaPath** + +The AreaPath. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |3 |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |4 |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |5 |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.AreaPath + + +--- +### Syntax +```PowerShell +Add-ADOAreaPath [-Organization] [-Project] [-AreaPath] [[-Server] ] [[-ApiVersion] ] [-WhatIf] [-Confirm] [] +``` +--- + + From 753fd32bf2178e8a8b1ffae195d5c109d113b603 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:23 +0000 Subject: [PATCH 040/151] Updating Add-ADOAttachment.md --- docs/Add-ADOAttachment.md | 127 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 docs/Add-ADOAttachment.md diff --git a/docs/Add-ADOAttachment.md b/docs/Add-ADOAttachment.md new file mode 100644 index 00000000..27e2a1a7 --- /dev/null +++ b/docs/Add-ADOAttachment.md @@ -0,0 +1,127 @@ + +Add-ADOAttachment +----------------- +### Synopsis +Adds an ADO Attachment + +--- +### Description + +Adds an Azure DevOps Attachment + +--- +### Related Links +* [https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands](https://docs.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Add-ADOAttachment -Path .\a.zip +``` + +#### EXAMPLE 2 +```PowerShell +Add-ADOAttachment -Path .\summary.md -IsSummary +``` + +#### EXAMPLE 3 +```PowerShell +Add-ADOAttachment -Path .\log.txt -IsLog +``` + +--- +### Parameters +#### **Path** + +The attachment path. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Name** + +The Attachment name. This is used to upload information for an Azure DevOps extension. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **Type** + +The Attachment type. This is used to upload information for an Azure DevOps extension. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |2 |true (ByPropertyName)| +--- +#### **ContainerFolder** + +The Container Folder. This is required when uploading artifacts. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **ArtifactName** + +The Artifact Name. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **IsSummary** + +If set, the upload will be treated as a summary. Summary uploads must be markdown. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **IsLog** + +If set, the upload will be treated as a log file. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +### Outputs +System.String + + +--- +### Syntax +```PowerShell +Add-ADOAttachment -Path [] +``` +```PowerShell +Add-ADOAttachment -Path -ContainerFolder -ArtifactName [] +``` +```PowerShell +Add-ADOAttachment -Path -IsLog [] +``` +```PowerShell +Add-ADOAttachment -Path -IsSummary [] +``` +```PowerShell +Add-ADOAttachment -Path [-Name] [-Type] [] +``` +--- + + From 4e32ad65598a105a85e67909312fd143769faba4 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:23 +0000 Subject: [PATCH 041/151] Updating Add-ADODashboard.md --- docs/Add-ADODashboard.md | 214 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 docs/Add-ADODashboard.md diff --git a/docs/Add-ADODashboard.md b/docs/Add-ADODashboard.md new file mode 100644 index 00000000..0dbdc341 --- /dev/null +++ b/docs/Add-ADODashboard.md @@ -0,0 +1,214 @@ + +Add-ADODashboard +---------------- +### Synopsis +Creates Dashboards and Widgets + +--- +### Description + +Creates Dashboards from Azure DevOps, or Creates Widgets in a Dashboard in Azure Devops. + +--- +### Related Links +* [Get-ADODashboard](Get-ADODashboard.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Add-ADODashboard -Organization MyOrg -Project MyProject -Team MyTeam -Name MyDashboard +``` + +#### EXAMPLE 2 +```PowerShell +Get-ADODashboard -Organization MyOrg -Project MyProject -Team MyTeam | + Select-Object -First 1 | + Add-ADODashboard -Name BuildHistory -ContributionID ms.vss-dashboards-web.Microsoft.VisualStudioOnline.Dashboards.BuildHistogramWidget -ColumnSpan 2 +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Project** + +The Project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Team** + +The Team. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Name** + +The name of the dashboard or widget. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Description** + +A description of the dashboard + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Widget** + +Widgets created with the dashboard. + + + +|Type |Requried|Postion|PipelineInput | +|------------------|--------|-------|---------------------| +|```[PSObject[]]```|false |named |true (ByPropertyName)| +--- +#### **DashboardID** + +The DashboardID. This dashboard will contain the new widgets. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **ContributionID** + +The ContributionID. This describes the exact extension contribution the widget will use. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Row** + +The row of the widget. + + + +|Type |Requried|Postion|PipelineInput | +|-------------|--------|-------|---------------------| +|```[Int32]```|false |named |true (ByPropertyName)| +--- +#### **Column** + +The column of the widget. + + + +|Type |Requried|Postion|PipelineInput | +|-------------|--------|-------|---------------------| +|```[Int32]```|false |named |true (ByPropertyName)| +--- +#### **RowSpan** + +The number of rows the widget should occupy. + + + +|Type |Requried|Postion|PipelineInput | +|-------------|--------|-------|---------------------| +|```[Int32]```|false |named |true (ByPropertyName)| +--- +#### **ColumnSpan** + +The number of columns the widget should occupy. + + + +|Type |Requried|Postion|PipelineInput | +|-------------|--------|-------|---------------------| +|```[Int32]```|false |named |true (ByPropertyName)| +--- +#### **Setting** + +The widget settings. Settings are specific to each widget. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[PSObject]```|false |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.Dashboard + + +PSDevOps.Widget + + +--- +### Syntax +```PowerShell +Add-ADODashboard -Organization -Project [-Team ] -Name [-Description ] [-Widget ] [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +```PowerShell +Add-ADODashboard -Organization -Project [-Team ] -Name -DashboardID -ContributionID [-Row ] [-Column ] [-RowSpan ] [-ColumnSpan ] [-Setting ] [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +--- + + From f3b066dd55b3444a367206390267f773261188cc Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:23 +0000 Subject: [PATCH 042/151] Updating Add-ADOIterationPath.md --- docs/Add-ADOIterationPath.md | 127 +++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 docs/Add-ADOIterationPath.md diff --git a/docs/Add-ADOIterationPath.md b/docs/Add-ADOIterationPath.md new file mode 100644 index 00000000..c15f592e --- /dev/null +++ b/docs/Add-ADOIterationPath.md @@ -0,0 +1,127 @@ + +Add-ADOIterationPath +-------------------- +### Synopsis +Adds an Azure DevOps IterationPath + +--- +### Description + +Adds an Azure DevOps IterationPath. IterationPaths are used to logically group work items within a project. + +--- +### Related Links +* [Get-ADOIterationPath](Get-ADOIterationPath.md) +* [Remove-ADOIterationPath](Remove-ADOIterationPath.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Add-ADOIterationPath -Organization MyOrg -Project MyProject -IterationPath MyIterationPath +``` + +#### EXAMPLE 2 +```PowerShell +Add-ADOIterationPath -Organization MyOrg -Project MyProject -IterationPath MyIterationPath\MyNestedPath +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **Project** + +The Project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |2 |true (ByPropertyName)| +--- +#### **IterationPath** + +The IterationPath. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |3 |true (ByPropertyName)| +--- +#### **StartDate** + +The start date of the iteration. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[DateTime]```|false |4 |true (ByPropertyName)| +--- +#### **EndDate** + +The end date of the iteration. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[DateTime]```|false |5 |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |6 |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |7 |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.IterationPath + + +--- +### Syntax +```PowerShell +Add-ADOIterationPath [-Organization] [-Project] [-IterationPath] [[-StartDate] ] [[-EndDate] ] [[-Server] ] [[-ApiVersion] ] [-WhatIf] [-Confirm] [] +``` +--- + + From decac619f217c326856e4d7b3ae2796053f8b417 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:23 +0000 Subject: [PATCH 043/151] Updating Add-ADOPicklist.md --- docs/Add-ADOPicklist.md | 141 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 docs/Add-ADOPicklist.md diff --git a/docs/Add-ADOPicklist.md b/docs/Add-ADOPicklist.md new file mode 100644 index 00000000..68e66fe2 --- /dev/null +++ b/docs/Add-ADOPicklist.md @@ -0,0 +1,141 @@ + +Add-ADOPicklist +--------------- +### Synopsis +Creates Picklists + +--- +### Description + +Creates Picklists in Azure DevOps. + +--- +### Related Links +* [Get-ADOPicklist](Get-ADOPicklist.md) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/processes/lists/create](https://docs.microsoft.com/en-us/rest/api/azure/devops/processes/lists/create) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Add-ADOPicklist -Organization MyOrg -PicklistName TShirtSize -Item S, M, L, XL +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **PicklistName** + +The name of the picklist + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|true |named |false | +--- +#### **DateType** + +The data type of the picklist. By default, String. + + + +Valid Values: + +* Double +* Integer +* String +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **IsSuggested** + +If set, will make the items in the picklist "suggested", and allow user input. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **Item** + +A list of items. By default, these are the initial contents of the picklist. +If a PicklistID is provided, or -PicklistName already exists, will add these items to the picklist. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|true |named |true (ByPropertyName)| +--- +#### **PicklistID** + +The PicklistID of an existing picklist. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.Picklist.Detail + + +--- +### Syntax +```PowerShell +Add-ADOPicklist -Organization -PicklistName [-DateType ] [-IsSuggested] -Item [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +```PowerShell +Add-ADOPicklist -Organization [-DateType ] [-IsSuggested] -Item -PicklistID [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +--- + + From de8747847383a00c15ffa423880442b2b6d96dac Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:23 +0000 Subject: [PATCH 044/151] Updating Add-ADOTeam.md --- docs/Add-ADOTeam.md | 135 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 docs/Add-ADOTeam.md diff --git a/docs/Add-ADOTeam.md b/docs/Add-ADOTeam.md new file mode 100644 index 00000000..381dd718 --- /dev/null +++ b/docs/Add-ADOTeam.md @@ -0,0 +1,135 @@ + +Add-ADOTeam +----------- +### Synopsis +Gets Azure DevOps Teams + +--- +### Description + +Gets teams from Azure DevOps or TFS + +--- +### Related Links +* [Get-ADOTeam](Get-ADOTeam.md) +* [Get-ADOProject](Get-ADOProject.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Add-ADOTeam -Organization StartAutomating -Project PSDevOps -Team MyNewTeam -WhatIf +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Project** + +The project name or identifier. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Team** + +The Team Name. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Description** + +The Team Description. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **UserDescriptor** + +The Security Descriptor of the User. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|true |named |false | +--- +#### **TeamDescriptor** + +The Security Descriptor of the Team. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|true |named |false | +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.Team + + +--- +### Syntax +```PowerShell +Add-ADOTeam -Organization -Project -Team [-Description ] [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +```PowerShell +Add-ADOTeam -Organization -UserDescriptor -TeamDescriptor [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +--- + + From cfe1d491777fda76f77bf9a0e4a596364aead11c Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:23 +0000 Subject: [PATCH 045/151] Updating Add-ADOTest.md --- docs/Add-ADOTest.md | 102 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 docs/Add-ADOTest.md diff --git a/docs/Add-ADOTest.md b/docs/Add-ADOTest.md new file mode 100644 index 00000000..2530698f --- /dev/null +++ b/docs/Add-ADOTest.md @@ -0,0 +1,102 @@ + +Add-ADOTest +----------- +### Synopsis +Creates tests in Azure DevOps. + +--- +### Description + +Creates test plans, suites, points, and results in Azure DevOps or TFS. + +--- +### Related Links +* [Get-ADOProject](Get-ADOProject.md) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/test/runs/list](https://docs.microsoft.com/en-us/rest/api/azure/devops/test/runs/list) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/test/results/list](https://docs.microsoft.com/en-us/rest/api/azure/devops/test/results/list) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/test/test%20%20suites/list](https://docs.microsoft.com/en-us/rest/api/azure/devops/test/test%20%20suites/list) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/testplan/test%20%20suites/get%20test%20suites%20for%20plan](https://docs.microsoft.com/en-us/rest/api/azure/devops/testplan/test%20%20suites/get%20test%20suites%20for%20plan) +--- +### Parameters +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **TestPlan** + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **TestSuite** + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **ProjectID** + +The project identifier. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevOps.TestPlan + + +PSDevOps.TestRun + + +PSDevOps.TestSuite + + +PSDevOps.TestPoint + + +PSDevOps.TestCase + + +--- +### Syntax +```PowerShell +Add-ADOTest -Organization -TestPlan -ProjectID [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Add-ADOTest -Organization -TestSuite -ProjectID [-Server ] [-ApiVersion ] [] +``` +--- + + From 3d4fa35cc680224c8695e4dcdb052d81094c4c7f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:24 +0000 Subject: [PATCH 046/151] Updating Add-ADOWiki.md --- docs/Add-ADOWiki.md | 143 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) create mode 100644 docs/Add-ADOWiki.md diff --git a/docs/Add-ADOWiki.md b/docs/Add-ADOWiki.md new file mode 100644 index 00000000..1447cab3 --- /dev/null +++ b/docs/Add-ADOWiki.md @@ -0,0 +1,143 @@ + +Add-ADOWiki +----------- +### Synopsis +Creates Azure DevOps Wikis + +--- +### Description + +Creates Wikis in Azure DevOps. + +--- +### Related Links +* [Get-ADOWiki](Get-ADOWiki.md) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/wiki/wikis/create](https://docs.microsoft.com/en-us/rest/api/azure/devops/wiki/wikis/create) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Add-ADOWiki -Organization MyOrg -Project MyProject -Name MyWiki +``` + +#### EXAMPLE 2 +```PowerShell +Get-ADORepository -Organization MyOrg -Project MyProject | + Add-ADOWiki -Name BuildHistory +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **Project** + +The Project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |2 |true (ByPropertyName)| +--- +#### **Name** + +The name of the wiki. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |3 |true (ByPropertyName)| +--- +#### **RepositoryID** + +The ID of the repository used for the wiki. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |4 |true (ByPropertyName)| +--- +#### **WikiType** + +The type of the wiki. This can be either 'ProjectWiki' or 'CodeWiki'. +If a -RepositoryID is provided, this will be ignored as it must be a CodeWiki. + + + +Valid Values: + +* ProjectWiki +* CodeWiki +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |5 |true (ByPropertyName)| +--- +#### **RootPath** + +The root path of the wiki within the repository. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |6 |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |7 |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |8 |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.Wiki + + +--- +### Syntax +```PowerShell +Add-ADOWiki [-Organization] [-Project] [-Name] [[-RepositoryID] ] [[-WikiType] ] [[-RootPath] ] [[-Server] ] [[-ApiVersion] ] [-WhatIf] [-Confirm] [] +``` +--- + + From 46fc65903f4cdda10f0d7130338bc9982bcf7bc7 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:24 +0000 Subject: [PATCH 047/151] Updating Add-Git.md --- docs/Add-Git.md | 185 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 docs/Add-Git.md diff --git a/docs/Add-Git.md b/docs/Add-Git.md new file mode 100644 index 00000000..ef78c297 --- /dev/null +++ b/docs/Add-Git.md @@ -0,0 +1,185 @@ + +Add-Git +------- +### Synopsis +PowerShell wrapper around git add + +--- +### Description + +Adds changes to a git changelist + +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Add-Git AddGit.ps1 +``` + +--- +### Parameters +#### **Path** + +The path to add to git. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **DryRun** + +Don't actually add the file(s), just show if they exist and/or will +be ignored. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Force** + +Allow adding otherwise ignored files. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Interactive** + +Add modified contents in the working tree interactively to +the index. Optional path arguments may be supplied to limit +operation to a subset of the working tree. See Interactive +mode for details. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Patch** + +Interactively choose hunks of patch between the index and the +work tree and add them to the index. This gives the user a chance +to review the difference before adding modified contents to the +index. + +This effectively runs add --interactive, but bypasses the +initial command menu and directly jumps to the patch subcommand. +See 'Interactive mode' for details. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Edit** + +Open the diff vs. the index in an editor and let the user +edit it. After the editor was closed, adjust the hunk headers +and apply the patch to the index. + +The intent of this option is to pick and choose lines of the patch to +apply, or even to modify the contents of lines to be staged. This can be +quicker and more flexible than using the interactive hunk selector. +However, it is easy to confuse oneself and create a patch that does not +apply to the index. See EDITING PATCHES below. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **IntentToAdd** + +Record only the fact that the path will be added later. An entry +for the path is placed in the index with no content. This is +useful for, among other things, showing the unstaged content of +such files with git diff and committing them with git commit +-a. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Refresh** + +Don't add the file(s), but only refresh their stat() +information in the index. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **IgnoreErrors** + +If some files could not be added because of errors indexing +them, do not abort the operation, but continue adding the +others. The command shall still exit with non-zero status. +The configuration variable add.ignoreErrors can be set to +true to make this the default behaviour. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **IgnoreMissing** + +This option can only be used together with --dry-run. By using +this option the user can check if any of the given files would +be ignored, no matter if they are already present in the work +tree or not. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Renormalize** + +Apply the "clean" process freshly to all tracked files to +forcibly add them again to the index. This is useful after +changing core.autocrlf configuration or the text attribute +in order to correct files added with wrong CRLF/LF line endings. +This option implies -u. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Syntax +```PowerShell +Add-Git [-Path ] [-DryRun] [-Force] [-Interactive] [-Patch] [-Edit] [-IntentToAdd] [-Refresh] [-IgnoreErrors] [-IgnoreMissing] [-Renormalize] [-WhatIf] [-Confirm] [] +``` +--- + + From e26ea16dccb711bba0d147df59aa0aff92aa239e Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:24 +0000 Subject: [PATCH 048/151] Updating Clear-ADODashboard.md --- docs/Clear-ADODashboard.md | 130 +++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 docs/Clear-ADODashboard.md diff --git a/docs/Clear-ADODashboard.md b/docs/Clear-ADODashboard.md new file mode 100644 index 00000000..5e57bce4 --- /dev/null +++ b/docs/Clear-ADODashboard.md @@ -0,0 +1,130 @@ + +Clear-ADODashboard +------------------ +### Synopsis +Clears Azure DevOps Dashboards + +--- +### Description + +Clears Azure DevOps Dashboards, and Clears settings of Widgets on a dashboard. + +--- +### Related Links +* [Get-ADODashboard](Get-ADODashboard.md) +* [Remove-ADODashboard](Remove-ADODashboard.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOTeam -Organization MyOrganization -PersonalAccessToken $pat | + Get-ADODashboard | + Clear-ADODashboard +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Project** + +The Project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Team** + +The Team. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **DashboardID** + +The DashboardID + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **WidgetID** + +The WidgetID. If provided, will get details about a given Azure DevOps Widget. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.Dashboard + + +PSDevOps.Widget + + +--- +### Syntax +```PowerShell +Clear-ADODashboard -Organization -Project [-Team ] -DashboardID -WidgetID [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +```PowerShell +Clear-ADODashboard -Organization -Project [-Team ] -DashboardID [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +--- + + From dc9476a178b1d8d763267aa7004c370f1e9d7fe2 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:24 +0000 Subject: [PATCH 049/151] Updating Connect-ADO.md --- docs/Connect-ADO.md | 90 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 docs/Connect-ADO.md diff --git a/docs/Connect-ADO.md b/docs/Connect-ADO.md new file mode 100644 index 00000000..4882f3a8 --- /dev/null +++ b/docs/Connect-ADO.md @@ -0,0 +1,90 @@ + +Connect-ADO +----------- +### Synopsis +Connects to Azure DeVOps + +--- +### Description + +Connects the current PowerShell session to Azure DeVOps or a Team Foundation Server. + +Information passed to Connect-ADO will be used as the default parameters to all -ADO* commands from PSDevOps. + +PersonalAccessTokens will be cached separately to improve security. + +--- +### Related Links +* [Disconnect-ADO](Disconnect-ADO.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Connect-ADO -Organization StartAutomating -PersonalAccessToken $myPat +``` + +--- +### Parameters +#### **Organization** + +The organization. +When connecting to TFS, this is the Project Collection. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **PersonalAccessToken** + +The Personal Access Token. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |2 |true (ByPropertyName)| +--- +#### **UseDefaultCredentials** + +If set, will use default credentials when connecting. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Credential** + +The credential used to connect. + + + +|Type |Requried|Postion|PipelineInput | +|--------------------|--------|-------|---------------------| +|```[PSCredential]```|false |3 |true (ByPropertyName)| +--- +#### **Server** + +The Server. If this points to a TFS server, it should be the root TFS url, i.e. http://localhost:8080/tfs + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |4 |true (ByPropertyName)| +--- +### Outputs +PSDevOps.Connection + + +--- +### Syntax +```PowerShell +Connect-ADO [-Organization] [[-PersonalAccessToken] ] [-UseDefaultCredentials] [[-Credential] ] [[-Server] ] [] +``` +--- + + From 4c6bae10942135268420b82d4f67112b8dcd8c99 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:24 +0000 Subject: [PATCH 050/151] Updating Connect-GitHub.md --- docs/Connect-GitHub.md | 100 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/Connect-GitHub.md diff --git a/docs/Connect-GitHub.md b/docs/Connect-GitHub.md new file mode 100644 index 00000000..4086b67c --- /dev/null +++ b/docs/Connect-GitHub.md @@ -0,0 +1,100 @@ + +Connect-GitHub +-------------- +### Synopsis +Connects to GitHub + +--- +### Description + +Connects to GitHub, automatically creating smart aliases for all GitHub URLs. + +--- +### Related Links +* [Invoke-GitHubRESTAPI](Invoke-GitHubRESTAPI.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Connect-GitHub +``` + +--- +### Parameters +#### **GitHubOpenAPIUrl** + +A URL that contains the GitHub OpenAPI definition + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |1 |true (ByPropertyName)| +--- +#### **PassThru** + +If set, will output the dynamically imported module. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **Force** + +If set, will force a reload of the module. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **PersonalAccessToken** + +The personal access token used to connect to GitHub. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |2 |true (ByPropertyName)| +--- +#### **Owner** + +If provided, will default the [owner] in GitHub API requests + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |3 |false | +--- +#### **UserName** + +If provided, will default the [username] in GitHub API requests + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |4 |false | +--- +#### **Repo** + +If provided, will default the [repo] in GitHub API requests + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |5 |false | +--- +### Syntax +```PowerShell +Connect-GitHub [[-GitHubOpenAPIUrl] ] [-PassThru] [-Force] [[-PersonalAccessToken] ] [[-Owner] ] [[-UserName] ] [[-Repo] ] [] +``` +--- + + From 71e4ff98b689538e21829e259437ce9b10953752 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:24 +0000 Subject: [PATCH 051/151] Updating Convert-ADOPipeline.md --- docs/Convert-ADOPipeline.md | 94 +++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 docs/Convert-ADOPipeline.md diff --git a/docs/Convert-ADOPipeline.md b/docs/Convert-ADOPipeline.md new file mode 100644 index 00000000..313708d7 --- /dev/null +++ b/docs/Convert-ADOPipeline.md @@ -0,0 +1,94 @@ + +Convert-ADOPipeline +------------------- +### Synopsis +Converts builds to Azure DevOps Pipelines + +--- +### Description + +Converts builds TFS or "Classic" builds to Azure DevOps YAML Pipelines. + +--- +### Related Links +* [New-ADOPipeline](New-ADOPipeline.md) +* [Get-ADOTask](Get-ADOTask.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +$taskList = (Get-ADOTask -Server $tfsRootUrl -Org $projectCollectionName) +Get-ADOBuild -Definition -Server $tfsRootUrl -Org $projectCollection | + Convert-ADOPipeline -TaskList $taskList +``` + +--- +### Parameters +#### **BuildStep** + +A list of build steps. +This will be automatically populated when piping in a TFS Build definition. + + + +|Type |Requried|Postion|PipelineInput | +|------------------|--------|-------|---------------------| +|```[PSObject[]]```|true |1 |true (ByPropertyName)| +--- +#### **BuildVariable** + +An object containing build variables. +This will be automatically populated when piping in a TFS build definition. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[PSObject]```|false |2 |true (ByPropertyName)| +--- +#### **TaskList** + +A list of task definitions. This will normally be the output from Get-ADOTask. + + + +|Type |Requried|Postion|PipelineInput| +|------------------|--------|-------|-------------| +|```[PSObject[]]```|true |3 |false | +--- +#### **WhereFore** + +A dictionary of conditional transformations. + + + +|Type |Requried|Postion|PipelineInput| +|-------------------|--------|-------|-------------| +|```[IDictionary]```|false |4 |false | +--- +#### **Passthru** + +If set, will output the dictionary used to create each pipeline. +If not set, will output the pipeline YAML. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +### Outputs +System.String + + +System.Management.Automation.PSObject + + +--- +### Syntax +```PowerShell +Convert-ADOPipeline [-BuildStep] [[-BuildVariable] ] [-TaskList] [[-WhereFore] ] [-Passthru] [] +``` +--- + + From a0a8c64bec85cec6cc67a3ae969900e44bcee671 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:24 +0000 Subject: [PATCH 052/151] Updating Convert-BuildStep.md --- docs/Convert-BuildStep.md | 180 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 docs/Convert-BuildStep.md diff --git a/docs/Convert-BuildStep.md b/docs/Convert-BuildStep.md new file mode 100644 index 00000000..399f0728 --- /dev/null +++ b/docs/Convert-BuildStep.md @@ -0,0 +1,180 @@ + +Convert-BuildStep +----------------- +### Synopsis +Converts Build Steps into build system input + +--- +### Description + +Converts Build Steps defined in a PowerShell script into build steps in a build system + +--- +### Related Links +* [Import-BuildStep](Import-BuildStep.md) +* [Expand-BuildStep](Expand-BuildStep.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-Command Convert-BuildStep | Convert-BuildStep +``` + +--- +### Parameters +#### **Name** + +The name of the build step + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **ScriptBlock** + +The Script Block that will be converted into a build step + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|------------------------------| +|```[ScriptBlock]```|false |named |true (ByValue, ByPropertyName)| +--- +#### **Module** + +The module that -ScriptBlock is declared in. If piping in a command, this will be bound automatically + + + +|Type |Requried|Postion|PipelineInput | +|--------------------|--------|-------|---------------------| +|```[PSModuleInfo]```|false |named |true (ByPropertyName)| +--- +#### **Path** + +The path to the file + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Extension** + +The extension of the file + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **InputParameter** + +The name of parameters that should be supplied from event input. +Wildcards accepted. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |named |true (ByPropertyName)| +--- +#### **VariableParameter** + +The name of parameters that should be supplied from build variables. +Wildcards accepted. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **EnvironmentParameter** + +The name of parameters that should be supplied from the environment. +Wildcards accepted. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **UniqueParameter** + +The name of parameters that should be referred to uniquely. +For instance, if converting function foo($bar) {} and -UniqueParameter is 'bar' +The build parameter would be foo_bar. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **ExcludeParameter** + +The name of parameters that should be excluded. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **DefaultParameter** + +Default parameters for a build step + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |named |true (ByPropertyName)| +--- +#### **BuildSystem** + +The build system. Currently supported options, ADO and GitHub. Defaulting to ADO. + + + +Valid Values: + +* ADOPipeline +* ADOExtension +* GitHubWorkflow +* GitHubAction +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **BuildOption** + +Options for the build system. The can contain any additional parameters passed to the build system. + + + +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[PSObject]```|false |named |false | +--- +### Outputs +System.Collections.IDictionary + + +--- +### Syntax +```PowerShell +Convert-BuildStep -Name [-ScriptBlock ] [-Module ] [-Path ] [-InputParameter ] [-VariableParameter ] [-EnvironmentParameter ] [-UniqueParameter ] [-ExcludeParameter ] [-DefaultParameter ] [-BuildSystem ] [-BuildOption ] [] +``` +```PowerShell +Convert-BuildStep -Name -Path -Extension [-InputParameter ] [-VariableParameter ] [-EnvironmentParameter ] [-UniqueParameter ] [-ExcludeParameter ] [-DefaultParameter ] [-BuildSystem ] [-BuildOption ] [] +``` +--- + + From 7d91f350e22882a5bd02b6f92424d0b3b6c56795 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:24 +0000 Subject: [PATCH 053/151] Updating Disable-ADOExtension.md --- docs/Disable-ADOExtension.md | 102 +++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 docs/Disable-ADOExtension.md diff --git a/docs/Disable-ADOExtension.md b/docs/Disable-ADOExtension.md new file mode 100644 index 00000000..a3c85b03 --- /dev/null +++ b/docs/Disable-ADOExtension.md @@ -0,0 +1,102 @@ + +Disable-ADOExtension +-------------------- +### Synopsis +Disables Azure DevOps Extensions. + +--- +### Description + +Disables one or more Azure DevOps Extensions. + +--- +### Related Links +* [Get-ADOExtension](Get-ADOExtension.md) +* [Enable-ADOExtension](Enable-ADOExtension.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Disable-ADOExtension -Organization StartAutomating -PublisherID ms-samples -ExtensionID samples-contributions-guide +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **PublisherID** + +The Publisher of an Extension. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |2 |true (ByPropertyName)| +--- +#### **ExtensionID** + +The name of the Extension. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |3 |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |4 |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |5 |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.InstalledExtension + + +--- +### Syntax +```PowerShell +Disable-ADOExtension [-Organization] [-PublisherID] [-ExtensionID] [[-Server] ] [[-ApiVersion] ] [-WhatIf] [-Confirm] [] +``` +--- + + From dc949cd3d8d957de4e4ac3a8fd1d9ad1e0e509ff Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:24 +0000 Subject: [PATCH 054/151] Updating Disconnect-ADO.md --- docs/Disconnect-ADO.md | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 docs/Disconnect-ADO.md diff --git a/docs/Disconnect-ADO.md b/docs/Disconnect-ADO.md new file mode 100644 index 00000000..7e7e7bc3 --- /dev/null +++ b/docs/Disconnect-ADO.md @@ -0,0 +1,51 @@ + +Disconnect-ADO +-------------- +### Synopsis +Disconnects from Azure DevOps + +--- +### Description + +Disconnects from Azure DevOps, clearing parameter value defaults and cached access tokens. + +--- +### Related Links +* [Connect-ADO](Connect-ADO.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Disconnect-ADO +``` + +--- +### Parameters +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +System.Nullable + + +System.Management.Automation.PSObject + + +--- +### Syntax +```PowerShell +Disconnect-ADO [-WhatIf] [-Confirm] [] +``` +--- + + From 9c30c8b699275d55f6f04233a7b0ddd8470e03e4 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:24 +0000 Subject: [PATCH 055/151] Updating Disconnect-GitHub.md --- docs/Disconnect-GitHub.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 docs/Disconnect-GitHub.md diff --git a/docs/Disconnect-GitHub.md b/docs/Disconnect-GitHub.md new file mode 100644 index 00000000..0eab1c7d --- /dev/null +++ b/docs/Disconnect-GitHub.md @@ -0,0 +1,31 @@ + +Disconnect-GitHub +----------------- +### Synopsis +Disconnects from GitHub + +--- +### Description + +Disconnects from GitHub. + +This unloads any dynamically imported commands and clears the cached PersonalAccessToken. + +--- +### Related Links +* [Connect-GitHub](Connect-GitHub.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Disconnect-GitHub +``` + +--- +### Syntax +```PowerShell +Disconnect-GitHub [] +``` +--- + + From daa79e8216f9cfab637f9c49b3a295a7f256c3e1 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:25 +0000 Subject: [PATCH 056/151] Updating Enable-ADOExtension.md --- docs/Enable-ADOExtension.md | 102 ++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 docs/Enable-ADOExtension.md diff --git a/docs/Enable-ADOExtension.md b/docs/Enable-ADOExtension.md new file mode 100644 index 00000000..05b9ac96 --- /dev/null +++ b/docs/Enable-ADOExtension.md @@ -0,0 +1,102 @@ + +Enable-ADOExtension +------------------- +### Synopsis +Enables Azure DevOps Extensions. + +--- +### Description + +Enables one or more Azure DevOps Extensions. + +--- +### Related Links +* [Get-ADOExtension](Get-ADOExtension.md) +* [Disable-ADOExtension](Disable-ADOExtension.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Enable-ADOExtension -Organization StartAutomating -PublisherID ms-samples -ExtensionID samples-contributions-guide +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **PublisherID** + +The Publisher of an Extension. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |2 |true (ByPropertyName)| +--- +#### **ExtensionID** + +The name of the Extension. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |3 |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |4 |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |5 |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.InstalledExtension + + +--- +### Syntax +```PowerShell +Enable-ADOExtension [-Organization] [-PublisherID] [-ExtensionID] [[-Server] ] [[-ApiVersion] ] [-WhatIf] [-Confirm] [] +``` +--- + + From 40cad0b970a08156bba78f501831b5fa7cbf3f0f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:25 +0000 Subject: [PATCH 057/151] Updating Expand-BuildStep.md --- docs/Expand-BuildStep.md | 199 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 docs/Expand-BuildStep.md diff --git a/docs/Expand-BuildStep.md b/docs/Expand-BuildStep.md new file mode 100644 index 00000000..1c245247 --- /dev/null +++ b/docs/Expand-BuildStep.md @@ -0,0 +1,199 @@ + +Expand-BuildStep +---------------- +### Synopsis +Expands Build Steps in a single build object + +--- +### Description + +Component Files are .ps1 or datafiles within a directory that tells you what type they are. + +--- +### Related Links +* [Convert-BuildStep](Convert-BuildStep.md) +* [Import-BuildStep](Import-BuildStep.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Expand-BuildStep -StepMap @{Steps='InstallPester','RunPester'} +``` + +--- +### Parameters +#### **StepMap** + +A map of step properties to underlying data. +Each key is the name of a property the output. +Each value may contain the name of another Step or StepMap + + + +|Type |Requried|Postion|PipelineInput| +|-------------------|--------|-------|-------------| +|```[IDictionary]```|true |1 |false | +--- +#### **Parent** + +The immediate parent object + + + +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[PSObject]```|false |2 |false | +--- +#### **Root** + +The absolute root object + + + +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[PSObject]```|false |3 |false | +--- +#### **Singleton** + +If set, the component will be expanded as a singleton (single object) + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **SingleItemName** + +A list of item names that automatically become singletons + + + +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[String[]]```|false |4 |false | +--- +#### **PluralItemName** + +A list of item names that automatically become plurals + + + +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[String[]]```|false |5 |false | +--- +#### **DictionaryItemName** + +A list of item names that automatically become dictionaries. + + + +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[String[]]```|false |6 |false | +--- +#### **BuildSystem** + +The build system, either ADO or GitHub. + + + +Valid Values: + +* ADOPipeline +* ADOExtension +* GitHubWorkflow +* GitHubAction +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |7 |false | +--- +#### **VariableParameter** + +The name of parameters that should be supplied from build variables. +Wildcards accepted. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |8 |true (ByPropertyName)| +--- +#### **InputParameter** + +The name of parameters that should be supplied from webhook events. +Wildcards accepted. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |9 |true (ByPropertyName)| +--- +#### **EnvironmentParameter** + +The name of parameters that should be supplied from the environment. +Wildcards accepted. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |10 |true (ByPropertyName)| +--- +#### **UniqueParameter** + +The name of parameters that should be referred to uniquely. +For instance, if converting function foo($bar) {} and -UniqueParameter is 'bar' +The build parameter would be foo_bar. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |11 |true (ByPropertyName)| +--- +#### **ExcludeParameter** + +The name of parameters that should be excluded. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |12 |true (ByPropertyName)| +--- +#### **DefaultParameter** + +A collection of default parameters. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |13 |true (ByPropertyName)| +--- +#### **BuildOption** + +Options for the build system. The can contain any additional parameters passed to the build system. + + + +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[PSObject]```|false |14 |false | +--- +### Outputs +System.Management.Automation.PSObject + + +--- +### Syntax +```PowerShell +Expand-BuildStep [-StepMap] [[-Parent] ] [[-Root] ] [-Singleton] [[-SingleItemName] ] [[-PluralItemName] ] [[-DictionaryItemName] ] [[-BuildSystem] ] [[-VariableParameter] ] [[-InputParameter] ] [[-EnvironmentParameter] ] [[-UniqueParameter] ] [[-ExcludeParameter] ] [[-DefaultParameter] ] [[-BuildOption] ] [] +``` +--- + + From 3b7affd65886f816a189bc3018ddc619df173d4c Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:25 +0000 Subject: [PATCH 058/151] Updating Get-ADOAgentPool.md --- docs/Get-ADOAgentPool.md | 142 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 docs/Get-ADOAgentPool.md diff --git a/docs/Get-ADOAgentPool.md b/docs/Get-ADOAgentPool.md new file mode 100644 index 00000000..00cb9a56 --- /dev/null +++ b/docs/Get-ADOAgentPool.md @@ -0,0 +1,142 @@ + +Get-ADOAgentPool +---------------- +### Synopsis +Gets Azure DevOps Agent Pools + +--- +### Description + +Gets Agent Pools and their associated queues from Azure DevOps. + +Queues associate a given project with a pool. +Pools are shared by organization. + +Thus providing a project will return the queues associated with the project, +and just providing the organization will return all of the common pools. + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/distributedtask/pools/get%20agent%20pools](https://docs.microsoft.com/en-us/rest/api/azure/devops/distributedtask/pools/get%20agent%20pools) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/distributedtask/queues/get%20agent%20queues](https://docs.microsoft.com/en-us/rest/api/azure/devops/distributedtask/queues/get%20agent%20queues) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/distributedtask/agents/list](https://docs.microsoft.com/en-us/rest/api/azure/devops/distributedtask/agents/list) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOAgentPool -Organization MyOrganization -PersonalAccessToken $pat +``` + +--- +### Parameters +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **PoolID** + +The Pool ID. When this is provided, will return agents associated with a given pool ID. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **AgentName** + +If provided, will return agents of a given name. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **IncludeCapability** + +If set, will return the capabilities of each returned agent. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **IncludeLastCompletedRequest** + +If set, will return the last completed request of each returned agent. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **IncludeAssignedRequest** + +If set, will return the requests queued for an agent. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Project** + +The project name or identifier. When this is provided, will return queues associated with the project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevops.Pool + + +--- +### Syntax +```PowerShell +Get-ADOAgentPool -Organization -PoolID [-AgentName ] [-IncludeCapability] [-IncludeLastCompletedRequest] [-IncludeAssignedRequest] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOAgentPool -Organization -Project [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOAgentPool -Organization [-Server ] [-ApiVersion ] [] +``` +--- + + From 7f68da7c57bf40dade8e9d7bf3199f82df7bf758 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:25 +0000 Subject: [PATCH 059/151] Updating Get-ADOAreaPath.md --- docs/Get-ADOAreaPath.md | 100 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 docs/Get-ADOAreaPath.md diff --git a/docs/Get-ADOAreaPath.md b/docs/Get-ADOAreaPath.md new file mode 100644 index 00000000..cdb3efc7 --- /dev/null +++ b/docs/Get-ADOAreaPath.md @@ -0,0 +1,100 @@ + +Get-ADOAreaPath +--------------- +### Synopsis +Gets area paths + +--- +### Description + +Get area paths from Azure DevOps + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/Classification%20Nodes/Get%20Classification%20Nodes?view=azure-devops-rest-5.1#get-the-root-area-tree](https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/Classification%20Nodes/Get%20Classification%20Nodes?view=azure-devops-rest-5.1#get-the-root-area-tree) +* [Add-ADOAreaPath](Add-ADOAreaPath.md) +* [Remove-ADOAreaPath](Remove-ADOAreaPath.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOAreaPath -Organization StartAutomating -Project PSDevOps +``` + +--- +### Parameters +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **Project** + +The project name or identifier. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |2 |true (ByPropertyName)| +--- +#### **AreaPath** + +The AreaPath + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |3 |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |4 |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 2.0. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |5 |false | +--- +#### **Depth** + +The depth of items to get. By default, one. + + + +|Type |Requried|Postion|PipelineInput| +|-------------|--------|-------|-------------| +|```[Int32]```|false |6 |false | +--- +### Outputs +PSDevOps.AreaPath + + +--- +### Syntax +```PowerShell +Get-ADOAreaPath [-Organization] [-Project] [[-AreaPath] ] [[-Server] ] [[-ApiVersion] ] [[-Depth] ] [] +``` +--- + + From 5d8c828026ce9295b28a7efcd10fdfe56fc48c29 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:25 +0000 Subject: [PATCH 060/151] Updating Get-ADOArtifactFeed.md --- docs/Get-ADOArtifactFeed.md | 343 ++++++++++++++++++++++++++++++++++++ 1 file changed, 343 insertions(+) create mode 100644 docs/Get-ADOArtifactFeed.md diff --git a/docs/Get-ADOArtifactFeed.md b/docs/Get-ADOArtifactFeed.md new file mode 100644 index 00000000..3ff2ebdb --- /dev/null +++ b/docs/Get-ADOArtifactFeed.md @@ -0,0 +1,343 @@ + +Get-ADOArtifactFeed +------------------- +### Synopsis +Gets artifact feeds from Azure DevOps + +--- +### Description + +Gets artifact feeds from Azure DevOps. Artifact feeds can be used to publish packages. + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/artifacts/feed%20%20management/get%20feeds?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/artifacts/feed%20%20management/get%20feeds?view=azure-devops-rest-5.1) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOArtifactFeed -Organization myOrganization -Project MyProject +``` + +--- +### Parameters +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Project** + +The Project + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **FeedID** + +The name or ID of the feed. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **View** + +If set, will Get Artifact Feed Views + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Permission** + +If set, will get artifact permissions + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **RetentionPolicy** + +If set, will get artifact retention policies + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **PackageVersionList** + +If set, will list versions of a particular package. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Provenance** + +If set, will get provenance for a package version + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **VersionID** + +A package version ID. Only required when getting version provenance. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **PackageList** + +If set, will list packages within a feed. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **IncludeAllVersion** + +If set, will include all versions of packages within a feed. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **IncludeDescription** + +If set, will include descriptions of a package. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **ProtocolType** + +If provided, will return packages of a given protocol. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **NPM** + +If set, will get information about a Node Package Manager module. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **NuGet** + +If set, will get information about a Nuget module. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Python** + +If set, will get information about a Python module. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Universal** + +If set, will get information about a Universal package module. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **PackageName** + +The Package Name. Must be used with -NPM, -NuGet, -Python, or -Universal. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **PackageVersion** + +The Package Version. Must be used with -NPM, -NuGet, -Python, or -Universal. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **FeedRole** + +The Feed Role + + + +Valid Values: + +* Administrator +* Collaborator +* Contributor +* Reader +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **PackageID** + +A -PackageID. This can be used to get Packages -Metrics, -ListPackageVersion, or get -Provenance of a particular version. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Metric** + +If set, will get package metrics. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **IncludeDeleted** + +If set, will include deleted feeds. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **Change** + +If set, will get changes in artifact feeds. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **Server** + +The server. By default https://feeds.dev.azure.com/. + + + +|Type |Requried|Postion|PipelineInput| +|-----------|--------|-------|-------------| +|```[Uri]```|false |named |false | +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevOps.ArtfiactFeed + + +PSDevOps.ArtfiactFeed.View + + +PSDevOps.ArtfiactFeed.Change + + +--- +### Syntax +```PowerShell +Get-ADOArtifactFeed -Organization [-Project ] [-FeedID ] [-IncludeDeleted] [-Change] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOArtifactFeed -Organization [-Project ] [-FeedID ] -View [-IncludeDeleted] [-Change] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOArtifactFeed -Organization [-Project ] [-FeedID ] -Permission [-IncludeDeleted] [-Change] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOArtifactFeed -Organization [-Project ] [-FeedID ] -RetentionPolicy [-IncludeDeleted] [-Change] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOArtifactFeed -Organization [-Project ] [-FeedID ] -PackageVersionList [-IncludeDeleted] [-Change] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOArtifactFeed -Organization [-Project ] [-FeedID ] -Provenance -VersionID [-IncludeDeleted] [-Change] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOArtifactFeed -Organization [-Project ] [-FeedID ] -PackageList [-IncludeAllVersion] [-IncludeDescription] [-ProtocolType ] [-PackageName ] [-IncludeDeleted] [-Change] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOArtifactFeed -Organization [-Project ] [-FeedID ] -NPM -PackageName -PackageVersion [-IncludeDeleted] [-Change] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOArtifactFeed -Organization [-Project ] [-FeedID ] -NuGet -PackageName -PackageVersion [-IncludeDeleted] [-Change] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOArtifactFeed -Organization [-Project ] [-FeedID ] -Python -PackageName -PackageVersion [-IncludeDeleted] [-Change] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOArtifactFeed -Organization [-Project ] [-FeedID ] -Universal -PackageName -PackageVersion [-IncludeDeleted] [-Change] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOArtifactFeed -Organization [-Project ] [-FeedID ] [-FeedRole ] [-IncludeDeleted] [-Change] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOArtifactFeed -Organization [-Project ] [-FeedID ] -PackageID -Metric [-IncludeDeleted] [-Change] [-Server ] [-ApiVersion ] [] +``` +--- + + From 7d758d717717e3eb35cef9bbf911b70d702299a9 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:25 +0000 Subject: [PATCH 061/151] Updating Get-ADOBuild.md --- docs/Get-ADOBuild.md | 472 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 472 insertions(+) create mode 100644 docs/Get-ADOBuild.md diff --git a/docs/Get-ADOBuild.md b/docs/Get-ADOBuild.md new file mode 100644 index 00000000..291279fe --- /dev/null +++ b/docs/Get-ADOBuild.md @@ -0,0 +1,472 @@ + +Get-ADOBuild +------------ +### Synopsis +Gets Azure DevOps Builds, Definitions, and associated information. + +--- +### Description + +Gets Azure DevOps Builds or Definitions and associated information. + +Gets builds by default. To get build definitions, use -Definition + +Given a -BuildID, we can can get associated information: + +|Parameter | Effect | +|----------|----------------------------------------------| +|-Artfiact | Get a list of all build artifacts | +|-ChangeSet | Get the build's associated changeset | +|-Log | Get a list of all build logs | +|-LogID | Get the content of a specific LogID | +|-Timeline | Gets the build timeline | +|-BuildMetaData | Returns system metadata about the build | + +Given a -Definition ID, we can get associated information: + +|Parameter | Effect | +|----------|--------------------------------------------------| +|-Status | Gets the status of the build definition | +|-Metric | Gets metrics about the build definition | +|-Revision | Gets the revisions of a build definition| +|-DefinitionMetadata| Gets metadata about a build definition | + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/build/builds/get?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/build/builds/get?view=azure-devops-rest-5.1) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/build/artifacts/list?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/build/artifacts/list?view=azure-devops-rest-5.1) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/build/builds/get%20build%20logs?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/build/builds/get%20build%20logs?view=azure-devops-rest-5.1) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/build/timeline/get?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/build/timeline/get?view=azure-devops-rest-5.1) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/build/properties/get%20build%20properties?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/build/properties/get%20build%20properties?view=azure-devops-rest-5.1) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/build/definitions/get?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/build/definitions/get?view=azure-devops-rest-5.1) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/build/properties/get%20definition%20properties?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/build/properties/get%20definition%20properties?view=azure-devops-rest-5.1) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/build/metrics/get%20definition%20metrics?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/build/metrics/get%20definition%20metrics?view=azure-devops-rest-5.1) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOBuild -Organization StartAutomating -Project PSDevOps +``` + +#### EXAMPLE 2 +```PowerShell +Get-ADOBuild -Organization StartAutomating -Project PSDevOps -Definition +``` + +--- +### Parameters +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Project** + +The Project + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://feeds.dev.azure.com/. + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **BuildID** + +Build ID + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Detail** + +If set + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **BuildMetadata** + +If set, returns system metadata about the -BuildID. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Artifact** + +If set, will get artifacts from -BuildID. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Log** + +If set, will get a list of logs associated with -BuildID + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **LogID** + +If provided, will retreive the specific log content of -BuildID + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **ChangeSet** + +If set, will return the changeset associated with the build -BuildID. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Report** + +If set, will return the build report associated with -BuildID. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Timeline** + +If set, will return the timeline for build -BuildID + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **CodeCoverage** + +If set, will return the code coverage associated with -BuildID + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Definition** + +If set, will get build definitions. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **DefinitionID** + +If set, will get a specific build by definition ID + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Status** + +If set, will get the status of a defined build. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **DefinitionMetadata** + +If set, will get definition properties + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Revision** + +If set, will get revisions to a build definition. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Resource** + +If set, will get authorized resources for a build definition. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Metric** + +If set, will get metrics about a build definition. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **First** + +If provided, will get the first N builds or build definitions + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[UInt32]```|false |named |false | +--- +#### **BranchName** + +If provided, will only return builds for a given branch. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **Tag** + +If provided, will only return builds one of these tags. + + + +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[String[]]```|false |named |false | +--- +#### **After** + +If provided, will only return builds queued after this point in time. + + + +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[DateTime]```|false |named |false | +--- +#### **Before** + +If provided, will only return builds queued before this point in time. + + + +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[DateTime]```|false |named |false | +--- +#### **BuildResult** + +If provided, will only return builds with this result. + + + +Valid Values: + +* Canceled +* Failed +* None +* Succeeded +* PartiallySucceeded +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **DefinitionName** + +Will only return build definitions with the specified name. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **BuiltAfter** + +If provided, will only return build definitions that have been built after this date. + + + +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[DateTime]```|false |named |false | +--- +#### **NotBuiltSince** + +If provided, will only return build definitions that have not been built since this date. + + + +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[DateTime]```|false |named |false | +--- +#### **IncludeAllProperty** + +If set, will return extended properities of a build definition. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **IncludeLatestBuild** + +If set, will include the latest build and latest completed build in a given build definition. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **DefinitionYAML** + +If provided, will return build definition YAML. No other information will be returned. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +### Outputs +PSDevOps.Build + + +PSDevOps.Build.Definition + + +PSDevOps.Build.Timeline + + +PSDevOps.Build.Change + + +PSDevOps.Build.Report + + +PSDevOps.Build.Artifact + + +PSDevOps.Build.CodeCoverage + + +--- +### Syntax +```PowerShell +Get-ADOBuild -Organization -Project [-Server ] [-ApiVersion ] [-First ] [-BranchName ] [-Tag ] [-After ] [-Before ] [-BuildResult ] [] +``` +```PowerShell +Get-ADOBuild -Organization -Project [-Server ] [-ApiVersion ] -BuildID -CodeCoverage [] +``` +```PowerShell +Get-ADOBuild -Organization -Project [-Server ] [-ApiVersion ] -BuildID -Report [] +``` +```PowerShell +Get-ADOBuild -Organization -Project [-Server ] [-ApiVersion ] -BuildID -Timeline [] +``` +```PowerShell +Get-ADOBuild -Organization -Project [-Server ] [-ApiVersion ] -BuildID -Artifact [] +``` +```PowerShell +Get-ADOBuild -Organization -Project [-Server ] [-ApiVersion ] -BuildID -ChangeSet [] +``` +```PowerShell +Get-ADOBuild -Organization -Project [-Server ] [-ApiVersion ] -BuildID -LogID [] +``` +```PowerShell +Get-ADOBuild -Organization -Project [-Server ] [-ApiVersion ] -BuildID -Log [] +``` +```PowerShell +Get-ADOBuild -Organization -Project [-Server ] [-ApiVersion ] -BuildID -BuildMetadata [] +``` +```PowerShell +Get-ADOBuild -Organization -Project [-Server ] [-ApiVersion ] -BuildID [-Detail] [] +``` +```PowerShell +Get-ADOBuild -Organization -Project [-Server ] [-ApiVersion ] -Definition [-First ] [-DefinitionName ] [-BuiltAfter ] [-NotBuiltSince ] [-IncludeAllProperty] [-IncludeLatestBuild] [] +``` +```PowerShell +Get-ADOBuild -Organization -Project [-Server ] [-ApiVersion ] -DefinitionID -Resource [] +``` +```PowerShell +Get-ADOBuild -Organization -Project [-Server ] [-ApiVersion ] -DefinitionID -Status [] +``` +```PowerShell +Get-ADOBuild -Organization -Project [-Server ] [-ApiVersion ] -DefinitionID -Revision [] +``` +```PowerShell +Get-ADOBuild -Organization -Project [-Server ] [-ApiVersion ] -DefinitionID -Metric [] +``` +```PowerShell +Get-ADOBuild -Organization -Project [-Server ] [-ApiVersion ] -DefinitionID -DefinitionMetadata [] +``` +```PowerShell +Get-ADOBuild -Organization -Project [-Server ] [-ApiVersion ] -DefinitionID [-DefinitionYAML] [] +``` +--- + + From c3c5cdc9bfd47e3e28358a0555a0e0cc209cc8c6 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:26 +0000 Subject: [PATCH 062/151] Updating Get-ADODashboard.md --- docs/Get-ADODashboard.md | 131 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 docs/Get-ADODashboard.md diff --git a/docs/Get-ADODashboard.md b/docs/Get-ADODashboard.md new file mode 100644 index 00000000..091e34b1 --- /dev/null +++ b/docs/Get-ADODashboard.md @@ -0,0 +1,131 @@ + +Get-ADODashboard +---------------- +### Synopsis +Gets Azure DevOps Dashboards + +--- +### Description + +Gets Azure DevOps Team Dashboards and Widgets within a dashboard. + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/dashboard/dashboards/list](https://docs.microsoft.com/en-us/rest/api/azure/devops/dashboard/dashboards/list) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOTeam -Organization MyOrganization -PersonalAccessToken $pat | + Get-ADODashboard +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Project** + +The Project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Team** + +The Team. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **DashboardID** + +The DashboardID + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Widget** + +If set, will widgets within a dashboard. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **WidgetID** + +The WidgetID. If provided, will get details about a given Azure DevOps Widget. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevOps.Dashboard + + +PSDevOps.Widget + + +--- +### Syntax +```PowerShell +Get-ADODashboard -Organization -Project [-Team ] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADODashboard -Organization -Project [-Team ] -DashboardID -WidgetID [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADODashboard -Organization -Project [-Team ] -DashboardID -Widget [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADODashboard -Organization -Project [-Team ] -DashboardID [-Server ] [-ApiVersion ] [] +``` +--- + + From aeba6630fcb4ee500b954a2a7c6c2c5b79ba4ce0 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:26 +0000 Subject: [PATCH 063/151] Updating Get-ADOExtension.md --- docs/Get-ADOExtension.md | 238 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 238 insertions(+) create mode 100644 docs/Get-ADOExtension.md diff --git a/docs/Get-ADOExtension.md b/docs/Get-ADOExtension.md new file mode 100644 index 00000000..89f479b6 --- /dev/null +++ b/docs/Get-ADOExtension.md @@ -0,0 +1,238 @@ + +Get-ADOExtension +---------------- +### Synopsis +Gets Azure DevOps Extensions + +--- +### Description + +Gets Extensions to Azure DevOps. + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/extensionmanagement/installed%20extensions/list?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/extensionmanagement/installed%20extensions/list?view=azure-devops-rest-5.1) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/extensionmanagement/installed%20extensions/get?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/extensionmanagement/installed%20extensions/get?view=azure-devops-rest-5.1) +* [https://docs.microsoft.com/en-us/azure/devops/extend/develop/data-storage?view=azure-devops#how-settings-are-stored](https://docs.microsoft.com/en-us/azure/devops/extend/develop/data-storage?view=azure-devops#how-settings-are-stored) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOExtension -Organization StartAutomating +``` + +--- +### Parameters +#### **Organization** + +The organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **ExtensionNameLike** + +A wildcard of the extension name. Only extensions where the Extension Name or ID matches the wildcard will be returned. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **ExtensionNameMatch** + +A regular expression of the extension name. Only extensions where the Extension Name or ID matches the wildcard will be returned. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **PublisherNameLike** + +A wildcard of the publisher name. Only extensions where the Publisher Name or ID matches the wildcard will be returned. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **PublisherNameMatch** + +A regular expression of the publisher name. Only extensions where the Publisher Name or ID matches the wildcard will be returned. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **PublisherID** + +The Publisher of the Extension. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **ExtensionID** + +The Extension Identifier. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **DataCollection** + +The data collection + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **DataID** + +The data identifier + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **ScopeType** + +The scope type. By default, the value "default" (which maps to Project Collection) + + + +Valid Values: + +* Default +* Project +* User +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **ScopeModifier** + +The scope modifier. By default, the value "current" (which maps to the current project collection or project) + + + +Valid Values: + +* Current +* Me +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **AssetType** + +A list of asset types + + + +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[String[]]```|false |named |false | +--- +#### **IncludeDisabled** + +If set, will include disabled extensions + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **InstallationIssue** + +If set, will include extension installation issues + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **IncludeError** + +If set, will include errors + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **Contribution** + +If set, will expand contributions. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevOps.InstalledExtension + + +--- +### Syntax +```PowerShell +Get-ADOExtension -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOExtension -Organization [-ExtensionNameLike ] [-ExtensionNameMatch ] [-PublisherNameLike ] [-PublisherNameMatch ] [-AssetType ] [-IncludeDisabled] [-InstallationIssue] [-IncludeError] [-Contribution] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOExtension -Organization [-ExtensionNameLike ] [-ExtensionNameMatch ] [-PublisherNameLike ] [-PublisherNameMatch ] -PublisherID -ExtensionID [-AssetType ] [-IncludeDisabled] [-InstallationIssue] [-IncludeError] [-Contribution] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOExtension -Organization -PublisherID -ExtensionID -DataCollection [-DataID ] [-ScopeType ] [-ScopeModifier ] [-Server ] [-ApiVersion ] [] +``` +--- + + From f20ce7fd4f2d6763e912095f9c8b6debe879d4e4 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:26 +0000 Subject: [PATCH 064/151] Updating Get-ADOField.md --- docs/Get-ADOField.md | 123 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 docs/Get-ADOField.md diff --git a/docs/Get-ADOField.md b/docs/Get-ADOField.md new file mode 100644 index 00000000..5a6051ab --- /dev/null +++ b/docs/Get-ADOField.md @@ -0,0 +1,123 @@ + +Get-ADOField +------------ +### Synopsis +Gets fields from Azure DevOps + +--- +### Description + +Gets fields from Azure DevOps or Team Foundation Server. + +--- +### Related Links +* [New-ADOField](New-ADOField.md) +* [Remove-ADOField](Remove-ADOField.md) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/fields/list](https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/fields/list) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOField -Organization StartAutomating -Project PSDevOps +``` + +--- +### Parameters +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Project** + +The Project + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **FieldName** + +The name of the field. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **ProcessID** + +The processs identifier. This is used to get field information related to a particular work process template. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **WorkItemTypeName** + +The name of the work item type. This is used to get field information related to a particular work process template. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **Force** + +If set, will force a refresh of the cached results. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **ApiVersion** + +The api version. By default, 5.1. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevOps.Field + + +--- +### Syntax +```PowerShell +Get-ADOField -Organization [-Project ] [-FieldName ] [-Server ] [-Force] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOField -Organization [-Project ] [-FieldName ] -ProcessID -WorkItemTypeName [-Server ] [-Force] [-ApiVersion ] [] +``` +--- + + From 82920765a026f3642fc2c48e88ec56526411caf5 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:26 +0000 Subject: [PATCH 065/151] Updating Get-ADOIdentity.md --- docs/Get-ADOIdentity.md | 138 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 docs/Get-ADOIdentity.md diff --git a/docs/Get-ADOIdentity.md b/docs/Get-ADOIdentity.md new file mode 100644 index 00000000..3c5d0255 --- /dev/null +++ b/docs/Get-ADOIdentity.md @@ -0,0 +1,138 @@ + +Get-ADOIdentity +--------------- +### Synopsis +Gets Azure DevOps Identities + +--- +### Description + +Gets Identities from Azure Devops. Identities can be either users or groups. + +--- +### Related Links +* [Get-ADOUser](Get-ADOUser.md) +* [Get-ADOTeam](Get-ADOTeam.md) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/ims/identities/read%20identities](https://docs.microsoft.com/en-us/rest/api/azure/devops/ims/identities/read%20identities) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOIdentity -Organization StartAutomating -Filter 'GitHub' +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **AceDictionary** + +A dictionary of Access Control Entries + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[PSObject]```|false |2 |true (ByPropertyName)| +--- +#### **Descriptors** + +A list of descriptors + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |3 |true (ByPropertyName)| +--- +#### **DescriptorBatchSize** + +The maximum number of specific descriptors to request in one batch. + + + +|Type |Requried|Postion|PipelineInput| +|-------------|--------|-------|-------------| +|```[Int32]```|false |4 |false | +--- +#### **Membership** + +If set, will get membership information. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **Recurse** + +If set, will recursively expand any group memberships discovered. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **Filter** + +The filter used for a query + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |5 |false | +--- +#### **SearchType** + +The search type. Can be: AccountName, DisplayName, MailAddress, General, LocalGroupName + + + +Valid Values: + +* AccountName +* DisplayName +* MailAddress +* General +* LocalGroupName +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |6 |false | +--- +#### **ApiVersion** + +The api version. By default, 6.0. +This API does not exist in TFS. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |7 |false | +--- +### Outputs +PSDevOps.Team + + +PSDevOps.TeamMember + + +--- +### Syntax +```PowerShell +Get-ADOIdentity [-Organization] [[-AceDictionary] ] [[-Descriptors] ] [[-DescriptorBatchSize] ] [-Membership] [-Recurse] [[-Filter] ] [[-SearchType] ] [[-ApiVersion] ] [] +``` +--- + + From 95aaa36dc6920d345fc44a8461e9a317c43cea0b Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:26 +0000 Subject: [PATCH 066/151] Updating Get-ADOIterationPath.md --- docs/Get-ADOIterationPath.md | 99 ++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 docs/Get-ADOIterationPath.md diff --git a/docs/Get-ADOIterationPath.md b/docs/Get-ADOIterationPath.md new file mode 100644 index 00000000..ba0c5117 --- /dev/null +++ b/docs/Get-ADOIterationPath.md @@ -0,0 +1,99 @@ + +Get-ADOIterationPath +-------------------- +### Synopsis +Gets iteration paths + +--- +### Description + +Get iteration paths from Azure DevOps + +--- +### Related Links +* [Get-ADOAreaPath](Get-ADOAreaPath.md) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/Classification%20Nodes/Get%20Classification%20Nodes?view=azure-devops-rest-5.1#get-the-root-area-tree](https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/Classification%20Nodes/Get%20Classification%20Nodes?view=azure-devops-rest-5.1#get-the-root-area-tree) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOIterationPath -Organization StartAutomating -Project PSDevOps +``` + +--- +### Parameters +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **Project** + +The project name or identifier. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |2 |true (ByPropertyName)| +--- +#### **IterationPath** + +The IterationPath + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |3 |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |4 |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 2.0. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |5 |false | +--- +#### **Depth** + +The depth of items to get. By default, one. + + + +|Type |Requried|Postion|PipelineInput| +|-------------|--------|-------|-------------| +|```[Int32]```|false |6 |false | +--- +### Outputs +PSDevOps.IterationPath + + +--- +### Syntax +```PowerShell +Get-ADOIterationPath [-Organization] [-Project] [[-IterationPath] ] [[-Server] ] [[-ApiVersion] ] [[-Depth] ] [] +``` +--- + + From 7fa7a448e18042b978ef46ae7bb54835ce2a23eb Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:26 +0000 Subject: [PATCH 067/151] Updating Get-ADOPermission.md --- docs/Get-ADOPermission.md | 403 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 403 insertions(+) create mode 100644 docs/Get-ADOPermission.md diff --git a/docs/Get-ADOPermission.md b/docs/Get-ADOPermission.md new file mode 100644 index 00000000..5e305c7c --- /dev/null +++ b/docs/Get-ADOPermission.md @@ -0,0 +1,403 @@ + +Get-ADOPermission +----------------- +### Synopsis +Gets Azure DevOps Permissions + +--- +### Description + +Gets Azure DevOps security permissions. + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/security/access%20control%20lists/query](https://docs.microsoft.com/en-us/rest/api/azure/devops/security/access%20control%20lists/query) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/security/security%20namespaces/query](https://docs.microsoft.com/en-us/rest/api/azure/devops/security/security%20namespaces/query) +* [https://docs.microsoft.com/en-us/azure/devops/organizations/security/namespace-reference](https://docs.microsoft.com/en-us/azure/devops/organizations/security/namespace-reference) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOPermission -Organization MyOrganization -Project MyProject -PersonalAccessToken $pat +``` + +#### EXAMPLE 2 +```PowerShell +Get-ADOProject -Organization MyOrganization -Project MyProject | # Get the project + Get-ADOTeam | # get the teams within the project + Get-ADOPermission -Dashboard # get the dashboard permissions of each team within the project. +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **PermissionType** + +If set, will list the type of permisssions. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **NamespaceID** + +The Security Namespace ID. +For details about each namespace, see: +https://docs.microsoft.com/en-us/azure/devops/organizations/security/namespace-reference + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **SecurityToken** + +The Security Token. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **ProjectID** + +The Project ID. +If this is provided without anything else, will get permissions for the projectID + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **TeamID** + +If provided, will get permissions related to a given teamID. ( see Get-ADOTeam) + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **AreaPath** + +If provided, will get permissions related to an Area Path. ( see Get-ADOAreaPath ) + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **IterationPath** + +If provided, will get permissions related to an Iteration Path. ( see Get-ADOIterationPath ) + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Overview** + +If set, will get common permissions related to a project. +These are: +* Builds +* Boards +* Dashboards +* Git Repositories +* ServiceEndpoints +* Project Permissions +* Service Endpoints +* ServiceHooks + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Tagging** + +If set, will get permissions for tagging related to the current project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Analytics** + +If set, will get permissions for analytics related to the current project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **ManageTFVC** + +If set, will get permissions for Team Foundation Version Control related to the current project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Plan** + +If set, will get permissions for Delivery Plans. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Dashboard** + +If set, will get dashboard permissions related to the current project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **ServiceEndpoint** + +If set, will get all service endpoints permissions. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **EndpointID** + +If set, will get endpoint permissions related to a particular endpoint. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **DefinitionID** + +The Build Definition ID + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **BuildPath** + +The path to the build. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **BuildPermission** + +If set, will get build and release permissions for a given project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **RepositoryID** + +If provided, will get build and release permissions for a given project's repositoryID + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **BranchName** + +If provided, will get permissions for a given branch within a repository + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **ProjectRepository** + +If set, will get permissions for repositories within a project + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **AllRepository** + +If set, will get permissions for repositories within a project + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Descriptor** + +The Descriptor + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **Recurse** + +If set and this is a hierarchical namespace, return child ACLs of the specified token. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **IncludeExtendedInfo** + +If set, populate the extended information properties for the access control entries in the returned lists. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **ExpandACL** + +If set, will expand the ACE dictionary returned + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevOps.SecurityNamespace + + +PSDevOps.AccessControlList + + +--- +### Syntax +```PowerShell +Get-ADOPermission -Organization [-PermissionType] [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPermission -Organization -NamespaceID [-SecurityToken ] [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPermission -Organization -ProjectID -Overview [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPermission -Organization -ProjectID -ProjectRepository [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPermission -Organization -ProjectID -RepositoryID [-BranchName ] [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPermission -Organization -ProjectID -IterationPath [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPermission -Organization -ProjectID -BuildPermission [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPermission -Organization -ProjectID -DefinitionID [-BuildPath ] [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPermission -Organization -ProjectID -ManageTFVC [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPermission -Organization -ProjectID -Tagging [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPermission -Organization -ProjectID [-TeamID ] -Dashboard [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPermission -Organization -ProjectID -AreaPath [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPermission -Organization [-ProjectID ] -EndpointID [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPermission -Organization [-ProjectID ] -Analytics [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPermission -Organization -ProjectID [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPermission -Organization -Plan [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPermission -Organization -ServiceEndpoint [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPermission -Organization [-BranchName ] -AllRepository [-Descriptor ] [-Recurse] [-IncludeExtendedInfo] [-ExpandACL] [-Server ] [-ApiVersion ] [] +``` +--- + + From 8f983dae69b9d7d9cf438b82509eda0f699ec022 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:26 +0000 Subject: [PATCH 068/151] Updating Get-ADOPicklist.md --- docs/Get-ADOPicklist.md | 115 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 docs/Get-ADOPicklist.md diff --git a/docs/Get-ADOPicklist.md b/docs/Get-ADOPicklist.md new file mode 100644 index 00000000..8f611cf6 --- /dev/null +++ b/docs/Get-ADOPicklist.md @@ -0,0 +1,115 @@ + +Get-ADOPicklist +--------------- +### Synopsis +Gets picklists from Azure DevOps. + +--- +### Description + +Gets picklists from Azure DevOps. + +Picklists are lists of values that can be associated with a field, for example, a list of T-shirt sizes. + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/processes/lists/list](https://docs.microsoft.com/en-us/rest/api/azure/devops/processes/lists/list) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/processes/lists/get](https://docs.microsoft.com/en-us/rest/api/azure/devops/processes/lists/get) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOPicklist -Organization StartAutomating -PersonalAccessToken $pat +``` + +#### EXAMPLE 2 +```PowerShell +Get-ADOPicklist -Organization StartAutomating +``` + +--- +### Parameters +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **PickListID** + +The Picklist Identifier. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **PicklistName** + +The name of the picklist + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Orphan** + +If set, will return orphan picklists. These picklists are not associated with any field. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevOps.Project + + +PSDevOps.Property + + +--- +### Syntax +```PowerShell +Get-ADOPicklist -Organization [-PicklistName ] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPicklist -Organization [-PicklistName ] -Orphan [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOPicklist -Organization -PickListID [-PicklistName ] [-Server ] [-ApiVersion ] [] +``` +--- + + From 6e5442a37e35fc220a8e57cb60605e6d55e136e5 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:27 +0000 Subject: [PATCH 069/151] Updating Get-ADOProject.md --- docs/Get-ADOProject.md | 307 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 307 insertions(+) create mode 100644 docs/Get-ADOProject.md diff --git a/docs/Get-ADOProject.md b/docs/Get-ADOProject.md new file mode 100644 index 00000000..940dd135 --- /dev/null +++ b/docs/Get-ADOProject.md @@ -0,0 +1,307 @@ + +Get-ADOProject +-------------- +### Synopsis +Gets projects from Azure DevOps. + +--- +### Description + +Gets projects from Azure DevOps or TFS. + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/core/projects/list](https://docs.microsoft.com/en-us/rest/api/azure/devops/core/projects/list) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/wiki/wikis/list](https://docs.microsoft.com/en-us/rest/api/azure/devops/wiki/wikis/list) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOProject -Organization StartAutomating -PersonalAccessToken $pat +``` + +#### EXAMPLE 2 +```PowerShell +Get-ADOProject -Organization StartAutomating -Project PSDevOps +``` + +#### EXAMPLE 3 +```PowerShell +Get-ADOProject -Organization StartAutomating -Project PSDevOps | + Get-ADOProject -Metadata +``` + +--- +### Parameters +#### **Project** + +The project name. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **ProjectID** + +The project identifier. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Metadata** + +If set, will get project metadta + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **ProcessConfiguration** + +If set, will return the process configuration of a project. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **PolicyConfiguration** + +If set, will return the policy configuration of a project. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **PolicyType** + +If set, will return the policy types available in a given project. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Plan** + +If set, will return the plans related to a project. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **TestRun** + +If set, will return the test runs associated with a project. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **TestPlan** + +If set, will return the test plans associated with a project. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **TestVariable** + +If set, will return the test variables associated with a project. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **TestConfiguration** + +If set, will return the test variables associated with a project. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **PlanID** + +If set, will a specific project plan. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|true |named |false | +--- +#### **DeliveryTimeline** + +If set, will return the project delivery timeline associated with a given planID. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|true |named |false | +--- +#### **Wiki** + +If set, will return any wikis associated with the project. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Board** + +If set, will return any boards associated with the project. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Release** + +If set, will return releases associated with the project. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **PendingApproval** + +If set, will return pending approvals associated with the project. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevOps.Project + + +PSDevOps.Property + + +--- +### Syntax +```PowerShell +Get-ADOProject -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -Project -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -ProjectID -Board -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -ProjectID -TestConfiguration -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -ProjectID -TestVariable -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -ProjectID -PendingApproval -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -ProjectID -Release -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -ProjectID -TestPlan -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -ProjectID -TestRun -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -ProjectID -Wiki -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -ProjectID -PolicyConfiguration -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -ProjectID -PolicyType -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -ProjectID -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -ProjectID -PlanID -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -ProjectID -Plan -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -ProjectID -ProcessConfiguration -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -ProjectID -Metadata -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -ProjectID -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOProject -PlanID -DeliveryTimeline -Organization [-Server ] [-ApiVersion ] [] +``` +--- + + From fbed2b1966d46423dff737a53865565064af69ab Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:27 +0000 Subject: [PATCH 070/151] Updating Get-ADORepository.md --- docs/Get-ADORepository.md | 508 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 508 insertions(+) create mode 100644 docs/Get-ADORepository.md diff --git a/docs/Get-ADORepository.md b/docs/Get-ADORepository.md new file mode 100644 index 00000000..74b2bbb4 --- /dev/null +++ b/docs/Get-ADORepository.md @@ -0,0 +1,508 @@ + +Get-ADORepository +----------------- +### Synopsis +Gets repositories from Azure DevOps + +--- +### Description + +Gets the repositories from Azure DevOps. + +By default, this will return the project's git repositories. + +You can get additional details by piping back into Get-ADORepository with a number of switches: + +* ```Get-ADORepository | Get-ADORepository -PullRequest # Lists pull requests``` +* ```Get-ADORepository | Get-ADORepository -FileList # Lists files in a repository``` +* ```Get-ADORepository | Get-ADORepository -GitRef # Lists git refs for a repository``` + + +Azure DevOps repositories can have more than one type of SourceProvider. + +To list the Source Providers, use -SourceProvider + +We can get repositories for a given -ProviderName. + +--- +### Related Links +* [Remove-ADORepository](Remove-ADORepository.md) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/build/source%20providers/list%20repositories](https://docs.microsoft.com/en-us/rest/api/azure/devops/build/source%20providers/list%20repositories) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADORepository -Organization StartAutomating -Project PSDevOps +``` + +--- +### Parameters +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Project** + +The Project + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **RepositoryID** + +The Repository ID + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **CommitList** + +If set, will list commits associated with a given repository. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Skip** + +If provided, will -Skip N items. + + + +|Type |Requried|Postion|PipelineInput| +|-------------|--------|-------|-------------| +|```[Int32]```|false |named |false | +--- +#### **First** + +If provided, will return the -First N items. + + + +|Type |Requried|Postion|PipelineInput| +|-------------|--------|-------|-------------| +|```[Int32]```|false |named |false | +--- +#### **FileList** + +If set, will get the file list from a repository + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **RecursionLevel** + +When getting a -FileList, the recursion level. By default, full. + + + +Valid Values: + +* full +* None +* oneLevel +* oneLevelPlusNestedEmptyFolders +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **ScopePath** + +When getting a -FileList, the path scope. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **VersionDescriptor** + +The version string identifier (name of tag/branch, SHA1 of commit) + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **VersionOption** + +The version options (e.g. firstParent, previousChange) + + + +Valid Values: + +* none +* firstParent +* previousChange +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **VersionType** + +The version type (e.g. branch, commit, or tag) + + + +Valid Values: + +* branch +* commit +* tag +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **IncludeMetadata** + +If -IncludeContentMetadata is set a -FileList will include content metadata. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Download** + +If set, will include the parent repository + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **PullRequest** + +If set, will list pull requests related to a git repository. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **GitRef** + +If set, will list git references related to a repository. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **BranchStatistic** + +If set, will list git branch statistics related to a repository. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **TreeId** + +If provided, will output a tree of commits. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **CreatorIdentity** + +Filters pull requests, returning requests created by the -CreatorIdentity. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **ReviewerIdentity** + +Filters pull requests where the -ReviewerIdentity is a reviewer. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **SourceReference** + +Filters pull requests where the source branch is the -SourceReference. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **TargetReference** + +Filters pull requests where the target branch is the -TargetReference. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **PullRequestStatus** + +Filters pull requests with a paricular status. If not specified, will default to Active. + + + +Valid Values: + +* abandoned +* active +* all +* completed +* notset +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **PullRequestID** + +Get pull request with a specific id + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **PushList** + +If set, will list pushes associated with a repository + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **IncludeParent** + +If set, will include the parent repository + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Recycled** + +If set, will get repositories from the recycle bin + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **IncludeHidden** + +If set, will include hidden repositories. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **IncludeLink** + +If set, will include all related links to a repository. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **IncludeRemoteUrl** + +If set, will return all GitHub remote URLs associated with a repository. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **SourceProvider** + +If set, will list repository source providers + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **ProviderName** + +The name of the Source Provider. This will get all repositories associated with the project. +If the -ProviderName is not TFVC or TFGit, an -EndpointID is also required + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **EndpointID** + +The name of the Source Provider. This will get all repositories associated with the project. +If the -ProviderName is not TFVC or TFGit, an -EndpointID is also required + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **RepositoryName** + +The name of the repository + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Path** + +The path within the repository. +To use this parameter, -ProviderName is also required, and -EndpointID will be required if the -ProviderName is not TFVC or TFGit + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **CommitOrBranch** + +The commit or branch. By default, Master. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevOps.Repository + + +PSDevOps.Repository.SourceProvider + + +PSDevOps.Repository.File + + +PSDevOps.Repoistory.Recycled + + +--- +### Syntax +```PowerShell +Get-ADORepository -Organization -Project [-IncludeHidden] [-IncludeLink] [-IncludeRemoteUrl] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADORepository -Organization -Project -RepositoryID -TreeId [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADORepository -Organization -Project -RepositoryID -BranchStatistic [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADORepository -Organization -Project -RepositoryID [-First ] -GitRef [-IncludeLink] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADORepository -Organization -Project -RepositoryID [-Skip ] [-First ] -PushList [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADORepository -Organization -Project -RepositoryID -PullRequestID [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADORepository -Organization -Project -RepositoryID [-Skip ] [-First ] -PullRequest [-CreatorIdentity ] [-ReviewerIdentity ] [-SourceReference ] [-TargetReference ] [-PullRequestStatus ] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADORepository -Organization -Project -RepositoryID -FileList [-RecursionLevel ] [-ScopePath ] [-VersionDescriptor ] [-VersionOption ] [-VersionType ] [-IncludeMetadata] [-Download] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADORepository -Organization -Project -RepositoryID -CommitList [-Skip ] [-First ] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADORepository -Organization -Project -RepositoryID [-IncludeParent] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADORepository -Organization -Project -Recycled [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADORepository -Organization -Project -SourceProvider [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADORepository -Organization -Project -ProviderName [-EndpointID ] -RepositoryName -Path [-CommitOrBranch ] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADORepository -Organization -Project -ProviderName [-EndpointID ] [-Server ] [-ApiVersion ] [] +``` +--- + + From 597553cb08e5ee48479fec312337443677f1c9d1 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:27 +0000 Subject: [PATCH 071/151] Updating Get-ADOServiceEndpoint.md --- docs/Get-ADOServiceEndpoint.md | 133 +++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 docs/Get-ADOServiceEndpoint.md diff --git a/docs/Get-ADOServiceEndpoint.md b/docs/Get-ADOServiceEndpoint.md new file mode 100644 index 00000000..9d147806 --- /dev/null +++ b/docs/Get-ADOServiceEndpoint.md @@ -0,0 +1,133 @@ + +Get-ADOServiceEndpoint +---------------------- +### Synopsis +Gets Azure DevOps Service Endpoints + +--- +### Description + +Gets Service Endpoints from Azure DevOps. + +Service Endpoints are used to connect an Azure DevOps project to one or more web services. + +To see the types of service endpoints, use Get-ADOServiceEndpoint -GetEndpointType + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/serviceendpoint/endpoints/get%20service%20endpoints?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/serviceendpoint/endpoints/get%20service%20endpoints?view=azure-devops-rest-5.1) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/serviceendpoint/endpoints/get?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/serviceendpoint/endpoints/get?view=azure-devops-rest-5.1) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOServiceEndpoint -Organization MyOrg -Project MyProject -PersonalAccessToken $myPersonalAccessToken +``` + +#### EXAMPLE 2 +```PowerShell +Get-ADOServiceEndpoint -Organization MyOrg -GetEndpointType -PersonalAccessToken $myPersonalAccessToken +``` + +--- +### Parameters +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Project** + +The Project + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **EndpointID** + +The Endpoint ID + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **History** + +If set, will get the execution history of the endpoint. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **GetEndpointType** + +If set, will get the types of endpoints. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevOps.ServiceEndpoint + + +StartAutomating.PSDevOps.ServiceEndpoint.History + + +StartAutomating.PSDevOps.ServiceEndpoint.Type + + +--- +### Syntax +```PowerShell +Get-ADOServiceEndpoint -Organization -Project [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOServiceEndpoint -Organization -GetEndpointType [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOServiceEndpoint -Organization -Project -EndpointID -History [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOServiceEndpoint -Organization -Project -EndpointID [-Server ] [-ApiVersion ] [] +``` +--- + + From 53a5b61de1cb921fb70b97754c62a86176bb3924 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:27 +0000 Subject: [PATCH 072/151] Updating Get-ADOServiceHook.md --- docs/Get-ADOServiceHook.md | 191 +++++++++++++++++++++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644 docs/Get-ADOServiceHook.md diff --git a/docs/Get-ADOServiceHook.md b/docs/Get-ADOServiceHook.md new file mode 100644 index 00000000..ff8946c9 --- /dev/null +++ b/docs/Get-ADOServiceHook.md @@ -0,0 +1,191 @@ + +Get-ADOServiceHook +------------------ +### Synopsis +Gets Azure DevOps Service Hooks + +--- +### Description + +Gets Azure DevOps Service Hook Subscriptions, Consumers, and Publishers. + +A subscription maps a publisher of events to a consumer of events. + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/hooks/subscriptions/list?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/hooks/subscriptions/list?view=azure-devops-rest-5.1) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/hooks/consumers/list?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/hooks/consumers/list?view=azure-devops-rest-5.1) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/hooks/consumers/list%20consumer%20actions?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/hooks/consumers/list%20consumer%20actions?view=azure-devops-rest-5.1) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/hooks/publishers/list?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/hooks/publishers/list?view=azure-devops-rest-5.1) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/hooks/publishers/list%20event%20types?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/hooks/publishers/list%20event%20types?view=azure-devops-rest-5.1) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +# Gets subscriptions. If none exist, nothing is returned. +Get-ADOServiceHook -Organization MyOrganization -PersonalAccessToken $pat +``` + +#### EXAMPLE 2 +```PowerShell +# Gets potential consumers +Get-ADOServiceHook -Organization MyOrganization -PersonalAccessToken $pat -Consumer +``` + +#### EXAMPLE 3 +```PowerShell +# Gets the actions of all consumers +Get-ADOServiceHook -Organization MyOrganization -PersonalAccessToken $pat -Consumer | + Get-ADOServiceHook -Action +``` + +#### EXAMPLE 4 +```PowerShell +# Gets potential publishers +Get-ADOServiceHook -Organization MyOrganization -PersonalAccessToken $pat -Publisher +``` + +#### EXAMPLE 5 +```PowerShell +# Gets the event types of all publishers +Get-ADOServiceHook -Organization MyOrganization -PersonalAccessToken $pat -Publisher| + Get-ADOServiceHook -EventType +``` + +--- +### Parameters +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Consumer** + +If set, will list consumers. Consumers can receive events from a publisher. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **ConsumerID** + +The Consumer ID. This can be provided to get details of an event consumer, or to list actions related to the event consumer. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Action** + +If set, will list actions available in a given event consumer. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Publisher** + +If set, will list publishers. Publishers can provide events to a consumer. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **PublisherID** + +The Publisher ID. This can be provided to get details of an event publisher, or to list actions related to the event publisher. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **EventType** + +If set, will list event types available from a given event publisher. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevops.Subscription + + +PSDevops.Consumer + + +PSDevops.Publisher + + +PSDevops.EventType + + +PSDevops.Action + + +--- +### Syntax +```PowerShell +Get-ADOServiceHook -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOServiceHook -Organization -Consumer [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOServiceHook -Organization -ConsumerID -Action [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOServiceHook -Organization -ConsumerID [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOServiceHook -Organization -Publisher [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOServiceHook -Organization -PublisherID -EventType [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOServiceHook -Organization -PublisherID [-Server ] [-ApiVersion ] [] +``` +--- + + From d02b301a65f077c12d66d0ca112f7fe279fed95f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:27 +0000 Subject: [PATCH 073/151] Updating Get-ADOTask.md --- docs/Get-ADOTask.md | 97 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 docs/Get-ADOTask.md diff --git a/docs/Get-ADOTask.md b/docs/Get-ADOTask.md new file mode 100644 index 00000000..ffcb77c1 --- /dev/null +++ b/docs/Get-ADOTask.md @@ -0,0 +1,97 @@ + +Get-ADOTask +----------- +### Synopsis +Gets Azure DevOps Tasks + +--- +### Description + +Gets Tasks and Task Groups from Azure DevOps + +--- +### Related Links +* [Convert-ADOPipeline](Convert-ADOPipeline.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOTask -Organization StartAutomating +``` + +#### EXAMPLE 2 +```PowerShell +Get-ADOTask -Organization StartAutomating -YAMLSchema +``` + +--- +### Parameters +#### **Organization** + +The organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Project** + +The project. Required to get task groups. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **TaskGroup** + +If set, will get task groups related to a project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **YAMLSchema** + +If set, will get the schema for YAML tasks within an organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +### Outputs +PSDevOps.Task + + +--- +### Syntax +```PowerShell +Get-ADOTask -Organization [-Server ] [] +``` +```PowerShell +Get-ADOTask -Organization -Project -TaskGroup [-Server ] [] +``` +```PowerShell +Get-ADOTask -Organization -YAMLSchema [-Server ] [] +``` +--- + + From a07d093a245b5ee4303599a00ccc7a34e95873a0 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:27 +0000 Subject: [PATCH 074/151] Updating Get-ADOTeam.md --- docs/Get-ADOTeam.md | 211 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 211 insertions(+) create mode 100644 docs/Get-ADOTeam.md diff --git a/docs/Get-ADOTeam.md b/docs/Get-ADOTeam.md new file mode 100644 index 00000000..a9cc5560 --- /dev/null +++ b/docs/Get-ADOTeam.md @@ -0,0 +1,211 @@ + +Get-ADOTeam +----------- +### Synopsis +Gets Azure DevOps Teams + +--- +### Description + +Gets teams from Azure DevOps or TFS + +--- +### Related Links +* [Get-ADOProject](Get-ADOProject.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOTeam -Organization StartAutomating +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Project** + +The project name or identifier + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **Mine** + +If set, will return teams in which the current user is a member. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **TeamID** + +The Team Identifier + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **Member** + +If set, will return members of a team. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **SecurityDescriptor** + +The Security Descriptor. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Identity** + +If set, will return the team identity. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Setting** + +If set, will return the team settings. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **FieldValue** + +If set, will return the team field values. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Iteration** + +If set, will return iterations for the team. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Board** + +If set, will list team workboards. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **SecurityGroup** + +If set, will list the security groups. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevOps.Team + + +PSDevOps.TeamMember + + +--- +### Syntax +```PowerShell +Get-ADOTeam -Organization [-Mine] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTeam -Organization [-Project ] [-TeamID ] -Identity [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTeam -Organization -Project -TeamID -Board [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTeam -Organization -Project -TeamID -Iteration [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTeam -Organization -Project -TeamID -FieldValue [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTeam -Organization -Project -TeamID -Setting [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTeam -Organization -Project -TeamID -Member [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTeam -Organization -Project -TeamID [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTeam -Organization -Project [-Mine] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTeam -Organization -Member -SecurityDescriptor [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTeam -Organization -SecurityGroup [-Server ] [-ApiVersion ] [] +``` +--- + + From f7b17c74866e2b165103d48f29b6019b6722319c Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:28 +0000 Subject: [PATCH 075/151] Updating Get-ADOTest.md --- docs/Get-ADOTest.md | 309 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 309 insertions(+) create mode 100644 docs/Get-ADOTest.md diff --git a/docs/Get-ADOTest.md b/docs/Get-ADOTest.md new file mode 100644 index 00000000..98af4d7d --- /dev/null +++ b/docs/Get-ADOTest.md @@ -0,0 +1,309 @@ + +Get-ADOTest +----------- +### Synopsis +Gets tests from Azure DevOps. + +--- +### Description + +Gets test plans, suites, points, and results from Azure DevOps or TFS. + +--- +### Related Links +* [Get-ADOProject](Get-ADOProject.md) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/test/runs/list](https://docs.microsoft.com/en-us/rest/api/azure/devops/test/runs/list) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/test/results/list](https://docs.microsoft.com/en-us/rest/api/azure/devops/test/results/list) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/test/test%20%20suites/list](https://docs.microsoft.com/en-us/rest/api/azure/devops/test/test%20%20suites/list) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/testplan/test%20%20suites/get%20test%20suites%20for%20plan](https://docs.microsoft.com/en-us/rest/api/azure/devops/testplan/test%20%20suites/get%20test%20suites%20for%20plan) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOProject -Organization StartAutomating -Project PSDevOps | + Get-ADOTest -Run +``` + +--- +### Parameters +#### **ProjectID** + +The project identifier. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **TestRun** + +If set, will return the test runs associated with a project. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **TestRunID** + +If set, will return results related to a specific test run. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **TestPlan** + +If set, will return the test plans associated with a project. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **TestPlanID** + +If set, will return results related to a specific test plan. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **TestVariable** + +If set, will return the test variables associated with a project. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **TestConfiguration** + +If set, will return the test variables associated with a project. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **TestSuite** + +If set, will list test suites related to a plan. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **TestSuiteID** + +If set, will return results related to a particular test suite. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **TestPoint** + +If set, will return test points within a suite. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **TestResult** + +If set, will return test results within a run. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **First** + +If set, will return the first N results within a test run. + + + +|Type |Requried|Postion|PipelineInput | +|-------------|--------|-------|---------------------| +|```[Int32]```|false |named |true (ByPropertyName)| +--- +#### **Total** + +If provided, will return the continue to return results of the maximum batch size until the total is reached. + + + +|Type |Requried|Postion|PipelineInput | +|-------------|--------|-------|---------------------| +|```[Int32]```|false |named |true (ByPropertyName)| +--- +#### **Skip** + +If set, will return the skip N results within a test run. + + + +|Type |Requried|Postion|PipelineInput | +|-------------|--------|-------|---------------------| +|```[Int32]```|false |named |true (ByPropertyName)| +--- +#### **Outcome** + +If provided, will only return test results with one of the provided outcomes. + + + +Valid Values: + +* Unspecified +* None +* Passed +* Failed +* Inconclusive +* Timeout +* Aborted +* Blocked +* NotExecuted +* Warning +* Error +* NotApplicable +* Passed +* InProgress +* NotImpacted +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **ResultDetail** + +Details to include with the test results. + + + +Valid Values: + +* None +* Iterations +* WorkItems +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **TestAttachment** + +If set, will return test attachments to a run. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Force** + +If set, will always retrieve fresh data. +By default, cached data will be returned. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevOps.Project + + +PSDevOps.Property + + +--- +### Syntax +```PowerShell +Get-ADOTest -ProjectID [-TestRun] -Organization [-Force] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTest -ProjectID -TestRunID -TestResult [-First ] [-Total ] [-Skip ] [-Outcome ] [-ResultDetail ] -Organization [-Force] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTest -ProjectID -TestRunID -TestAttachment -Organization [-Force] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTest -ProjectID -TestRunID -Organization [-Force] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTest -ProjectID -TestPlan -Organization [-Force] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTest -ProjectID -TestPlanID -TestSuiteID -TestPoint -Organization [-Force] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTest -ProjectID -TestPlanID -TestSuite -Organization [-Force] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTest -ProjectID -TestPlanID -Organization [-Force] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTest -ProjectID -TestVariable -Organization [-Force] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTest -ProjectID -TestConfiguration -Organization [-Force] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOTest -ProjectID -TestSuiteID -Organization [-Force] [-Server ] [-ApiVersion ] [] +``` +--- + + From f256d2d9b220a7a466bfa7e88cc6ca63c4bb6bd6 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:28 +0000 Subject: [PATCH 076/151] Updating Get-ADOUser.md --- docs/Get-ADOUser.md | 178 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 docs/Get-ADOUser.md diff --git a/docs/Get-ADOUser.md b/docs/Get-ADOUser.md new file mode 100644 index 00000000..7dcb8718 --- /dev/null +++ b/docs/Get-ADOUser.md @@ -0,0 +1,178 @@ + +Get-ADOUser +----------- +### Synopsis +Gets Azure DevOps Users + +--- +### Description + +Gets users from Azure DevOps. + +--- +### Related Links +* [Get-ADOTeam](Get-ADOTeam.md) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/graph/users/list?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/graph/users/list?view=azure-devops-rest-5.1) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/memberentitlementmanagement/user%20entitlements/search%20user%20entitlements](https://docs.microsoft.com/en-us/rest/api/azure/devops/memberentitlementmanagement/user%20entitlements/search%20user%20entitlements) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOUser -Organization StartAutomating +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **StorageKey** + +If set, will get details about a particular user storage key + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **MemberURL** + +If set, will get details about a particular member URL. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Project** + +The project name or identifier. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **TeamID** + +The Team Identifier + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Entitlement** + +If set, will get user entitlement data. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Filter** + +If provided, will filter user entitlement data. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **OrderBy** + +If provided, will order user entitlement data. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Select** + +If provided, will select given properties of user entitlement data. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **SubjectType** + +If provided, will get graph users of one or more subject types. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevOps.Team + + +PSDevOps.TeamMember + + +--- +### Syntax +```PowerShell +Get-ADOUser -Organization [-SubjectType ] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOUser -Organization -StorageKey [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOUser -Organization -MemberURL [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOUser -Organization [-Project ] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOUser -Organization -Project -TeamID [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOUser -Organization -Entitlement [-Filter ] [-OrderBy ] [-Select ] [-Server ] [-ApiVersion ] [] +``` +--- + + From a4cc5cc6ff81bcf26efd05e1516453d8cf37a07a Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:28 +0000 Subject: [PATCH 077/151] Updating Get-ADOWiki.md --- docs/Get-ADOWiki.md | 91 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 docs/Get-ADOWiki.md diff --git a/docs/Get-ADOWiki.md b/docs/Get-ADOWiki.md new file mode 100644 index 00000000..7ce09e29 --- /dev/null +++ b/docs/Get-ADOWiki.md @@ -0,0 +1,91 @@ + +Get-ADOWiki +----------- +### Synopsis +Gets Azure DevOps Wikis + +--- +### Description + +Gets Azure DevOps Wikis related to a project. + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/wiki/wikis/list](https://docs.microsoft.com/en-us/rest/api/azure/devops/wiki/wikis/list) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOWiki -Organization MyOrganization -Project MyProject -PersonalAccessToken $pat +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Project** + +The Project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **WikiID** + +The Wiki Identifier. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevOps.Wiki + + +--- +### Syntax +```PowerShell +Get-ADOWiki -Organization -Project [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWiki -Organization -Project -WikiID [-Server ] [-ApiVersion ] [] +``` +--- + + From 565ca9cb7390b84a25168bffedb4fa82b3f465c5 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:28 +0000 Subject: [PATCH 078/151] Updating Get-ADOWorkItem.md --- docs/Get-ADOWorkItem.md | 304 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 304 insertions(+) create mode 100644 docs/Get-ADOWorkItem.md diff --git a/docs/Get-ADOWorkItem.md b/docs/Get-ADOWorkItem.md new file mode 100644 index 00000000..9aa99d21 --- /dev/null +++ b/docs/Get-ADOWorkItem.md @@ -0,0 +1,304 @@ + +Get-ADOWorkItem +--------------- +### Synopsis +Gets work items from Azure DevOps + +--- +### Description + +Gets work item from Azure DevOps or Team Foundation Server. + +--- +### Related Links +* [Invoke-ADORestAPI](Invoke-ADORestAPI.md) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/work%20items/get%20work%20item?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/work%20items/get%20work%20item?view=azure-devops-rest-5.1) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/wiql/query%20by%20wiql?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/wiql/query%20by%20wiql?view=azure-devops-rest-5.1) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOWorkItem -Organization StartAutomating -Project PSDevOps -ID 1 +``` + +#### EXAMPLE 2 +```PowerShell +Get-ADOWorkItem -Organization StartAutomating -Project PSDevOps -Query 'Select [System.ID] from WorkItems' +``` + +--- +### Parameters +#### **Title** + +The Work Item Title + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Query** + +A query. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **Mine** + +Gets work items assigned to me. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **CurrentIteration** + +Gets work items in the current iteration. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **NoDetail** + +If set, queries will output the IDs of matching work items. +If not provided, details will be retreived for all work items. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **ID** + +The Work Item ID + + + +|Type |Requried|Postion|PipelineInput | +|-------------|--------|-------|---------------------| +|```[Int32]```|true |named |true (ByPropertyName)| +--- +#### **Comment** + +If set, will get comments related to a work item. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Revision** + +If set, will get revisions of a work item. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Update** + +If set, will get updates of a work item. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Project** + +The Project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Team** + +The Team. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **First** + +If provided, will only return the first N results from a query. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[UInt32]```|false |named |true (ByPropertyName)| +--- +#### **WorkItemType** + +If set, will return work item types. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **SharedQuery** + +If set, will return work item shared queries + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **IncludeDeleted** + +If set, will return shared queries that have been deleted. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Depth** + +If provided, will return shared queries up to a given depth. + + + +|Type |Requried|Postion|PipelineInput | +|-------------|--------|-------|---------------------| +|```[Int32]```|false |named |true (ByPropertyName)| +--- +#### **SharedQueryFilter** + +If provided, will filter the shared queries returned + + + +|Type |Requried|Postion|PipelineInput | +|-------------|--------|-------|---------------------| +|```[Int32]```|false |named |true (ByPropertyName)| +--- +#### **ExpandSharedQuery** + +Determines how data from shared queries will be expanded. By default, expands all data. + + + +Valid Values: + +* All +* Clauses +* Minimal +* None +* Wiql +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Field** + +One or more fields. + + + +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[String[]]```|false |named |false | +--- +#### **Related** + +If set, will get related items + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevOps.WorkItem + + +--- +### Syntax +```PowerShell +Get-ADOWorkItem [-Title ] [-Mine] [-CurrentIteration] -ID -Organization [-Project ] [-Field ] [-Related] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkItem [-Title ] [-Query] [-Mine] [-CurrentIteration] [-NoDetail] -Organization [-Project ] [-Team ] [-First ] [-Field ] [-Related] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkItem [-Title ] [-Mine] [-CurrentIteration] [-ID ] -Update -Organization [-Project ] [-Field ] [-Related] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkItem [-Title ] [-Mine] [-CurrentIteration] [-ID ] -Revision -Organization [-Project ] [-Field ] [-Related] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkItem [-Title ] [-Mine] [-CurrentIteration] [-ID ] -Organization [-Project ] [-Field ] [-Related] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkItem [-Title ] [-Mine] [-CurrentIteration] -Comment -Organization [-Project ] [-Field ] [-Related] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkItem [-Title ] [-Mine] [-CurrentIteration] -Organization [-Project ] [-First ] -SharedQuery [-IncludeDeleted] [-Depth ] [-SharedQueryFilter ] [-ExpandSharedQuery ] [-Field ] [-Related] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkItem [-Title ] [-Mine] [-CurrentIteration] -Organization [-Project ] -WorkItemType [-Field ] [-Related] [-Server ] [-ApiVersion ] [] +``` +--- + + From 95979a1f17a3f349ad152b95b1a032d504d08cca Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:28 +0000 Subject: [PATCH 079/151] Updating Get-ADOWorkItemType.md --- docs/Get-ADOWorkItemType.md | 218 ++++++++++++++++++++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 docs/Get-ADOWorkItemType.md diff --git a/docs/Get-ADOWorkItemType.md b/docs/Get-ADOWorkItemType.md new file mode 100644 index 00000000..13ce7c82 --- /dev/null +++ b/docs/Get-ADOWorkItemType.md @@ -0,0 +1,218 @@ + +Get-ADOWorkItemType +------------------- +### Synopsis +Gets work item types + +--- +### Description + +Gets work item types from Azure DevOps + +--- +### Related Links +* [Get-ADOWorkProcess](Get-ADOWorkProcess.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOWorkProcess -Organization StartAutomating -Project PSDevOps | + Get-ADOWorkItemType +``` + +#### EXAMPLE 2 +```PowerShell +Get-ADOWorkItemType -Organization StartAutomating -Icon +``` + +#### EXAMPLE 3 +```PowerShell +Get-ADOWorkItemType -Organization StartAutomating -Project PSDevOps +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **ProcessID** + +The ProcessID. This is returned from Get-ADOWorkProcess. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **ReferenceName** + +The Reference Name of the Work Item Type. This can be provided by piping Get-ADOWorkItemType to itself. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Layout** + +If set, will get the layout associated with a given work item type. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Page** + +If set, will get the pages within a given work item type layout. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **State** + +If set, will get the states associated with a given work item type. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Rule** + +If set, will get the rules associated with a given work item type. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Behavior** + +If set, will get the behaviors associated with a given work item type. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Field** + +If set, will get the fields associated with a given work item type. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Project** + +The name of the project. If provided, will get work item type information related to the project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Icon** + +If set, will get work item icons available to the organization. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevOps.WorkItemType + + +PSDevOps.State + + +PSDevOps.Rule + + +PSDevOps.Behavior + + +PSDevOps.Layout + + +PSDevOps.ProcessField + + +--- +### Syntax +```PowerShell +Get-ADOWorkItemType -Organization -ProcessID -ReferenceName -Behavior [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkItemType -Organization -ProcessID -ReferenceName -Field [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkItemType -Organization -ProcessID -ReferenceName -Rule [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkItemType -Organization -ProcessID -ReferenceName -State [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkItemType -Organization -ProcessID -ReferenceName -Layout [-Page] [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkItemType -Organization -ProcessID -ReferenceName [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkItemType -Organization -ProcessID [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkItemType -Organization -Project [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkItemType -Organization -Icon [-Server ] [-ApiVersion ] [] +``` +--- + + From 8b5c6c3b48be655c61afea6ad66220bf7227aba5 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:28 +0000 Subject: [PATCH 080/151] Updating Get-ADOWorkProcess.md --- docs/Get-ADOWorkProcess.md | 125 +++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 docs/Get-ADOWorkProcess.md diff --git a/docs/Get-ADOWorkProcess.md b/docs/Get-ADOWorkProcess.md new file mode 100644 index 00000000..6dea8cc6 --- /dev/null +++ b/docs/Get-ADOWorkProcess.md @@ -0,0 +1,125 @@ + +Get-ADOWorkProcess +------------------ +### Synopsis +Gets work processes from ADO. + +--- +### Description + +Gets work processes from Azure DevOps. + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/processes/processes/list?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/processes/processes/list?view=azure-devops-rest-5.1) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOWorkProcess -Organization StartAutomating -PersonalAccessToken $pat +``` + +#### EXAMPLE 2 +```PowerShell +Get-ADOProject -Organization StartAutomating -PersonalAccessToken $pat | Get-ADOWorkProcess +``` + +--- +### Parameters +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **ProjectID** + +The Project Identifier. If this is provided, will get the work process associated with that project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **ProcessID** + +The process identifier + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **WorkItemType** + +If set, will list work item types in a given Work process. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Behavior** + +If set, will list behaviors associated with a given work process. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +PSDevOps.WorkProcess + + +--- +### Syntax +```PowerShell +Get-ADOWorkProcess -Organization [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkProcess -Organization -ProjectID [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkProcess -Organization -ProcessID -Behavior [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkProcess -Organization -ProcessID -WorkItemType [-Server ] [-ApiVersion ] [] +``` +```PowerShell +Get-ADOWorkProcess -Organization -ProcessID [-Server ] [-ApiVersion ] [] +``` +--- + + From 2d08ca9baa5dbf7af7534940a4bcb531543e2906 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:28 +0000 Subject: [PATCH 081/151] Updating Get-BuildStep.md --- docs/Get-BuildStep.md | 77 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 docs/Get-BuildStep.md diff --git a/docs/Get-BuildStep.md b/docs/Get-BuildStep.md new file mode 100644 index 00000000..8030c119 --- /dev/null +++ b/docs/Get-BuildStep.md @@ -0,0 +1,77 @@ + +Get-BuildStep +------------- +### Synopsis +Gets BuildSteps + +--- +### Description + +Gets Build Steps. + +Build Steps are scripts or data fragments used to compose a build. + +--- +### Related Links +* [Import-BuildStep](Import-BuildStep.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-BuildStep +``` + +--- +### Parameters +#### **Name** + +If provided, only return build steps that are like this name. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |1 |true (ByPropertyName)| +--- +#### **Extension** + +If provided, only return build steps matching this extension. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |2 |true (ByPropertyName)| +--- +#### **Type** + +If provided, only return build steps of a given type. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |3 |true (ByPropertyName)| +--- +#### **BuildSystem** + +If provided, only return build steps for a given build system. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |4 |true (ByPropertyName)| +--- +### Outputs +PSDevOps.BuildStep + + +--- +### Syntax +```PowerShell +Get-BuildStep [[-Name] ] [[-Extension] ] [[-Type] ] [[-BuildSystem] ] [] +``` +--- + + From f3b01b680573a6b6351d58dcfcdf4fa5701cb884 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:28 +0000 Subject: [PATCH 082/151] Updating Get-PSDevOps.md --- docs/Get-PSDevOps.md | 106 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 docs/Get-PSDevOps.md diff --git a/docs/Get-PSDevOps.md b/docs/Get-PSDevOps.md new file mode 100644 index 00000000..1e80d8a8 --- /dev/null +++ b/docs/Get-PSDevOps.md @@ -0,0 +1,106 @@ + +Get-PSDevOps +------------ +### Synopsis +Gets PSDevOps commands. + +--- +### Description + +Gets PSDevOps commands. + +PSDevOps commands are self-contained scripts that complete end-to-end scenarios. + +They are traditionally named with the patterns *.*.ps1 or *.*.*.ps1. + +For example: + *.psdevops.ps1 files are used to run commands in PSDevOps. + *.GitHubAction.PSDevOps.ps1 would indicate creating a GitHubAction. + *.tests.ps1 files are used by Pester + *.ezout|ezformat|format|view.ps1 files are used by EZOut + +To name a few examples of where the technique is used. + +Using Get-PSDevOps will return extended command information and addtional methods. + +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-PSDevOps # Get *.*.ps1 commands in the current directory +``` + +#### EXAMPLE 2 +```PowerShell +Get-Module PSDevops | Get-PSDevOps # Gets related commands +``` + +--- +### Parameters +#### **Name** + +The name of the script. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |1 |true (ByPropertyName)| +--- +#### **ScriptPath** + +One or more paths to scripts. +If these paths resolve to directories, all files that match \.(?.+)\.ps1$ +If the paths resolve to scripts or commands + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |2 |true (ByPropertyName)| +--- +#### **ModuleInfo** + +One or more modules. This can be passed via the pipeline, for example: +Get-Module PSDevOps | Get-PSDevOps + + + +|Type |Requried|Postion|PipelineInput | +|----------------------|--------|-------|------------------------------| +|```[PSModuleInfo[]]```|false |3 |true (ByValue, ByPropertyName)| +--- +#### **Pattern** + +The Regular Expression Pattern used to search for files. +If a -Pattern is provided, named capture groups in that pattern will become noteproperties of the output object. +By default: + (?\.\w+.)?\.(?\w+)\.ps1$ + This roughly translates as: + Any *.*.ps1 file + The Named Capture 'Type' the type of .ps1 + The Optional Named Capture, Subtype, will match an additional '.Something' + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |4 |false | +--- +#### **Recurse** + +If set, will search directories recursively. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +### Syntax +```PowerShell +Get-PSDevOps [[-Name] ] [[-ScriptPath] ] [[-ModuleInfo] ] [[-Pattern] ] [-Recurse] [] +``` +--- + + From adcd01dfc7f1cc8535cc9976a55efa51e817e5ef Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:28 +0000 Subject: [PATCH 083/151] Updating Hide-GitHubOutput.md --- docs/Hide-GitHubOutput.md | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 docs/Hide-GitHubOutput.md diff --git a/docs/Hide-GitHubOutput.md b/docs/Hide-GitHubOutput.md new file mode 100644 index 00000000..d8cd47ad --- /dev/null +++ b/docs/Hide-GitHubOutput.md @@ -0,0 +1,47 @@ + +Hide-GitHubOutput +----------------- +### Synopsis +Masks output + +--- +### Description + +Prevents a message from being printed in a GitHub Workflow log. + +--- +### Related Links +* [Write-GitHubOutput](Write-GitHubOutput.md) +* [https://docs.github.com/en/actions/reference/workflow-commands-for-GitHubhub-actions](https://docs.github.com/en/actions/reference/workflow-commands-for-GitHubhub-actions) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Hide-GitHubOutput 'IsItSecret?' +'IsItSecret?' | Out-Host +``` + +--- +### Parameters +#### **Message** + +The message to hide. Any time this string would appear in logs, it will be replaced by asteriks. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +### Outputs +System.String + + +--- +### Syntax +```PowerShell +Hide-GitHubOutput [-Message] [] +``` +--- + + From 9ea1523bf46c64512813b6305a6c592c8bc96bb5 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:29 +0000 Subject: [PATCH 084/151] Updating Import-ADOProxy.md --- docs/Import-ADOProxy.md | 132 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 docs/Import-ADOProxy.md diff --git a/docs/Import-ADOProxy.md b/docs/Import-ADOProxy.md new file mode 100644 index 00000000..0d7a086e --- /dev/null +++ b/docs/Import-ADOProxy.md @@ -0,0 +1,132 @@ + +Import-ADOProxy +--------------- +### Synopsis +Imports an Azure DevOps Proxy + +--- +### Description + +Imports a Proxy Module for Azure DevOps or TFS. + +A Proxy module will wrap all commands, but will always provide one or more default parameters. + +--- +### Related Links +* [Connect-ADO](Connect-ADO.md) +* [Disconnect-ADO](Disconnect-ADO.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Import-ADOProxy -Organization StartAutomating +``` + +#### EXAMPLE 2 +```PowerShell +Import-ADOProxy -Organization StartAutomating -Prefix SA +``` + +#### EXAMPLE 3 +```PowerShell +Import-ADOProxy -Organization StartAutomating -Project PSDevOps -IncludeCommand *Build* -Prefix SADO +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **Project** + +The project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |2 |true (ByPropertyName)| +--- +#### **Server** + +The server. This can be used to provide a TFS instance + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |3 |true (ByPropertyName)| +--- +#### **Prefix** + +The prefix for all commands in the proxy module. +If not provided, this will be the -Server + -Organization + -Project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |4 |true (ByPropertyName)| +--- +#### **IncludeCommand** + +A list of command wildcards to include. By default, all applicable commands. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |5 |true (ByPropertyName)| +--- +#### **ExcludeCommand** + +A list of commands to exclude. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |6 |true (ByPropertyName)| +--- +#### **PassThru** + +If set, will return the imported module. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **Force** + +If set, will unload a previously loaded copy of the module. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +### Outputs +System.Nullable + + +System.Management.Automation.PSModuleInfo + + +--- +### Syntax +```PowerShell +Import-ADOProxy [-Organization] [[-Project] ] [[-Server] ] [[-Prefix] ] [[-IncludeCommand] ] [[-ExcludeCommand] ] [-PassThru] [-Force] [] +``` +--- + + From a87c877ced80423695ebc0125fcecdcccb3793ca Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:29 +0000 Subject: [PATCH 085/151] Updating Import-BuildStep.md --- docs/Import-BuildStep.md | 120 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 docs/Import-BuildStep.md diff --git a/docs/Import-BuildStep.md b/docs/Import-BuildStep.md new file mode 100644 index 00000000..1a2d9740 --- /dev/null +++ b/docs/Import-BuildStep.md @@ -0,0 +1,120 @@ + +Import-BuildStep +---------------- +### Synopsis +Imports Build Steps + +--- +### Description + +Imports Build Steps defined in a module. + +--- +### Related Links +* [Convert-BuildStep](Convert-BuildStep.md) +* [Expand-BuildStep](Expand-BuildStep.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Import-BuildStep -ModuleName PSDevOps +``` + +--- +### Parameters +#### **ModuleName** + +The name of the module containing build steps. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **SourcePath** + +The source path. This path contains definitions for a given single build system. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **IncludeCommand** + +A list of commands to include. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **ExcludeCommand** + +A list of commands to exclude + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **BuildSystem** + +The different build systems supported. +Each buildsystem is the name of a subdirectory that can contain steps or other components. + + + +Valid Values: + +* ADOPipeline +* ADOExtension +* GitHubAction +* GitHubWorkflow +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[String[]]```|false |named |false | +--- +#### **BuildSystemAlias** + +A list of valid directory aliases for a given build system. +By default, ADOPipelines can exist within a directory named ADOPipeline, ADO, AzDO, or AzureDevOps. +By default, GitHubWorkflows can exist within a directory named GitHubWorkflow, GitHubWorkflows, or GitHub. + + + +|Type |Requried|Postion|PipelineInput| +|-------------------|--------|-------|-------------| +|```[IDictionary]```|false |named |false | +--- +#### **BuildSystemInclude** + +|Type |Requried|Postion|PipelineInput| +|-------------------|--------|-------|-------------| +|```[IDictionary]```|false |named |false | +--- +#### **BuildCommandType** + +|Type |Requried|Postion|PipelineInput| +|-------------------|--------|-------|-------------| +|```[IDictionary]```|false |named |false | +--- +### Outputs +System.Nullable + + +--- +### Syntax +```PowerShell +Import-BuildStep -ModuleName [-IncludeCommand ] [-ExcludeCommand ] [-BuildSystem ] [-BuildSystemAlias ] [-BuildSystemInclude ] [-BuildCommandType ] [] +``` +```PowerShell +Import-BuildStep -SourcePath [-BuildSystem ] [-BuildSystemAlias ] [-BuildSystemInclude ] [-BuildCommandType ] [] +``` +--- + + From 3e10114e0d732ffc2fb1b1d9d8ed9f775636f2a6 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:29 +0000 Subject: [PATCH 086/151] Updating Install-ADOExtension.md --- docs/Install-ADOExtension.md | 112 +++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 docs/Install-ADOExtension.md diff --git a/docs/Install-ADOExtension.md b/docs/Install-ADOExtension.md new file mode 100644 index 00000000..84300b1d --- /dev/null +++ b/docs/Install-ADOExtension.md @@ -0,0 +1,112 @@ + +Install-ADOExtension +-------------------- +### Synopsis +Installs Azure DevOps Extensions + +--- +### Description + +Installs Azure DevOps Extensions from the Marketplace + +--- +### Related Links +* [Get-ADOExtension](Get-ADOExtension.md) +* [Uninstall-ADOExtension](Uninstall-ADOExtension.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Install-ADOExtension -PublisherID YodLabs -ExtensionID yodlabs-githubstats -Organization MyOrg +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **PublisherID** + +The Publisher of an Extension. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |2 |true (ByPropertyName)| +--- +#### **ExtensionID** + +The name of the Extension. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |3 |true (ByPropertyName)| +--- +#### **Version** + +The version of the extension. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |4 |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |5 |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |6 |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.Extension + + +--- +### Syntax +```PowerShell +Install-ADOExtension [-Organization] [-PublisherID] [-ExtensionID] [[-Version] ] [[-Server] ] [[-ApiVersion] ] [-WhatIf] [-Confirm] [] +``` +--- + + From e7d22d65f17587607eace1550d9d47135c3b7784 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:29 +0000 Subject: [PATCH 087/151] Updating Invoke-ADORestAPI.md --- docs/Invoke-ADORestAPI.md | 284 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 284 insertions(+) create mode 100644 docs/Invoke-ADORestAPI.md diff --git a/docs/Invoke-ADORestAPI.md b/docs/Invoke-ADORestAPI.md new file mode 100644 index 00000000..5241cf99 --- /dev/null +++ b/docs/Invoke-ADORestAPI.md @@ -0,0 +1,284 @@ + +Invoke-ADORestAPI +----------------- +### Synopsis +Invokes the ADO Rest API + +--- +### Description + +Invokes the Azure DevOps REST API + +--- +### Related Links +* [Invoke-RestMethod](https://docs.microsoft.com/powershell/module/Microsoft.PowerShell.Utility/Invoke-RestMethod) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +# Uses the Azure DevOps REST api to get builds from a project +$org = 'StartAutomating' +$project = 'PSDevOps' +Invoke-ADORestAPI "https://dev.azure.com/$org/$project/_apis/build/builds/?api-version=5.1" +``` + +--- +### Parameters +#### **Uri** + +The REST API Url + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|true |1 |true (ByPropertyName)| +--- +#### **Method** + +Specifies the method used for the web request. The acceptable values for this parameter are: + - Default + - Delete + - Get + - Head + - Merge + - Options + - Patch + - Post + - Put + - Trace + + + +Valid Values: + +* GET +* DELETE +* HEAD +* MERGE +* OPTIONS +* PATCH +* POST +* PUT +* TRACE +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Body** + +Specifies the body of the request. +If this value is a string, it will be passed as-is +Otherwise, this value will be converted into JSON. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Object]```|false |named |true (ByPropertyName)| +--- +#### **UrlParameter** + +Parameters provided as part of the URL (in segments or a query string). + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |named |true (ByPropertyName)| +--- +#### **QueryParameter** + +Additional parameters provided after the URL. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |named |true (ByPropertyName)| +--- +#### **ContentType** + +Specifies the content type of the web request. +If this parameter is omitted and the request method is POST, Invoke-RestMethod sets the content type to application/x-www-form-urlencoded. Otherwise, the content type is not specified in the call. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Headers** + +Specifies the headers of the web request. Enter a hash table or dictionary. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |named |true (ByPropertyName)| +--- +#### **PersonalAccessToken** + +A Personal Access Token + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **Credential** + +Specifies a user account that has permission to send the request. The default is the current user. +Type a user name, such as User01 or Domain01\User01, or enter a PSCredential object, such as one generated by the Get-Credential cmdlet. + + + +|Type |Requried|Postion|PipelineInput| +|--------------------|--------|-------|-------------| +|```[PSCredential]```|false |named |false | +--- +#### **UseDefaultCredentials** + +Indicates that the cmdlet uses the credentials of the current user to send the web request. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **ContinuationToken** + +A continuation token. This is appended as a query parameter, and can be used to continue a request. +Invoke-ADORestAPI will call recursively invoke itself until a response does not have a ContinuationToken + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **PSTypeName** + +The typename of the results. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **Property** + +A set of additional properties to add to an object + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |named |true (ByPropertyName)| +--- +#### **RemoveProperty** + +A list of property names to remove from an object + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **ExpandProperty** + +If provided, will expand a given property returned from the REST api. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **DecorateProperty** + +If provided, will decorate the values within a property in the return object. +This allows nested REST properties to work with the PowerShell Extended Type System. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |named |true (ByPropertyName)| +--- +#### **Cache** + +If set, will cache results from a request. Only HTTP GET results will be cached. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **AsByte** + +If set, will return results as a byte array. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **AsJob** + +If set, will run as a background job. +This parameter will be ignored if the caller is piping the results of Invoke-ADORestAPI. +This parameter will also be ignore when calling with -DynamicParameter or -MapParameter. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **DynamicParameter** + +If set, will get the dynamic parameters that should be provided to any function that wraps Invoke-ADORestApi + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **MapParameter** + +If set, will return the parameters for any function that can be passed to Invoke-ADORestApi. +Unmapped parameters will be added as a noteproperty of the returned dictionary. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|true |named |true (ByPropertyName)| +--- +### Outputs +System.Management.Automation.PSObject + + +--- +### Syntax +```PowerShell +Invoke-ADORestAPI [-Uri] [-Method ] [-Body ] [-UrlParameter ] [-QueryParameter ] [-ContentType ] [-Headers ] [-PersonalAccessToken ] [-Credential ] [-UseDefaultCredentials] [-ContinuationToken ] [-PSTypeName ] [-Property ] [-RemoveProperty ] [-ExpandProperty ] [-DecorateProperty ] [-Cache] [-AsByte] [-AsJob] [] +``` +```PowerShell +Invoke-ADORestAPI [-PersonalAccessToken ] [-Credential ] [-UseDefaultCredentials] [-Cache] [-AsByte] [-AsJob] -DynamicParameter [] +``` +```PowerShell +Invoke-ADORestAPI [-PersonalAccessToken ] [-Credential ] [-UseDefaultCredentials] [-Cache] [-AsByte] [-AsJob] -MapParameter [] +``` +--- + + From 59a46b5fe16546bf750d0d49c14e1ca1f9798d1e Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:29 +0000 Subject: [PATCH 088/151] Updating Invoke-GitHubRestAPI.md --- docs/Invoke-GitHubRestAPI.md | 284 +++++++++++++++++++++++++++++++++++ 1 file changed, 284 insertions(+) create mode 100644 docs/Invoke-GitHubRestAPI.md diff --git a/docs/Invoke-GitHubRestAPI.md b/docs/Invoke-GitHubRestAPI.md new file mode 100644 index 00000000..65a7715f --- /dev/null +++ b/docs/Invoke-GitHubRestAPI.md @@ -0,0 +1,284 @@ + +Invoke-GitHubRestAPI +-------------------- +### Synopsis +Invokes the Git Rest API + +--- +### Description + +Invokes the GitHub REST API + +--- +### Related Links +* [Invoke-RestMethod](https://docs.microsoft.com/powershell/module/Microsoft.PowerShell.Utility/Invoke-RestMethod) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +# Uses the Azure DevOps REST api to get builds from a project +$org = 'StartAutomating' +$repo = 'PSDevOps' +Invoke-GitRestAPI "https://api.github.com/repos/StartAutomating/PSDevOps" +``` + +--- +### Parameters +#### **Uri** + +The REST API Url + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **Method** + +Specifies the method used for the web request. The acceptable values for this parameter are: + - Default + - Delete + - Get + - Head + - Merge + - Options + - Patch + - Post + - Put + - Trace + + + +Valid Values: + +* GET +* DELETE +* HEAD +* MERGE +* OPTIONS +* PATCH +* POST +* PUT +* TRACE +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Body** + +Specifies the body of the request. +If this value is a string, it will be passed as-is +Otherwise, this value will be converted into JSON. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Object]```|false |named |true (ByPropertyName)| +--- +#### **UrlParameter** + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |named |true (ByPropertyName)| +--- +#### **QueryParameter** + +Additional parameters provided in the query string. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |named |true (ByPropertyName)| +--- +#### **PersonalAccessToken** + +A Personal Access Token + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Page** + +The page number. If provided, will only get one page of results. +If this is not provided, additional results will be fetched until they are exhausted. + + + +|Type |Requried|Postion|PipelineInput| +|-------------|--------|-------|-------------| +|```[Int32]```|false |named |false | +--- +#### **PerPage** + +The number of items to retreive on a single page. + + + +|Type |Requried|Postion|PipelineInput| +|-------------|--------|-------|-------------| +|```[Int32]```|false |named |false | +--- +#### **PSTypeName** + +The typename of the results. +If not set, will be the depluralized last non-variable segment of a URL. +(i.e. "https://api.github.com/user/repos" would use a typename of 'repos' +so would: "https://api.github.com/users/{UserName}/repos") + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **Property** + +A set of additional properties to add to an object + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |named |true (ByPropertyName)| +--- +#### **RemoveProperty** + +A list of property names to remove from an object + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **ExpandProperty** + +If provided, will expand a given property returned from the REST api. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **DecorateProperty** + +If provided, will decorate the values within a property in the return object. +This allows nested REST properties to work with the PowerShell Extended Type System. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |named |true (ByPropertyName)| +--- +#### **Cache** + +If set, will cache results from a request. Only HTTP GET results will be cached. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **AsJob** + +If set, will run as a background job. +This parameter will be ignored if the caller is piping the results of Invoke-ADORestAPI. +This parameter will also be ignore when calling with -DynamicParameter or -MapParameter. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **DynamicParameter** + +If set, will get the dynamic parameters that should be provided to any function that wraps Invoke-ADORestApi + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **MapParameter** + +If set, will return the parameters for any function that can be passed to Invoke-ADORestApi. +Unmapped parameters will be added as a noteproperty of the returned dictionary. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|true |named |true (ByPropertyName)| +--- +#### **GitApiUrl** + +The GitAPIUrl +This will used if -Uri does not contain a hostname. +It will default to $env:GIT_API_URL if it is set, otherwise 'https://api.github.com/' + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ContentType** + +Specifies the content type of the web request. +If this parameter is omitted and the request method is POST, Invoke-RestMethod sets the content type to application/x-www-form-urlencoded. Otherwise, the content type is not specified in the call. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Headers** + +Specifies the headers of the web request. Enter a hash table or dictionary. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |named |true (ByPropertyName)| +--- +#### **UserAgent** + +Provides a custom user agent. GitHub API requests require a User Agent. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +### Outputs +System.Management.Automation.PSObject + + +--- +### Syntax +```PowerShell +Invoke-GitHubRestAPI [-Uri ] [-Method ] [-Body ] [-UrlParameter ] [-QueryParameter ] [-PersonalAccessToken ] [-Page ] [-PerPage ] [-PSTypeName ] [-Property ] [-RemoveProperty ] [-ExpandProperty ] [-DecorateProperty ] [-Cache] [-AsJob] [-GitApiUrl ] [-ContentType ] [-Headers ] [-UserAgent ] [] +``` +```PowerShell +Invoke-GitHubRestAPI [-PersonalAccessToken ] [-Cache] [-AsJob] -DynamicParameter [] +``` +```PowerShell +Invoke-GitHubRestAPI [-PersonalAccessToken ] [-Cache] [-AsJob] -MapParameter [] +``` +--- + + From e0986973bcf4b3f65ad1f20ce9cbcc9380413c03 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:29 +0000 Subject: [PATCH 089/151] Updating New-ADOArtifactFeed.md --- docs/New-ADOArtifactFeed.md | 239 ++++++++++++++++++++++++++++++++++++ 1 file changed, 239 insertions(+) create mode 100644 docs/New-ADOArtifactFeed.md diff --git a/docs/New-ADOArtifactFeed.md b/docs/New-ADOArtifactFeed.md new file mode 100644 index 00000000..8cc3c16a --- /dev/null +++ b/docs/New-ADOArtifactFeed.md @@ -0,0 +1,239 @@ + +New-ADOArtifactFeed +------------------- +### Synopsis +Creates artifact feeds and views in Azure DevOps + +--- +### Description + +Creates artifact feeds and feed views in Azure DevOps. + +Artifact feeds are used to publish packages. + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/artifacts/feed%20%20management/create%20feed?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/artifacts/feed%20%20management/create%20feed?view=azure-devops-rest-5.1) +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/artifacts/feed%20%20management/create%20feed%20view?view=azure-devops-rest-5.1#feedvisibility](https://docs.microsoft.com/en-us/rest/api/azure/devops/artifacts/feed%20%20management/create%20feed%20view?view=azure-devops-rest-5.1#feedvisibility) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +New-ADOArtifactFeed -Organization MyOrg -Project MyProject -Name Builds -Description "Builds of MyProject" +``` + +--- +### Parameters +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Project** + +The Project + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Name** + +The Feed Name +?<> -LiteralCharacter '|?/\:&$*"[]>' -CharacterClass Whitespace -Not -Repeat -StartAnchor StringStart -EndAnchor StringEnd + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Description** + +The feed description. +?<> -CharacterClass Any -Min 1 -Max 255 -StartAnchor StringStart -EndAnchor StringEnd + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **NoBadge** + +If set, this feed will not support the generation of package badges. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **PublicUpstream** + +If provided, will allow upstream sources from public repositories. +Upstream sources allow your packages to depend on packages in public repositories or private feeds. + + + +Valid Values: + +* NPM +* NuGet +* PyPi +* Maven +* PowerShellGallery +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **UpstreamSource** + +A property bag describing upstream sources + + + +|Type |Requried|Postion|PipelineInput | +|------------------|--------|-------|---------------------| +|```[PSObject[]]```|false |named |true (ByPropertyName)| +--- +#### **AllowConflictUpstream** + +If set, will allow package names to conflict with the names of packages upstream. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **IsReadOnly** + +If set, all packages in the feed are immutable. +It is important to note that feed views are immutable; therefore, this flag will always be set for views. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **FeedID** + +The feed id. This can be supplied to create a veiw for a particular feed. + + + +|Type |Requried|Postion|PipelineInput | +|------------|--------|-------|---------------------| +|```[Guid]```|false |named |true (ByPropertyName)| +--- +#### **ShowDeletedPackageVersions** + +If set, the feed will not hide all deleted/unpublished versions + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **FeedRole** + +The Feed Role + + + +Valid Values: + +* Administrator +* Collaborator +* Contributor +* Reader +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **View** + +If set, will create a new view for an artifact feed. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|true |named |true (ByPropertyName)| +--- +#### **ViewVisibility** + +The visibility of the view. By default, the view will be visible to the entire organization. + + + +Valid Values: + +* Collection +* Organization +* Private +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://feeds.dev.azure.com/. + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.ArtifactFeed + + +PSDevOps.ArtifactFeed.View + + +--- +### Syntax +```PowerShell +New-ADOArtifactFeed -Organization [-Project ] -Name [-Description ] [-NoBadge] [-PublicUpstream ] [-UpstreamSource ] [-AllowConflictUpstream] [-IsReadOnly] [-FeedID ] [-ShowDeletedPackageVersions] [-FeedRole ] [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +```PowerShell +New-ADOArtifactFeed -Organization [-Project ] -Name -FeedID -View [-ViewVisibility ] [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +--- + + From 5f0b7b9bdc33fb955291281ab2d7e58f3b496528 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:29 +0000 Subject: [PATCH 090/151] Updating New-ADOBuild.md --- docs/New-ADOBuild.md | 230 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 230 insertions(+) create mode 100644 docs/New-ADOBuild.md diff --git a/docs/New-ADOBuild.md b/docs/New-ADOBuild.md new file mode 100644 index 00000000..96777f44 --- /dev/null +++ b/docs/New-ADOBuild.md @@ -0,0 +1,230 @@ + +New-ADOBuild +------------ +### Synopsis +Creates Azure DevOps Build Definitions + +--- +### Description + +Creates Build Definitions in Azure DevOps. + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/build/definitions/create](https://docs.microsoft.com/en-us/rest/api/azure/devops/build/definitions/create) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +New-ADOBuild -Organization StartAutomating -Project PSDevops -Name PSDevOps_CI -Repository @{ + id = 'StartAutomating/PSDevOps' + type = 'GitHub' + name = 'StartAutomating/PSDevOps' + url = 'https://github.com/StartAutomating/PSDevOps.git' + defaultBranch = 'master' + properties = @{ + connectedServiceId = '2b65e3be-c457-4d61-b457-d883fb231ff2' + } +} -YAMLFilename azure-pipelines.yml +``` + +--- +### Parameters +#### **Organization** + +The Organization. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **Project** + +The Project + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |2 |true (ByPropertyName)| +--- +#### **Name** + +The name of the build. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |3 |true (ByPropertyName)| +--- +#### **Path** + +The folder path of the definition. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |4 |true (ByPropertyName)| +--- +#### **YAMLFileName** + +The path to a YAML file containing the build definition + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |5 |true (ByPropertyName)| +--- +#### **Comment** + +A comment about the build defintion revision. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |6 |true (ByPropertyName)| +--- +#### **Description** + +A description of the build definition. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |7 |true (ByPropertyName)| +--- +#### **DropLocation** + +The drop location for the build + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |8 |true (ByPropertyName)| +--- +#### **BuildNumberFormat** + +The build number format + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |9 |true (ByPropertyName)| +--- +#### **Repository** + +The repository used by the build definition. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[PSObject]```|true |10 |true (ByPropertyName)| +--- +#### **Queue** + +The queue used by the build definition. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[PSObject]```|false |11 |true (ByPropertyName)| +--- +#### **Demand** + +A collection of demands for the build definition. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |12 |true (ByPropertyName)| +--- +#### **Variable** + +A collection of variables for the build definition. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |13 |true (ByPropertyName)| +--- +#### **Secret** + +A collection of secrets for the build definition. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |14 |true (ByPropertyName)| +--- +#### **Tag** + +A list of tags for the build definition. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |15 |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |16 |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |17 |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.Build.Definition + + +--- +### Syntax +```PowerShell +New-ADOBuild [-Organization] [-Project] [-Name] [[-Path] ] [[-YAMLFileName] ] [[-Comment] ] [[-Description] ] [[-DropLocation] ] [[-BuildNumberFormat] ] [-Repository] [[-Queue] ] [[-Demand] ] [[-Variable] ] [[-Secret] ] [[-Tag] ] [[-Server] ] [[-ApiVersion] ] [-WhatIf] [-Confirm] [] +``` +--- + + From c750876400fcd9d899233f9ad4a242eef90159cb Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:30 +0000 Subject: [PATCH 091/151] Updating New-ADOField.md --- docs/New-ADOField.md | 218 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 218 insertions(+) create mode 100644 docs/New-ADOField.md diff --git a/docs/New-ADOField.md b/docs/New-ADOField.md new file mode 100644 index 00000000..114338ec --- /dev/null +++ b/docs/New-ADOField.md @@ -0,0 +1,218 @@ + +New-ADOField +------------ +### Synopsis +Creates new fields in Azure DevOps + +--- +### Description + +Creates new work item fields in Azure DevOps or Team Foundation Server. + +--- +### Related Links +* [Invoke-ADORestAPI](Invoke-ADORestAPI.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +New-ADOField -Name Verb -ReferenceName Cmdlet.Verb -Description "The PowerShell Verb" -ValidValue (Get-Verb | Select-Object -ExpandProperty Verb | Sort-Object) -Organization MyOrganization +``` + +#### EXAMPLE 2 +```PowerShell +New-ADOField -Name IsDCR -Type Boolean -Description "Is this a direct custom request?" -Organization MyOrganization +``` + +--- +### Parameters +#### **Name** + +The friendly name of the field + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **ReferenceName** + +The reference name of the field. This is the name used in queries. +If not provided, the ReferenceName will Custom. + -Name (stripped of whitespace) + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |2 |true (ByPropertyName)| +--- +#### **Type** + +The type of the field. + +This can be any of the following: +* boolean +* dateTime +* double +* guid +* history +* html +* identity +* integer +* plainText +* string +* treePath + + + +Valid Values: + +* boolean +* dateTime +* double +* guid +* history +* html +* identity +* integer +* picklistDouble +* picklistInteger +* picklistString +* plainText +* string +* treePath +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |3 |true (ByPropertyName)| +--- +#### **Description** + +A description for the field. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |4 |true (ByPropertyName)| +--- +#### **ValidValue** + +A list of valid values. +If provided, an associated picklist will be created with these values. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |5 |true (ByPropertyName)| +--- +#### **CanSortBy** + +If set, the field can be used to sort. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **IsQueryable** + +If set, the field can be used in queries. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **ReadOnly** + +If set, the field will be read only. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **AllowCustomValue** + +If set, custom values can be provided into the field. +This is ignored if not used with -ValidValue. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |6 |true (ByPropertyName)| +--- +#### **Project** + +The Project + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |7 |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |8 |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |9 |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.Field + + +--- +### Syntax +```PowerShell +New-ADOField [-Name] [[-ReferenceName] ] [[-Type] ] [[-Description] ] [[-ValidValue] ] [-CanSortBy] [-IsQueryable] [-ReadOnly] [-AllowCustomValue] [-Organization] [[-Project] ] [[-Server] ] [[-ApiVersion] ] [-WhatIf] [-Confirm] [] +``` +--- + + From 792a25dcb64e6ff6afc2f94ed28b0b9923dc9b1f Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:30 +0000 Subject: [PATCH 092/151] Updating New-ADOPipeline.md --- docs/New-ADOPipeline.md | 180 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 docs/New-ADOPipeline.md diff --git a/docs/New-ADOPipeline.md b/docs/New-ADOPipeline.md new file mode 100644 index 00000000..189d8c90 --- /dev/null +++ b/docs/New-ADOPipeline.md @@ -0,0 +1,180 @@ + +New-ADOPipeline +--------------- +### Synopsis +Creates a new ADO Pipeline + +--- +### Description + +Create a new Azure DevOps Pipeline. + +--- +### Related Links +* [Convert-BuildStep](Convert-BuildStep.md) +* [Import-BuildStep](Import-BuildStep.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +New-ADOPipeline -Trigger SourceChanged -Stage PowerShellStaticAnalysis,TestPowerShellCrossPlatForm, UpdatePowerShellGallery +``` + +#### EXAMPLE 2 +```PowerShell +New-ADOPipeline -Trigger SourceChanged -Stage PowerShellStaticAnalysis,TestPowerShellCrossPlatForm, UpdatePowerShellGallery -Option @{RunPester=@{env=@{"SYSTEM_ACCESSTOKEN"='$(System.AccessToken)'}}} +``` + +--- +### Parameters +#### **InputObject** + +The InputObject + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|--------------| +|```[PSObject]```|false |1 |true (ByValue)| +--- +#### **UseSystemAccessToken** + +If set, will use map the system access token to an environment variable in each script step. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **Option** + +Optional changes to a part. +A table of additional settings to apply wherever a part is used. +For example -Option @{RunPester=@{env=@{"SYSTEM_ACCESSTOKEN"='$(System.AccessToken)'}} + + + +|Type |Requried|Postion|PipelineInput| +|-------------------|--------|-------|-------------| +|```[IDictionary]```|false |2 |false | +--- +#### **VariableParameter** + +The name of parameters that should be supplied from build variables. +Wildcards accepted. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |3 |true (ByPropertyName)| +--- +#### **EnvironmentParameter** + +The name of parameters that should be supplied from the environment. +Wildcards accepted. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |4 |true (ByPropertyName)| +--- +#### **ExcludeParameter** + +The name of parameters that should be excluded. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |5 |true (ByPropertyName)| +--- +#### **UniqueParameter** + +The name of parameters that should be referred to uniquely. +For instance, if converting function foo($bar) {} and -UniqueParameter is 'bar' +The build parameter would be foo_bar. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |6 |true (ByPropertyName)| +--- +#### **DefaultParameter** + +A collection of default parameters. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |7 |true (ByPropertyName)| +--- +#### **BuildScript** + +A list of build scripts. Each build script will run as a step in the same job. + + + +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[String[]]```|false |8 |false | +--- +#### **PassThru** + +If set, will output the created objects instead of creating YAML. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **PowerShellCore** + +If set, will run scripts using PowerShell core, even if on Windows. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **WindowsPowerShell** + +If set will run script using WindowsPowerShell if available. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **RootDirectory** + +If provided, will directly reference build steps beneath this directory. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |9 |false | +--- +### Outputs +System.String + + +System.Management.Automation.PSObject + + +--- +### Syntax +```PowerShell +New-ADOPipeline [[-InputObject] ] [-UseSystemAccessToken] [[-Option] ] [[-VariableParameter] ] [[-EnvironmentParameter] ] [[-ExcludeParameter] ] [[-UniqueParameter] ] [[-DefaultParameter] ] [[-BuildScript] ] [-PassThru] [-PowerShellCore] [-WindowsPowerShell] [[-RootDirectory] ] [] +``` +--- + + From 912be1512ddd8ceb8b784fe0a0738996840b52cb Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:30 +0000 Subject: [PATCH 093/151] Updating New-ADOProject.md --- docs/New-ADOProject.md | 132 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 docs/New-ADOProject.md diff --git a/docs/New-ADOProject.md b/docs/New-ADOProject.md new file mode 100644 index 00000000..fea526cc --- /dev/null +++ b/docs/New-ADOProject.md @@ -0,0 +1,132 @@ + +New-ADOProject +-------------- +### Synopsis +Creates new projects in Azure DevOps. + +--- +### Description + +Creates new projects in Azure DevOps or TFS. + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/core/projects/list?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/core/projects/list?view=azure-devops-rest-5.1) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +New-ADOProject -Organization StartAutomating -Project Formulaic -PersonalAccessToken $pat +``` + +--- +### Parameters +#### **Name** + +The name of the project. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **Description** + +The project description. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |2 |true (ByPropertyName)| +--- +#### **Process** + +The process template used by the project. By default, 'Agile' + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |3 |true (ByPropertyName)| +--- +#### **Public** + +If set, the project will be created as a public project. +If not set, the project will be created as a private project. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **Abbreviation** + +The project abbreviation + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |4 |false | +--- +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |5 |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |6 |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |7 |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.Project + + +--- +### Syntax +```PowerShell +New-ADOProject [-Name] [-Description] [[-Process] ] [-Public] [[-Abbreviation] ] [-Organization] [[-Server] ] [[-ApiVersion] ] [-WhatIf] [-Confirm] [] +``` +--- + + From 95295d8d51cb2ebc21385e10a94acd03acdc8817 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:30 +0000 Subject: [PATCH 094/151] Updating New-ADORepository.md --- docs/New-ADORepository.md | 125 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 docs/New-ADORepository.md diff --git a/docs/New-ADORepository.md b/docs/New-ADORepository.md new file mode 100644 index 00000000..0366a7bf --- /dev/null +++ b/docs/New-ADORepository.md @@ -0,0 +1,125 @@ + +New-ADORepository +----------------- +### Synopsis +Creates repositories in Azure DevOps + +--- +### Description + +Creates a new repository in Azure DevOps. + +--- +### Related Links +* [Get-ADORepository](Get-ADORepository.md) +* [Remove-ADORepository](Remove-ADORepository.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +New-ADORepository -Organization StartAutomating -Project PSDevOps -RepositoryName NewRepo -WhatIf +``` + +--- +### Parameters +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **Project** + +The Project + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |2 |true (ByPropertyName)| +--- +#### **RepositoryName** + +The name of the repository + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |3 |true (ByPropertyName)| +--- +#### **UpstreamName** + +The name of the upstream repository (this creates a forked repository from the same project) + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |4 |true (ByPropertyName)| +--- +#### **UpstreamID** + +The ID of an upstream repository (this creates a forked repository) + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |5 |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |6 |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |7 |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.Repository + + +hashtable + + +--- +### Syntax +```PowerShell +New-ADORepository [-Organization] [-Project] [-RepositoryName] [[-UpstreamName] ] [[-UpstreamID] ] [[-Server] ] [[-ApiVersion] ] [-WhatIf] [-Confirm] [] +``` +--- + + From 4f67473301977fc56c1ff181541b08af15145b6a Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:30 +0000 Subject: [PATCH 095/151] Updating New-ADOServiceEndpoint.md --- docs/New-ADOServiceEndpoint.md | 193 +++++++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 docs/New-ADOServiceEndpoint.md diff --git a/docs/New-ADOServiceEndpoint.md b/docs/New-ADOServiceEndpoint.md new file mode 100644 index 00000000..0347ace6 --- /dev/null +++ b/docs/New-ADOServiceEndpoint.md @@ -0,0 +1,193 @@ + +New-ADOServiceEndpoint +---------------------- +### Synopsis +Creates Azure DevOps Service Endpoints + +--- +### Description + +Creates Service Endpoints in Azure DevOps. + +Service Endpoints are used to connect an Azure DevOps project to one or more web services. + +To see the types of service endpoints, use Get-ADOServiceEndpoint -GetEndpointType + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/serviceendpoint/endpoints/create?view=azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/serviceendpoint/endpoints/create?view=azure-devops-rest-5.1) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +New-ADOServiceEndpoint -Organization MyOrg -Project MyProject -Name MyGitHubConnection -Url https://github.com -Type GitHub -Authorization @{ + scheme = 'PersonalAccessToken' + parameters = @{ + accessToken = $MyGitHubPersonalAccessToken + } +} -PersonalAccessToken $MyAzureDevOpsPersonalAccessToken -Data @{pipelinesSourceProvider='github'} +``` + +--- +### Parameters +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **Project** + +The Project + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |2 |true (ByPropertyName)| +--- +#### **Name** + +The name of the endpoint + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |3 |true (ByPropertyName)| +--- +#### **AdministratorsGroup** + +Initial administrators of the endpoint + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[PSObject]```|false |4 |true (ByPropertyName)| +--- +#### **Authorization** + +Endpoint authorization data + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[PSObject]```|false |5 |true (ByPropertyName)| +--- +#### **Data** + +General endpoint data + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[PSObject]```|false |6 |true (ByPropertyName)| +--- +#### **ReadersGroup** + +Initial readers of the endpoint + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[PSObject]```|false |7 |true (ByPropertyName)| +--- +#### **Type** + +The endpoint type. To see available endpoint types, use Get-ADOServiceEndpoint -GetEndpointType + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |8 |true (ByPropertyName)| +--- +#### **Description** + +The endpoint description. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |9 |true (ByPropertyName)| +--- +#### **Url** + +The endpoint service URL. + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |10 |true (ByPropertyName)| +--- +#### **IsShared** + +If set, the endpoint will be shared across projects + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |11 |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1-preview. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |12 |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.ServiceEndpoint + + +hashtable + + +--- +### Syntax +```PowerShell +New-ADOServiceEndpoint [-Organization] [-Project] [-Name] [[-AdministratorsGroup] ] [[-Authorization] ] [[-Data] ] [[-ReadersGroup] ] [[-Type] ] [[-Description] ] [[-Url] ] [-IsShared] [[-Server] ] [[-ApiVersion] ] [-WhatIf] [-Confirm] [] +``` +--- + + From 7edc7c844be2e1cd47edf9003a2ff85b7e21d191 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:30 +0000 Subject: [PATCH 096/151] Updating New-ADOWorkItem.md --- docs/New-ADOWorkItem.md | 257 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 257 insertions(+) create mode 100644 docs/New-ADOWorkItem.md diff --git a/docs/New-ADOWorkItem.md b/docs/New-ADOWorkItem.md new file mode 100644 index 00000000..2487b84e --- /dev/null +++ b/docs/New-ADOWorkItem.md @@ -0,0 +1,257 @@ + +New-ADOWorkItem +--------------- +### Synopsis +Creates new work items in Azure DevOps + +--- +### Description + +Creates new work items in Azure DevOps or Team Foundation Server. + +--- +### Related Links +* [Invoke-ADORestAPI](Invoke-ADORestAPI.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +@{ Title='New Work Item'; Description='A Description of the New Work Item' } | + New-ADOWorkItem -Organization StartAutomating -Project PSDevOps -Type Issue +``` + +--- +### Parameters +#### **InputObject** + +The InputObject + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|------------------------------| +|```[PSObject]```|true |named |true (ByValue, ByPropertyName)| +--- +#### **Type** + +The type of the work item. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **QueryName** + +If set, will create a shared query for work items. The -InputObject will be passed to the body. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **QueryPath** + +If provided, will create shared queries beneath a given folder. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **WIQL** + +If provided, create a shared query with a given WIQL. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **QueryType** + +If provided, the shared query created may be hierchical + + + +Valid Values: + +* Flat +* OneHop +* Tree +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **QueryRecursiveOption** + +The recursion option for use in a tree query. + + + +Valid Values: + +* childFirst +* parentFirst +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **FolderName** + +If provided, create a shared query folder. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **ParentID** + +The work item ParentID + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Project** + +The Project + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Relationship** + +A collection of relationships for the work item. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |named |true (ByPropertyName)| +--- +#### **Comment** + +A list of comments to be added to the work item. + + + +|Type |Requried|Postion|PipelineInput | +|------------------|--------|-------|---------------------| +|```[PSObject[]]```|false |named |true (ByPropertyName)| +--- +#### **Tag** + +A list of tags to assign to the work item. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **BypassRule** + +If set, will not validate rules. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **ValidateOnly** + +If set, will only validate rules, but will not update the work item. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **SupressNotification** + +If set, will only validate rules, but will not update the work item. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.WorkItem + + +--- +### Syntax +```PowerShell +New-ADOWorkItem -InputObject -Type [-ParentID ] -Organization -Project [-Relationship ] [-Comment ] [-Tag ] [-BypassRule] [-ValidateOnly] [-SupressNotification] [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +```PowerShell +New-ADOWorkItem -QueryName [-QueryPath ] -WIQL [-QueryType ] [-QueryRecursiveOption ] -Organization -Project [-Tag ] [-ValidateOnly] [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +```PowerShell +New-ADOWorkItem [-QueryPath ] -FolderName -Organization -Project [-Tag ] [-ValidateOnly] [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +--- + + From 3d7c2f7113e83821248efd1e0d842e322f2a3525 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:30 +0000 Subject: [PATCH 097/151] Updating New-ADOWorkItemType.md --- docs/New-ADOWorkItemType.md | 351 ++++++++++++++++++++++++++++++++++++ 1 file changed, 351 insertions(+) create mode 100644 docs/New-ADOWorkItemType.md diff --git a/docs/New-ADOWorkItemType.md b/docs/New-ADOWorkItemType.md new file mode 100644 index 00000000..4583aa72 --- /dev/null +++ b/docs/New-ADOWorkItemType.md @@ -0,0 +1,351 @@ + +New-ADOWorkItemType +------------------- +### Synopsis +Creates custom work item types + +--- +### Description + +Creates custom work item types in Azure DevOps. + +Also creates custom rules or states for a work item type. + +--- +### Related Links +* [Get-ADOWorkItemType](Get-ADOWorkItemType.md) +* [Remove-ADOWorkItemType](Remove-ADOWorkItemType.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOProject -Organization StartAutomating -Project PSDevOps | + Get-ADOWorkProcess | + New-ADOWorkItemType -Name ServiceRequest -Color 'ddee00' -Icon icon_flame +``` + +#### EXAMPLE 2 +```PowerShell +Get-ADOProject -Organization StartAutomating -Project PSDevOps | # Get a project + Get-ADOWorkProcess | # Get it's process + Get-ADOWorkItemType| # Get work item types + Where-Object Name -eq 'Cmdlet' | # Filter the cmdlet type + New-ADOWorkItemType -State Cancelled -Color 'ff2200' -StateCategory Removed # create a new state. +``` + +--- +### Parameters +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **ProcessID** + +The process identifier. This can be piped in from Get-ADOWorkProcess. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Name** + +The name of the custom work item type, custom work item type state, custom work item type rule, or custom work item type behavior. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **Icon** + +The name of the icon used for the custom work item. +To list available icons, use Get-ADOWorkItemType -Icon + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **Color** + +The color of the work item type or state. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **Description** + +The description for the custom work item type. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **InheritsFrom** + +The work item type the custom work item should inherit, or the backlog behavior that should be inherited. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **IsDisabled** + +If set, will create the work item type disabled. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **BehaviorID** + +If set, will associate a given work item type with a behavior (for instance, adding a type of work item to be displayed in a backlog) + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **IsDefault** + +If set, will make the given work item type the default within a particular behavior (for instance, making the work item type the default type of a backlog). + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Behavior** + +If set, will create a new state for a custom work item instead of a custom work item. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **ReferenceName** + +The Reference Name of a WorkItemType. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |named |true (ByPropertyName)| +--- +#### **State** + +If set, will create a new state for a custom work item instead of a custom work item. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|true |named |false | +--- +#### **Order** + +The order of the a custom state for a custom work item. + + + +|Type |Requried|Postion|PipelineInput| +|-------------|--------|-------|-------------| +|```[Int32]```|false |named |false | +--- +#### **StateCategory** + +The state category of a custom state for a custom work item. + + + +Valid Values: + +* Proposed +* InProgress +* Resolved +* Completed +* Removed +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|true |named |false | +--- +#### **RuleConditionType** + +The type of work item rule to create. + + + +Valid Values: + +* when +* whenChanged +* whenNot +* whenNotChanged +* whenStateChangedFromAndTo +* whenStateChangedTo +* whenValueIsDefined +* whenValueIsNotDefined +* whenWas +* whenWorkItemIsCreated +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|true |named |true (ByPropertyName)| +--- +#### **Field** + +The field for a given rule condition. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **Value** + +The value of a given rule condition. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **RuleActionType** + +The type of action run when the work item rule is triggered. + + + +Valid Values: + +* copyFromClock +* copyFromCurrentUser +* copyFromField +* copyFromServerClock +* copyFromServerCurrentUser +* copyValue +* makeReadOnly +* makeRequired +* setDefaultFromClock +* setDefaultFromCurrentUser +* setDefaultFromField +* setDefaultValue +* setValueToEmpty +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|true |named |true (ByPropertyName)| +--- +#### **TargetField** + +The target field for a given rule action. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **TargetValue** + +The target value for a given rule action. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |named |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.WorkItemType + + +PSDevOps.Rule + + +PSDevOps.State + + +PSDevOps.Behavior + + +--- +### Syntax +```PowerShell +New-ADOWorkItemType -Organization -ProcessID [-Name] [-Icon ] -Color [-Description ] [-InheritsFrom ] [-IsDisabled] [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +```PowerShell +New-ADOWorkItemType -Organization -ProcessID [-Name] -Color -InheritsFrom -Behavior [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +```PowerShell +New-ADOWorkItemType -Organization -ProcessID [-BehaviorID ] [-IsDefault] -ReferenceName [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +```PowerShell +New-ADOWorkItemType -Organization -ProcessID [-Name] -Color -ReferenceName -State [-Order ] -StateCategory [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +```PowerShell +New-ADOWorkItemType -Organization -ProcessID [-Name] -ReferenceName -RuleConditionType [-Field ] [-Value ] -RuleActionType [-TargetField ] [-TargetValue ] [-Server ] [-ApiVersion ] [-WhatIf] [-Confirm] [] +``` +--- + + From 5957b0086e9d8eaa99c0795247ba97ef5dc3a93c Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:31 +0000 Subject: [PATCH 098/151] Updating New-ADOWorkProcess.md --- docs/New-ADOWorkProcess.md | 137 +++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 docs/New-ADOWorkProcess.md diff --git a/docs/New-ADOWorkProcess.md b/docs/New-ADOWorkProcess.md new file mode 100644 index 00000000..80155b6c --- /dev/null +++ b/docs/New-ADOWorkProcess.md @@ -0,0 +1,137 @@ + +New-ADOWorkProcess +------------------ +### Synopsis +Creates work processes in ADO. + +--- +### Description + +Creates work processes in Azure DevOps. + +Must provide a -Name + +Can Provide: +* -Description +* -ParentProcessID (can be piped in, will default to the ID for 'Agile') +* -ReferenceName + +--- +### Related Links +* [https://docs.microsoft.com/en-us/rest/api/azure/devops/processes/processes/create](https://docs.microsoft.com/en-us/rest/api/azure/devops/processes/processes/create) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Get-ADOWorkProcess -Organization StartAutomating -PersonalAccessToken $pat | + Where-Object Name -Ne TheNameOfTheCurrentProcess | + Set-ADOWorkProcess -Disable +``` + +#### EXAMPLE 2 +```PowerShell +Get-ADOProject -Organization StartAutomating -PersonalAccessToken $pat | + Get-ADOWorkProcess | + Set-ADOWorkPrcoess -Description "Updating Description" +``` + +--- +### Parameters +#### **Organization** + +The Organization + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |1 |true (ByPropertyName)| +--- +#### **Name** + +The name of the work process + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|true |2 |true (ByPropertyName)| +--- +#### **Description** + +A description of the work process. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |3 |true (ByPropertyName)| +--- +#### **ParentProcessID** + +The parent process identifier. If not provided, will default to the process ID for 'Agile'. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |4 |true (ByPropertyName)| +--- +#### **ReferenceName** + +A reference name for the work process. If one is not provided, Azure Devops will automatically generate one. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |5 |true (ByPropertyName)| +--- +#### **Server** + +The server. By default https://dev.azure.com/. +To use against TFS, provide the tfs server URL (e.g. http://tfsserver:8080/tfs). + + + +|Type |Requried|Postion|PipelineInput | +|-----------|--------|-------|---------------------| +|```[Uri]```|false |6 |true (ByPropertyName)| +--- +#### **ApiVersion** + +The api version. By default, 5.1. +If targeting TFS, this will need to change to match your server version. +See: https://docs.microsoft.com/en-us/azure/devops/integrate/concepts/rest-api-versioning?view=azure-devops + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |7 |false | +--- +#### **WhatIf** +-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-WhatIf is used to see what would happen, or return operations without executing them +#### **Confirm** +-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```. +-Confirm is used to -Confirm each operation. + +If you pass ```-Confirm:$false``` you will not be prompted. + + +If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed. + +--- +### Outputs +PSDevOps.WorkProcess + + +--- +### Syntax +```PowerShell +New-ADOWorkProcess [-Organization] [-Name] [[-Description] ] [[-ParentProcessID] ] [[-ReferenceName] ] [[-Server] ] [[-ApiVersion] ] [-WhatIf] [-Confirm] [] +``` +--- + + From de82abdbdc93eea44412deb716abdc2b29b84e3d Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:31 +0000 Subject: [PATCH 099/151] Updating New-GitHubAction.md --- docs/New-GitHubAction.md | 200 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 200 insertions(+) create mode 100644 docs/New-GitHubAction.md diff --git a/docs/New-GitHubAction.md b/docs/New-GitHubAction.md new file mode 100644 index 00000000..da4a708d --- /dev/null +++ b/docs/New-GitHubAction.md @@ -0,0 +1,200 @@ + +New-GitHubAction +---------------- +### Synopsis +Creates a new GitHub action + +--- +### Description +--- +### Related Links +* [New-GitHubWorkflow](New-GitHubWorkflow.md) +* [Import-BuildStep](Import-BuildStep.md) +* [Convert-BuildStep](Convert-BuildStep.md) +* [Expand-BuildStep](Expand-BuildStep.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +New-GitHubAction -Job TestPowerShellOnLinux +``` + +--- +### Parameters +#### **Name** + +The name of the action. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|true |1 |false | +--- +#### **Description** + +A description of the action. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|true |1 |false | +--- +#### **Action** + +The git hub action steps. +While we don't want to restrict the steps here, we _do_ want to be able to suggest steps that are built-in. + + + +|Type |Requried|Postion|PipelineInput | +|------------------|--------|-------|---------------------| +|```[PSObject[]]```|false |named |true (ByPropertyName)| +--- +#### **DockerImage** + +The DockerImage used for a GitHub Action. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **NodeJSScript** + +The NodeJS main script used for a GitHub Action. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |named |true (ByPropertyName)| +--- +#### **ActionInput** + +The git hub action inputs. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |named |true (ByPropertyName)| +--- +#### **ActionOutput** + +The git hub action outputs. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |named |true (ByPropertyName)| +--- +#### **Option** + +Optional changes to a component. +A table of additional settings to apply wherever a part is used. +For example -Option @{RunPester=@{env=@{"SYSTEM_ACCESSTOKEN"='$(System.AccessToken)'}} + + + +|Type |Requried|Postion|PipelineInput| +|-------------------|--------|-------|-------------| +|```[IDictionary]```|false |named |false | +--- +#### **ExcludeParameter** + +The name of parameters that should be excluded. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **UniqueParameter** + +The name of parameters that should be referred to uniquely. +For instance, if converting function foo($bar) {} and -UniqueParameter is 'bar' +The build parameter would be foo_bar. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |named |true (ByPropertyName)| +--- +#### **DefaultParameter** + +A collection of default parameters. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |named |true (ByPropertyName)| +--- +#### **PassThru** + +If set, will output the created objects instead of creating YAML. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **BuildScript** + +A list of build scripts. Each build script will run as a step in the action. + + + +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[String[]]```|false |named |false | +--- +#### **Icon** + +The icon used for branding. By default, a terminal icon. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +#### **Color** + +The color used for branding. By default, blue. + + + +Valid Values: + +* white +* yellow +* blue +* green +* orange +* red +* purple +* gray-dark +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |named |false | +--- +### Outputs +System.String + + +--- +### Syntax +```PowerShell +New-GitHubAction [-Name] [-Description] [-Action ] [-DockerImage ] [-NodeJSScript ] [-ActionInput ] [-ActionOutput ] [-Option ] [-ExcludeParameter ] [-UniqueParameter ] [-DefaultParameter ] [-PassThru] [-BuildScript ] [-Icon ] [-Color ] [] +``` +--- + + From e3b615422ac8828d2bb7db34d1e6704763f24a07 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:31 +0000 Subject: [PATCH 100/151] Updating New-GitHubWorkflow.md --- docs/New-GitHubWorkflow.md | 154 +++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 docs/New-GitHubWorkflow.md diff --git a/docs/New-GitHubWorkflow.md b/docs/New-GitHubWorkflow.md new file mode 100644 index 00000000..3ce57427 --- /dev/null +++ b/docs/New-GitHubWorkflow.md @@ -0,0 +1,154 @@ + +New-GitHubWorkflow +------------------ +### Synopsis +Creates a new GitHub Workflow + +--- +### Description +--- +### Related Links +* [Import-BuildStep](Import-BuildStep.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +New-GitHubWorkflow -Job TestPowerShellOnLinux +``` + +--- +### Parameters +#### **InputObject** + +The input object. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|--------------| +|```[PSObject]```|false |1 |true (ByValue)| +--- +#### **Name** + +The name of the workflow. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |2 |false | +--- +#### **Option** + +Optional changes to a component. +A table of additional settings to apply wherever a part is used. +For example -Option @{RunPester=@{env=@{"SYSTEM_ACCESSTOKEN"='$(System.AccessToken)'}} + + + +|Type |Requried|Postion|PipelineInput| +|-------------------|--------|-------|-------------| +|```[IDictionary]```|false |3 |false | +--- +#### **Environment** + +A collection of environment variables used throughout the build. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |4 |true (ByPropertyName)| +--- +#### **InputParameter** + +The name of parameters that should be supplied from an event. +Wildcards accepted. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |5 |true (ByPropertyName)| +--- +#### **VariableParameter** + +The name of parameters that should be supplied from build variables. +Wildcards accepted. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |6 |true (ByPropertyName)| +--- +#### **ExcludeParameter** + +The name of parameters that should be excluded. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |7 |true (ByPropertyName)| +--- +#### **UniqueParameter** + +The name of parameters that should be referred to uniquely. +For instance, if converting function foo($bar) {} and -UniqueParameter is 'bar' +The build parameter would be foo_bar. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |8 |true (ByPropertyName)| +--- +#### **DefaultParameter** + +A collection of default parameters. + + + +|Type |Requried|Postion|PipelineInput | +|-------------------|--------|-------|---------------------| +|```[IDictionary]```|false |9 |true (ByPropertyName)| +--- +#### **PassThru** + +If set, will output the created objects instead of creating YAML. + + + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[Switch]```|false |named |false | +--- +#### **BuildScript** + +A list of build scripts. Each build script will run as a step in the same job. + + + +|Type |Requried|Postion|PipelineInput| +|----------------|--------|-------|-------------| +|```[String[]]```|false |10 |false | +--- +#### **RootDirectory** + +|Type |Requried|Postion|PipelineInput| +|--------------|--------|-------|-------------| +|```[String]```|false |11 |false | +--- +### Outputs +System.String + + +--- +### Syntax +```PowerShell +New-GitHubWorkflow [[-InputObject] ] [[-Name] ] [[-Option] ] [[-Environment] ] [[-InputParameter] ] [[-VariableParameter] ] [[-ExcludeParameter] ] [[-UniqueParameter] ] [[-DefaultParameter] ] [-PassThru] [[-BuildScript] ] [[-RootDirectory] ] [] +``` +--- + + From 5dbbb7f8ebc0adaa72e0bc15a53402fbfe68fe42 Mon Sep 17 00:00:00 2001 From: StartAutomating Date: Tue, 7 Jun 2022 22:45:31 +0000 Subject: [PATCH 101/151] Updating Push-Git.md --- docs/Push-Git.md | 333 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 333 insertions(+) create mode 100644 docs/Push-Git.md diff --git a/docs/Push-Git.md b/docs/Push-Git.md new file mode 100644 index 00000000..dc5a93c9 --- /dev/null +++ b/docs/Push-Git.md @@ -0,0 +1,333 @@ + +Push-Git +-------- +### Synopsis +PowerShell Wrapper around git push + +--- +### Description + +Pushes changes to a git repository. + +--- +### Related Links +* [Add-Git](Add-Git.md) +* [Submit-Git](Submit-Git.md) +--- +### Examples +#### EXAMPLE 1 +```PowerShell +Push-Git +``` + +--- +### Parameters +#### **Repository** + +The argument. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[String]```|false |1 |true (ByPropertyName)| +--- +#### **ReferenceSpec** + +Specify what destination ref to update with what source object. +The format of a parameter is an optional plus +, +followed by the source object , followed by a colon :, +followed by the destination ref . + +The is often the name of the branch you would want to push, +but it can be any arbitrary "SHA-1 expression", +such as master~4 or HEAD (see gitrevisions(7)). + +The tells which ref on the remote side is updated with this push. +Arbitrary expressions cannot be used here, an actual ref must be named. +If git push [] without any argument is set to update +some ref at the destination with with remote..push configuration variable, + : part can be omitted—​such a push will update a ref that normally updates without any +on the command line. +Otherwise, missing : means to update the same ref as the . + +The object referenced by is used to update the reference on the remote side. +By default this is only allowed if is not a tag (annotated or lightweight), +and then only if it can fast-forward . + +By having the optional leading +, you can tell Git to update the ref even +if it is not allowed by default (e.g., it is not a fast-forward.) +This does not attempt to merge into . + +tag means the same as refs/tags/:refs/tags/. + +Pushing an empty allows you to delete the ref from the remote repository. + +The special refspec : (or +: to allow non-fast-forward updates) directs Git to push "matching" branches: +for every branch that exists on the local side, +the remote side is updated if a branch of the same name already exists on the remote side. + + + +|Type |Requried|Postion|PipelineInput | +|----------------|--------|-------|---------------------| +|```[String[]]```|false |2 |true (ByPropertyName)| +--- +#### **All** + +Push all branches (i.e. refs under refs/heads/); cannot be used with other . + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Prune** + +Remove remote branches that don’t have a local counterpart. +For example a remote branch tmp will be removed if a +local branch with the same name doesn’t exist any more. + +This also respects refspecs, e.g. +git push --prune remote refs/heads/*:refs/tmp/* +would make sure that remote refs/tmp/foo will be removed if refs/heads/foo doesn’t exist. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Mirror** + +Instead of naming each ref to push, +specifies that all refs under refs/ +(which includes but is not limited to refs/heads/, refs/remotes/, and refs/tags/) +be mirrored to the remote repository. + +Newly created local refs will be pushed to the remote end, +locally updated refs will be force updated on the remote end, +and deleted refs will be removed from the remote end. + +This is the default if the configuration option remote..mirror is set. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **DryRun** + +Do everything except actually send the updates. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Porcelain** + +Produce machine-readable output. +The output status line for each ref will be tab-separated and sent to stdout instead of stderr. +The full symbolic names of the refs will be given. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Delete** + +All listed refs are deleted from the remote repository. +This is the same as prefixing all refs with a colon. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Tag** + +All refs under refs/tags are pushed, in addition to refspecs explicitly listed on the command line. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **FollowTag** + +Push all the refs that would be pushed without this option, +and also push annotated tags in refs/tags that are missing from the remote +but are pointing at commit-ish that are reachable from the refs being pushed. + +This can also be specified with configuration variable push.followTags. + +For more information, see push.followTags in git-config(1). + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **Atomic** + +Use an atomic transaction on the remote side if available. Either all refs are updated, or on error, no refs are updated. +If the server does not support atomic pushes the push will fail. + + + +|Type |Requried|Postion|PipelineInput | +|--------------|--------|-------|---------------------| +|```[Switch]```|false |named |true (ByPropertyName)| +--- +#### **PushOption** + +Transmit the given string to the server, +which passes them to the pre-receive as well as the post-receive hook. + +The given string must not contain a NUL or LF character. +When multiple --push-option=