To install features from the command line you can use DISM. This command will list the features:

dism /online /get-features /format:table

A variation of this command if you are looking for a certain feature:

dism /online /get-features /format:table |find “SMB1”

Example to install the feature:

Dism /online /Enable-Feature /FeatureName:SMB1Protocol
Dism /online /Enable-Feature /FeatureName:SMB1Protocol-Client