Steps:
1. Make sure Managed metadata service is running in CA.
2. Create a Visual studio Console Application and run as Admin.
3. Add below references:
using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Client.Taxonomy;
using System.Collections.ObjectModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Client;
using Microsoft.SharePoint.Client.Taxonomy;
using System.Collections.ObjectModel;
namespace MMSApplication
{
class Program
{
static void Main(string[] args)
{
ClientContext clientContext = new ClientContext("Site collection url");
TaxonomySession taxonomySession = TaxonomySession.GetTaxonomySession(clientContext);
TermStore termStore = taxonomySession.TermStores.GetByName("Term Store Name");
Guid guid = new Guid("6h4f3b5c-224f-5faa-de7a-57735d3eb7d5");
TermGroup termGroup = termStore.GetGroup(guid);
string termSetName="Put New Term Set Name";
Guid newTermSetGuid=Guid.NewGuid();
int lcid=1033;
TermSet termSetColl = termGroup.CreateTermSet(termSetName, newTermSetGuid, lcid);
clientContext.ExecuteQuery();
}
}
}
Thanks, Prabhat