Modules/AzureDevOpsDsc.Common/Resources/Functions/Public/AzDoProjectServices/Test-AzDoProjectServices.ps1
|
<#
.SYNOPSIS Tests the Azure DevOps project services configuration. .DESCRIPTION The Test-AzDoProjectServices function checks the configuration of various services within an Azure DevOps project, such as Git repositories, work boards, build pipelines, test plans, and Azure artifacts. .PARAMETER ProjectName The name of the Azure DevOps project to test. .PARAMETER GitRepositories Specifies whether Git repositories are enabled or disabled. Default is 'Enabled'. Valid values are 'Enabled' and 'Disabled'. .PARAMETER WorkBoards Specifies whether work boards are enabled or disabled. Default is 'Enabled'. Valid values are 'Enabled' and 'Disabled'. .PARAMETER BuildPipelines Specifies whether build pipelines are enabled or disabled. Default is 'Enabled'. Valid values are 'Enabled' and 'Disabled'. .PARAMETER TestPlans Specifies whether test plans are enabled or disabled. Default is 'Enabled'. Valid values are 'Enabled' and 'Disabled'. .PARAMETER AzureArtifact Specifies whether Azure artifacts are enabled or disabled. Default is 'Enabled'. Valid values are 'Enabled' and 'Disabled'. .PARAMETER LookupResult A hashtable containing lookup results for the project services. .PARAMETER Ensure Specifies whether to ensure the configuration is present or absent. .PARAMETER Force Forces the command to run without asking for user confirmation. .OUTPUTS [System.Management.Automation.PSObject[]] Returns an array of PSObject representing the status of the project services. .EXAMPLE Test-AzDoProjectServices -ProjectName "MyProject" -GitRepositories "Enabled" -WorkBoards "Enabled" -BuildPipelines "Enabled" -TestPlans "Enabled" -AzureArtifact "Enabled" This command tests the configuration of the specified Azure DevOps project services for the project named "MyProject". #> Function Test-AzDoProjectServices { [CmdletBinding()] [OutputType([System.Management.Automation.PSObject[]])] param ( [Parameter(Mandatory = $true)] [Alias('Name')] [System.String]$ProjectName, [Parameter()] [Alias('Repos')] [ValidateSet('Enabled', 'Disabled')] [System.String]$GitRepositories = 'Enabled', [Parameter()] [Alias('Board')] [ValidateSet('Enabled', 'Disabled')] [System.String]$WorkBoards = 'Enabled', [Parameter()] [Alias('Pipelines')] [ValidateSet('Enabled', 'Disabled')] [System.String]$BuildPipelines = 'Enabled', [Parameter()] [Alias('Tests')] [ValidateSet('Enabled', 'Disabled')] [System.String]$TestPlans = 'Enabled', [Parameter()] [Alias('Artifacts')] [ValidateSet('Enabled', 'Disabled')] [System.String]$AzureArtifact = 'Enabled', [Parameter()] [HashTable]$LookupResult, [Parameter()] [Ensure]$Ensure, [Parameter()] [System.Management.Automation.SwitchParameter] $Force ) # Won't be triggered. } |