From Giki

diskpart - remove all partitions


list disk
select disk n

use clean all to zero the disk after removing partitions (might take long and cannot be aborted!) - if diskpart was closed when clean all was executed but not yet done: use the task manager tab performance to see when usage drops from 100 % on previously selected disk to see when it's done

fix ALTGR in RDP session not working


from time to time ALTGR does not work in a RDP session. while this can be circumvent by pressing ALT + CTRL it can be easily fixed by pressing ALT + RETURN.

Shrink VHDX

in VM


defrag C:



DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          63 GB     23 GB        *

DISKPART> select disk 0

Disk 0 is now the selected disk.

DISKPART> list volume

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0         Recovery     NTFS   Partition    499 MB  Healthy
  Volume 1     C                NTFS   Partition     50 GB  Healthy    Boot
  Volume 2                      FAT32  Partition     99 MB  Healthy    System

DISKPART> select volume 0

Volume 0 is the selected volume.

DISKPART> shrink querymax

The maximum number of reclaimable bytes is:  15 GB (177586 MB)

DISKPART> shrink desired=12256

DiskPart successfully shrunk the volume by:   11 GB

on Hyper-V Host


Resize-VHD -Path 'C:\Hyper-V\VMNAME\Virtual Hard Disks\VMNAME.vhdx' -ToMinimumSize

Compact disk using GUI

In the setting of the VM select the disk -> Edit -> Compact

Self-healing NTFS

initial source:

To enumerate the confirmed corruptions of a volume, type:

fsutil repair enumerate C: $Corrupt

To enable self-healing repair on drive C, type:

fsutil repair set c: 1

To disable self-healing repair on drive C, type:

fsutil repair set c: 0

Virus Scanner

Kaspersky Free Rescue Disk (bootable)

Microsoft Safety Scanner (Windows)