mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-12-28 09:38:53 +01:00
Updated list-wsl-distros.ps1
This commit is contained in:
parent
0d3c0ce08c
commit
ad73e693cb
@ -1,4 +1,22 @@
|
|||||||
& wsl.exe --list --online
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Lists distros for Windows Subsystem for Linux
|
||||||
|
.DESCRIPTION
|
||||||
|
This PowerShell script lists available Linux distributions for Windows Subsystem for Linux (WSL).
|
||||||
|
.EXAMPLE
|
||||||
|
PS> ./list-wsl-distros.ps1
|
||||||
|
.LINK
|
||||||
|
https://github.com/fleschutz/PowerShell
|
||||||
|
.NOTES
|
||||||
|
Author: Markus Fleschutz | License: CC0
|
||||||
|
#>
|
||||||
|
|
||||||
|
try {
|
||||||
|
& wsl.exe --list --online
|
||||||
" "
|
" "
|
||||||
& wsl.exe --status
|
& wsl.exe --status
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
|
} catch {
|
||||||
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
exit 1
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user