<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kripohb Sudnethong on Medium]]></title>
        <description><![CDATA[Stories by Kripohb Sudnethong on Medium]]></description>
        <link>https://medium.com/@kripohb?source=rss-b3449ad6528------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Ys-VYfvf9x50VEvv</url>
            <title>Stories by Kripohb Sudnethong on Medium</title>
            <link>https://medium.com/@kripohb?source=rss-b3449ad6528------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 15:02:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kripohb/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Windows Server 2016 : DHCP Reservation]]></title>
            <link>https://medium.com/@kripohb/windows-server-2016-dhcp-reservation-e518a5db2e28?source=rss-b3449ad6528------2</link>
            <guid isPermaLink="false">https://medium.com/p/e518a5db2e28</guid>
            <category><![CDATA[windows-server-2016]]></category>
            <dc:creator><![CDATA[Kripohb Sudnethong]]></dc:creator>
            <pubDate>Fri, 03 Jan 2020 18:12:24 GMT</pubDate>
            <atom:updated>2020-01-03T18:12:24.973Z</atom:updated>
            <content:encoded><![CDATA[<h3>Windows Server 2016 : DHCP Reservation</h3><p>การ Reservation DHCP หรือการจอง DHCP โดยธรรมชาติของ DHCP มันจะแจก IP แบบสุ่มใน Scope ของเราที่กำหนดไว้ แต่ในบางกรณีที่เรามีเครื่อง Client ที่จำเป็นต้อง Fix IP ไม่ว่าจะด้วยเหตุใดก็ตาม เราจึงจำเป็นต้องทำการ Reservation หรือ การจอง IP โดยการล็อค mac address ของอุปกรณ์</p><p>เริ่มต้นให้เราไปที่ Tool &gt; DHCP คลิก &gt; Address Leases ขวามือเราจะพบเครื่อง Client ที่ได้รับ IP อยู่ ให้เรา Copy ค่า Mac หรือ Unique ID มาได้เลย (หากเครื่องที่ต้องการจะ Reservation ยังไม่ได้ต่อกับ Network Server ให้ทำการหา Mac Address บนเครื่องโดยใช้คำสั่ง getmac ก็ได้เช่นกัน)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lkKSUa7gnBb-dufakxhgPw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*BNrLeCIOjpkJF-RM703VNQ.png" /></figure><p>คลิกขวาที่ Reservations &gt; New Reservations</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*jaJu4i20LhjM4ttBWvwrEA.png" /></figure><p>ใส่รายละเอียดของ Client โดยสิ่งที่จำเป็นต้องใส่คือ IP ที่เราต้องการ Fix และค่า Mac address ของ Client จากนั้นกด Add</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*Zn8AlSZEEE8kAankA8Ih8Q.png" /></figure><p>เสร็จแล้วเราจะพบ Reservations ที่เรากำหนดไว้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*npPI4Kr1OM7dIonD_GmHAA.png" /></figure><p>ผมได้ทำการ Reservations ของ Windows 7 ให้รับเป็น IP 192.168.1.41 ให้เราสลับไปที่เครื่อง Client เราจะพบว่า เครื่องยังไม่อัพเดทข้อมูล ให้เราทำการเปิด-ปิด Network Card ก็จะพบว่า เราได้รับ IP จากการทำ Reservations แล้ว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/1*_Ol8e5dvYjiwwcVilZAPpw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*jqwdJ6mf-r_6xjo95F4RvA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e518a5db2e28" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows Server 2016 : Promote DHCP Server and Setup DHCP Scope]]></title>
            <link>https://medium.com/@kripohb/windows-server-2016-promote-dhcp-server-and-setup-dhcp-scope-574149d5e14e?source=rss-b3449ad6528------2</link>
            <guid isPermaLink="false">https://medium.com/p/574149d5e14e</guid>
            <category><![CDATA[windows-server-2016]]></category>
            <dc:creator><![CDATA[Kripohb Sudnethong]]></dc:creator>
            <pubDate>Fri, 03 Jan 2020 17:47:48 GMT</pubDate>
            <atom:updated>2020-01-03T17:47:48.120Z</atom:updated>
            <content:encoded><![CDATA[<h3>Windows Server 2016 : Promote DHCP Server and Setup DHCP Scope</h3><p>การเซต DHCP Server เพื่อจ่าย IP แบบ Auto ไม่จำเป็นจะต้องติดตั้ง DC นะครับ ติดตั้งแค่ Tool DHCP ก็พอแล้ว และเครื่อง Client ใดๆที่อยู่บน Network เดียวกันก็จะได้รับ IP เช่นกันโดยไม่ต้องอยู่ใน AD ด้วย แบบทดสอบนี้ผมจะทำการติดตั้ง DHCP บนเครื่อง Server และมีเครื่อง Client ที่เป็น Windows 7 อยู่อีกเครื่อง และยังไม่ได้ assigned เพื่อทดสอบว่า ได้รับ IP ที่เป็น DHCP หรือไม่ และได้รับ IP ที่อยู่ใน Scope ที่เรากำหนดไว้รึเปล่า</p><p>เริ่มแรกให้ติดตั้ง DHCP ที่เครื่อง Server ก่อนเลย ไปที่ Manage &gt; add Role &gt; DHCP Server Tool</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*zB-_til40aWGo8RjLkq6uA.png" /></figure><p>เมื่อติดตั้งเสร็จแล้วให้กด Complete DHCP configuration</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*TBhhqPsPRBEfq0KZu811AA.png" /></figure><p>แล้วให้ไปที่ Tool &gt; DHCP คลิกขวาที่ IPv4 &gt; New Scope…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*Y9wjP9ohxm5t4cpc4ub2mA.png" /></figure><p>ตั้งชื่อ Scope Name</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*Y2f4XZQEMrURSc6mKAxsyA.png" /></figure><p>กำหนด Range ของ IP ในตัวอย่างนี้ผมตั้งให้ IP จ่ายระหว่าง 192.168.1.10–192.168.1.50 เสร็จแล้วกด Next</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*sh_-wvAdTWMcNcZyjEdFxQ.png" /></figure><p>ถัดมาจะเป็น Add Exclusion หมายถึง ถ้าเราต้องการให้ IP ระหว่างที่เราตั้ง ถูกยกเว้น ก็สามารถใส่ได้เลย เช่น ผมไม่ต้องการในช่วง 1.20–1.25 IP ช่วงนี้ก็จะไม่ถูกจ่าย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*tAS3E9CmMcxe_fXIwN49wA.png" /></figure><p>Lease Duration คือ ระยะเวลาที่เครื่อง Client จะได้รับ IP ซ้ำ แต่หากเกินในเวลาที่เราระบุ (ค่าเริ่มต้นคือ 8 วัน) เครื่อง Client ก็จะได้รับ IP ชุดใหม่แทน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*hTPFR9tHv7HkQruYicXXEA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*u2nb8jokpVJ9dLRJ40at4w.png" /></figure><p>หน้า Default Gateway เราสามารถกำหนดได้เลย หากมี เครื่อง Client ก็จะถูก assigned IP Gateway เข้าไปด้วย ในตัวอย่างนี้ ผมจะลองใส่ IP 192.168.1.254</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*75DbLtZOTquJrMxpsN0qvg.png" /></figure><p>หน้า DNS และ WINS หากมี ก็ใส่ไปได้ด้วยเช่นกัน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*nJhxYWqeCfhsymzxPLujlw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*23bzT_NmxCQVZCjfV7CRsQ.png" /></figure><p>เมือเสร็จสิ้นแล้วก็เลือก Yes, I want to activate this scope now</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*5ZEuiEOdMDuLKQizx8twIw.png" /></figure><p>เมื่อเสร็จสิ้นการกำหนด Scope แล้ว ให้กลับไปที่ Tool &gt; DNS เราจะพบ Scope ที่เรากำหนดไว้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*dVKuaiauq6B7-69tuQciWQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*VHzcM0UBX7KQqPrSMjf24w.png" /></figure><p>ให้เราสลับไปที่เครื่อง Client Windows 7 และให้ Disable Network Card และ Enable ขึ้นมาอีกที เราจะพบว่า เครื่องได้รับ IP และอยู่ใน Scope ที่เรากำหนดไว้ และยังมี Gateway ที่เราได้กำหนดให้อีก</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*GXiB-zQCVVFeUkKAmTSf6A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*Sw9p_gESvjMdm9lo1k-o0Q.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=574149d5e14e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows Server 2016 : Password Replication Policy RODC]]></title>
            <link>https://medium.com/@kripohb/windows-server-2016-password-replication-policy-rodc-f924b8fcd3cd?source=rss-b3449ad6528------2</link>
            <guid isPermaLink="false">https://medium.com/p/f924b8fcd3cd</guid>
            <category><![CDATA[windows-server-2016]]></category>
            <dc:creator><![CDATA[Kripohb Sudnethong]]></dc:creator>
            <pubDate>Thu, 02 Jan 2020 16:08:48 GMT</pubDate>
            <atom:updated>2020-01-02T16:08:48.695Z</atom:updated>
            <content:encoded><![CDATA[<h3>Windows Server 2016 : Password Replication Policy RODC</h3><p>บทความที่แล้วเราสร้าง RODC ไปแล้ว แน่นอนว่ามันทำหน้าที่แค่อ่าน และค่าการ authentication ต่างๆมันจะทำการโยน authentication ทั้งหมดที่ Server เครื่องหลัก นั้นหมายความว่า หากเครื่อง RODC ไม่สามารถเชือมต่อเครื่อง DC หลักได้ เครื่อง Client ฝั่ง RODC ก็จะไม่สามารถ Log in AD ได้ แม้เราจะข้อมูลอยู่บน RODC แล้วก็ตาม ก็ไม่สามาร Log in AD ได้</p><p>เราจะลองทดสอบดู โดยผมจะปิด Network Card บนเครื่อง DC หลัก และจะลองให้เครื่อง PC Client Windows 7 ผม ที่ตอนนี้เชือมต่อ AD ของเครื่อง RODC อยู่ ลอง Log in เข้ามา (เบื้องต้น DC จะมี group policy cache login ดังนั้นจะเห็นว่า หลายต่อหลายครั้ง User เอาโน๊ตบุ๊คกลับบ้าน และไม่ได้ เชือมต่อกับ Network DC แต่ก็ยังสามมรถ Log in PC ได้)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kNle38HlhSezaKrbON0arw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*d3stGkDRXNAIzQOeTWhZAA.png" /></figure><p>เราจึงต้องทำ password replication policy เพื่อให้ RODC เก็บค่า Passwords โดยให้ไปที่ Tool &gt; AD User and Computer &gt; เลือก Domain Controller &gt; เลือก DC2-RODC &gt; เลือก Properties &gt; Passwords Replication Policy จำตอนที่เรา Promote RODC ได้ไหม นี้คือหน้าต่างว่าจะให้กลุ่มไหน Allow,Deny เข้ามาได้ โดยให้เราเลือก Allowed RODC Password คลิก Add และให้ทำการเพิ่ม user1 เข้าไป</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tpkhEM-VZCFBLbr3MSyAew.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*6JcNHdg5WZQq8jV7kn-iUQ.png" /></figure><p>เสร็จแล้วนอกจาก user อย่าลืมว่าชื่อ Computer ก็มีการเก็บ Password ด้วยเช่นกัน ให้ทำการ Add และเพิ่มชื่อ Computer ไปด้วย เป็นอันเสร็จสิ้น</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UfuEHRFvMhmEeDRyHX5oAQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f924b8fcd3cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows Server 2016 : Promote Read Only Domain Controller (RODC)]]></title>
            <link>https://medium.com/@kripohb/windows-server-2016-promote-read-only-domain-controller-rodc-eb5915fe002e?source=rss-b3449ad6528------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb5915fe002e</guid>
            <category><![CDATA[windows-server-2016]]></category>
            <dc:creator><![CDATA[Kripohb Sudnethong]]></dc:creator>
            <pubDate>Thu, 02 Jan 2020 15:26:00 GMT</pubDate>
            <atom:updated>2020-01-02T15:26:00.412Z</atom:updated>
            <content:encoded><![CDATA[<h3>Windows Server 2016 : Promote Read Only Domain Controller (RODC)</h3><p>ส่วนมากแล้ว เวลาเรามี DC หลัก แล้ววันหนึ่งเกิดมีสาขาใหม่ที่ต้องการใช้ DC ด้วย ก็เลี่ยงไม่ได้ที่จะต้องสร้าง DC บนสาขานั้นๆ แต่ปัญหาคือ หากมีการ เพิ่ม ลบ ข้อมูลของ DC ก็จะมีปัญหากลับ DC หลักด้วย ทำให้จัดการได้ยาก จึงจำเป็นต้อง Promote DC แบบ Read Only เพื่อให้ DC หลักจัดการข้อมูลเพียงแหล่งเดียว แต่ DC สาขาที่เป็น Read Only ก็จะได้ใช้งานด้วย โดยไม่ต้องกังวลว่าจะมีการแก้ไขข้อมูลใดๆ แถมเครื่อง client ก็จะได้ใช้ AD โดยผ่าน authentication ได้อีก</p><p>เริ่มแรกเรามี Windows Server DC หลักที่ถูกติดตั้งอยู่แล้ว เราก็จะมาจำลองว่าเราจะติดตั้ง Server RODC บนสาขาใหม่ โดยก่อนเริ่ม Promote DC ให้ตั้งชื่อเครื่องให้สอดคล้องกับการใช้งาน และเซต IP ให้เรียบร้อย โดยให้ DNS เป็น IP เดียวกับเครื่องหลักเรา</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*Aw5CWDQyhZv6X0L1HyQ1Vw.png" /></figure><p>จากนั้นให้ทำการ Promote Domain Controller ตามปกติ เมื่อถึงขั้นตอน Deployment Configuration ให้เราเลือก Add a domain controller to an existing domain &gt; เลือก Select &gt; ใส่ User admin ของ DC หลัก โดยให้ใส่ชื่อ domain ก่อน ตามด้วย \ และ administrator ex. mylab\administrator</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*Nd4qNa1LxKJv4GeUC6AXNg.png" /></figure><p>ต่อมาในหน้า Domain Options ให้ติ๊กต้อง Read only domain controller (RODC) อย่างลืมใส่ Password Restore (DSRM) ด้วยล่ะ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*n3P2d-GRtyhCPKBTdfGXAw.png" /></figure><p>ถัดมาจะเป็นในส่วนของ RODC Options ให้สังเกตสองส่วน คือ Accounts that are allowed to replicate passwords to the RODC หมายความว่า กลุ่มในช่องนี้ คือกลุ่มที่จะ Allowed replicate passwords to RODC ในส่วนที่สองคือ Accouts than are denied from replicating passwords to the RODC หมายความว่า กลุ่มที่จะถูก denied การ replicating password to the RODC เดียวเราจะปล่อยให้มันตั้งเป็นค่า default แบบนี้ไปก่อน ค่อยมาอธิบายกันอีกทีบทความต่อไป</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*1hjEThLRA_Jbaoi1kCPv5g.png" /></figure><p>หลังจาก Log in Server RODC เราก็ลองไปที่เครื่องมือ AD &gt; Change Directory Server &gt; DC2-RODC หลังจากนั้น ลองสร้าง OU หรือ User ดู จะพบว่าคำสั่ง New หายไปแล้ว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*ClZJmJW1_SETGk8BbGI_8A.png" /></figure><p>ทีนี้เราลองกับมาสร้าง User ใหม่ที่ DC1 ผมจะลองสร้าง user3 และให้เรากลับมาที่ server RODC จะพบว่าข้อมูลยังไม่ถูก replicate มาทันที</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9kyKqunE-H8N7_GueYrV6g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*bg8nlqSzcxlqj7lYU7Jbzg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*d0aKUYPlJ9NbshEvdcGt-Q.png" /><figcaption>RODC ยังไม่ได้รับข้อมูล user3 เนื่องจากยังไม่ถูก replicate จาก DC1</figcaption></figure><p>โดยวิธีที่จะทำให้มัน replicate ข้อมูลมานั้น ให้ไปที่ Tools &gt; AD sites and services &gt; ด้านซ้ายมือให้เลือก DC2-RODC กด sub ย่อยลงมาจนถึง NTDS Settings ด้านขวามือจะรายละเอียดว่า RODC เชือมต่อจาก DC1 ให้เราคลิกขวา และเลือก Replicate Now</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*s4s8Yxzk3GmZX5iTskXYTg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*upRdEyhp5PdzkiJdbd20jQ.png" /></figure><p>ทีนี้ข้อมูลก็จะถูก Replicate มายัง RODC แล้ว ให้เลือกเช็ค user3 ทีเราเพึ่งสร้างดู จะพบข้อมูลถูกอัพเดทเข้ามาแล้ว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MiKPPUpb7olrejelVtLing.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*XBvQYae_lyenfUdehB7B2Q.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb5915fe002e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows Server 2016 : การ Seize FSMO (ยึด Roles)]]></title>
            <link>https://medium.com/@kripohb/windows-server-2016-%E0%B8%81%E0%B8%B2%E0%B8%A3-seize-fsmo-%E0%B8%A2%E0%B8%B6%E0%B8%94-roles-af845c9c26d2?source=rss-b3449ad6528------2</link>
            <guid isPermaLink="false">https://medium.com/p/af845c9c26d2</guid>
            <category><![CDATA[windows-server-2016]]></category>
            <dc:creator><![CDATA[Kripohb Sudnethong]]></dc:creator>
            <pubDate>Wed, 01 Jan 2020 17:48:20 GMT</pubDate>
            <atom:updated>2020-01-03T16:36:00.616Z</atom:updated>
            <content:encoded><![CDATA[<h3>Windows Server 2016 : การ Seize FSMO (ยึด Roles)</h3><p>การ Seize หรือ ยึด Roles จะเกิดขึ้นในกรณีที่ เครื่อง Server Primary เราเสียหาย ไม่สามารถใช้งาน หรือ Boot ได้เลย โดยปกติแล้ว Role DC นั้นจะถูกติดตั้งที่เครื่อง Primary แต่ในเมือไม่สามารถออนไลน์ได้แล้ว จึงไม่สามารถใช้คำสั่ง transfer fsmo ได้เหมือนบทความที่แล้ว เราจึงต้องทำการ การ Seize FSMO (ยึด Roles) เพื่อให้ Server Additional เราทำงานแทน Server Primary</p><p>ดังนั้น เราจึงต้องใช้ Server Additional ยึด Roles กลับมา วิธีทดลองคือ ผมมี Server Primary กับ Additional อย่างละตัว สร้างบน VM ผมจะจำลอง ว่า Server หลักผมไม่สามารถใช้งานได้ โดย Disable Network Card</p><p>กลับมาที่ Server DC2-Add ผมจะลองเช็ค Role โดยใช้คำสั่ง netdom query fsmo ดูจะพบว่า role ยังอยู่ที่ DC1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*SeqlJKC4vBg3y87ygt_-XQ.png" /></figure><p>แต่ถ้าเราเข้าไปดู Role ที่เป็นหน้า UI จะพบว่า มันขึ้นข้อความว่า ERROR (ระหว่างเข้าเช็ค จะพบว่ามีความหน่วง เนื่องจาก Server พยายามหา Role ของมันอยู่)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*srKxBb3IWy8Kpt65IVTG4g.png" /></figure><p>ทีนี้เราจะมาทำการยึด Role โดยใช้คำสั่ง</p><ol><li>ntdsutil</li><li>roles</li><li>connection</li><li>connect to server dc2-add (เพราะว่าเครื่อง DC1 ไม่สามารถเชือมต่อได้แล้ว )</li><li>quit</li><li>?</li><li>เราจะพบคำสั่ง Seize infrastructure master และอีก 4 คำสั่งสำหรับ 4 role ที่เหลือ ให้เรา ก็อปใส่ให้ครบ 5 roles</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*ab99fWQIubOjkLBdI4Wn_A.png" /></figure><p>จุดสังเกต แม้ว่าเราจะพยายาม Seize Role แต่เบื้องต้น มันก็จะพยายาม transfer fsmo แต่จะขึ้น Error ระบบถึงจะทำการ Seize ดังนั้น จึงจะมีความหน่วงหน่อยๆระหว่าง Seize Roles</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xVudgfVDRhIGAnRr6LfxZQ.png" /></figure><p>เสร็จแล้วก็ลองใช้คำสั่ง netdom query fsmo เช็ค Role ดูว่าถูกย้ายมาหรือยัง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t-EaHPZqBOrk9tAg2enS_Q.png" /></figure><p>เสร็จแล้วลองมาดู UI Operations Masters ตรง 3 Role แรกจะพบว่า ERROR หายไปแล้ว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*OzE3L8Zszf7u4FRx24DOyg.png" /></figure><p>หลังจากการยึด Role เสร็จเรียบร้อยแล้วแต่ยังไม่แล้วเสร็จ เราต้องไปที่ Tool &gt; AD sites and services ให้กดโฟเดอร์ Server เพื่อดูรายละเอียดภายใน เราจะพบ ชื่อ Server และภายใน sub จะมี NTDS Settings โดยให้เราทำการลบ NTDS Settings ของ DC1 หรือ Server ที่เราทำการยึด Role มา โดยก่อนลบ จะขึ้น Pop up แจ้งว่า หากลบแล้ว เครื่อง DC1 จะไม่ออนไลน์ขึ้นมาอีก</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*WfjnrBK0iMOa3DW5GVvWVg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*nw61598HObvWpV0uIzUq3Q.png" /></figure><p>หลังจากนั้นให้ลบ โฟเดอร์ DC1 ตามอีกครั้ง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*pZSfnq2SdrEnK3MHmcVqsA.png" /></figure><p>ทีนี้จะเหลือ DC2-Add NTDS Settings ให้ทำการลบค่าขวามือทิ้งไปด้วย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lpMMIkXUJIS2MZtISjMPsA.png" /></figure><p>ขั้นตอนสุดท้าย เนื่องจาก Server Additional จะกลายไปเครื่องหลักแล้ว อย่าลืมไปเปลี่ยน DNS ให้เป็น IP ของเครื่องด้วย และแน่นอนว่า เครื่อง PC client ก็ต้อง Join โดยใช้ DNS ของ Server Additional ของเราด้วย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*l5vQ_BZiHJjQUz9nWyIitA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af845c9c26d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows Server 2016 : Transfer Flexible Single Master Operations (FSMO)]]></title>
            <link>https://medium.com/@kripohb/windows-server-2016-transfer-flexible-single-master-operations-fsmo-9a23d322af7b?source=rss-b3449ad6528------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a23d322af7b</guid>
            <category><![CDATA[windows-server-2016]]></category>
            <dc:creator><![CDATA[Kripohb Sudnethong]]></dc:creator>
            <pubDate>Wed, 01 Jan 2020 16:19:46 GMT</pubDate>
            <atom:updated>2020-01-01T16:19:46.444Z</atom:updated>
            <content:encoded><![CDATA[<h3>Windows Server 2016 : Transfer Flexible Single Master Operations (FSMO)</h3><p>หลังจากติดตั้ง DC แล้ว Flexible Single Master Operations (FSMO) จะถูกติดตั้งมาด้วย โดยมันจะมี 5 role แต่ละ role ก็จะทำหน้าที่แตกต่างกัน role นี้อาจตรวจสอบ authentication role นี้อาจตรวจสอบ Security Identifier (SID) ของ AD เป็นต้น ตอนนี้ เรามี Windows Server อยู่ 2 เครื่อง คือ DC1 และ DC2-ADD สำหรับ Backup DC</p><p>เริ่มแรกให้เราตรวจสอบก่อนเลย ว่า Role ทั้ง 5 อยู่บนเครื่องไหน โดยให้ใช้คำสั่ง netdom query fsmo</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*H_pAiLT46VdckRk-unT2Mg.png" /></figure><p>ก็จะพบว่า ตอนนี้เครื่อง DC1 ถือ Role ไว้ทั้ง 5 Role ทีนี้ ทำไมเราต้องย้าย Role 1. บางที่อาจจะมี Server หลายๆสาขา อาจจะมีการแบ่ง Role บางส่วนให้ถือแยกกันไว้เป็นการลด Load ของ Server หรือ 2. กรณีที่เราต้องการปิด Server หลัก และเราต้องการให้เครื่อง Additional Domain Controller ถือ Role ไว้ชั่วคราว เพื่อให้ระบบเดินได้ต่อ</p><p>ทีนี้ขั้นตอนการย้ายให้ใช้คำสั่ง</p><ol><li>ntdsutil</li><li>roles</li><li>connection</li><li>connect to server dc2-add (connect ชื่อ server ของเครื่องเราเอง)</li><li>quit</li><li>? (จะย้อนกลับมาที่ fsmo maintenance)</li><li>เราจะเห็น 5 บรรทัดสุดท้าย นั้นเป็นคำสั่ง Transfer Roles ต่างๆ ให้เราก็อปไปทีละบรรทัด ให้ครบ 5 roles เลย จากนั้นให้ใช้คำสั่ง quit ออกมา และตรวจสอบ role ด้วยคำสั่ง netdom query fsmo อีกครั้ง จะพบว่า Roles ทั้ง 5 ถูกย้ายมาเรียบร้อยแล้ว</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PSQUaHJ1DPzgYScf0JShog.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jaOyDdes_q4G6dhJVbR_3A.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a23d322af7b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Promote Additional Domain Controller สำหรับ Backup Domain Controller]]></title>
            <link>https://medium.com/@kripohb/promote-additional-domain-controller-%E0%B8%AA%E0%B8%B3%E0%B8%AB%E0%B8%A3%E0%B8%B1%E0%B8%9A-backup-domain-controller-156f0a34684d?source=rss-b3449ad6528------2</link>
            <guid isPermaLink="false">https://medium.com/p/156f0a34684d</guid>
            <category><![CDATA[windows-server-2016]]></category>
            <dc:creator><![CDATA[Kripohb Sudnethong]]></dc:creator>
            <pubDate>Wed, 01 Jan 2020 15:25:54 GMT</pubDate>
            <atom:updated>2020-01-01T15:25:54.740Z</atom:updated>
            <content:encoded><![CDATA[<p>ครั้งที่แล้วเราสร้าง Windows Server 2016 ชื่อ DC1 (ใช่ไหม?) เราจะต่อจากตรงนั้น Additional Domain Controller เอาง่ายๆมันคล้ายๆกับการ Backup ข้อมูล DC เรา โดยการ Promote Additional Domain Controller เราจะต้องใช้ Server อีก<strong>เครื่องหนึ่ง</strong>ในการติดตั้ง Windows Server และ AD DS เหมือนกับเครื่องหลักเลย ทีนี้ เวลาเราจะสร้าง จะลบข้อมูลใดๆ (ข้อมูลในระบบไม่ใช่ข้อมูลไฟล์แชร์ในลักษณะ Data ) มันจะซิงค์ข้อมูลกันเสมอ ทำให้เวลาเครื่องหลักเสียหาย หรือ shutdown เราสามารถใช้เครื่อง Additional Domain Controller เพื่อให้ระบบทำงานต่อได้</p><p>ขั้นแรก ก่อนสร้าง เช็ค IP ก่อนเลย แน่นอนว่า IP ต้องไม่ซ้ำกัน และ DNS เราต้องชี้ไปที่ DNS ของเครื่องหลัก เพราะเราต้อง Join Domain ของเครื่องหลักด้วย</p><ol><li>ลองใช้คำสั่ง nslookup ตามด้วยชื่อ domain ดูว่า เจอไหม ex. nslookup mylab.local</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*sn4Z0MazNqOj8p3QbBriqA.png" /><figcaption>nslookup mylab.local</figcaption></figure><p>2.ทำการติดตั้ง Roles AD จนถึงขั้นตอน Deployment Configuration ให้เราเลือก “Add a domain controller to an existing domain” จากนั้นกด Select จะขึ้น Pop up ให้ใส่ Username Password ของ ID เครื่องหลัก ให้ใส่โดยมี / ตามหลังชื่อ domain ด้วยนะครับ Ex. mylab\administrator ตัด .local ออก ( NetBIOS name)</p><p>จากนั้นจะขึ้นรายการ DC ที่มีอยู่ใน DSN นั้น</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/953/1*-DdcoO8mZ8IsfB7NWMjpgQ.png" /><figcaption>Add a domain controller to an existing domain</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*bYtcQ2KMZO1cwIcx2VfbUQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*YBR4W3ynmUAwjYdmv-W9hw.png" /></figure><p>พอถึง Additional Options มีจะให้เลือก Replicate from: จะมี Any domain controller และ รายชื่อ domain เรา สองข้อนี้ไม่ต่างกัน ก็เลือก domain เรานี้แหละ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*cJZIHRnqpYWufp3kMCz_Fg.png" /></figure><p>หลังจาก Install เรียบร้อยและ Server จะ Restart ครั้งหนึ่ง สังเกตอย่างหนึ่งเวลาเรา Reboot เสร็จ เราจะ Log in โดยมีชื่อ Domain ด้านหลังด้วย ทีนี้เราลองเปิด Active Directory User and Computers ดู เราจะพบว่ามี ชื่อ OU, User ที่เราเคยสร้างไว้ตอน DC1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ffT9INoeE-lwg2FzlY_Bbg.png" /></figure><p>ที่นี้ลองคลิกขวาตรง Active Directory User…. &gt; Change Domain Controller… ดู จะพบรายละเอียด Current Directory Server ว่าตอนนี้เราอยู่บนเครื่องไหน ด้านล่างเราก็สามารถ Change to : … ได้เวลาจะย้ายมาให้มาออนไลน์บนเครื่อง Backup</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*4Dy-XoS8d_oAIECjiZ-qGw.png" /></figure><p>ทีนี้เรามาลองสร้าง User บน Additional Domain Controller กันดู ผมจะสร้าง user2</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*kqZvrwVcFk4_PRBsPNuHkQ.png" /></figure><p>แล้วกลับมาดูที่ Server เครื่องหลักเรา จะพบว่าข้อมูลจะซิงค์กันทันที เราจะบน user2 บนเครื่องหลักด้วย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*jpAhL8JupED02D4cfN7Psg.png" /></figure><p>ปัญหาที่น่าหงุดหงิดอีกอย่างคือ เวลาเราเข้ามาดูตรง Change to : จะพบตรง Status ขึ้นว่า Unavailable ซึ่งจริงๆไม่มีผลในการใช้งานครับ ปัญหาเกิดจากการที่เราปิดฟังก์ชั่น IPv6 ถ้าดูแล้วลำคาญตา ก็ให้ไปเปิด IPv6 ครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*48_5xnRYqV6KguGDR1j9DQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*ZHxyYL75UT9BhFGMBQCM9w.png" /></figure><p>เปิดแล้วก็จะพบว่า Status กลับมาออนไลน์โดยปกติ ทีนี้ เราก็กลับไปปิดอีกที ก็จะไม่เกิดปัญหานี้แเล้วครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*BDcJbeUSM6TagfaM5dHKfw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=156f0a34684d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows Server 2016 : ADUC,ADAC]]></title>
            <link>https://medium.com/@kripohb/windows-server-2016-aduc-adac-bcc66d7b5183?source=rss-b3449ad6528------2</link>
            <guid isPermaLink="false">https://medium.com/p/bcc66d7b5183</guid>
            <category><![CDATA[windows-server-2016]]></category>
            <dc:creator><![CDATA[Kripohb Sudnethong]]></dc:creator>
            <pubDate>Sun, 29 Dec 2019 15:14:33 GMT</pubDate>
            <atom:updated>2019-12-29T15:14:33.075Z</atom:updated>
            <content:encoded><![CDATA[<h3>Windows Server 2016 : ADUC,ADAC</h3><p>หลัง Promote domain controller เราจะมาทำความรู้จัก ADUC,ADAC เครื่องมือคู่บุญของ AD เรา ไปเลย Toot &gt;AD User and Computer</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*No_-j1IHqCg2o2c0ALCd6g.png" /><figcaption>OU ของเครื่องมือ AD</figcaption></figure><p>การสร้าง OU ของเรา ให้คลิกขวาที่ระดับ domain &gt; New &gt; organizational unit ตั้งชื่อ OU ของเรา ในนั้นเราจะเพิ่ม User หรือในอะไรก็ตามแต่ได้ จะได้เป็นระเบียนยิ่งขึ้นเวลาจัดการ ผมจะลองสร้าง User ไว้ทดลองสักหนึ่งตัว</p><p>ทีนี้ นอกจากการจัดการ AD ตามด้านบนแล้ว จริงๆเราจะมีเครื่องมือจัดการ AD ที่ง่ายกว่านี้ เรียกว่า Active Directory Administrative Center อยู่ตรง Toot &gt; Active Directory Administrative Center ในหน้านี้ มันก็คือเครื่องมือ AD ที่อัพเกรด UI น่ะแหละ บางอย่างก็ใช้งานง่าย อันนี้คงแล้วแต่คนถนัด ฟีเจอร์ใหม่ที่มีเฉพาะในหน้า Active Directory Administrative Center คือ Active Directory Recycle Bin เวลาเราลบ AD ใดไป เราอยากคืนค่า ก็ไปที่ deleted objects แล้ว Restore ได้เลย ถ้าในเครื่องมือแบบแรกจะไม่สามารถใช้งานฟีเจอร์นี้ได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vrSw1PtJCAViW9Glg3OLqw.png" /><figcaption>Active Directory Administrative Center</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bcc66d7b5183" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows Server 2016 : Promote Domain Controller]]></title>
            <link>https://medium.com/@kripohb/windows-server-2016-promote-domain-controller-7dc00ca92be4?source=rss-b3449ad6528------2</link>
            <guid isPermaLink="false">https://medium.com/p/7dc00ca92be4</guid>
            <category><![CDATA[windows-server-2016]]></category>
            <dc:creator><![CDATA[Kripohb Sudnethong]]></dc:creator>
            <pubDate>Sun, 29 Dec 2019 14:15:27 GMT</pubDate>
            <atom:updated>2019-12-29T14:15:27.738Z</atom:updated>
            <content:encoded><![CDATA[<h3>Windows Server 2016 : Promote Domain Controller</h3><p>เขียนไว้กันลืมจริงๆ พยายามจะลงดีเทลบางจุดที่จำเป็น บทความนี้ทำบน Lab VM Hyper-V สำหรับการ Promote DC จริงๆเคยเขียนแล้ว แต่ไปเรียนมา น่าจะเข้าใจบางจุดได้ดีกว่าบทความที่งมเอง แถม VMware Workstation ก็เอ๋อๆบ่อย เปลี่ยนมาใช้ Hyper-V ค่อนข้างจะนิ่งกว่า</p><p>ข้ามขั้นตอนการลง Windows Server 2016 มาเลย อันดับแรกก่อน Promote Domain Controller ให้พยายามตั้งชื่อเครื่องให้สอดคล้องกับบริบท</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yOaE6GPBpacHKt6CWZeJjg.png" /><figcaption>ยกตัวอย่าง ตั้งชื่อ Lab1</figcaption></figure><p>หลังจากนั้นให้ กำหนดค่า Static IP Address รวมไปถึง DNS ด้วย เพราะเวลา Join Domain จะ DNS ในการเชือมต่อ ในแลปนี้จะ IP : 192.168.1.100/24 DNS : 192.168.1.1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*GaJVJuEAKJNqZ4hIQteOMg.png" /><figcaption>กำหนดค่า Static IP Address</figcaption></figure><p>ทีนี้ ลืมบอกไป อย่าลืมว่าเราทำ Lab นี้บน Hyper-V จำเป็นต้องใส่ Virtual Switch ด้วย มันจะมี Virtual Switch อยู่ 3 แบบคือ</p><p>External : แบบแรก VM จะสามารถออกมายัง Network ภายนอกได้ ถ้าเปิดตอนสร้าง VM สังเกตได้เลยว่าจะได้รับ IP DHCP จาก Router เราด้วย</p><p>Internal : ตัวเลือกนี้จะสามารถติดต่อกับเครื่อง Host ของเราได้ ติดต่อได้ภายใน VM ด้วย แต่ไม่สามารถออกมายัง Gateway ของ Host ได้ คือ Ping เจอแค่เครื่อง Host นี้แหละ</p><p>Private : แบบสุดท้าย ตัว VM จะสามารถติดต่อกันได้เฉพาะใน VM เท่านั้น ออก Host ก็ไม่ได้นะ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*DU6gRR7rxD-1QvbVrhlFiw.png" /><figcaption>Virtual Switch Hyper-V</figcaption></figure><p>ตั้งชื่อแล้ว เซต IP แล้ว ก็เริ่ม Promote Domain Controller เลย ไป Manage &gt; Add Roles and Features &gt; เลือก Active Directory Domain Services &gt; Instell</p><p>เสร็จแล้วให้คลิก Promote this server to a domain controller หน้า Deployment Configuration ให้เลือก Add a new forest และ ใส่ชื่อ Domain ที่ต้องการ ในที่นี้ผมใส่ lab1.local</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*LAq7rqcAOlQYlA3cDf0Scg.png" /><figcaption>Domain Name</figcaption></figure><p>หน้าถัดมาตรง Forest functional level กับ Domain functional level นี้ คาดว่าจะเป็นการแสดงผลตามที่เราเลือก เผือบางคนใช้ Windows Server ที่เก่ากว่าตัว 2016 จะได้ค้นมือ ในทีนี้ผมเลือก Windows Server 2016 ตามที่เราใช้งานเลย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*eoSfLyqa9eWMAP1FJpLqWA.png" /><figcaption>Forest functional level and Domain functional level</figcaption></figure><p>และก็ใส่ Password สำหรับ Restore Directory Services Password ชุดนี้จะใช้สำหรับเวลา Backup AD และต้องการที่จะ Restore กลับมา จำไว้ด้วยล่ะ ถัดไปจะมีติ๊กการตั้งค่า DNS ไม่จำเป็นต้องติ๊กนะ ยังไงเราก็จะได้ DNS อยู่ดี</p><p>ถัดมาอีกจะเป็นชื่อ NetBIOS มันคือชื่อของ Domain เราที่ตัด .local ออก เวลาใช้ เราสามารถใช้ Login User ได้ โดยให้คำสั่ง Lab1\user ดังนั้นก็ตั้งตามมันแนะนำน่ะแหละ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*QfatTJzjpXWyRedYmirBOA.png" /><figcaption>NetBIOS</figcaption></figure><p>หน้าสุดท้ายจะมี Review จะมีปุ่ม View Script มันจะเปิดไฟล์ Notepad จะเป็นชุดคำสั่ง PowerShell โดยเราสามารถใช้ชุดความสั่งนี้ติดตั้ง Domain ตามที่เราคลิกๆกันมาโดยไม่ต้องใช้ UI เลย ไม่มีอะไร ให้ดูเฉยๆ เสร็จแล้วกด Instell ได้เลย หลังจากนั้นมันจะ Reboot ตัวเอง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mkH_86gYky3b5AhIFhQbQg.png" /><figcaption>PowerShell script for AD DS Deployment</figcaption></figure><p>หลัง Reboot มาแล้ว หน้าตาเวลาเข้าใจงาน ก็จะมีชื่อ Domain ตามด้วย \ ก็ Log in ตามปกติ สิ่งที่ต้องสังเกตคือ IP เราจะเปลี่ยนไปเป็น loopback ip 127.0.0.1 ซึ่งก็คือ IP ตัวมันเองน่ะแหละ แต่ในทีนี้ ให้เราเปลี่ยนเป็น IP เครื่องเลย กันความสับสน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*mPqHuszOHTv2keh-XL8A-A.png" /><figcaption>loopback ip</figcaption></figure><p>จบแล้วสำหรับการ Promote Domain Controller ไว้ต่อบทความต่อไป</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7dc00ca92be4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ทดลองทำ Lab จำลอง ระบบ Network ในโรงงานกัน Part 2]]></title>
            <link>https://medium.com/@kripohb/%E0%B8%97%E0%B8%94%E0%B8%A5%E0%B8%AD%E0%B8%87%E0%B8%97%E0%B8%B3-lab-%E0%B8%88%E0%B8%B3%E0%B8%A5%E0%B8%AD%E0%B8%87-%E0%B8%A3%E0%B8%B0%E0%B8%9A%E0%B8%9A-network-%E0%B9%83%E0%B8%99%E0%B9%82%E0%B8%A3%E0%B8%87%E0%B8%87%E0%B8%B2%E0%B8%99%E0%B8%81%E0%B8%B1%E0%B8%99-part-2-6b7b4ef5d1a?source=rss-b3449ad6528------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b7b4ef5d1a</guid>
            <category><![CDATA[esxi]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[windows-server]]></category>
            <category><![CDATA[vmware]]></category>
            <dc:creator><![CDATA[Kripohb Sudnethong]]></dc:creator>
            <pubDate>Mon, 09 Sep 2019 01:40:56 GMT</pubDate>
            <atom:updated>2019-09-09T01:40:56.295Z</atom:updated>
            <content:encoded><![CDATA[<p>Part แรกเราหยุดกันหลัง install pfSense เสร็จ เราจะหยุดตรงนั้นไว้ก่อน Part นี้เราจะมาลง Windows Server 2019 บน Esxi กัน เริ่มแรกให้เรา Create VM ใหม่บน Esxi ให้โดยเลือกเป็น Windows Server ตัวอิมเมจ iso โหลดจาก Microsoft ได้เลย เลือกแบบ ISO นะ เราแค่ทำแลป เพราะดังนั้นอายุของมันจะแค่ 180 วัน ใช้เป็น free trial</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*PPl6H8FugkiMYEYf_sr9ew.png" /></figure><p>หลัง Create VM เสร็จก็รันและติดตั้งได้เลย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*48yU3g-mCuzDGga-9H0skQ.png" /><figcaption>Boot normally</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*BUNCjWuvM-fxjzUAWGYvPw.png" /></figure><p>หลังติดตั้งเสร็จ สิ่งแรกที่ต้องทำเลยคือ เข้ามา Config ที่ชื่อ Server และ กำหนด IP เครื่อง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rr2FxbpdLbVlg0mX_Ddq-A.png" /></figure><p>หลังจากนั้นเราจะมา add roles and features ในแลปเราจะใช้ AD และ DNS (ต้องลงคู่กันอยู่แล้ว) เพื่อกำหนดสิทธิ ให้การเข้าถึง Share Drive เพื่อที่เราจะลองเทส AD เล่นๆกันบน Lab</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*343UaGsSJe-Vd-8IxLiInA.png" /><figcaption>Select server pool</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*Ue65AqqimU9haTTeWWJ4Sg.png" /><figcaption>เลือก Active Directory Domain Services และ DNS Server</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*iv8oZnsEx_CojID0plqkgA.png" /><figcaption>หลังจาก Install เสร็จ ให้เลือก Promote this server to a domain controller</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*ulZkLQ0InjrtaJikSKnBfA.png" /><figcaption>เลือก Add a new forest และกำหนดชื่อสำหรับ join domain</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*KX_zGMcYfoKe_fiNPhPxHw.png" /><figcaption>กำหนดรหัสผ่านสำหรับ Services Restore</figcaption></figure><p>หลังจากเสร็จขั้นตอนการลง Services แล้ว เราจะมา Set DNS กันต่อ ให้ไปที่ Tool &gt; DNS</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/371/1*RmUSQ3OFbDxrI2PnY9NjZg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*x2jFthS55QHm2-5vt6TKKQ.png" /></figure><p>เลือก Reverse lookup zone คลิกขวาเลือก New Zone… เลือกเป็น primary zone &gt; To all DNS Server running on domain… &gt; IPv4 &gt; ใส่ Network ID มันจะบังคับใส่ 3 ช่อง ปกติ IPv4 จะเป็นแบบ xxx.xxx.xxx.xxx ให้เราใส่แค่ 3 ช่องแรก</p><p>จากนั้นก็ไปเปลี่ยน DNS ของ Server เรา DNS Server กับ IP เครื่อง Server Lab นี้จะเหมือนกัน</p><p>เสร็จจากการ Set Windows Server แล้ว ให้เรากลับมาที่ VM Workstation ให้เรารัน VM Windows 7 ของเรา เปลี่ยน DNS เป็น IP เครื่อง Server และลองทำการ Join Domain ดู</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*P0gSq0xSXrfqLfNQMryo2w.png" /></figure><p>ให้พิมพ์ชื่อ Domain ที่เราตั้งไว้บน Windows Server ตัวอย่างแลปนี้คือ lab.local มันจะขึ้นให้ใส่ User name,Password ให้ใช้รหัสของ Windows Server ของเรา e.g administrator</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*celQxrX3EaIkYRNsDVm9CA.png" /></figure><p>หากสำเร็จจะขึ้นข้อความแบบนี้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*HUr86lIVWqemhkUZTteqCA.png" /></figure><p>ย้อนกลับมาที่ Windows Server ของเรา ให้เข้าไปจัดการ AD ที่ Acticv Directory Users and Computer ให้สร้าง Folder แผนกเป็นตัวอย่างสักหนึ่ง Folder ในที่นี้สร้างเป็น IT ใน Folder ก็สร้าง User AD ที่เราต้องการได้เลย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*im5VaBacw3A7yeKJ8DrXTQ.png" /></figure><p>สร้างเสร็จแล้ว ให้เรากลับมาที่ Windows 7 ให้เรา Restart เครื่อง จะพบการเครื่องต้องปลดล็อคด้วยการกด Ctrl+Alt+Del</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*RdKow26c1inzw9wsOMwY6Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/399/1*z5d9a56OHvknyGqSTTW4Qg.png" /></figure><p>ให้เราปลดล็อคและกด Switch User และ ให้ใส่ช่อง User เป็นชื่อ AD ตามด้วยรหัสผ่าน AD ที่เรากำหนดให้ User ที่เราสร้าง หลังจากเข้าได้แล้ว ให้เช็คดูกว่าเราอยู่ใน Domain แล้วรึยัง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*PusF58phM2NcuquQkqi7CQ.png" /></figure><p>จากนั้นลองเทสดู โดยให้เราสร้าง Folder บน Drive ของ Windows Server และกดให้แชร์ไฟล์ดู</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*ekHUXj3opfDeFD0r_r0Bxg.png" /></figure><p>เรากำหนดให้ AD ของเราให้ เข้าถึง,แก้ไข,ลบ หรือ Full Control ได้โดยผ่านการจัดการทาง AD เท่านี้ เราก็เทส AD ได้อย่างสบายใจแล้ว หากต้องการเพิ่ม AD ก็ให้เพิ่ม VM Windows 7 อีกสักตัวเพื่อเทสการ Set ค่าที่ต่างกันระหว่างสอง AD</p><p>ก่อนจะปิดเครื่อง (แลปยังไม่จบ) ให้ทำการ Snapshot ไว้ด้วย โดยสังเกตบนขวาของ หน้าต่าง VM จะพบเครื่องหมายฟันเฟือง เลือก Snapshot &gt; Take Snapshot</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0FNWt6Q9_WNrCP_i43eFVA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*Y0-imW99tl1sm-GZp4AL5A.png" /></figure><p>ตั้งชื่อ รายละเอียด เกี่ยวกับ Snapshot ที่เราจับไว้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*JUQJYnmSXhvO07qZ35dkQQ.png" /></figure><p>ปล. Snapshot คือ การเก็บสถานะของ Virtual Machine คล้ายๆกับ System Restore ของ Windows รูปแบบคล้ายๆกัน แต่ details เชิงเทคนิคต่างกันมาก</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b7b4ef5d1a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>