Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Add, remove and display site promotions for a keyword by using Windows PowerShell (FAST Search Server 2010 for SharePoint)

FAST Search Server 2010

Published: May 12, 2010

note Note:

This article describes how to manage site promotions by using Windows PowerShell. For information about how to manage site promotions by using the graphical user interface, see Promoting or demoting sites (Office.com).

In this article the following Windows PowerShell procedures are described:

Add a site promotion 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 site promotion to a keyword:

    $searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" 
    $keyword = $searchSettingGroup.Keywords.GetKeyword("<KeywordTerm>")
    $promotion = $keyword.AddPromotion("<PromotionName>")
    $promotion.BoostValue = "<BoostValue>"
    $uri = New-Object -TypeName System.Uri -ArgumentList "<URI>" 
    $promotion.PromotedItems.AddPromotedLocation($uri)
    
    

    Where:

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

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

    • <PromotionName> is the title of the site promotion to be added.

    • <BoostValue> is the boost value to associate with the site promotion, for example 1000.

    • <URI> is the URI of the site that is to be promoted.

See also

Add multiple site promotions 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 site promotions that you want to add:

    $sitePromotionsToBeAdded = @("<SitePromotion1>", "<SitePromotion2>", "<SitePromotion3>", "<SitePromotion4>")
    
    

    Where:

    • <SitePromotion1-4> are the site promotions 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 site promotions to a keyword:

    $searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" 
    $keyword = $searchSettingGroup.Keywords.GetKeyword("<KeywordTerm>")
    foreach ($uriToAdd in <$sitePromotionsToBeAdded>) { $sitePromotion = $keyword.AddPromotion( $uriToAdd ) ; 
    $uri = New-Object -TypeName System.Uri -ArgumentList $uriToAdd ; $sitePromotion.PromotedItems.AddPromotedLocation( $uri ) }
    
    

    Where:

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

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

    • <$sitePromotionsToBeAdded > is an existing variable that contains a collection of strings of the existing site promotions you want to add.

See also

Remove a site promotion 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 site promotion from a keyword:

    $searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" 
    $keyword = $searchSettingGroup.Keywords.GetKeyword("<KeywordTerm>")
    $promotedItems = $keyword.Promotions["<PromotionName>"].PromotedItems
    $uri = New-Object -TypeName System.Uri -ArgumentList "<URI>" 
    foreach ($promotedLocation in @($promotedItems.GetPromotedLocationEnumerator())) { if ($promotedLocation.Uri -eq $uri) { $promotedItems.Remove($promotedLocation) } }
    

    Where:

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

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

    • <PromotionName> is the title of the site promotion to be removed.

    • <URI> is the URI of the site promotion that is to be removed.

See also

Remove all site promotions 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 site promotions from a keyword:

    $searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" 
    $keyword = $searchSettingGroup.Keywords.GetKeyword("<KeywordTerm>")
    foreach ($promotion in $keyword.Promotions) { $promotedItems = $promotion.PromotedItems; foreach 
    ($promotedLocation in @($promotedItems.GetPromotedLocationEnumerator() ) ) 
    { $promotedItems.Remove( $promotedLocation ) } }
    

    Where:

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

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

See also

Add a global site promotion

  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 site promotion:

    $searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" 
    $globalPromotions = $searchSettingGroup.PromotionsWithoutKeyword
    $globalPromotion = $globalPromotions.AddPromotion("<GlobalPromotionName>") 
    $globalPromotion.BoostValue = "<BoostValue>"
    $uri = New-Object -TypeName System.Uri -ArgumentList <URI> 
    $globalPromotion.PromotedItems.AddPromotedLocation($uri)
    

    Where:

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

    • <GlobalPromotionName> is the name of the global site promotion to be added.

    • <BoostValue> is the boost value to associate with the global site promotion, for example 1000.

    • <URI> is the URI of the site that is to be promoted.

See also

Add multiple global site promotions

note Note:

In order to add multiple global site promotions you have to create a collection of the global site promotions you want to add.

  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 site promotions that you want to add:

    $globalSitePromotionsToBeAdded = @("<GlobalSitePromotion1>", "<GlobalSitePromotion2>", "<GlobalSitePromotion3>", "<GlobalSitePromotion4>")
    
    

    Where:

    • <GlobalSitePromotion1-4> are the site promotions 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 site promotions:

    $searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" 
    $globalPromotions = $searchSettingGroup.PromotionsWithoutKeyword
    foreach ($uriToAdd in <$globalSitePromotionsToBeAdded>) { $sitePromotion = $globalPromotions.AddPromotion( $uriToAdd ) ; $uri = New-Object -TypeName System.Uri -ArgumentList $uriToAdd ; $sitePromotion.PromotedItems.AddPromotedLocation( $uri ) }
    
    

    Where:

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

    • <$globalSitePromotionsToBeAdded> is an existing variable that contains a collection of strings of the existing global site promotions you want to add.

See also

Remove a global site promotion

  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 site promotion:

    $searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" 
    $globalPromotions = $searchSettingGroup.PromotionsWithoutKeyword
    $globalPromotion = $globalPromotions.GetPromotion("<GlobalPromotionName>") 
    $promotedItems = $globalPromotion.PromotedItems
    $uri = New-Object -TypeName System.Uri -ArgumentList <URI> 
    foreach ($promotedLocation in @($promotedItems.GetPromotedLocationEnumerator())) { if ($promotedLocation.Uri -eq $uri) { $promotedItems.Remove($promotedLocation) } }
    

    Where:

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

    • <GlobalPromotionName> is the name of an existing global promotion from which to remove a global site promotion.

    • <URI> is the URI of the global site promotion to be removed.

See also

Remove all global site promotions

  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 site promotions:

    $searchSettingGroup = Get-FASTSearchSearchSettingGroup -Name "<SearchSettingGroupName>" 
    $globalPromotions = $searchSettingGroup.PromotionsWithoutKeyword
    foreach ($globalPromotion in $globalPromotions) { $globalPromotedItems = $globalPromotion.PromotedItems;  foreach ($promotedLoc in @($globalPromotedItems.GetPromotedLocationEnumerator())) {  $globalPromotedItems.Remove($promotedLoc) } }
    
    

    Where:

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

See also

Display all promotions

  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 promotions:

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

    Where:

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

See also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.