---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# WindowsOSNameHelper - Global

# WindowsOSNameHelper - Global {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read

The WindowsOSNameHelper script include provides methods to handle the formatting of Windows OS names.

Use in any server-side discovery scripts where you need to format OS names.

## WindowsOSNameHelper - formatWindowsOSName(String name) {#ariaid-title2}

Formats the given Windows OS name.
{#r_WONH-formatWindowsOSName_S__table_tjr_xbs_pt__entry__3}

| Name | Type | Description |
|-|-|-|
| name | String | The name to format |
[Table 1. Parameters]

{#r_WONH-formatWindowsOSName_S__table_tjr_xbs_pt} {#r_WONH-formatWindowsOSName_S__table_ujr_xbs_pt__entry__2}

| Type | Description |
|-|-|
| String | The formatted name |
[Table 2. Returns]

{#r_WONH-formatWindowsOSName_S__table_ujr_xbs_pt}

## WindowsOSNameHelper - makeOSChoiceValid(String value) {#ariaid-title3}

Ensures that the OS choice is valid.
Note:  
Deprecated. Use OSChoice.reconcile()
{#r_WONH-makeOSChoiceValid_S__table_t1k_mds_pt__entry__3}

| Name | Type | Description |
|-|-|-|
| value | String | The value to validate |
[Table 3. Parameters]

{#r_WONH-makeOSChoiceValid_S__table_t1k_mds_pt} {#r_WONH-makeOSChoiceValid_S__table_u1k_mds_pt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 4. Returns]

{#r_WONH-makeOSChoiceValid_S__table_u1k_mds_pt}

## WindowsOSNameHelper - osCleanupName(String name) {#ariaid-title4}

Cleans up the specified Windows OS name by stripping out incorrect characters,
incorrect capitalization, extra spaces, or trailing spaces.
{#r_WONH-osCleanupName_S__table_igy_scs_pt__entry__3}

| Name | Type | Description |
|-|-|-|
| name | String | The name to clean up. |
[Table 5. Parameters]

{#r_WONH-osCleanupName_S__table_igy_scs_pt} {#r_WONH-osCleanupName_S__table_jgy_scs_pt__entry__2}

| Type | Description |
|-|-|
| String | The cleaned up name |
[Table 6. Returns]

{#r_WONH-osCleanupName_S__table_jgy_scs_pt}

