Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wsl --install : Don't work with System context #11142

Open
1 of 2 tasks
Radhwen-1919 opened this issue Feb 9, 2024 · 3 comments
Open
1 of 2 tasks

wsl --install : Don't work with System context #11142

Radhwen-1919 opened this issue Feb 9, 2024 · 3 comments
Assignees

Comments

@Radhwen-1919
Copy link

Windows Version

19045.3930

WSL Version

2.0.14

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

No response

Distro Version

Ubuntu

Other Software

No response

Repro Steps

I want to deply WSL 2 to Intune but when testing on my local machine I can't install WSL with system context (C:\pstools\PsExec.exe /s cmd) .

the Script:

####### Install the latest version of Ubuntu ######

Write-Log -Message "Starting Install WSL..."

wsl --install

########## Update WSL to the latest version ##########

Write-Log -Message "Starting Update WSL to the latest version..."

wsl --update --web-download

########## Set default version 2 ##########

Write-Log -Message "Starting Set default version 2..."

wsl --set-default-version 2

########## Install Ubuntu distribution ##########

Write-Log -Message "Starting Install Ubuntu distribution..."

wsl --install -d Ubuntu --no-launch

command for testing:
%WINDIR%\System32\windowsPowershell\v1.0\Powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File Install_WSL.ps1

Expected Behavior

It should install WSL and update to latest version and set version 2 and instal Ubuntu distribution.

Actual Behavior

It gives the output:

COMMENTAIRES : Starting Install WSL...
o p y r i g h t ( c ) M i c r o s o f t C o r p o r a t i o n . T o u s d r o i t s r Ú s e r v Ú s .
u t i l i s a t i o n á : W S L . e x e [ A r g u m e n t ] [ O p t i o n s . . . ] [ C o m m a n d L i n e ]

COMMENTAIRES : Starting Update WSL to the latest version...
Ú l Ú c h a r g e m e n t e n c o u r s á : S o u s - s y s t Þ m e W i n d o w s p o u r L i n u x
I n s t a l l a t i o n e n c o u r s á : S o u s - s y s t Þ m e W i n d o w s p o u r L i n u x
P a r a m Þ t r e i n c o r r e c t .

COMMENTAIRES : Starting Set default version 2...
P o u r p l u s d ↓ i n f o r m a t i o n s s u r l e s d i f f Ú r e n c e s d e c l Ú s a v e c W S L á 2 , v i s i t e z h t t p s : / / a k a . m s / w s l 2
L ↓ o p Ú r a t i o n a r Ú u s s i .

COMMENTAIRES : Starting Install Ubuntu distribution...

  • i n s t a l l : u n r e c o g n i z e d o p t i o n : n o - l a u n c h
    C o p y r i g h t ( c ) M i c r o s o f t C o r p o r a t i o n . T o u s d r o i t s r Ú s e r v Ú s .
    u t i l i s a t i o n á : W S L . e x e [ A r g u m e n t ] [ O p t i o n s . . . ] [ C o m m a n d L i n e ]

Diagnostic Logs

No response

Copy link

github-actions bot commented Feb 9, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@Skeb1ns
Copy link

Skeb1ns commented Aug 29, 2024

Any updates on this? Using Intune to distribute wsl and found out that it currently doesn't want to install in System context. Any reason why this limitation exists?

Our users don't have admin permissions (which they should not have in a corporate environment).

@martencassel
Copy link

martencassel commented Nov 10, 2024

One could try to deploy WSL2 to non-admin users through Intune using the WSL2 MSI [1] and/or the Intune [2] "Windows LOB apps" feature.
The required feature VirtualMachinePlatform, could also be deployed as a dependency (Another Win32 APp). using Intune.

[1] https://github.com/microsoft/WSL/releases
[2] https://learn.microsoft.com/en-us/microsoft-365/solutions/apps-type-lob?view=o365-worldwide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants