Send to connection is used in many seniors, so being able to deploy them through PowerShell is a must and it is in this way you do it:
First the XML configuration file, SendTos tag can be added multiple times if you have several applications. Under the SendTos tag is SendTo which is the connection itself. A send to consist of an Action, which can Copy, Move, or Link. Explanation which is the description for sending the link. Official filename is the name or title of sending the link. OfficialFileUrl is the URL of the site as the document to be sent, N.B. Remember that the content organizer feature must be enabled on the site. ShowOnSendToMenu is whether it should be shown in the document context menu.
<SendTos WebApplicationUrl="http://win-l2sfc3oetnn/">
<SendTo>
<Action>Move</Action>
<Explanation>Move the document to 'a' site collection</Explanation>
<OfficialFileName>Move to 'a'</OfficialFileName>
<OfficialFileUrl>/docid/a/_vti_bin/officialfile.asmx</OfficialFileUrl>
<ShowOnSendToMenu>false</ShowOnSendToMenu>
</SendTo>
</SendTos>
The second part, is the PowerShell, where I loops thought the to sends tags and grab the web application. Then I test whether the connection already exists, if not I create it by adding a Microsoft.SharePoint.SPOfficialFileHost to OfficialFileHosts collection located on the web application.
[xml]$SendTos = gc $pwd\sendto.xml
$SendTos.SendTos | % {
$webapp = Get
-SPWebApplication
$_.WebApplicationUrl.TrimEnd
("/")
$officialFileHostTemp = $webapp.OfficialFileHosts | ? {
$_.OfficialFileName
-eq $SendTo.OfficialFileName
}
if($officialFileHostTemp -eq $null)
{
[Microsoft.SharePoint.SPOfficialFileHost] $officialFileHost = New-Object "Microsoft.SharePoint.SPOfficialFileHost"
$officialFileHost.Action = [Enum]::Parse([Microsoft.SharePoint.SPOfficialFileAction], $SendTo.Action)
$officialFileHost.Explanation = $SendTo.Explanation
$officialFileHost.OfficialFileName = $SendTo.OfficialFileName
$officialFileHost.OfficialFileUrl = $url+$SendTo.OfficialFileUrl
$officialFileHost.ShowOnSendToMenu = [bool]::Parse($SendTo.ShowOnSendToMenu)
$webapp.OfficialFileHosts.Add($officialFileHost)
$webapp.Update()
}
$officialFileHostTemp = $null
}
}