{"action":"created","comment":{"url":"https://api.github.com/repos/theforeman/theforeman.org/pulls/comments/41854009","id":41854009,"diff_hunk":"@@ -0,0 +1,160 @@\n+Provisioning Windows is a two step process. The first step, creating Installation Media, is not discussed here but can be found in the [Wiki](http://projects.theforeman.org/projects/foreman/wiki/Tutorials). The second step, setting up templates, is discussed in the following section.\n+\n+The necessary boot files are are later downloaded by automatically by smart-proxy.\n+\n+##### Tasks break down\n+- Change / add a new Architecture and OS\n+- Edit provision templates\n+- Add installation media\n+- Edit partition table\n+- Add parameters\n+- Link provisioning templates to OS\n+\n+##### Architecture and OS\n+In _Hosts -> Architectures_ add a new architecture:\n+\n+- Name: `x64`\n+\n+Add a new OS in _Hosts -> Operating systems_ if needed.\n+If you already have Windows hosts and with Puppet installed, the correct OS and architecture has been auto created already.\n+This example covers Windows 8.1 / Windows Server 2012R2.\n+\n+![Add new OS](/static/images/screenshots/4.4.8.3_prov_win_os.png \"Adding Windows 8 OS in Foreman\")\n+\n+- Name: `windows`\n+- Major: `6`\n+- Minor: `3`\n+- OS family: `windows`\n+- Description: `Windows8`\n+- Root password hash: `Base64`\n+- Architectures: `x64`\n+\n+Take special care to set __Root password hash = `Base64`__. The templates do not render correctly if this is set otherwise.\n+Changing the encoding does not [apply do existing hosts](/manuals/{{page.version}}/index.html#3.5.2ConfigurationOptions)\n+\n+##### Add provision templates\n+Head to _Hosts -> Provisioning Templates_ and edit the templates starting with `WAIK` to your needs. Make sure to get the latest version of the WAIK templates from the [community templates project](https://github.com/theforeman/community-templates)\n+Assign each of those templates to your Windows OS (does not apply to snippets).\n+The naming of the templates is a suggestion and up to you. This does __not__ apply to snippets! There, the name is important.\n+\n+__Note__ You can find more info about [Foreman Template Writing in the Wiki](http://projects.theforeman.org/projects/foreman/wiki/TemplateWriting)\n+\n+##### Required templates\n+###### WAIK Finish\n+- Name: `WAIK Finish`\n+- Kind: `finish`\n+\n+###### WAIK unattend.xml\n+- Name: `WAIK unattend.xml`\n+- Kind: Provision\n+\n+###### WAIK WAIK peSetup.cmd\n+- Name: `WAIK peSetup.cmd`\n+- Kind: `script`\n+\n+__Note:__ To get the download folders nicely, the `wget` commands in this template might need tweaking. This could\n+especially be necessary if you intend to use the `extraFinishCommands` snippet.\n+Eg, `--cut-dirs=3` would cut the first three directories form the download path when saving locally.\n+This way `http://winmirror.domain.com/pub/win81x64/extras/puppet.msi` will be stripped of `pub/win81x64/extras` and download to `puppet.msi`.\n+\n+###### WAIK PXELinux\n+- Name: `WAIK PXELinux`\n+- Kind: `PXE Linux`\n+\n+##### Optional templates\n+###### WAIK joinDomain.ps1\n+- Name: `WAIK joinDomain.ps1`\n+- Kind: `user_data`\n+\n+###### WAIK local users\n+- Name: `WAIK local users`\n+- Kind: Snippet\n+\n+__Note:__ This snippet creates extra users in the unattended stage.\n+This may be very useful for debugging early stages of your deployment; since you\n+can find yourself locked out of the newly provisioned host.\n+\n+Microsoft does not really care about password security in unattend.xml files; so it does not really matter if you use\n+`<PlainText>true</PlainText>` or not. If you prefer the encoded form, you need to append the string `Password` to your user password and encode it to Base64. The following ruby function is an example, it creates the _encoded_ from of `P@55w0rd`:\n+\n+```\n+Base64.encode64(Encoding::Converter.new(\"UTF-8\", \"UTF-16LE\",:undef => nil).convert(\"P@55w0rd\"+\"Password\")).delete!(\"\\n\").chomp\n+```\n+\n+##### WAIK extraFinishCommands\n+- Name: `WAIK extraFinishCommands`\n+- Kind: Snippet\n+\n+__Note:__ The commands here are executed at the last stage just before finishing host building.\n+Make sure they get executed in a synchronous way (eg. do not run in background like msiexec).\n+Otherwise the following reboot might kill them.\n+\n+##### WAIK OU from Hostgroup\n+- Name: `WAIK OU from Hostgroup`\n+- Kind: Snippet\n+\n+__Note__: This snippet may be used to generate the computer OU from the host's hostgroup and domain.\n+\n+_Example_: Imagine host `example` in domain `ad.corp.com` and in hostgroup `servers/windows/databases`.\n+The snippet generates the OU path:\n+`OU=databases,OU=windows,OU=servers,DC=ad,DC=corp,DC=com`. Optionally, set the host parameter `computerOuSuffix` to add some arbitrary OU at the end.\n+\n+##### Add installation media\n+For each of your Windows versions add a new installation media pointing to the root of the folder.\n+Eg, `http://winmirror.domain.com/pub/win81x64`. Assign them to your operatingsystem.\n+\n+##### Modify partition table\n+The default partition table is a simple `diskpart.exe` script. It will wipe `Disk 0`\n+\n+##### Define templates\n+Link all the created templates as well as the installation media and partition table to the OS:\n+\n+1. Head to your OS, then provisioning\n+2. Select the template from each kind from the drop down list\n+3. In partition tables, select `WAIK default`\n+4. In installation media, check the appropriate installation media added above.\n+\n+![Link templates to OS](/static/images/screenshots/4.4.8.3_prov_win_templates.png \"Linking Windows 8 OS in Foreman\")\n+\n+##### Add Parameters\n+To render the the templates correctly, some parameters need to be added. They need to be available as Host Parameter. Most of them make the most sense as parameter on the the OS. Also, almost none are\n+required and have defaults. For the most up to date desciption see the template itself.\n+\n+##### Important parameters\n+###### Required\n+- `windowsLicenseKey`: Valid Windows license key or generic KMS key\n+- `windowsLicenseOwner`:Legal owner of the Windows license key\n+- `wimImageName`: WIM image to install from a multi image install.wim file.\n+\n+###### Optional\n+The following parameters are only applied if they exist. Some, like `domainAdminAccount` and `domainAdminAccountPasswd` require each other, tough.","path":"_includes/manuals/1.10/4.4.8.3_prov_windows.md","position":130,"original_position":130,"commit_id":"902b9fd266f4415cd158605f9641efda5b36989a","original_commit_id":"902b9fd266f4415cd158605f9641efda5b36989a","user":{"login":"domcleal","id":482089,"avatar_url":"https://avatars.githubusercontent.com/u/482089?v=3","gravatar_id":"","url":"https://api.github.com/users/domcleal","html_url":"https://github.com/domcleal","followers_url":"https://api.github.com/users/domcleal/followers","following_url":"https://api.github.com/users/domcleal/following{/other_user}","gists_url":"https://api.github.com/users/domcleal/gists{/gist_id}","starred_url":"https://api.github.com/users/domcleal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domcleal/subscriptions","organizations_url":"https://api.github.com/users/domcleal/orgs","repos_url":"https://api.github.com/users/domcleal/repos","events_url":"https://api.github.com/users/domcleal/events{/privacy}","received_events_url":"https://api.github.com/users/domcleal/received_events","type":"User","site_admin":false},"body":"\"though\"","created_at":"2015-10-13T11:22:03Z","updated_at":"2015-10-13T11:22:03Z","html_url":"https://github.com/theforeman/theforeman.org/pull/450#discussion_r41854009","pull_request_url":"https://api.github.com/repos/theforeman/theforeman.org/pulls/450","_links":{"self":{"href":"https://api.github.com/repos/theforeman/theforeman.org/pulls/comments/41854009"},"html":{"href":"https://github.com/theforeman/theforeman.org/pull/450#discussion_r41854009"},"pull_request":{"href":"https://api.github.com/repos/theforeman/theforeman.org/pulls/450"}}},"pull_request":{"url":"https://api.github.com/repos/theforeman/theforeman.org/pulls/450","id":47468535,"html_url":"https://github.com/theforeman/theforeman.org/pull/450","diff_url":"https://github.com/theforeman/theforeman.org/pull/450.diff","patch_url":"https://github.com/theforeman/theforeman.org/pull/450.patch","issue_url":"https://api.github.com/repos/theforeman/theforeman.org/issues/450","number":450,"state":"open","locked":false,"title":"Feature12128","user":{"login":"helge000","id":13696924,"avatar_url":"https://avatars.githubusercontent.com/u/13696924?v=3","gravatar_id":"","url":"https://api.github.com/users/helge000","html_url":"https://github.com/helge000","followers_url":"https://api.github.com/users/helge000/followers","following_url":"https://api.github.com/users/helge000/following{/other_user}","gists_url":"https://api.github.com/users/helge000/gists{/gist_id}","starred_url":"https://api.github.com/users/helge000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helge000/subscriptions","organizations_url":"https://api.github.com/users/helge000/orgs","repos_url":"https://api.github.com/users/helge000/repos","events_url":"https://api.github.com/users/helge000/events{/privacy}","received_events_url":"https://api.github.com/users/helge000/received_events","type":"User","site_admin":false},"body":"RFC. Initial version for the process. Added new section 4.4.8.3\r\n\r\nRef: Please note my [PR](https://github.com/theforeman/community-templates/pull/209) for the necessary templates","created_at":"2015-10-12T21:51:38Z","updated_at":"2015-10-13T11:22:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c51e2b908a165970dc419c368d710dd06fef519","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/theforeman/theforeman.org/pulls/450/commits","review_comments_url":"https://api.github.com/repos/theforeman/theforeman.org/pulls/450/comments","review_comment_url":"https://api.github.com/repos/theforeman/theforeman.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/theforeman/theforeman.org/issues/450/comments","statuses_url":"https://api.github.com/repos/theforeman/theforeman.org/statuses/902b9fd266f4415cd158605f9641efda5b36989a","head":{"label":"helge000:Feature12128","ref":"Feature12128","sha":"902b9fd266f4415cd158605f9641efda5b36989a","user":{"login":"helge000","id":13696924,"avatar_url":"https://avatars.githubusercontent.com/u/13696924?v=3","gravatar_id":"","url":"https://api.github.com/users/helge000","html_url":"https://github.com/helge000","followers_url":"https://api.github.com/users/helge000/followers","following_url":"https://api.github.com/users/helge000/following{/other_user}","gists_url":"https://api.github.com/users/helge000/gists{/gist_id}","starred_url":"https://api.github.com/users/helge000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helge000/subscriptions","organizations_url":"https://api.github.com/users/helge000/orgs","repos_url":"https://api.github.com/users/helge000/repos","events_url":"https://api.github.com/users/helge000/events{/privacy}","received_events_url":"https://api.github.com/users/helge000/received_events","type":"User","site_admin":false},"repo":{"id":43426642,"name":"theforeman.org","full_name":"helge000/theforeman.org","owner":{"login":"helge000","id":13696924,"avatar_url":"https://avatars.githubusercontent.com/u/13696924?v=3","gravatar_id":"","url":"https://api.github.com/users/helge000","html_url":"https://github.com/helge000","followers_url":"https://api.github.com/users/helge000/followers","following_url":"https://api.github.com/users/helge000/following{/other_user}","gists_url":"https://api.github.com/users/helge000/gists{/gist_id}","starred_url":"https://api.github.com/users/helge000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helge000/subscriptions","organizations_url":"https://api.github.com/users/helge000/orgs","repos_url":"https://api.github.com/users/helge000/repos","events_url":"https://api.github.com/users/helge000/events{/privacy}","received_events_url":"https://api.github.com/users/helge000/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/helge000/theforeman.org","description":"The new and improved Foreman website.","fork":true,"url":"https://api.github.com/repos/helge000/theforeman.org","forks_url":"https://api.github.com/repos/helge000/theforeman.org/forks","keys_url":"https://api.github.com/repos/helge000/theforeman.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/helge000/theforeman.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/helge000/theforeman.org/teams","hooks_url":"https://api.github.com/repos/helge000/theforeman.org/hooks","issue_events_url":"https://api.github.com/repos/helge000/theforeman.org/issues/events{/number}","events_url":"https://api.github.com/repos/helge000/theforeman.org/events","assignees_url":"https://api.github.com/repos/helge000/theforeman.org/assignees{/user}","branches_url":"https://api.github.com/repos/helge000/theforeman.org/branches{/branch}","tags_url":"https://api.github.com/repos/helge000/theforeman.org/tags","blobs_url":"https://api.github.com/repos/helge000/theforeman.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/helge000/theforeman.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/helge000/theforeman.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/helge000/theforeman.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/helge000/theforeman.org/statuses/{sha}","languages_url":"https://api.github.com/repos/helge000/theforeman.org/languages","stargazers_url":"https://api.github.com/repos/helge000/theforeman.org/stargazers","contributors_url":"https://api.github.com/repos/helge000/theforeman.org/contributors","subscribers_url":"https://api.github.com/repos/helge000/theforeman.org/subscribers","subscription_url":"https://api.github.com/repos/helge000/theforeman.org/subscription","commits_url":"https://api.github.com/repos/helge000/theforeman.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/helge000/theforeman.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/helge000/theforeman.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/helge000/theforeman.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/helge000/theforeman.org/contents/{+path}","compare_url":"https://api.github.com/repos/helge000/theforeman.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/helge000/theforeman.org/merges","archive_url":"https://api.github.com/repos/helge000/theforeman.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/helge000/theforeman.org/downloads","issues_url":"https://api.github.com/repos/helge000/theforeman.org/issues{/number}","pulls_url":"https://api.github.com/repos/helge000/theforeman.org/pulls{/number}","milestones_url":"https://api.github.com/repos/helge000/theforeman.org/milestones{/number}","notifications_url":"https://api.github.com/repos/helge000/theforeman.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/helge000/theforeman.org/labels{/name}","releases_url":"https://api.github.com/repos/helge000/theforeman.org/releases{/id}","created_at":"2015-09-30T10:21:47Z","updated_at":"2015-09-30T10:21:57Z","pushed_at":"2015-10-12T21:44:32Z","git_url":"git://github.com/helge000/theforeman.org.git","ssh_url":"git@github.com:helge000/theforeman.org.git","clone_url":"https://github.com/helge000/theforeman.org.git","svn_url":"https://github.com/helge000/theforeman.org","homepage":null,"size":19784,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"gh-pages"}},"base":{"label":"theforeman:gh-pages","ref":"gh-pages","sha":"9e0bd0dd2eac89caf82f756cf9005c450c1427da","user":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"repo":{"id":5928690,"name":"theforeman.org","full_name":"theforeman/theforeman.org","owner":{"login":"theforeman","id":1439844,"avatar_url":"https://avatars.githubusercontent.com/u/1439844?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman","html_url":"https://github.com/theforeman","followers_url":"https://api.github.com/users/theforeman/followers","following_url":"https://api.github.com/users/theforeman/following{/other_user}","gists_url":"https://api.github.com/users/theforeman/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman/subscriptions","organizations_url":"https://api.github.com/users/theforeman/orgs","repos_url":"https://api.github.com/users/theforeman/repos","events_url":"https://api.github.com/users/theforeman/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/theforeman/theforeman.org","description":"The new and improved Foreman website.","fork":false,"url":"https://api.github.com/repos/theforeman/theforeman.org","forks_url":"https://api.github.com/repos/theforeman/theforeman.org/forks","keys_url":"https://api.github.com/repos/theforeman/theforeman.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/theforeman/theforeman.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/theforeman/theforeman.org/teams","hooks_url":"https://api.github.com/repos/theforeman/theforeman.org/hooks","issue_events_url":"https://api.github.com/repos/theforeman/theforeman.org/issues/events{/number}","events_url":"https://api.github.com/repos/theforeman/theforeman.org/events","assignees_url":"https://api.github.com/repos/theforeman/theforeman.org/assignees{/user}","branches_url":"https://api.github.com/repos/theforeman/theforeman.org/branches{/branch}","tags_url":"https://api.github.com/repos/theforeman/theforeman.org/tags","blobs_url":"https://api.github.com/repos/theforeman/theforeman.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/theforeman/theforeman.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/theforeman/theforeman.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/theforeman/theforeman.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/theforeman/theforeman.org/statuses/{sha}","languages_url":"https://api.github.com/repos/theforeman/theforeman.org/languages","stargazers_url":"https://api.github.com/repos/theforeman/theforeman.org/stargazers","contributors_url":"https://api.github.com/repos/theforeman/theforeman.org/contributors","subscribers_url":"https://api.github.com/repos/theforeman/theforeman.org/subscribers","subscription_url":"https://api.github.com/repos/theforeman/theforeman.org/subscription","commits_url":"https://api.github.com/repos/theforeman/theforeman.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/theforeman/theforeman.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/theforeman/theforeman.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/theforeman/theforeman.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/theforeman/theforeman.org/contents/{+path}","compare_url":"https://api.github.com/repos/theforeman/theforeman.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/theforeman/theforeman.org/merges","archive_url":"https://api.github.com/repos/theforeman/theforeman.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/theforeman/theforeman.org/downloads","issues_url":"https://api.github.com/repos/theforeman/theforeman.org/issues{/number}","pulls_url":"https://api.github.com/repos/theforeman/theforeman.org/pulls{/number}","milestones_url":"https://api.github.com/repos/theforeman/theforeman.org/milestones{/number}","notifications_url":"https://api.github.com/repos/theforeman/theforeman.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/theforeman/theforeman.org/labels{/name}","releases_url":"https://api.github.com/repos/theforeman/theforeman.org/releases{/id}","created_at":"2012-09-24T02:36:57Z","updated_at":"2015-10-12T10:03:03Z","pushed_at":"2015-10-13T10:29:48Z","git_url":"git://github.com/theforeman/theforeman.org.git","ssh_url":"git@github.com:theforeman/theforeman.org.git","clone_url":"https://github.com/theforeman/theforeman.org.git","svn_url":"https://github.com/theforeman/theforeman.org","homepage":null,"size":24024,"stargazers_count":38,"watchers_count":38,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":116,"mirror_url":null,"open_issues_count":23,"forks":116,"open_issues":23,"watchers":38,"default_branch":"gh-pages"}},"_links":{"self":{"href":"https://api.github.com/repos/theforeman/theforeman.org/pulls/450"},"html":{"href":"https://github.com/theforeman/theforeman.org/pull/450"},"issue":{"href":"https://api.github.com/repos/theforeman/theforeman.org/issues/450"},"comments":{"href":"https://api.github.com/repos/theforeman/theforeman.org/issues/450/comments"},"review_comments":{"href":"https://api.github.com/repos/theforeman/theforeman.org/pulls/450/comments"},"review_comment":{"href":"https://api.github.com/repos/theforeman/theforeman.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/theforeman/theforeman.org/pulls/450/commits"},"statuses":{"href":"https://api.github.com/repos/theforeman/theforeman.org/statuses/902b9fd266f4415cd158605f9641efda5b36989a"}}}}