<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Azure Archives - Wiredwolf Canada</title>
	<atom:link href="https://catastrophe.wiredwolf.com/category/azure/feed/" rel="self" type="application/rss+xml" />
	<link>https://catastrophe.wiredwolf.com/category/azure/</link>
	<description></description>
	<lastBuildDate>Wed, 17 May 2023 20:07:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>Azure AD Connect &#8211; Fixing the Sync</title>
		<link>https://catastrophe.wiredwolf.com/azure-ad-connect-fixing-the-sync/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 17 May 2023 17:03:54 +0000</pubDate>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Microsoft Office 365]]></category>
		<category><![CDATA[Microsoft Server]]></category>
		<guid isPermaLink="false">https://catastrophe.wiredwolf.com/?p=22432</guid>

					<description><![CDATA[<p>Windows Active Directory to Azure Active Directory generally works pretty well but there are times when the sync generates a new Azure AD user instead of linking to an existing account in Azure.  This generally happens when you're onboarding a client environment to Azure where they already have a number of accounts in MS 365  [...]</p>
<p>The post <a href="https://catastrophe.wiredwolf.com/azure-ad-connect-fixing-the-sync/">Azure AD Connect &#8211; Fixing the Sync</a> appeared first on <a href="https://catastrophe.wiredwolf.com">Wiredwolf Canada</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Windows Active Directory to Azure Active Directory generally works pretty well but there are times when the sync generates a new Azure AD user instead of linking to an existing account in Azure.&nbsp; This generally happens when you&#8217;re onboarding a client environment to Azure where they already have a number of accounts in MS 365 that are in use, and now need to be directly linked to the on-premises Active Directory.</p>
<p>Typically I use the EmailAddress (Mail) attribute to cross-link the accounts.</p>
<p>Example:</p>
<p>Azure AD user:&nbsp; Smiles J. McDuff</p>
<p>Azure AD email:&nbsp; smiley@mydomain.com, sjmcduff@mydomain.onmicrosoft.com</p>
<p>In AD I then create the user &#8211;</p>
<p>AD User:&nbsp; &nbsp;Smiles McDuff</p>
<p>SamAccountName:&nbsp; sjmcduff</p>
<p>Set Email Address:&nbsp; smiley@mydomain.com</p>
<p>When I do an Azure AD Connect Sync the new AD user should match to the Azure AD user and overwrite the user and attributes to that based in Active Directory.</p>
<p>Sometimes that doesn&#8217;t happen, such as making a typo with the email address, and instead of cross-linking the accounts between AD and AAD, a new user account is created in AAD.&nbsp; Now things get tricky, because no matter how many times you delete the incorrect account in Azure AD, the next sync will just recreate it.</p>
<p>The solution is to capture the ObjectGUID attribute for the user in Active Directory and set that as the ImmutableID for the user in Azure.</p>
<p>Command:</p>
<blockquote><p>Get-ADUser sjmcduff | select-object userPrincipalName, objectGuid</p></blockquote>
<p>Result:</p>
<blockquote><p>UserPrincipleName&nbsp; :&nbsp; sjmcduff@mywindowsdomain.com</p>
<p>objectGuid : b316d357-25fd-4912-9896-faf007a16289</p></blockquote>
<p>Now convert that Guid to something we can use as an ImmutableID &#8211;</p>
<blockquote><p>[Convert]::ToBase64String([guid]::New(&#8220;b316d357-25fd-4912-9896-faf007a16289&#8221;).ToByteArray())</p></blockquote>
<p>Result:&nbsp;&nbsp;</p>
<blockquote><p>V9MWs/0lEkmYlvrwB6FiiQ==</p></blockquote>
<p>This is our new ImmutableID value for the Azure AD user account.</p>
<blockquote><p>connect-msolservice</p>
<p>Get-MsolUser -UserPrincipalName &#8220;sjmcduff@mydomain.onmicrosoft.com&#8221; | select-object userPrincipalName, ImmutableId</p></blockquote>
<p>Result:</p>
<blockquote><p>UserPrincipalName : sjmcduff@mydomain.onmicrosoft.com<br />
ImmutableId :&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [Confirm ImmutableID is blank -if not record it in your notes]</p></blockquote>
<p>Command:</p>
<blockquote><p>Set-MsolUser -UserPrincipalName &#8220;sjmcduff@mydomain.onmicrosoft.com&#8221; -ImmutableId &#8220;V9MWs/0lEkmYlvrwB6FiiQ==&#8221;</p></blockquote>
<p>Comand:</p>
<blockquote><p>Get-MsolUser -UserPrincipalName &#8220;sjmcduff@mydomain.onmicrosoft.com&#8221; | fl userPrincipalName,ImmutableId</p></blockquote>
<p><strong><em>Confirm ImmutableID matches</em></strong></p>
<p>Now when you sync, the accounts should pair up properly.</p>
<p>The post <a href="https://catastrophe.wiredwolf.com/azure-ad-connect-fixing-the-sync/">Azure AD Connect &#8211; Fixing the Sync</a> appeared first on <a href="https://catastrophe.wiredwolf.com">Wiredwolf Canada</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Azure Repair and Recovery for Active Directory</title>
		<link>https://catastrophe.wiredwolf.com/azure-repair-and-recovery-for-active-directory/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 12 Nov 2022 20:48:04 +0000</pubDate>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Microsoft Server]]></category>
		<guid isPermaLink="false">https://catastrophe.wiredwolf.com/?p=22003</guid>

					<description><![CDATA[<p>This is a similar post to one a few days ago. In that post I detailed an experience I had with a recovered DC that refused to boot in Azure, and how I solved the issue. This post is more specific to creating a clean room, restoring your controllers to the clean room to run  [...]</p>
<p>The post <a href="https://catastrophe.wiredwolf.com/azure-repair-and-recovery-for-active-directory/">Azure Repair and Recovery for Active Directory</a> appeared first on <a href="https://catastrophe.wiredwolf.com">Wiredwolf Canada</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This is a <a href="https://catastrophe.wiredwolf.com/recover-a-domain-controller-in-azure/" target="_blank" rel="noopener">similar post</a> to one a few days ago. In that post I detailed an experience I had with a recovered DC that refused to boot in Azure, and how I solved the issue.</p>
<p>This post is more specific to creating a clean room, restoring your controllers to the clean room to run tests on them, particularly to make sure they&#8217;re replicating with each other, and restore them to the original Resource Group.&nbsp; In this post we are using Commvault as the backup medium and restoring to Azure using a Commvault Media Agent.</p>
<h4>Step 1: Create a Clean Room in Azure</h4>
<p>The clean room in Azure is a Resource Group into which Commvault will restore backups of the Active Directory Domain Controllers. This Resource Group should be created in the same region as the production environment.</p>
<p style="padding-left: 40px;">Resource Group:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; RG-CACENTRAL-AD-Cleanroom<br />
Within the Resource Group create:<br />
Virtual Network: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VNET-CACENTRAL-AD-Cleanroom<br />
Scope: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10.200.0.0/16<br />
Subnet 1:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SNET-CACENTRAL-AD-Cleanroom<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 10.200.0.0/24<br />
Subnet 2:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AzureBastionSubnet<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;10.200.254.0/26<br />
Storage Account:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; cleanroomstorage1<br />
Public IP:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PIP-Bastion-Cleanroom</p>
<p>NOTES</p>
<p style="padding-left: 40px;">• Subnet 2 is automatically created when Bastion is deployed, and the name of the subnet must be AzureBastionSubnet<br />
• The storage account is a requirement of Commvault as a place holder for the recovery VHDs<br />
• Commvault also requires the name of the virtual network/subnet<br />
• Throughout this exercise the vnet was never given its own security group or public IP address. This is a sandbox area with no internet access to ensure there can be no tampering with the domain controllers while they’re being recovered.<br />
Bastion Deployment</p>
<h4>Step 2 &#8211; Add Bastion</h4>
<p>• In the resource group click on Create<br />
• Enter “Bastion” in the search field<br />
• Select Microsoft Bastion<br />
• Click on Create to add the Bastion Plan to the Resource Group</p>
<p style="padding-left: 40px;">o Subscription: pre-selected<br />
o Resource Group: pre-selected<br />
o Name: RG-CACENTRAL-CLEANROOM-BASTION<br />
o Region: pre-selected (but make sure it matches)<br />
o Tier: Basic<br />
o Virtual Network: select VNET-CACENTRAL-AD-Cleanroom<br />
o Subnet: select AzureBastionSubnet<br />
o Public IP select ‘Create new’<br />
o Public IP Name PIP-Bastion-Cleanroom</p>
<p>It can take a few minutes for Bastion to deploy.</p>
<p>The Clean Room has now been set up. Please note that the only Public IP to this environment is with Bastion and Bastion cannot be accessed outside of the Azure Portal.</p>
<h4>Step 3 &#8211; Restoring the VMs to the Clean Room</h4>
<p>Using Commvault the restoration process will deposit/create replica VMs to the resource group.</p>
<p style="padding-left: 40px;">• Use the option to <strong>not start the VM</strong> when the restore is completed so you can check each one individually for corruption.<br />
• Try to restore from the same time frame for each domain controller<br />
IE – restore for Nov 11 2022 8 PM for one, then every other one should be the same or close<br />
• Recommend you start with your PDCE role holder and restore each subsequent domain controller to a time or date after the PDCE</p>
<h4>Step 4 &#8211; Verifying Azure Cleanroom VMs</h4>
<p>The restored VMs can be booted up but may require additional modifications to function in the different vnet. This can be set on the vnet object or each network interface object.</p>
<p>• Update the Network Interface for each VM<br />
o IP configurations – set to Static and note the IP address<br />
o DNS Servers – add the static IP assigned to each VM as DNS servers<br />
o Update the root IP A address of the domain, test pinging to ensure it resolves to the correct address<br />
Use Bastion to connect to each domain controller. Note that your username should not be your pre-2000 (DOMAIN\username) but rather your modern username (username@internaldomain.loc)</p>
<p>• Suggest you open Active Directory Sites and Services and add the SNET-CACENTRAL-AD-Cleanroom subnet and link to the site name of the original domain controller</p>
<p>Testing AD</p>
<p>In this environment I was able to connect to each domain controller and immediately execute commands to verify AD replication.&nbsp;</p>
<p style="padding-left: 40px;">• Start Elevated CMD<br />
• Execute: repadmin /syncall<br />
• Execute: repadmin /showrepl<br />
• Execute: repadmin /replsummary</p>
<p>I also created a bogus DNS entry under our domain and confirmed that it did replicate between controllers. Once confirmed be sure to remove this entry.</p>
<p>There was an issue with NETLOGON/SYSVOL replication with DFS Replication. In DNS the root A host record of the local domain is the original IP address of the PDCE and doesn’t automatically update. We resolved this issue in our test environment by adjusting this IP from the original to the new IP of the PDCE. Immediately all servers showed the NETLOGON and SYSVOL folders, and policies were being replicated between the domain controllers.</p>
<p><em>After moving back to the production environment make sure this DNS record is updated to its original value.</em></p>
<h4>Step 5 &#8211; Migration back to Production Environment</h4>
<p>The process to migrate the VMs to the Production Environment is simplified by only migrating the managed disks. To move the virtual disks the easiest way is to snapshot then create a replica from the snapshot in the target Resource Group.</p>
<p style="padding-left: 40px;">• Shut down the VMs in the Clean Room<br />
• Click on the disk to replicate in the Clean Room<br />
• Click on Create Snapshot<br />
• Give the snapshot a name but leave it in the same Resource group<br />
• Set the networking to ‘Disable public and private access’<br />
• Review + create<br />
• Create</p>
<p>Now click on the snapshot in the Resource group</p>
<p style="padding-left: 40px;">• Click on Create Disk<br />
• Give the disk a name that identifies it as the replacement OS disk for the DC being restored<br />
• Select the Resource group where the DC is being restored<br />
• Select an appropriate size for the disk<br />
• Set the networking to ‘Disable public and private access’<br />
• Review + create<br />
• Create</p>
<p>Go back to your production Resource group and ensure the servers you are about to restore are shut down</p>
<p style="padding-left: 40px;">• Start with your PDCE Virtual machine<br />
• Click on Disks<br />
• In the OS Disk section, click on Swap OS Disk</p>
<p>Pay attention to the disk name, size, and which resource group it is in, to ensure correct selection.</p>
<p><strong>Note:</strong><br />
<em>You must confirm the OS Disk Swap by typing in the name of the VM</em></p>
<p>Click on OK at the bottom of the screen and wait for deployment to complete.</p>
<p>You will need to repeat this process for each VM being restored.</p>
<h4>Final Steps</h4>
<p>Once you have restored all the domain controllers in this fashion, start them up one at a time starting with your PDCE, and execute your AD tests again.</p>
<p>Because you are only swapping disks and not recreating the VMs you do not need to worry about configuration changes to the VM itself. All that information is retained. The analogy here would be that you have restored to a new drive to an earlier point in time, removed the corrupted or locked drive, and replaced with the new drive.</p>
<p>Tech Notes:</p>
<ul>
<li>I found it can sometimes take Azure a little while for the disks to appear in the dropdowns (sometimes a few minutes)</li>
<li>I strongly recommend that you test this process biannually up to the point of restoring the disks to the production VMs.</li>
<li>Bastion also has its own costs so if you aren’t going to be using it regularly then you can add when needed and remove when your recovery process has been concluded.&nbsp; Keeping the Clean Room Resource Group doesn&#8217;t really cost anything but it&#8217;s so easy to recreate you might as well remove it as well.</li>
<li>After recovery you should ensure your backups are continuing as expected &#8211; check your backup logs and run new backups manually as a test</li>
</ul>
<p>The post <a href="https://catastrophe.wiredwolf.com/azure-repair-and-recovery-for-active-directory/">Azure Repair and Recovery for Active Directory</a> appeared first on <a href="https://catastrophe.wiredwolf.com">Wiredwolf Canada</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Recover a Domain Controller in Azure</title>
		<link>https://catastrophe.wiredwolf.com/recover-a-domain-controller-in-azure/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 11 Nov 2022 00:52:26 +0000</pubDate>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Azure]]></category>
		<category><![CDATA[Microsoft Server]]></category>
		<guid isPermaLink="false">https://catastrophe.wiredwolf.com/?p=21991</guid>

					<description><![CDATA[<p>I was recently tasked with creating a cleanroom restore process in Azure to recover Active Directory servers in the event of a catastrophic event, such as an entire AD domain being crypto-locked.  We needed to confirm that we could restore all the domain controllers, and that the domain controllers came up and were able to  [...]</p>
<p>The post <a href="https://catastrophe.wiredwolf.com/recover-a-domain-controller-in-azure/">Recover a Domain Controller in Azure</a> appeared first on <a href="https://catastrophe.wiredwolf.com">Wiredwolf Canada</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I was recently tasked with creating a cleanroom restore process in Azure to recover Active Directory servers in the event of a catastrophic event, such as an entire AD domain being crypto-locked.&nbsp; We needed to confirm that we could restore all the domain controllers, and that the domain controllers came up and were able to immediately replicate AD/DNS, etc.&nbsp;</p>
<p>The production environment:</p>
<ul>
<li>One AD server is already in Azure</li>
<li>One AD server is hosted on-premises in a VMware hypervisor</li>
<li>Backup is done on both servers with CommVault</li>
</ul>
<p>We created a Resource Group and populated with the following:</p>
<ul>
<li>Virtual Network separate from our production network with 2 subnets with no Public IP
<ul>
<li>Cleanroom Subnet</li>
<li>AzureBastionSubnet</li>
</ul>
</li>
<li>Bastion</li>
<li>StorageAccount</li>
</ul>
<p>Using CommVault both servers were restored to the vnet subnet for the Cleanroom.</p>
<p>The Azure server came up right away with no issues.&nbsp; AD DS was healthy.</p>
<p>The VMware hosted server did not come up &#8211; it could not be booted and gave a BSOD of 0xc00002e2 which is Directory Services could not be started.&nbsp; Uh oh &#8211; this is a problem.</p>
<p>Azure can be a little difficult when it comes to a BSOD on a server.&nbsp; There is no &#8216;console&#8217; per-say so there&#8217;s no way to reboot the server and start pounding on the F8 key to start in Directory Services Recovery Mode.&nbsp; Even after an exhaustive Google search session, there wasn&#8217;t a lot to be found.&nbsp; Lots of articles on how to enable DSRM on a failed domain controller if the option wasn&#8217;t available, but very little on how to actually get a VM to boot into DSRM.</p>
<p>The good news is it is doable, but it&#8217;s quite complex and involved.&nbsp; Here are the steps I performed to achieve my goal:</p>
<h3>Step 1 &#8211; create a recovery VM</h3>
<p>This is done by utilizing Azure CLI commands.</p>
<p><a href="https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/repair-windows-vm-using-azure-virtual-machine-repair-commands">Repair a Windows VM by using the Azure Virtual Machine repair commands &#8211; Virtual Machines | Microsoft Learn</a></p>
<p>I used the CLI option in the top right of Azure to open a CLI shell into Azure.&nbsp; This is the simplest way to get a shell without having to install a whole bunch of Azure modules into PowerShell and navigate MFA authentication, etc.</p>
<blockquote><p>az extension add -n vm-repair</p></blockquote>
<p>This installs the extension so you can run the repair and create the repair environment</p>
<p>If you&#8217;ve already installed the extension at some point you may need to update it:</p>
<blockquote><p>az extension update -n vm-repair</p></blockquote>
<p>You will be prompted to enable a Public IP &#8211; if you aren&#8217;t using Bastion you might as well indicate Y &#8211; you will need it to access your recovery VM.</p>
<p>Now you run some simple commands&nbsp;</p>
<blockquote><p>az vm repair create -g MyResourceGroup -n myVM &#8211;repair-username username &#8211;repair-password &#8216;password!234&#8217; &#8211;enable-nested &#8211;verbose</p></blockquote>
<ul>
<li>where MyResourceGroup is the resource group the failed VM is currently residing</li>
<li>where myVM is the name of the failed VM</li>
<li>where repair-username is the is admin user you want to use for your recovery VM&nbsp;</li>
<li>where repair-password is the admin password you want to use for your recovery VM (I suggest you use a strong password)</li>
<li>where &#8211;enable-nested sets up your recovery VM (a 2016 server) with Hyper-V installed</li>
</ul>
<p>Once these commands complete, you&#8217;ll have a new Resource Group called repair-<em>myVM</em>&#8211;<em>timestamp</em> which has your bootable 2016 recovery VM and a copy of your failed drives &#8211; the non-bootable AD controller system drives and whatever other disks were attached to the failed VM from the restore.</p>
<p>Boot up the myVM recovery VM if it isn&#8217;t already and use RDP (or Bastion if you have it) to connect to the server using the repair-username and repair-password you specified in the previous command.</p>
<ul>
<li>Your Windows 2016 Server should have Hpyer-V installed to it.&nbsp; If not, install it.</li>
<li>Open Computer Management -&gt; Disk Management and make sure the drive(s) you need to use for Hyper-V VM are set to &#8220;Offline&#8221;</li>
<li>Open Hyper-V and create a VM with appropriate vCPU cores and memory (acknowledging the limits of your Server 2016 recovery instance)
<ul>
<li>Do not create a drive &#8211; choose to add a drive later</li>
</ul>
</li>
<li>Edit your new Hyper-V VM
<ul>
<li>Click on IDE Controller 1</li>
<li>Click on Add Hard Drive</li>
<li>Select the physical disk available</li>
<li>Click on Apply then OK</li>
</ul>
</li>
<li>Right click on the VM and click on Connect</li>
<li>Start the VM</li>
<li>When it starts booting up start tapping F8 to get into the boot menu</li>
<li>Select Directory Services Recovery Mode</li>
<li>Log in with your DSRM (Administrator) password</li>
</ul>
<p>You can now perform the steps to correct whatever issues you&#8217;re having with AD.</p>
<p>When completed and you can boot the VM up and log in with your domain credentials, shut down the VM, then shut down your Recovery VM.</p>
<p>Go back to your Azure CLI&nbsp;</p>
<blockquote><p><span class="hljs-keyword">az vm repair restore </span><span class="hljs-parameter">-g</span> MyResourceGroup <span class="hljs-parameter">-n</span> MyVM <span class="hljs-parameter">&#8211;verbose</span></p></blockquote>
<p>Obviously, you will again substitute your values for MyResourceGroup and MyVM (same as above).</p>
<p>This final command will completely remove the recovery environment including the repair-ResourceGroup that was created from your Azure tenant.&nbsp;&nbsp;</p>
<p>You should now be able to boot your recovered AD Domain Controller in Azure.</p>
<h3>If your issue was not with Active Directory or you&#8217;re having issues recovering Active Directory due to disk issues:</h3>
<p><a href="https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/troubleshoot-directory-service-initialization-failure">Troubleshoot Windows stop error – directory service initialization failure &#8211; Virtual Machines | Microsoft Learn</a></p>
<p>I found this to be an extremely helpful article on fixing disks with NTDS installed.&nbsp;</p>
<ul>
<li>You can use the 2016 Server to run DISKPART on the attached drive to set the active partition (Gen 1 VMs)</li>
<li>You can use REG QUERY to find the location of the NTDS (typically C:\Windows\NTDS but it can be moved such as I found in my case which complicated things considerably)</li>
<li>You can run BCDEDIT commands to&nbsp;<em>force</em> the VM to boot to DSRM (safeboot dsrepair) so you can re-attach the disk to your VM in Azure and not worry about not being able to hit F8 on a console
<ul>
<li>Note &#8211; you will have to also reverse this or the BCD will&nbsp;<em>always</em> boot to DS Recovery Mode</li>
<li>Note &#8211; you still have to have your DSRM password to log in</li>
</ul>
</li>
</ul>
<p>Other Helpful Resources</p>
<p>I used all of these online resources to solve my problem.</p>
<p><a href="https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/troubleshoot-common-blue-screen-error">Blue screen errors when booting an Azure VM &#8211; Virtual Machines | Microsoft Learn</a></p>
<p><a href="https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/troubleshoot-recovery-disks-portal-windows">Troubleshoot a Windows VM in the Azure portal &#8211; Virtual Machines | Microsoft Learn</a></p>
<p><a href="https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/reset-directory-services-restore-mode-admin-pwd">How to reset the Directory Services Restore Mode administrator account password &#8211; Windows Server | Microsoft Learn</a></p>
<p><a href="https://support.hostway.com/hc/en-us/articles/360001126259-How-to-fix-Error-0xc00002e2-after-rebooting-Windows-Domain-Controller">How to fix Error 0xc00002e2 after rebooting Windows Domain Controller – Hostway Help Center</a></p>
<p><a href="https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/serial-console-windows">Azure Serial Console for Windows &#8211; Virtual Machines | Microsoft Learn</a></p>
<p><a href="https://www.cloud-aware.net/2022/08/fixing-non-bootable-azure-virtual.html">Fixing non-bootable Azure Virtual Machine (cloud-aware.net)</a></p>
<p><a href="https://www.kapilarya.com/how-to-boot-windows-server-in-directory-services-restore-mode-dsrm">How to boot Windows Server in Directory Services Restore Mode (DSRM) (kapilarya.com)</a></p>
<p><a href="https://www.dell.com/support/kbdoc/en-ca/000137796/recovering-the-active-directory-database-in-windows-server-2012-r2#:~:text=The%20default%20path%20for%20ntds,C%3A%5CWindows%5CSystem32%20folder.">Recovering the Active Directory database in Windows Server 2012 R2 | Dell Canada</a></p>
<p><a href="https://www.nakivo.com/blog/hyper-v-nested-virtualization-on-azure-complete-guide/">How to Deploy Hyper-V Nested Virtualization on Azure: Full Overview (nakivo.com)</a></p>
<p><a href="https://learn.microsoft.com/en-us/azure/virtual-machines/windows/attach-managed-disk-portal">Attach a managed data disk to a Windows VM &#8211; Azure &#8211; Azure Virtual Machines | Microsoft Learn</a></p>
<p>The post <a href="https://catastrophe.wiredwolf.com/recover-a-domain-controller-in-azure/">Recover a Domain Controller in Azure</a> appeared first on <a href="https://catastrophe.wiredwolf.com">Wiredwolf Canada</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
