Create Send To Connection with PowerShell

In continuation to my post: SharePoint 2010 Configure Send To Connections , If you want to create send to connections programmatically or have multiple send to connections to create, PowerShell can help to automate it:

PowerShell Script to Create Send To Connections:

#Get the Web Application
$WebApp = Get-SPWebApplication "https://sharepoint.crescent.com"

$SPOfficialFileHost = New-Object Microsoft.SharePoint.SPOfficialFileHost
#Set Send to Options#
#Send to Connection Name
$SPOfficialFileHost.OfficialFileName = "Project Directory"
#Send to Target location
$SPOfficialFileHost.OfficialFileUrl = "https://sharepoint.crescent.com/teams/PMO/ProjectDir/_vti_bin/officialfile.asmx"
$SPOfficialFileHost.ShowOnSendToMenu = $true
#Send to Operation
$SPOfficialFileHost.Action=[Microsoft.SharePoint.SPOfficialFileAction]::Copy
$SPOfficialFileHost.Explanation = "Send to connection for Project submission"
$WebApp.OfficialFileHosts.Add($SPOfficialFileHost); 
$WebApp.Update()
 

Make sure you activated “Content Organizer” in Send To Target site before proceeding!

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

One thought on “Create Send To Connection with PowerShell

  • Thanks, this helped a lot!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *