functions/Remove-Project.ps1
<#
.SYNOPSIS Remove project based on the project ID .DESCRIPTION Removes a single project using the remove project API endpoint .EXAMPLE Remove-Project 5 #> Function Remove-Project { [cmdletbinding()] param( [Parameter(Mandatory=$true)] [Int32]$ProjectID ) $uri = $CDXSERVER + "/api/projects/" + $ProjectID $DeleteProject = Invoke-RestMethod -Uri $uri -Method Delete -Headers $headers -ContentType "application/json" Write-Verbose ( $DeleteProject | Format-Table | Out-String ) } |