Add, remove and display Visual Best Bets for a keyword by using Windows PowerShell (FAST Search Server 2010 for SharePoint)

 

Applies to: FAST Search Server 2010

Note

This article describes how to manage Visual Best Bets by using Windows PowerShell. For information about how to manage Visual Best Bets by using the graphical user interface, see Manage FAST Search keywords (Office.com).

In this article the following PowerShell procedures are described:

  • Add a Visual Best Bet to a keyword

  • Add multiple Visual Best Bets to a keyword

  • Remove a Visual Best Bet from a keyword

  • Remove all Visual Best Bets from a keyword

  • Add a global Visual Best Bet

  • Add multiple global Visual Best Bets

  • Remove a global Visual Best Bet

  • Remove all global Visual Best Bets

  • Display all Visual Best Bets

Add a Visual Best Bet to a keyword

  1. Verify that you meet the following minimum requirements: You are a member of the FASTSearchAdministrators local group on the computer where FAST Search Server 2010 for SharePoint is installed.

  2. On the Start menu, click All Programs.

  3. Click Microsoft FAST Search Server 2010 for SharePoint.

  4. Click Microsoft FAST Search Server 2010 for SharePoint shell.

  5. At the Windows PowerShell command prompt, get all search setting groups:

    Get-FASTSearchSearchSettingGroup
    
    >>Name        : 9c65a55f-eafc-451d-b0f5-56fbed465141
    >>Description :
    >>Id          : 1
    >>LastChanged : 10/19/2010 9:04:46 AM
    
    
  6. Add a Visual Best Bet to a keyword:

    $searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" 
    $keyword = $searchSettingGroup.Keywords.GetKeyword("<KeywordTerm>")
    $uri = New-Object -TypeName System.Uri -ArgumentList "<URI>" 
    $visualBestBet = $keyword.AddFeaturedContent("<VisualBestBetName>")
    $visualBestBet.Uri = $uri
    

    Where:

    • <SearchSettingGroupName> is the name of an existing search setting group.

    • <KeywordTerm> is the keyword term string name of an existing keyword.

    • <URI> is the URI to the content of the Visual Best Bet.

    • <VisualBestBetName> is the title of the Visual Best Bet to be added.

See also

Keyword.AddFeaturedContent Method

Get-FASTSearchSearchSettingGroup

Add multiple Visual Best Bets to a keyword

  1. Verify that you meet the following minimum requirements: You are a member of the FASTSearchAdministrators local group on the computer where FAST Search Server 2010 for SharePoint is installed.

  2. On the Start menu, click All Programs.

  3. Click Microsoft FAST Search Server 2010 for SharePoint.

  4. Click Microsoft FAST Search Server 2010 for SharePoint shell.

  5. At the Windows PowerShell command prompt, create a collection of existing Visual Best Bets that you want to add:

    $visualBestBetsToBeAdded = @("<VisualBestBet1>", "<VisualBestBet2>", "<VisualBestBet3>", "<VisualBestBet4>")
    

    Where:

    • <VisualBestBet 1-4> are the Visual Best Bets that you want to add.
  6. Get all search setting groups:

    Get-FASTSearchSearchSettingGroup
    
    >>Name        : 9c65a55f-eafc-451d-b0f5-56fbed465141
    >>Description :
    >>Id          : 1
    >>LastChanged : 10/19/2010 9:04:46 AM
    
    
  7. Add the collection of Visual Best Bets to a keyword:

    $searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" 
    $keyword = $searchSettingGroup.Keywords.GetKeyword("<KeywordTerm>")
    foreach($visualBestBetToBeAdded in <$visualBestBetsToBeAdded>) {$keyword.AddFeaturedContent($visualBestBetToBeAdded)}
    

    Where:

    • <SearchSettingGroupName> is the name of an existing search setting group.

    • <KeywordTerm> is the keyword term string name of an existing keyword.

    • <$visualBestBetsToBeAdded> is an existing variable that contains an existing array or collection of strings specifying the names of the existing Visual Best Bets to be added.

See also

FeaturedContentCollection Interface

Keyword.AddFeaturedContent Method

Get-FASTSearchSearchSettingGroup

Remove a Visual Best Bet from a keyword

  1. Verify that you meet the following minimum requirements: You are a member of the FASTSearchAdministrators local group on the computer where FAST Search Server 2010 for SharePoint is installed.

  2. On the Start menu, click All Programs.

  3. Click Microsoft FAST Search Server 2010 for SharePoint.

  4. Click Microsoft FAST Search Server 2010 for SharePoint shell.

  5. At the Windows PowerShell command prompt, get all search setting groups:

    Get-FASTSearchSearchSettingGroup
    
    >>Name        : 9c65a55f-eafc-451d-b0f5-56fbed465141
    >>Description :
    >>Id          : 1
    >>LastChanged : 10/19/2010 9:04:46 AM
    
  6. Remove a Visual Best Bets from a keyword:

    $searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" 
    $keyword = $searchSettingGroup.Keywords.GetKeyword("<KeywordTerm>")
    $keyword.RemoveFeaturedContent("<VisualBestBetName>")
    

    Where:

    • <SearchSettingGroupName> is the name of an existing search setting group.

    • <KeywordTerm> is the keyword term string name of an existing keyword.

    • <VisualBestBetName> is the name of the Visual Best Bet to be removed.

See also

Keyword.RemoveFeaturedContent Method

Get-FASTSearchSearchSettingGroup

Remove all Visual Best Bets from a keyword

  1. Verify that you meet the following minimum requirements: You are a member of the FASTSearchAdministrators local group on the computer where FAST Search Server 2010 for SharePoint is installed.

  2. On the Start menu, click All Programs.

  3. Click Microsoft FAST Search Server 2010 for SharePoint.

  4. Click Microsoft FAST Search Server 2010 for SharePoint shell.

  5. At the Windows PowerShell command prompt, get all search setting groups:

    Get-FASTSearchSearchSettingGroup
    
    >>Name        : 9c65a55f-eafc-451d-b0f5-56fbed465141
    >>Description :
    >>Id          : 1
    >>LastChanged : 10/19/2010 9:04:46 AM
    
  6. Remove all Visual Best Bets from a keyword:

    $searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" 
    $keyword = $searchSettingGroup.Keywords.GetKeyword("<KeywordTerm>")
    $keyword.FeaturedContent.Clear()
    

    Where:

    • <SearchSettingGroupName> is the name of an existing search setting group.

    • <KeywordTerm> is the keyword term string name of an existing keyword.

See also

Microsoft.SharePoint.Search.Extended.Administration.Keywords Namespace

Get-FASTSearchSearchSettingGroup

Add a global Visual Best Bet

  1. Verify that you meet the following minimum requirements: You are a member of the FASTSearchAdministrators local group on the computer where FAST Search Server 2010 for SharePoint is installed.

  2. On the Start menu, click All Programs.

  3. Click Microsoft FAST Search Server 2010 for SharePoint.

  4. Click Microsoft FAST Search Server 2010 for SharePoint shell.

  5. At the Windows PowerShell command prompt, get all search setting groups:

    Get-FASTSearchSearchSettingGroup
    
    >>Name        : 9c65a55f-eafc-451d-b0f5-56fbed465141
    >>Description :
    >>Id          : 1
    >>LastChanged : 10/19/2010 9:04:46 AM
    
    
  6. Add a global Visual Best Bet:

    $searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" 
    $searchSettingGroup.FeaturedContentWithoutKeyword.AddFeaturedContent("<GlobalVisualBestBetName>") 
    

    Where:

    • <SearchSettingGroupName> is the name of an existing search setting group.

    • <GlobalVisualBestBetName> is the title of the global Visual Best Bet to be added.

See also

Microsoft.SharePoint.Search.Extended.Administration.Keywords Namespace

Get-FASTSearchSearchSettingGroup

Add multiple global Visual Best Bets

  1. Verify that you meet the following minimum requirements: You are a member of the FASTSearchAdministrators local group on the computer where FAST Search Server 2010 for SharePoint is installed.

  2. On the Start menu, click All Programs.

  3. Click Microsoft FAST Search Server 2010 for SharePoint.

  4. Click Microsoft FAST Search Server 2010 for SharePoint shell.

  5. At the Windows PowerShell command prompt, create a collection of existing global Visual Best Bets that you want to add:

    $globalVisualBestBetsToBeAdded = @("<GlobalVisualBestBet1>", "<GlobalVisualBestBet2>", "<GlobalVisualBestBet3>", "<GlobalVisualBestBet4>")
    

    Where:

    • <GlobalVisualBestBet 1-4> are the global Visual Best Bets that you want to add.
  6. Get all search setting groups:

    Get-FASTSearchSearchSettingGroup
    
    >>Name        : 9c65a55f-eafc-451d-b0f5-56fbed465141
    >>Description :
    >>Id          : 1
    >>LastChanged : 10/19/2010 9:04:46 AM
    
    
  7. Add the collection of global Visual Best Bets:

    $searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" 
    foreach ($globalVisualBestBetToBeAdded in <$globalVisualBestBetsToBeAdd>) { $searchSettingGroup.FeaturedContentWithoutKeyword.AddFeaturedContent( $globalVisualBestBetToBeAdded ) }
    

    Where:

    • <SearchSettingGroupName> is the name of an existing search setting group.

    • <$globalVisualBestBetsToBeAdded> is an existing variable that contains an existing array or collection of strings specifying the names of the existing global Visual Best Bets to be added.

See also

Microsoft.SharePoint.Search.Extended.Administration.Keywords Namespace

Get-FASTSearchSearchSettingGroup

Remove a global Visual Best Bet

  1. Verify that you meet the following minimum requirements: You are a member of the FASTSearchAdministrators local group on the computer where FAST Search Server 2010 for SharePoint is installed.

  2. On the Start menu, click All Programs.

  3. Click Microsoft FAST Search Server 2010 for SharePoint.

  4. Click Microsoft FAST Search Server 2010 for SharePoint shell.

  5. At the Windows PowerShell command prompt, get all search setting groups:

    Get-FASTSearchSearchSettingGroup
    
    >>Name        : 9c65a55f-eafc-451d-b0f5-56fbed465141
    >>Description :
    >>Id          : 1
    >>LastChanged : 10/19/2010 9:04:46 AM
    
  6. Remove a global Visual Best Bets:

    $searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" 
    $searchSettingGroup.FeaturedContentWithoutKeyword.RemoveFeaturedContent("<GlobalVisualBestBetName>")
    

    Where:

    • <SearchSettingGroupName> is the name of an existing search setting group.

    • <GlobalVisualBestBetName> is the name of the global Visual Best Bet to be removed.

See also

Microsoft.SharePoint.Search.Extended.Administration.Keywords Namespace

Get-FASTSearchSearchSettingGroup

Remove all global Visual Best Bets

  1. Verify that you meet the following minimum requirements: You are a member of the FASTSearchAdministrators local group on the computer where FAST Search Server 2010 for SharePoint is installed.

  2. On the Start menu, click All Programs.

  3. Click Microsoft FAST Search Server 2010 for SharePoint.

  4. Click Microsoft FAST Search Server 2010 for SharePoint shell.

  5. At the Windows PowerShell command prompt, get all search setting groups:

    Get-FASTSearchSearchSettingGroup
    
    >>Name        : 9c65a55f-eafc-451d-b0f5-56fbed465141
    >>Description :
    >>Id          : 1
    >>LastChanged : 10/19/2010 9:04:46 AM
    
  6. Remove all global Visual Best Bets:

    $searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" 
    $searchSettingGroup.FeaturedContentWithoutKeyword.Clear()
    

    Where:

    • <SearchSettingGroupName> is the name of an existing search setting group.

See also

Microsoft.SharePoint.Search.Extended.Administration.Keywords Namespace

Get-FASTSearchSearchSettingGroup

Display all Visual Best Bets

  1. Verify that you meet the following minimum requirements: You are a member of the FASTSearchAdministrators local group on the computer where FAST Search Server 2010 for SharePoint is installed.

  2. On the Start menu, click All Programs.

  3. Click Microsoft FAST Search Server 2010 for SharePoint.

  4. Click Microsoft FAST Search Server 2010 for SharePoint shell.

  5. At the Windows PowerShell command prompt, get all search setting groups:

    Get-FASTSearchSearchSettingGroup
    
    >>Name        : 9c65a55f-eafc-451d-b0f5-56fbed465141
    >>Description :
    >>Id          : 1
    >>LastChanged : 10/19/2010 9:04:46 AM
    
  6. Display all Visual Best Bets:

    $searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" 
    $searchSettingGroup.FeaturedContent
    

    Where:

    • <SearchSettingGroupName> is the name of an existing search setting group.

See also

Keyword.FeaturedContent Property

Get-FASTSearchSearchSettingGroup