Disk cleanup with powershell in Windows server 2012 r2

Summary

How to cleanup disk in Windows server 2012 with powershell without data? Here you can increase the disk space in server 2012 without data loss.

Andrew Wright

12/11/2018

by Andrew Wright

Follow @IM-Magic

Disk cleanup with powershell in Windows server 2012 r2

Using the windows server 2012 r2 disk cleanup powershell system works great if you want to clean up your disk and remove all the unwanted files that might cause errors. The more you focus on dealing with such a problem, the easier it will be to achieve the results you want. Powershell is a very good tool if you use it properly. And it actually comes down to finding the right approach when it comes to using it.

How can you do disk cleanup with Powershell?

You will need to install a separate server component in this case. And that component is named Desktop Experience. You will have to use Powershell to do that.

  • Enter Powershell and make sure that everything runs properly
  • Use the “Install-WindowsFeature Desktop-Experience” command
  • Exit powershell and you should be ready to go. Restart only if necessary

The stuff that you can remove from Windows Server 2012 R2 differs here. But most of the time you can remove the sniping tool, character map, audio recording, sync central, Windows defender, AVI support and so on. All these things are actually unnecessary for you, so you want to remove them as quickly as you can. It will definitely be worth it in the end, so try to take your time with that.

Open command prompt, then add:

copy C:\Windows\WinSxS\amd64_microsoft-windows-cleanmgr_31bf3856ad364e35_6.2.9200.16384_none_c60dddc5e750072a\cleanmgr.exe C:\Windows\System32\

copy C:\Windows\WinSxS\amd64_microsoft-windows-cleanmgr.resources_31bf3856ad364e35_6.2.9200.16384_en-us_b6a01752226afbb3\cleanmgr.exe.mui C:\Windows\System32\en-US\

Once you added that, you will start disk cleanup with cleanmgr.exe. It’s a process that actively works the way you want, even if it needs a bit of adjustment. But the problem is that it might not work every time due to errors. So using a third party tool is very important and it actively makes a lot of sense in the long run.

How to free up/increase disk space with Partition Resize Server Edition

IM-Magic Partition Resizer Server Edition does an amazing job at helping you clean up unnecessary data. All you have to do is to open IM-Magic Partition Resizer Server Edition and then you need to select the option that allows you to Clean Up Disk. This will automatically clean the disk temp file and trashes. It will make it easier to have a clean server that’s ready to go.

And the best part is that you don’t have to remove all this stuff while the server is already running. It still helps you immensely, and you will have no problem achieving the results you expect in no time.

We found IM-Magic Partition Resizer Server Edition to be a much better solution than Powershell. It’s a system that works very well and you can adapt it to your own needs. It’s delivering the best quality and at the same time it’s also affordable too. Plus, you can easily use the app for resizing the server partitions too, so the possibilities are indeed limitless. Do try and give IM-Magic Partition Resizer Server Edition a shot if you want the best value and results. We guarantee you will not be disappointed with it!

[Guide] Steps to extend volume without data loss

This step by step guide will show you the right way to extend any volume using IM-Magic Partition Resizer Unlimited edition ;

Step-1  Download install, and launch the program.

Step-2 Right click the large volume to produce unallocated free space.

Steps to increase disk partition spaceSteps to increase disk partition space

Step-3  Then right click c and drag the border to acquire the free space.

Steps to increase disk partition space Steps to increase disk partition space

Step-4 Apply the changes.

Related Product