Public/DirectoryBrowser/Remove-R1DirectoryLdifFile.ps1
|
# .ExternalHelp psRadiantOne-help.xml function Remove-R1DirectoryLdifFile { [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High')] [OutputType([void])] param( [parameter( Mandatory = $true, ValueFromPipelineByPropertyName = $true )] [ValidateNotNullOrEmpty()] [string]$fileName ) Begin { Assert-R1Session -RequireToken }#begin Process { $URI = Resolve-R1ServiceUrl -Service Browser -Path "directory_browser/ldif/files/$($fileName | Get-EscapedString)" if ($PSCmdlet.ShouldProcess($fileName, 'Delete LDIF File')) { $null = Invoke-R1RestMethod -Uri $URI -Method DELETE } }#process End { }#end } |