--- title: Map a script to an OS profile description: To execute scripted actions during VM provisioning, you can map a script to an OS profile. The script runs on VMs that are created based on the image template in the OS profile. locale: en-US canonical_url: https://www.servicenow.com/docs/r/australia/it-operations-management/cloud-configuration-governance/map-script-to-os-profile.html release: australia product: Cloud Configuration Governance classification: cloud-configuration-governance topic_type: task last_updated: "2026-10-09" reading_time_minutes: 1 breadcrumb: [Cloud scripts and cloud script templates, Cloud Admin Portal, Cloud Provisioning and Governance administration guide, Cloud Provisioning and Governance, ITOM Cloud Accelerate, IT Operations Management] --- # Map a script to an OS profile To execute scripted actions during VM provisioning, you can map a script to an OS profile. The script runs on VMs that are created based on the image template in the OS profile. ## Before you begin Role required: sn\_cmp.cloud\_admin You must have a cloud account with datacenters. You must run Discovery on the service accounts to populate the datacenters. ## About this task In this procedure, you specify an existing script. See [Create cloud initialization script templates and a script](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/cloud-configuration-governance/create-cloud-init-template-and-script.md). **Note:** Profile mappings that specify more details run first. For example, a mapping that specifies a blueprint, OS profile, and resource alias takes precedence over a mapping that specifies only an OS profile. ## Procedure 1. In the Cloud Admin Portal, navigate to **Manage** > **Resource Profiles**. 2. In the **Profiles** list, select **OS Profile** and then open the profile. 3. On the Cloud Script OS Profile Mappings related list, click **New** and then fill in the form.
| Field | Description |
|---|---|
| Blueprint\[Optional\] | Select a blueprint to limit the script to a specific resource block used in the blueprint. |
| Cloud script | Select a cloud script to map the OS profile to. |
| Active | Select the check box if the cloud script should be run after the virtual machine is provisioned. |
| Application | Cloud Provisioning and Governance is auto-selected. |
| OS profile | If you specify a blueprint, the cloud script is run when the blueprint is provisioned. |
| Resource Alias\[Optional\] | If you specify a resource alias for the blueprint, then the cloud script is executed when the blueprint with the specified resource alias is provisioned. |