-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Turn Windows features on and off #556
Comments
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 |
Sorry but that's really just |
It would help for installing the RSAT, since that's been split up into 20-someodd packages in optional features. Chocolatey has a 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. |
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 –Online
#### 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 |
If it were me, I;d keep the focus on WInget being a tool to lay down applications on developer workstations. |
What could be done is to allow packages to define post installation configuration (like |
I would suggest that when we have dependencies in |
If you want to add/remove features, there are cmdlets for that. Let WInget do its job and not all the other jobs it could do. Winget might have some great use cases and a great vision, but let's not reinvent wheels we do not need to. |
I can see this being useful. winget does not need to install features or optional components, It pains me to say but we all know there's some software out there that requires .NET 3.5 for example. winget could test for the feaure and throw an error that a dependency is not satisfied. |
@jantari we're working on the experimental dependency flow to enable Windows features. We've started seeing more packages that require .NET 3.5, and this would essentially unblock them. It would be some future feature to look at something like |
This would be a very nice addition to assist enterprise management and simplify how its done within Intune. I'm doing something like this at the moment. `# Pro-Active Remediation Detect #endregion try `# Pro-Active Remediation Remediate [int32]$Success = 0 #endregion try {
` Win32App RequirementIf ((Get-WindowsCapability -Online -Name NetFX3~~~~).Name -eq 'NetFX3~~~~') { ` Win32App DetectionIf ((Get-WindowsCapability -Online -Name NetFX3~~~~).State -eq 'Installed') { |
We've added support for enabling Windows Features in WinGet 1.7 as a dependency of another package. As this version continues to roll out, we will be adding a manifest for WSL including the Windows Feature it depends on. |
Is this still WIP? |
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.
The text was updated successfully, but these errors were encountered: