diff --git a/app/models/concerns/foreman_wds/host_extensions.rb b/app/models/concerns/foreman_wds/host_extensions.rb
index 7742fbb29cc1b7b6cd7ea3d19b940fa9c80ef1e0..b0a5220a091b8585b17009e685796fa9e834d38f 100644
--- a/app/models/concerns/foreman_wds/host_extensions.rb
+++ b/app/models/concerns/foreman_wds/host_extensions.rb
@@ -65,6 +65,10 @@ module ForemanWds
       wds_facet || build_wds_facet
     end
 
+    def unattend_arch
+      WdsServer.wdsify_processor_architecture(architecture)
+    end
+
     def unattend_pass(password, suffix = nil)
       if suffix.nil?
         suffix = password
@@ -105,5 +109,5 @@ module ForemanWds
 end
 
 class ::Host::Managed::Jail < Safemode::Jail
-  allow :unattend_pass, :wds_facet, :wds_server, :wds_install_image_file, :wds_install_image_group, :wds_install_image_name
+  allow :unattend_arch, :unattend_pass, :wds_facet, :wds_server, :wds_install_image_file, :wds_install_image_group, :wds_install_image_name
 end
diff --git a/app/models/wds_server.rb b/app/models/wds_server.rb
index 98e330d9c7eed55f64ee93a307d9f147ae63c57e..a0c4a4db629da174367570d4ed3c1a27dd063fc6 100644
--- a/app/models/wds_server.rb
+++ b/app/models/wds_server.rb
@@ -136,6 +136,11 @@ class WdsServer < ApplicationRecord
     ForemanWds::WdsImage::WDS_ARCH_NAMES[wds_arch]
   end
 
+  def self.wdsify_processor_architecture(architecture)
+    wds_arch = ForemanWds::WdsImage::WDS_IMAGE_ARCHES.find_index { |arch| arch =~ architecture.name }
+    ForemanWds::WdsImage::WDS_ARCH_NAMES[wds_arch]
+  end
+
   def test_connection
     connection.run_wql('SELECT * FROM Win32_UTCTime').key? :win32_utc_time
   rescue StandardError
diff --git a/app/views/foreman_wds/unattend_2016.xml.erb b/app/views/foreman_wds/unattend_2016.xml.erb
index 6bbdd47b8e0eda41aac60ca1663055e815a34619..56c4a2b7216a8ba2015f144cbaac8af252f323eb 100644
--- a/app/views/foreman_wds/unattend_2016.xml.erb
+++ b/app/views/foreman_wds/unattend_2016.xml.erb
@@ -31,7 +31,7 @@ end
 <?xml version="1.0" encoding="utf-8"?>
 <unattend xmlns="urn:schemas-microsoft-com:unattend">
   <settings pass="windowsPE">
-    <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="<%= @host.unattend_arch %>" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <SetupUILanguage>
         <UILanguage>en-US</UILanguage>
       </SetupUILanguage>
@@ -39,7 +39,7 @@ end
       <SystemLocale>en-US</SystemLocale>
       <UserLocale>en-US</UserLocale>
     </component>
-    <component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <component name="Microsoft-Windows-Setup" processorArchitecture="<%= @host.unattend_arch %>" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <WindowsDeploymentServices>
         <Login>
           <Credentials>
@@ -73,7 +73,7 @@ end
   </settings>
   <settings pass="specialize">
     <%- if realm -%>
-    <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="<%= @host.unattend_arch %>" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <Identification>
         <JoinDomain><%= realm[:domain] %></JoinDomain>
         <%- if realm[:type] == :machine -%>
@@ -92,13 +92,13 @@ end
       </Identification>
     </component>
     <%- end -%>
-    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="<%= @host.unattend_arch %>" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <ComputerName><%= @host.shortname %></ComputerName>
       <RegisteredOrganization><%= registration[:organization] %></RegisteredOrganization>
       <RegisteredOwner><%= registration[:owner] %></RegisteredOwner>
       <TimeZone><%= timezone %></TimeZone>
     </component>
-    <component name="Microsoft-Windows-TCPIP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <component name="Microsoft-Windows-TCPIP" processorArchitecture="<%= @host.unattend_arch %>" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <Interfaces>
         <%- iface = @host.primary_interface # @host.managed_interfaces.each.with_index do |iface, i| -%>
         <Interface wcm:action="add">
@@ -132,7 +132,7 @@ end
         </Interface>
       </Interfaces>
     </component>
-    <component name="Microsoft-Windows-DNS-Client" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <component name="Microsoft-Windows-DNS-Client" processorArchitecture="<%= @host.unattend_arch %>" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <DNSSuffixSearchOrder>
         <DomainName wcm:action="add" wcm:keyValue="1"><%= @host.domain %></DomainName>
       </DNSSuffixSearchOrder>
@@ -150,7 +150,7 @@ end
     </component>
   </settings>
   <settings pass="oobeSystem">
-    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+    <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="<%= @host.unattend_arch %>" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <OOBE>
         <HideEULAPage>true</HideEULAPage>
         <HideLocalAccountScreen>true</HideLocalAccountScreen>