functions/Mde/indicators/Remove-MdIndicator.ps1
function Remove-MdIndicator { <# .SYNOPSIS Indicators - Delete a single indicator by id .DESCRIPTION Delete a single indicator by indicator id .PARAMETER IndicatorID The identifier of the Indicator to delete .EXAMPLE PS C:\> Remove-MdIndicator -IndicatorID $indicatorid Delete a single indicator by indicator id .LINK <unknown> #> [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')] [CmdletBinding(DefaultParameterSetName = 'default')] param ( [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $IndicatorID ) process { $__mapping = @{ } $__param = @{ Body = $PSBoundParameters | ConvertTo-HashTable -Include @() -Mapping $__mapping Query = $PSBoundParameters | ConvertTo-HashTable -Include @() -Mapping $__mapping Header = $PSBoundParameters | ConvertTo-HashTable -Include @() -Mapping $__mapping Path = 'indicators/{IndicatorID}' -Replace '{IndicatorID}',$IndicatorID Method = 'delete' Service = 'DefenderAPI.Endpoint' } $__param += $PSBoundParameters | ConvertTo-HashTable -Include 'ErrorAction', 'WarningAction', 'Verbose' try { Invoke-EntraRequest @__param } catch { $PSCmdlet.ThrowTerminatingError($_) } } } |