# How-To Create Custom User in Windows Using Cloudbase-init

## Problem

You want to create a custom user when creating a Windows-based VM that has Cloudbase-Init.

## Environment

* Platform9 Managed OpenStack - All versions.
* Nova
* Cloudbase-Init

## Procedure

1. Create a user data file as follows:

{% tabs %}
{% tab title="None" %}

```none
# cat /root/user_datarem cmdnet user chinmay Platf0rm9! /addnet localgroup administrators chinmay /add
```

{% endtab %}
{% endtabs %}

2. Create the instance using the CLI or GUI.

\- If using GUI, paste the contents of the ***user\_data*** file in the ***cloud-config*** section of the Instance creation wizard.

\- If using CLI, run the following command.

{% tabs %}
{% tab title="None" %}

```none
# openstack server create --image [Image_UUID] --net [Network_UUID] --flavor [Flavor_UUID] --user-data [path to user_data file] [instance_name]
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://platform9.com/kb/pmo/how-to/how-to-create-custom-user-in-windows-using-cloudbase-init.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
