Chinh Do

Posting a feed to Google Search Appliance (GSA) from PowerShell

First time here? Check out my greatest hits or look around in the archives, and consider subscribing to the latest posts via RSS or email. I am also on Twitter and Google Plus. Thanks for visiting.
14th November 2014

Posting a feed to Google Search Appliance (GSA) from PowerShell

PowerShell code to submit a feed to Google Search Appliance:

$dataSource = "MyFeed" # replace this with your datasource name
$gsaUrl = "http://testsearch.example.com:19900/xmlfeed"; # replace this with your GSA URL

$xml = @"



$dataSource incremental
"@ Write-Output "Submitting feed to $gsaUrl." $body = "feedtype=metadata-and-url&datasource=$dataSource&data=$xml" $contentType = "multipart/form-data" $length = $body.Length Write-Output "Posting feed to GSA:" Write-Output $xml $r=Invoke-WebRequest -uri $gsaUrl -method POST -body $body -ContentType $contentType -UserAgent "Ps-GsaFeedSubmitter"

See also Feeds Protocol Developer’s Guide

posted in PowerShell, Programming | 0 Comments

  • Calendar

  • November 2014
    M T W T F S S
    « Sep   Dec »
     12
    3456789
    10111213141516
    17181920212223
    24252627282930