Modules/AzureDevOpsDsc.Common/Resources/Functions/Public/AzDoProjectServices/Remove-AzDoProjectServices.ps1
|
<#
.SYNOPSIS Removes specified Azure DevOps project services. .DESCRIPTION The Remove-AzDoProjectServices function removes specified services from an Azure DevOps project. You can specify which services to remove, such as Git repositories, work boards, build pipelines, test plans, and Azure artifacts. .PARAMETER ProjectName Specifies the name of the Azure DevOps project from which services will be removed. This parameter is mandatory. .PARAMETER GitRepositories Specifies whether Git repositories should be enabled or disabled. The default value is 'Enabled'. Valid values are 'Enabled' and 'Disabled'. .PARAMETER WorkBoards Specifies whether work boards should be enabled or disabled. The default value is 'Enabled'. Valid values are 'Enabled' and 'Disabled'. .PARAMETER BuildPipelines Specifies whether build pipelines should be enabled or disabled. The default value is 'Enabled'. Valid values are 'Enabled' and 'Disabled'. .PARAMETER TestPlans Specifies whether test plans should be enabled or disabled. The default value is 'Enabled'. Valid values are 'Enabled' and 'Disabled'. .PARAMETER AzureArtifact Specifies whether Azure artifacts should be enabled or disabled. The default value 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 state of the project services. .PARAMETER Force If specified, forces the removal of the project services without prompting for confirmation. .EXAMPLE Remove-AzDoProjectServices -ProjectName "MyProject" -GitRepositories Disabled -Force This command removes the Git repositories from the Azure DevOps project named "MyProject" without prompting for confirmation. #> Function Remove-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. } |