Change Hostname
===============

You can control the name of a macOS device.

#. Go to **Policy** in the top panel.
#. Go to **Policy > Node Policy > Agent Action** in the left Policy panel.
#. Find and click **Change Hostname** in the Agent Action window(select the macOS version).

Under **General** section:

#. For **CWP Message**, add message to be displayed in accordance with the
   Policy.
#. For **Label**, add labels to help categorize your plugins with custom labels
   that appear in the "Description" field.

Under **Agent Actions** section:

#. For **Boolean Operator**, choose **AND** or **OR** to add optional
   conditions.
#. For **Settings**, click **Add** and select your optional conditions:
   **Criteria/Operator/Value**

Under **Plugin Settings** section:

#. For **Control Method**, specify a if you would like to change the Hostname to a **User Defined** value, or a value based on the **Hostname Rule of the Node Policy**

   - If **User Defined**: enter a hostname. 

#. For **Execution Interval**, adjust Periodic Interval. (*Seconds - months*)
#. Click **Update.**
#. Go to **Node Policy** in the left Policy panel.
#. Click the **Policy** you wish to edit in Node Policy window.
#. Find **Agent Action**. Click **Assign.**
#. Find **Change Hostname** in the **Available** section. Select and drag
   it into the **Selected** section.
#. Click **Add.**
#. Click **Update.**

.. note:: The name cannot contain all special and blank characters except the
          minus sign (-), and must be less than 63 bytes.