Open CMD on windows and run below command
For .NET web and .NET desktop development, run:
vs_community.exe --layout c:\vs2017layout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NetWeb --add Component.GitHub.VisualStudio --includeOptional --lang en-US
For .NET desktop and Office development, run:
vs_community.exe --layout c:\vs2017layout --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.Office --includeOptional --lang en-US
For C++ desktop development, run:
vs_community.exe --layout c:\vs2017layout --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended --lang en-US
To create a complete local layout with all features (this will take a long time—we have lots of features!), run:
vs_community.exe --layout c:\vs2017layout --lang en-US