Browse Source

fixed WSL-Install function

fixed WSL-Install function
pull/450/head
Dmitry Nefedov 2 years ago
parent
commit
aa0d90deb8
  1. 2
      src/Sophia_Script_for_Windows_10/Module/Sophia.psm1
  2. 2
      src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1
  3. 2
      src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1
  4. 2
      src/Sophia_Script_for_Windows_11/Module/Sophia.psm1
  5. 2
      src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

2
src/Sophia_Script_for_Windows_10/Module/Sophia.psm1

@ -9650,7 +9650,7 @@ function Install-WSL
{ {
[System.Console]::OutputEncoding = [System.Text.Encoding]::Unicode [System.Console]::OutputEncoding = [System.Text.Encoding]::Unicode
$Distros = (wsl --list --online | Select-Object -Skip 8).Replace(" ", "").Replace("* ", "") | ForEach-Object -Process { $Distros = (wsl --list --online | Select-Object -Skip 4).Replace(" ", "").Replace("* ", "") | ForEach-Object -Process {
[PSCustomObject]@{ [PSCustomObject]@{
"Distro" = $_ -split " ", 2 | Select-Object -Last 1 "Distro" = $_ -split " ", 2 | Select-Object -Last 1
"Alias" = $_ -split " ", 2 | Select-Object -First 1 "Alias" = $_ -split " ", 2 | Select-Object -First 1

2
src/Sophia_Script_for_Windows_10_LTSC_2021/Module/Sophia.psm1

@ -8635,7 +8635,7 @@ function Install-WSL
{ {
[System.Console]::OutputEncoding = [System.Text.Encoding]::Unicode [System.Console]::OutputEncoding = [System.Text.Encoding]::Unicode
$Distros = (wsl --list --online | Select-Object -Skip 8).Replace(" ", "").Replace("* ", "") | ForEach-Object -Process { $Distros = (wsl --list --online | Select-Object -Skip 4).Replace(" ", "").Replace("* ", "") | ForEach-Object -Process {
[PSCustomObject]@{ [PSCustomObject]@{
"Distro" = $_ -split " ", 2 | Select-Object -Last 1 "Distro" = $_ -split " ", 2 | Select-Object -Last 1
"Alias" = $_ -split " ", 2 | Select-Object -First 1 "Alias" = $_ -split " ", 2 | Select-Object -First 1

2
src/Sophia_Script_for_Windows_10_PowerShell_7/Module/Sophia.psm1

@ -9658,7 +9658,7 @@ function Install-WSL
{ {
[System.Console]::OutputEncoding = [System.Text.Encoding]::Unicode [System.Console]::OutputEncoding = [System.Text.Encoding]::Unicode
$Distros = (wsl --list --online | Select-Object -Skip 8).Replace(" ", "").Replace("* ", "") | ForEach-Object -Process { $Distros = (wsl --list --online | Select-Object -Skip 4).Replace(" ", "").Replace("* ", "") | ForEach-Object -Process {
[PSCustomObject]@{ [PSCustomObject]@{
"Distro" = $_ -split " ", 2 | Select-Object -Last 1 "Distro" = $_ -split " ", 2 | Select-Object -Last 1
"Alias" = $_ -split " ", 2 | Select-Object -First 1 "Alias" = $_ -split " ", 2 | Select-Object -First 1

2
src/Sophia_Script_for_Windows_11/Module/Sophia.psm1

@ -9283,7 +9283,7 @@ function Install-WSL
{ {
[System.Console]::OutputEncoding = [System.Text.Encoding]::Unicode [System.Console]::OutputEncoding = [System.Text.Encoding]::Unicode
$Distros = (wsl --list --online | Select-Object -Skip 8).Replace(" ", "").Replace("* ", "") | ForEach-Object -Process { $Distros = (wsl --list --online | Select-Object -Skip 4).Replace(" ", "").Replace("* ", "") | ForEach-Object -Process {
[PSCustomObject]@{ [PSCustomObject]@{
"Distro" = $_ -split " ", 2 | Select-Object -Last 1 "Distro" = $_ -split " ", 2 | Select-Object -Last 1
"Alias" = $_ -split " ", 2 | Select-Object -First 1 "Alias" = $_ -split " ", 2 | Select-Object -First 1

2
src/Sophia_Script_for_Windows_11_PowerShell_7/Module/Sophia.psm1

@ -9291,7 +9291,7 @@ function Install-WSL
{ {
[System.Console]::OutputEncoding = [System.Text.Encoding]::Unicode [System.Console]::OutputEncoding = [System.Text.Encoding]::Unicode
$Distros = (wsl --list --online | Select-Object -Skip 8).Replace(" ", "").Replace("* ", "") | ForEach-Object -Process { $Distros = (wsl --list --online | Select-Object -Skip 4).Replace(" ", "").Replace("* ", "") | ForEach-Object -Process {
[PSCustomObject]@{ [PSCustomObject]@{
"Distro" = $_ -split " ", 2 | Select-Object -Last 1 "Distro" = $_ -split " ", 2 | Select-Object -Last 1
"Alias" = $_ -split " ", 2 | Select-Object -First 1 "Alias" = $_ -split " ", 2 | Select-Object -First 1

Loading…
Cancel
Save