+

Search Tips   |   Advanced Search

Delete policy sets using wsadmin


Use the Jython or Jacl scripting language to delete policy sets from the configuration with wsadmin. Remove all policy set attachments before removing the policy set.

To complete this task, use the Administrator role with cell-wide access when admin security is enabled.

Before deleting a policy set, delete or transfer all attachments to applications. We cannot delete default policy sets.

Use the following steps to delete custom policy sets from the configuration with wsadmin:

 

  1. Launch a scripting command.

  2. List all policy sets in the configuration.

    • Enter the following command to list all application policy sets:

      AdminTask.listPolicySets()

    • Enter the following command to list all policy sets for the trust service:

      AdminTask.listPolicySets('[-policySetType system/trust]')

    • Enter the following command to list all system policy sets:

      AdminTask.listPolicySets('[-policySetType system]')

  3. Determine which policy set to delete. Enter the following command to view the description and default indicator for a specific policy set:

    AdminTask.getPolicySet('[-policySet policySet_name]')

  4. Delete the policy set. Enter the following command to delete a specific policy set.

    AdminTask.deletePolicySet('[-policySet PolicySet1)')

    The command returns a success or failure response. If we receive an error message, make sure that we have deleted all policy set attachments before entering the deletePolicySet command.

  5. Save the configuration changes. Enter the command to save the changes.

    AdminConfig.save()

 

What to do next

If we deleted a policy set that was previously attached to an application, restart the affected application to update the configuration changes.

 

Related tasks


Delete policy sets
Set application and system policy sets for Web services using scripting
Create policy sets using wsadmin
Add and remove policies using wsadmin

 

Related


PolicySetManagement