File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,11 +11,25 @@ Set-StrictMode -Version Latest
1111$folder = " WslLogs-" + (Get-Date - Format " yyyy-MM-dd_HH-mm-ss" )
1212mkdir - p $folder | Out-Null
1313
14- if ($LogProfile -eq $null )
14+ if ($LogProfile -eq $null -Or ! [ System.IO.File ]::Exists( $LogProfile ) )
1515{
16+ if ($LogProfile -eq $null )
17+ {
18+ $url = " https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/wsl.wprp"
19+ }
20+ elseif ($LogProfile -eq " storage" )
21+ {
22+ $url = " https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/wsl_storage.wprp"
23+ }
24+ else
25+ {
26+ Write-Error " Unknown log profile: $LogProfile "
27+ exit 1
28+ }
29+
1630 $LogProfile = " $folder /wsl.wprp"
1731 try {
18- Invoke-WebRequest - UseBasicParsing " https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/wsl.wprp " - OutFile $LogProfile
32+ Invoke-WebRequest - UseBasicParsing $url - OutFile $LogProfile
1933 }
2034 catch {
2135 throw
You can’t perform that action at this time.
0 commit comments