Granting ownership of a folder allows you to manipulate its contents without encountering a warning pop-up. However, when changing ownership, some users face the ‘Failed to Enumerate Objects in the Container’ error.
The error can appear due to missing administrator privileges, conflicting programs, corrupt system files, and disk errors. Use these seven methods to bypass the error and get complete access to your folders and files.
1. Ensure Administrator Privileges
When accessing a file or folder requiring elevated privileges, you can often face the ‘Failed to Enumerate Objects in the Container’ error. If you have multiple users, ensure the account has administrator privileges. Here’s how to do it:
Step 1: Press the Windows key + R to open the Run dialog box. Type control /name Microsoft.UserAccounts in the text box and press Enter.
Step 2: Click on the ‘Change your account type’ option.
Step 3: Click on the Administrator option. Then click on the Change Account Type button.
Step 4: Close the Control Panel window.
Step 5: Retry changing the ownership and check if you get the error again.
2. Switch to the Built-in Administrator Account
If changing the account type doesn’t help, you can switch to the built-in administrator account. That way, you will have unrestricted access to most Windows operating system features, including changing ownership of a file or folder. Here’s how to do it:
Step 1: Press the Windows key to open the Start menu. Type cmd in the search box and press the Ctrl + Shift + Enter keys together.
Step 2: The User Account Control will launch. Click on the Yes button.
Step 3: Type the following command and press Enter to execute it:
net user administrator /active:yes
Step 4: Close the Command Prompt window.
Step 5: Press the Windows key to open the Start menu. Click on the Profile icon and then select the administrator profile.
Step 6: Log in to the profile and then retry changing the ownership using the Properties window.
3. Use the Command Prompt to Grant Complete Ownership
If you face the error while using the Properties window, you can switch to Command Prompt to change the ownership. Here’s how to do it:
Step 1: Press the Windows key + E to open the File Explorer.
Step 2: Navigate to the folder or file you want to access and right-click on it. Select the Copy as path option.
Step 3: Press the Windows key to open the Start menu. Type cmd in the search box and press the Ctrl + Shift + Enter keys together.
Step 4: The User Account Control will launch. Click on the Yes button to launch Command Prompt with administrator privileges.
Step 5: The syntax of the first command to take ownership is:
takeown /F “full path” /a /r /d y
Step 6: Replace the “full path” part with the path you copied in the second step. Then press Enter to execute the new command:
takeown /f "C:\Windows\System32\AdvancedInstallers" /a /r /d y
Step 7: Similarly, the syntax of the second command is:
icacls “full path” /grant administrators:F /t
Step 8: Replace the “full path” and press Enter to execute the command:
icacls "C:\Windows\System32\AdvancedInstallers" /grant administrators:F /t
Step 9: After executing both commands without errors, close the Command Prompt window.
4. Switch to Safe Mode to Complete the Operation
Often, third-party programs and background services can interfere with basic OS operations. So, you must switch to Safe Mode and then reattempt changing a file or folder ownership. Here’s how to do it:
Step 1: Press the Windows key + L to lock the PC.
Step 2: Press and hold the Shift key, then click the Power icon. Select the Restart option.
Step 3: Your PC will boot to the Windows Recovery Environment page. Click on the Troubleshoot option.
Step 4: Click on the Advanced options.
Step 5: Now, click on the Startup Settings option.
Step 6: Click on the Restart option.
Step 7: After the PC restarts, press the F6 key to boot into Safe Mode with Command Prompt.
Step 8: Open the File Explorer and try changing the ownership of the file or folder. Exit the Safe Mode afterward.
5. Run a Check Disk Scan
Disk errors and corrupt files can cause all sorts of problems while manipulating any file or folder on the storage drive. So, you must use the Check Disk utility to scan and fix all the errors. Here’s how to do it:
Step 1: Press the Windows key to open the Start menu. Type cmd in the search box and simultaneously press the Ctrl + Shift + Enter keys.
Step 2: The User Account Control will launch. Click on the Yes button to launch Command Prompt with administrator privileges.
Step 3: Type the following command and press Enter:
chkdsk /r
Step 4: Type y and press Enter.
Step 5: Close the Command Prompt window.
Step 6: Restart your PC to start the check disk scan and wait for it to boot to the lock screen.
6. Try System Restore
System Restore creates snapshots of your PC at regular intervals, and you can use these restore points to revert to an earlier point in time. If you recently noticed the ‘Failed to Enumerate Objects in the Container’ error, applying a restore point might fix the issue. Here’s how to do it:
Step 1: Press the Windows key to open the Start menu. Type rstrui in the search box and press Enter to open System Restore.
Step 2: Click on the Next button.
Step 3: Select a restore point from the list and click on the Next button.
Step 4: Follow the on-screen instructions to apply the restore point on your PC.
7. Do an In-Place Upgrade
The last resort is to reinstall Windows on your PC. But if you do a system reset, it will remove all the installed programs. Instead, do an In-Place Upgrade to reinstall Windows without removing installed programs and personal files. Here’s how:
Step 1: Download the Windows ISO file.
Step 2: Double-click on the ISO file to mount it. After that, double-click on the setup.exe file.
Step 3: The User Account Control window will launch. Click on the Yes button to launch the Windows Installer.
Step 4: Click on the Next button.
Step 5: Click on the Accept button.
Step 6: Then, click on the Install button.
Step 7: Follow the on-screen instructions to finish the In-Place Upgrade. It will take more than half an hour to complete.
Fix Windows Errors
These were the seven methods to fix the ‘Failed to Enumerate Objects in the Container’ error in Windows. Enable administrator privileges in your local account, switch to the built-in administrator account, and use Command Prompt to change the ownership. After that, try the Safe mode, check the disk for errors, and do an In-Place upgrade as a last resort.
Was this helpful?
Last updated on 21 January, 2024
The article above may contain affiliate links which help support Guiding Tech. The content remains unbiased and authentic and will never affect our editorial integrity.