How do I turn a Windows feature on/off from the command line in Windows 10?

To enable and disable features on a client machine of Windows using PowerShell, the cmdlet you have to use is:

Enable-WindowsOptionalFeature

For example, with Windows 10 and NetFX 3, I would check if the feature is enabled with

Get-WindowsOptionalFeature -Online | Where-Object -FilterScript {$_.featurename -Like "*netfx3*"}

If not enabled, run this to enable it:

Enable-WindowsOptionalFeature -Online -FeatureName "NetFx3" -Source "SourcePath"

I'm not sure how you would go about kicking off a download, but you can get the files from the Windows 10 install CD/ISO. Copy the folder called 'D:\sources\sxs' and store these file somewhere.

Once you have the files you can install them with the following command, run it with administrative rights. Make sure you change the /Source: parameter to the location you copied 'sxs' folder to.

DISM /online /enable-feature /featurename:NetFx3 /All /Source:D:\sources\sxs /LimitAccess

If you wish to unstill the feature by command line you can use the following comamnd.

DISM /online /disable-feature /FeatureName:NetFx3

Run a command prompt as an administrator and use:

dism /online /Get-Features

This will display the feature names since they don't always match up with what you're seeing in that visual feature list. It will also show which are currently enabled/disabled. Once you find the feature that you'd like to enable (NetFx3 in this case), run this:

dism /online /Enable-Feature /FeatureName:NetFx3

And as Richard stated, you can then disable a feature by simply switching "Enable" to "Disable" ex.

dism /online /Disable-Feature /FeatureName:NetFx3

Note: Sometimes a restart is required to see changes with windows features.