---
title: Enabling a virtual attribute
description: You can enable a virtual attribute using the dsconfig tool.
component: pingdirectory
version: 11.0
page_id: pingdirectory:pingdirectory_server_administration_guide:pd_ds_enable_virtual_attribute
canonical_url: https://docs.pingidentity.com/pingdirectory/11.0/pingdirectory_server_administration_guide/pd_ds_enable_virtual_attribute.html
revdate: September 13, 2023
page_aliases: ["pd_ds_enable_virtual_attr_dsconfig_int_mode.adoc", "pd_ds_virtual_attr_dsconfig_non_int.adoc"]
section_ids:
  enabling-a-virtual-attribute-using-dsconfig-interactive-mode: Enabling a virtual attribute using dsconfig interactive mode
  steps: Steps
  example: Example:
  example-2: Example:
  result: Result:
  enabling-a-virtual-attribute-using-dsconfig-non-interactive-mode: Enabling a virtual attribute using dsconfig non-interactive mode
  steps-2: Steps
  example-3: Example:
---

# Enabling a virtual attribute

You can enable a virtual attribute using the `dsconfig` tool.

If you are using `dsconfig` in interactive command-line mode, you can access the virtual attribute menu from the `Standard object menu`.

## Enabling a virtual attribute using `dsconfig` interactive mode

### Steps

1. To enable a virtual attribute, use `dsconfig`.

   1. Specify the connection port, bind DN, password, and host information.

   2. Enter the LDAP connection parameter for your PingDirectory server:

      * For LDAP, enter `1`.

      * For SSL, enter `2`.

      * For StartTLS, enter `3`.

        #### Example:

        ```
        bin/dsconfig
        ```

2. On the PingDirectory server main menu, enter `o` to change the object menu, and then enter the number corresponding to `Standard`.

3. On the PingDirectory server main menu, enter the number corresponding to virtual attributes.

4. On the `Virtual Attribute management` menu, enter the number to view and edit an existing virtual attribute.

5. From the list of existing virtual attributes on the system, select the virtual attribute.

   For this example, enter the number corresponding to the `numSubordinates` virtual attribute.

6. On the `numSubordinates Virtual Attribute Properties` menu, enter the number to enable the virtual attribute.

7. On the `Enabled Property` menu for the `numSubordinates` virtual attribute, enter the number to change the value to `TRUE`.

8. On the `numSubordinates Virtual Attribute Properties` menu, enter `f` to apply the changes.

9. Verify that the virtual attribute is enabled.

   #### Example:

   |   |                                                             |
   | - | ----------------------------------------------------------- |
   |   | This example assumes you have configured the group entries. |

   ```shell
   $ bin/ldapsearch --baseDN dc=example,dc=com "(ou=People)" numSubordinates
   ```

   #### Result:

   The system returns the following.

   ```
   dn: ou=People,dc=example,dc=com
   numSubordinates: 1000
   ```

## Enabling a virtual attribute using `dsconfig` non-interactive mode

### Steps

* To enable a virtual attribute, such as `numSubordinates`, use `dsconfig`.

  #### Example:

  ```shell
  $ bin/dsconfig set-virtual-attribute-prop \
    --name numSubordinates --set enabled:true
  ```
