first commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
---
|
||||
title: How to Shrink a WSL2 Virtual Disk – SCRIPT
|
||||
updated: 2022-10-17 18:47:57Z
|
||||
created: 2022-10-17 18:47:57Z
|
||||
source: https://stephenreescarter.net/how-to-shrink-a-wsl2-virtual-disk/
|
||||
---
|
||||
|
||||
just put the in the flle scriptname.txt the lines
|
||||
|
||||
```batch
|
||||
wsl.exe –terminate WSLinux
|
||||
wsl –shutdown
|
||||
select vdisk file=%appdata%\\..\\Local\\Local\\Packages\\SomeWSLVendorName\\LocalState\\ext4.vhdx
|
||||
compact vdisk
|
||||
exit
|
||||
```
|
||||
|
||||
Create a task in task scheduler with this action
|
||||
|
||||
`diskpart /s PathToScript\\scriptname.txt > logfile.txt`
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
title: How to Shrink a WSL2 Virtual Disk – SCRIPT
|
||||
updated: 2022-10-17 18:47:57Z
|
||||
created: 2022-10-17 18:47:57Z
|
||||
source: https://stephenreescarter.net/how-to-shrink-a-wsl2-virtual-disk/
|
||||
---
|
||||
|
||||
just put the in the flle scriptname.txt the lines
|
||||
|
||||
```batch
|
||||
wsl.exe –terminate WSLinux
|
||||
wsl –shutdown
|
||||
select vdisk file=%appdata%\\..\\Local\\Local\\Packages\\SomeWSLVendorName\\LocalState\\ext4.vhdx
|
||||
compact vdisk
|
||||
exit
|
||||
```
|
||||
|
||||
Create a task in task scheduler with this action
|
||||
|
||||
`diskpart /s PathToScript\\scriptname.txt > logfile.txt`
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
title: How to Shrink a WSL2 Virtual Disk – SCRIPT
|
||||
updated: 2022-10-17 18:47:57Z
|
||||
created: 2022-10-17 18:47:57Z
|
||||
source: https://stephenreescarter.net/how-to-shrink-a-wsl2-virtual-disk/
|
||||
---
|
||||
|
||||
just put the in the flle scriptname.txt the lines
|
||||
|
||||
```batch
|
||||
wsl.exe –terminate WSLinux
|
||||
wsl –shutdown
|
||||
select vdisk file=%appdata%\\..\\Local\\Local\\Packages\\SomeWSLVendorName\\LocalState\\ext4.vhdx
|
||||
compact vdisk
|
||||
exit
|
||||
```
|
||||
|
||||
Create a task in task scheduler with this action
|
||||
|
||||
`diskpart /s PathToScript\\scriptname.txt > logfile.txt`
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
title: How to Shrink a WSL2 Virtual Disk – SCRIPT
|
||||
updated: 2022-10-17 18:47:57Z
|
||||
created: 2022-10-17 18:47:57Z
|
||||
source: https://stephenreescarter.net/how-to-shrink-a-wsl2-virtual-disk/
|
||||
---
|
||||
|
||||
just put the in the flle scriptname.txt the lines
|
||||
|
||||
```batch
|
||||
wsl.exe –terminate WSLinux
|
||||
wsl –shutdown
|
||||
select vdisk file=%appdata%\\..\\Local\\Local\\Packages\\SomeWSLVendorName\\LocalState\\ext4.vhdx
|
||||
compact vdisk
|
||||
exit
|
||||
```
|
||||
|
||||
Create a task in task scheduler with this action
|
||||
|
||||
`diskpart /s PathToScript\\scriptname.txt > logfile.txt`
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
title: How to Shrink a WSL2 Virtual Disk – SCRIPT
|
||||
updated: 2022-10-17 18:47:57Z
|
||||
created: 2022-10-17 18:47:57Z
|
||||
source: https://stephenreescarter.net/how-to-shrink-a-wsl2-virtual-disk/
|
||||
---
|
||||
|
||||
just put the in the flle scriptname.txt the lines
|
||||
|
||||
```batch
|
||||
wsl.exe –terminate WSLinux
|
||||
wsl –shutdown
|
||||
select vdisk file=%appdata%\\..\\Local\\Local\\Packages\\SomeWSLVendorName\\LocalState\\ext4.vhdx
|
||||
compact vdisk
|
||||
exit
|
||||
```
|
||||
|
||||
Create a task in task scheduler with this action
|
||||
|
||||
`diskpart /s PathToScript\\scriptname.txt > logfile.txt`
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
title: How to Shrink a WSL2 Virtual Disk – SCRIPT
|
||||
updated: 2022-10-17 18:47:57Z
|
||||
created: 2022-10-17 18:47:57Z
|
||||
source: https://stephenreescarter.net/how-to-shrink-a-wsl2-virtual-disk/
|
||||
---
|
||||
|
||||
just put the in the flle scriptname.txt the lines
|
||||
|
||||
```batch
|
||||
wsl.exe –terminate WSLinux
|
||||
wsl –shutdown
|
||||
select vdisk file=%appdata%\\..\\Local\\Local\\Packages\\SomeWSLVendorName\\LocalState\\ext4.vhdx
|
||||
compact vdisk
|
||||
exit
|
||||
```
|
||||
|
||||
Create a task in task scheduler with this action
|
||||
|
||||
`diskpart /s PathToScript\\scriptname.txt > logfile.txt`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user