Please refer the below PowerShell function using Client Object to create a new term in a Term Set. This can can be executed from remote machine you need not to be on server.
You need to set few parameters and pass it to function.
Parameter explanation:
$MMSbaseurl - Its the URL to website on which you have termsets and groups for e.g. http://yoursite
$credentials - Your credentials to the site, you need to have enough permissions to access and edit meta data
$GroupName - Name of the group in Term Set lives
$TermSetName - Name of the term set in which you want to create a new term
$lcid - locale ID you are using
function Create-NewTerm() { [CmdletBinding()] param( [Parameter(Mandatory=$true)][string]$MMSbaseurl, [Parameter(Mandatory=$false)][System.Net.NetworkCredential]$credentials, [Parameter(Mandatory=$true)][string]$GroupName, [Parameter(Mandatory=$true)][string]$TermSetName, [Parameter(Mandatory=$false)][int]$lcid ) begin{ Write-Host "Preparing for term store...." -ForegroundColor Cyan try{ $Context = New-Object Microsoft.SharePoint.Client.ClientContext($MMSbaseurl) } catch { Write-Host "Error:-->> Unable to create ClientContext at " $MMSbaseurl -ForegroundColor Red } try { Write-Host "Binding to Term store through managed metadata services for ($MMSbaseurl) " -ForegroundColor Cyan $Context.Credentials = $credentials $MMS = [Microsoft.SharePoint.Client.Taxonomy.TaxonomySession]::GetTaxonomySession($Context) $Context.Load($MMS) $Context.ExecuteQuery() Write-Host "Retrieving Term Stores" -ForegroundColor Cyan $TermStores = $MMS.TermStores $Context.Load($TermStores) $Context.ExecuteQuery() Write-Host "Binding term store" -ForegroundColor Cyan $TermStore = $TermStores[0] $Context.Load($TermStore) $Context.ExecuteQuery() Write-Host "Binding term store Groups" -ForegroundColor Cyan $Groups = $TermStore.Groups $Context.Load($Groups) $Context.ExecuteQuery() foreach($Group in $Groups) { if ((($Group.Name.ToLower()) -eq $GroupName.ToLower())) { $SelectedGroup = $Group Write-Host "Group found." -ForegroundColor Cyan break } } $Context.Load($SelectedGroup) $Context.ExecuteQuery() Write-Host "Bind to term set" -ForegroundColor Cyan $TermSets = $SelectedGroup.TermSets $Context.Load($TermSets) $Context.ExecuteQuery() foreach($TermSet in $TermSets) { if ((($TermSet.Name.ToLower()) -eq $TermSetName.ToLower())) { $SelectedTermSet = $TermSet Write-Host "Term set found." -ForegroundColor Cyan break } } $Context.Load($TermSet) $Context.ExecuteQuery() #Term creation # $NewTerm = $TermSet.CreateTerm("New Term", $lcid, [System.Guid]::NewGuid().toString()) $Context.Load($NewTerm) $Context.ExecuteQuery() Write-Host "New term created successfully" -ForegroundColor Cyan } catch{ Write-Host "Error -->>>> " $_.Exception.Message -ForegroundColor Red } } end{ $Context.Dispose() } } #Get and Set credentials $credentials = Get-Credential #Call Function # Create-NewTerm "http:YourSite.com" $credentials "New Group" "New Term Set" 1033
Same function you can refer at this blog