How to Recover Files after losing the Admin Password in Windows Server 2019/2022

Losing access to a Windows Server due to a forgotten password can be a frustrating experience. However, there are ways to recover your files and regain control of your data. In this article, we will outline the necessary steps to retrieve your files from a Windows Server by using a Linux-based Rescue Mode. Please note that the process may vary depending on your hosting provider, but we will provide general guidelines to help you through the recovery process. 

 Can I Just Reset My Windows Administrator Password?

Recovering lost admin passwords for Windows Server 2019 and Windows Server 2022 is no longer possible.Microsoft’s latest security enhancements have erected an unbreakable barrier, effectively preventing unauthorized access and protecting sensitive data. Regrettably, the days of easy password recovery for lost admin credentials are now a thing of the past. So, the only thing you can do is recovering all your important files and data from your Windows Server instance and reset the server. 

However, if you are still using older versions of Windows Server e.g., Windows Server 2012 or 2016 we got an article which will guide you through the process of resetting the Administrator password here

If you are still able to login into your Windows Server but you just want to change your current password check out this article

Launching Rescue System

To begin the file recovery process, you will need to log into a Linux-based Rescue Mode. If you are a Contabo customer, you can access this mode directly from the Customer Control Panel.  

To do so go to “Your Services”, hover over “Manage” and click on “Rescue System”: 

How to Recover Files after losing the Admin Password in Windows Server  (launch rescue mode)

Now leave it on “Debian Rescue” which is recommended and assign a password to your rescue instance. 

After a short reboot you will be able to login into your Rescue System via SSH. 

Important: While your server is in rescue mode you can’t access your server via RDP! 

How to Recover Files after losing the Admin Password in Windows Server (enter resuce password)

For customers of other providers, the process might differ, so it’s recommended to consult your hosting provider’s documentation or support team for specific instructions on accessing Rescue Mode. 

Mounting the Windows Partition

Once you have accessed the Linux-based Rescue Mode, follow these steps: 

 1. Create a folder to mount the Windows partition. For example, you can create a directory named “windows” using the following command: 

sudo mkdir /mnt/windows

2. Identify the Windows partition by running the command: 

fdisk –l

3. Once you have determined the correct partition, mount it using the following command: 

mount /dev/sdX /mnt/windows

Replace “/dev/sdX” with the appropriate partition identifier, such as “/dev/sda1.” 

Transfer the Files with SCP

With the Windows partition mounted, you can now transfer your important files to a different server for backup purposes. SCP (Secure Copy Protocol) is a secure file transfer protocol that can be used for this purpose. 

Ensure that you have another server or computer with SSH access, where you want to transfer the files.  

Use the SCP command to copy files from the Windows partition to the remote server. For example, to copy a file named “important_file.txt” from the Windows partition to the remote server, you can run: 

scp /mnt/windows/important_file.txt user@remote_server:/path/to/destination/ 

Replace “user” with the username on the remote server, “remote_server” with the server’s IP address or hostname, and “/path/to/destination/” with the desired location on the remote server where you want to store the file. 

Repeat the SCP command for each file or directory you wish to back up. 

Note: Important files on a Windows Server are commonly found in the following locations: 

User profiles: C:\Users\ 

System files: C:\Windows\ 

Application data: C:\ProgramData\ 

Web server files: C:\inetpub\ 

Congrats! Now your important files are safe again! 

Proceed with reinstalling your Windows Server and make sure to not forget your Admin password again. 

To keep all your passwords safe and organized check out our Guide on how to setup the password-manager Bitwarden on your server. 

Scroll to Top