Chinh Do

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

14th November 2014

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

posted in PowerShell, Programming |

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

This entry was posted on Friday, November 14th, 2014 at 8:59 am and is filed under PowerShell, Programming. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Comment

  • Calendar

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