Part of my setup is using Docker for Windows, obviously it works best with WSL2.
It would be nice to be able to turn things on in windows for my setup to be complete.
This can be done easily with PowerShell or the Deployment Image Servicing and Management (DISM) tool. I don't see how winget would help with that...
It would be nice if winget install telnet turned on telnet in Windows features.
Sorry but that's really just Install-WindowsFeature Telnet-Client in PowerShell with less ambiguity about what's going to happen. Or alternatively dism /online /Enable-Feature /FeatureName:TelnetClient with DISM.
It would help for installing the RSAT, since that's been split up into 20-someodd packages in optional features. Chocolatey has a choco install rsat that installs all of them via a PowerShell script.
Maybe PowerShell script support as an installer type would be the real feature request? Although that may encourage bad habits, since people could bypass the manifest creation step and put all of the logic inside of a non-standard script which then has to be debugged in a different way.
If all you know is a hammer everything looks like a nail.
I'm a strong proponent of using the right tool for the job and the RSAT installation in PowerShell really is just a single line:
#### Client OS (Windows 10) - uses DISM behind the scenes
# List RSAT components that are not installed
Get-WindowsCapability -Name RSAT* -Online | Where-Object { $_.State -eq "NotPresent" }
# Install all RSAT components
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability 鈥揙nline
#### Server OS (Server 201X) - uses Server Manager behind the scenes
# List RSAT components that are not installed
Get-WindowsFeature -Name RSAT* | Where-Object { $_.Installed -ne $true }
# Install all RSAT components
Install-WindowsFeature -Name RSAT -IncludeAllSubFeature -IncludeManagementTools
See https://hahndorf.eu/blog/WindowsFeatureViaCmd for details.
This could be part of #163 "Support for package dependencies". If you winget install ubuntu we should be able to see if WSL is enabled or not, and take care of that for you.
Most helpful comment
Sorry but that's really just
Install-WindowsFeature Telnet-Clientin PowerShell with less ambiguity about what's going to happen. Or alternativelydism /online /Enable-Feature /FeatureName:TelnetClientwith DISM.