Windows Server Sysprep Unattend.xml - Unable to use special chars( <, >, &.._ ) for pasword in unattend.xml file.

Sikander Khan [C] 21 Reputation points
2021-07-09T12:09:03.8+00:00

Hey,

  While creating a windows server using Sysprep, I found out that Sysprep's unattend.xml file doesn't accept special chars(<, >, &)  as input for passwords. I am trying to use the following characters as a password in the unattend.xml file.  

Sysprep unattend.xml code block

113323-screenshot-2021-06-02-at-81723-pm.png

Error message
113318-screenshot-2021-06-09-at-35902-pm.png

After debugging I found out that this is because XML doesn't accept these 5 special chars(<, >, &, ', "). We need to escape and unescape it but windows don't do that. If so please provide proper documentation stating all the valid characters accepted for the password in aunattend.xml.

Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,369 questions
{count} votes

1 additional answer

Sort by: Most helpful
  1. Percival Yang 721 Reputation points
    2021-07-12T06:09:28.687+00:00

    Hi
    @Sikander Khan [C]

    To use html transcode, you can have a try using the following html dec to replace.

    & → &#38
    < → &#60

    →    &#62  
    
    ´    →    &#180  
    ′    →  &#8242  
    ″    →  &#8243;  
    

    here is the link for your reference

    https://www.w3schools.com/charsets/ref_html_entities_4.asp
    Note: Since the websites are not hosted by Microsoft, the links may change without notice. Microsoft does not guarantee the accuracy of this information.

    Hope this can help you

    If your need further help, be free reply to me at your convenience.

    ==============================================================================

    If the Answer is helpful, please click "Accept Answer" and upvote it

    0 comments No comments