Files
developer.sailpoint.com/docs/tools/sdk/powershell/deleting-resources.md
darrell-thobe-sp 2cd5ccfc81 Prettified Code!
2024-04-18 10:31:05 +00:00

1.2 KiB

id, title, pagination_label, sidebar_label, sidebar_position, sidebar_class_name, keywords, description, slug, tags
id title pagination_label sidebar_label sidebar_position sidebar_class_name keywords description slug tags
powershell-sdk-delete Deleting resources with the PowerShell SDK PowerShell SDK Delete a resource 4 powershellsdk
powershell
sdk
delete
Learn how to delete resources using the PowerShell SDK in this guide. /tools/sdk/powershell/delete
SDK

You can use the SDK to delete resources. These cmdlets will typically start with the Remove keyword.

Here is an example script that searches for the previously created Workgroup by name and calls the delete cmdlet to remove it from your environment.

$WorkGroup = Get-BetaWorkgroups -Filters 'name eq "DB Access Governance Group"'

Remove-BetaWorkgroup -Id $WorkGroup.id -WithHttpInfo

Using the WithHttpInfo Switch in the script above, we can verify the operation completed successfully by the 204 status code.

Name                           Value
----                           -----
Response
StatusCode                     204
Headers                        {[Date, System.String[]], [Connection, System.String[]], [Server, System.String[]], [Vary, System.String[]]}