Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # fills the free space on disk with zeroes
- $buf = [byte[]](1024 * 1024);
- $path = "$CWD\zero";
- $file = [IO.File]::Create($path, $buf.Length, [IO.FileOptions]::DeleteOnClose);
- try {
- while(1) {
- $file.Write($buf, 0, $buf.Length);
- }
- } catch {
- }
- $file.Flush();
- $file.Close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement