<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vitalii Shumylo</title>
    <description>The latest articles on DEV Community by Vitalii Shumylo (@vitalii_shumylo).</description>
    <link>https://dev.to/vitalii_shumylo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4200160%2Fdc588a61-73d8-4983-aee5-6daf7eeb1444.png</url>
      <title>DEV Community: Vitalii Shumylo</title>
      <link>https://dev.to/vitalii_shumylo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vitalii_shumylo"/>
    <language>en</language>
    <item>
      <title>Promoting a domain controller with PowerShell: the short version</title>
      <dc:creator>Vitalii Shumylo</dc:creator>
      <pubDate>Thu, 22 Oct 2026 09:51:44 +0000</pubDate>
      <link>https://dev.to/vitalii_shumylo/promoting-a-domain-controller-with-powershell-the-short-version-an1</link>
      <guid>https://dev.to/vitalii_shumylo/promoting-a-domain-controller-with-powershell-the-short-version-an1</guid>
      <description>&lt;p&gt;Promoting a Windows Server to a domain controller takes two steps, and most failed promotions come from skipping the groundwork before them. The server needs its final name, a static IP address and a DNS setting that points at itself (or at the existing DC) before you start. Renaming a DC afterwards is possible, but it is a fiddly job you can avoid.&lt;/p&gt;

&lt;p&gt;After that, install the role, run the matching &lt;code&gt;Test-&lt;/code&gt; cmdlet, and only then run the real promotion. The test catches the usual problems (DNS, prerequisites, forest level) before anything is changed, so you do not find out halfway through a reboot.&lt;/p&gt;

&lt;p&gt;For a brand-new forest, the first DC looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Install-WindowsFeature&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;AD-Domain-Services&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-IncludeManagementTools&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="n"&gt;Test-ADDSForestInstallation&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-DomainName&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'corp.example.test'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-DomainNetbiosName&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'CORP'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;`
&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;-ForestMode&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'Win2025'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-DomainMode&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;'Win2025'&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-InstallDns&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the test passes, swap &lt;code&gt;Test-ADDSForestInstallation&lt;/code&gt; for &lt;code&gt;Install-ADDSForest&lt;/code&gt;. A second DC uses &lt;code&gt;Install-ADDSDomainController&lt;/code&gt; instead, and the full guide also covers the checks that prove both servers really are working domain controllers: &lt;code&gt;dcdiag&lt;/code&gt;, &lt;code&gt;repadmin /replsummary&lt;/code&gt; and a DNS fix that people often forget on the second DC.&lt;/p&gt;

&lt;p&gt;Read the full guide, with every step and the post-reboot checks: &lt;a href="https://learnitlessons.com/articles/promote-domain-controller-powershell/" rel="noopener noreferrer"&gt;https://learnitlessons.com/articles/promote-domain-controller-powershell/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I also keep the lab scripts for this on GitHub: &lt;a href="https://github.com/vitalii-shumylo/it-lab-scripts" rel="noopener noreferrer"&gt;https://github.com/vitalii-shumylo/it-lab-scripts&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Written with AI assistance and checked by the author.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>powershell</category>
      <category>windowsserver</category>
      <category>activedirectory</category>
      <category>sysadmin</category>
    </item>
    <item>
      <title>Kerberoasting in plain words: find your exposed service accounts</title>
      <dc:creator>Vitalii Shumylo</dc:creator>
      <pubDate>Thu, 22 Oct 2026 09:51:38 +0000</pubDate>
      <link>https://dev.to/vitalii_shumylo/kerberoasting-in-plain-words-find-your-exposed-service-accounts-5fe9</link>
      <guid>https://dev.to/vitalii_shumylo/kerberoasting-in-plain-words-find-your-exposed-service-accounts-5fe9</guid>
      <description>&lt;p&gt;Kerberoasting is an attack on service accounts, and it works because Kerberos is doing exactly what it was designed to do. Any signed-in domain user can ask a domain controller for a service ticket to any account that has a service principal name (SPN). Part of that ticket is encrypted with a key made from the service account's password, so the attacker takes the ticket away and guesses the password offline. There are no failed logons and no lockouts to notice.&lt;/p&gt;

&lt;p&gt;So the weak point is not Kerberos. It is a human-chosen password on an account with an SPN, made worse when the ticket uses RC4 instead of AES. Computer accounts and group managed service accounts (gMSAs) are safe from this because their passwords are long, random and rotated automatically.&lt;/p&gt;

&lt;p&gt;The first job is to know which ordinary user accounts carry an SPN:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;Get-ADUser&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;-Filter&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;ServicePrincipalName&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-like&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"*"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;`&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nt"&gt;-Properties&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ServicePrincipalName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;PasswordLastSet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;msDS-SupportedEncryptionTypes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;adminCount&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="n"&gt;Select-Object&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;PasswordLastSet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;msDS-SupportedEncryptionTypes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;adminCount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ServicePrincipalName&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An old password, an &lt;code&gt;adminCount&lt;/code&gt; of 1 or no AES setting each push an account to the top of your list. The full guide shows how to move accounts to gMSAs, force AES, and spot an attack by watching event 4769 for RC4 tickets.&lt;/p&gt;

&lt;p&gt;Read the full guide: &lt;a href="https://learnitlessons.com/articles/kerberoasting-explained-prevention/" rel="noopener noreferrer"&gt;https://learnitlessons.com/articles/kerberoasting-explained-prevention/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A read-only version of this audit is in my GitHub lab scripts: &lt;a href="https://github.com/vitalii-shumylo/it-lab-scripts" rel="noopener noreferrer"&gt;https://github.com/vitalii-shumylo/it-lab-scripts&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Written with AI assistance and checked by the author.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>activedirectory</category>
      <category>windowsserver</category>
      <category>powershell</category>
    </item>
  </channel>
</rss>
