New-SPEnterpriseSearchQueryKeyword

Adds a keyword term to a shared search application.

Syntax

New-SPEnterpriseSearchQueryKeyword
   [-AssignmentCollection <SPAssignmentCollection>]
   [-Confirm]
   [-Contact <String>]
   [-Definition <String>]
   [-EndDate <DateTime>]
   [-ReviewDate <DateTime>]
   -Site <SPSitePipeBind>
   [-StartDate <DateTime>]
   -Term <String>
   [-WhatIf]
   [<CommonParameters>]

Description

The New-SPEnterpriseSearchQueryKeyword cmdlet changes query results by creating a new keyword. A query keyword is a query component of a query topology. SPEnterpriseSearchQueryKeyword represents relevance setting through keywords.

You can use this cmdlet for keywords in site collections that are in SharePoint Server. You cannot use this cmdlet after a site collection is upgraded to SharePoint Server because keywords and Best Bets are automatically migrated to query rules.

For permissions and the most current information about Windows PowerShell for SharePoint Products, see the online documentation at http://go.microsoft.com/fwlink/p/?LinkId=251831 (http://go.microsoft.com/fwlink/p/?LinkId=251831).

Examples

------------------EXAMPLE------------------

C:\PS>New-SPEnterpriseSearchQueryKeyword -Term Tangible -Site http://myserver/sites/team

This example creates a new query keyword for the site http://myserver/sites/team with the term Tangible.

Required Parameters

-Site

Associates the new keyword term to the specified results URL.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid URL, in the form http://server_name; or an instance of a valid SPSite object.

Type:SPSitePipeBind
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016
-Term

Specifies the keyword term to create.

The type must be a valid string that contains a keyword term (for example, KeywordTerm1).

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016

Optional Parameters

-AssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

Type:SPAssignmentCollection
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016
-Confirm

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016
-Contact

Specifies the user name associated with the new keyword.

The type must be a valid user name; for example, KeywordUser1.

Type:String
Aliases:c
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016
-Definition

Specifies the definition of the new keyword term.

The type must be a valid string; for example, a keyword term definition.

Type:String
Aliases:d
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016
-EndDate

Specifies the expiration date of the keyword term. The default value is MaxDate.

The type must be a valid DateTime type, in the form 2010,12,05.

Type:DateTime
Aliases:e
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016
-ReviewDate

Specifies the review date of the keyword term. The default value is MaxDate.

The type must be a valid date, in the form 2010,12,05.

Type:DateTime
Aliases:r
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016
-StartDate

Specifies the activation date for the keyword term. The default value is the current date.

The type must be a valid date, in the form 2010,12,05.

Type:DateTime
Aliases:s
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016
-WhatIf

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Server 2010, SharePoint Server 2013, SharePoint Server 2016