- List drive letters currently in use with the command
Get-PSDrive -PSProvider FileSystem.PS B:\> Get-PSDrive -PSProvider FileSystem Name Used (GB) Free (GB) Provider Root ---- --------- --------- -------- ---- C 39.81 198.32 FileSystem C:\ D FileSystem D:\ E FileSystem E:\ F 27.78 996.09 FileSystem F:\ P FileSystem P:\ X FileSystem X:\ - Use the
substcommand and assign a virtual drive letter to the CSV volume.This example uses drive B: and maps the CSV volume to "C:\ClusterStorage\Volume1\".S G:\> subst B: C:\ClusterStorage\Volume1 PS G:\> B: PS B:\> ls Directory: B:\ Mode LastWriteTime Length Name ---- ------------- ---------- ---- d---- 7/12/2015 6:15 PM PowerShellSDK_1-0-15-0 d---- 7/12/2015 6:15 PM PowerShellToolkit-2-8-0-430 d---- 7/12/2015 6:16 PM PowerShellToolkit-3-0-0-0 d---- 7/20/2015 11:46 PM PythonToolkit-1-4-0 d---- 9/28/2015 6:35 PM SCOM d---- 12/30/2015 11:14 PM vdbench-1 d---- 7/12/2015 6:04 PM vdbench-2 d---- 7/12/2015 6:04 PM vdbench-3 -a--- 12/18/2015 1:29 AM 2718328422 PowerShellSDK_1-0-15-0.VHDX 4 -a--- 12/18/2015 1:30 AM 1084227584 PowerShellToolkit-2-8-0-430.VHDX 0 -a--- 9/9/2015 6:36 PM 9802088448 PowerShellToolkit-3-0-0-0.VHDX -a--- 11/23/2015 3:58 AM 1114426572 PythonToolkit-1-4-0.VHDX 8 -a--- 1/9/2013 2:26 PM 155736 sdelete.exe -a--- 12/18/2015 2:48 AM 1007052390 vdbench-1.VHDX 4 -a--- 12/18/2015 2:48 AM 1037251379 vdbench-2.VHDX 2 -a--- 12/18/2015 2:48 AM 1090938470 vdbench-3.VHDX 4 - Run
sdeleteto free space on the CSV. Deleted CSV files or folders still in the trash bin can prevent full space reclamation.Note: Usesdelete64for 64bit operating systems.- You must have the sdelete.exe file in the command path or the file sdelete.exe must exist on the current path. If you do not have the sdelete program, download it from Microsoft TechNet.
- Go to the virtual drive. In the example, drive B: is mapped to the CSV.
- Run
.\sdelete -z -s B:to zero out free space in the directory and its sub-directories.
PS B:\> .\sdelete -z -s B: SDelete - Secure Delete v1.61 Copyright (C) 1999-2012 Mark Russinovich Sysinternals - www.sysinternals.com SDelete is set for 1 pass. Zeroing free space on B:\: 0%