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

Sikander Khan [C] 21 Reputation points


  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


Error message

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

    @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
    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