Delete XenDesktop Policy through PowerShell

Delete XenDesktop Policy through PowerShell

book

Article ID: CTX139764

calendar_today

Updated On:

Description

Deleting XenDesktop Policy through PowerShell.

When you click on Policy in XenDesktop 7.1 Studio, the following screen appears:

User-added image

Resolution

Use PowerShell to delete the policy causing the issue:

  1. Open PowerShell on the controller and type add-pssnapin citrix.*.

  2. To mount the policies, type new-psdrive “Mysite” –psprovider CitrixGroupPolicy –Root \ -controller localhost.

    Note: “Mysite” is the name of the psdrive you are creating, so it can be anything.
  1. Type cd mysite:\.

  2. Type dir, and find the location of your policy.

  3. In this example, user container is being used, so type Cd user.

  4. To locate name of the policy which is causing the issue, type dir.

  5. In the preceding image, the policy name is Policy1, so to remove it, type Rd “.\Policy1”.

  6. Go back to the Studio, click Policy > Refresh.

You will now be able to see the rest of the policies and can modify/create once more.

Issue/Introduction

This article decribes how to delete XenDesktop Policy through PowerShell.

Additional Information

  • A policy is being modified from gpo editor as well as from Studio with mismatched settings.

  • A policy has mismatched setting in User and Computer section of policy.