This PowerShell script shows how to delete the "Windows.old" folder in Windows 8.
Assume that you perform a refresh of Windows 8, an upgrade to Windows 8, a custom installation of Windows 8 without formatting the drive, or install Windows 8 on the same partition of a previous Windows installation. In this situation, you may have a "C:\Windows.old" folder left over after your new installation. This folder contains a copy of the previous Windows 8 installation, and can be very large. If users do not have to have this folder, they can use a script to delete the folder.
You can find more All-In-One Script Framework script samples at https://aka.ms/onescriptingallery