Skip to content

Instantly share code, notes, and snippets.

@sjkp
Created November 11, 2014 20:50
Show Gist options
  • Save sjkp/3e7a3db800e516df1614 to your computer and use it in GitHub Desktop.
Save sjkp/3e7a3db800e516df1614 to your computer and use it in GitHub Desktop.
Download assemblies from SharePoint Online
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath
#replace contoso with your own tenant
$spUrl = "https://contoso.sharepoint.com/"
$dllsVTI = @("Microsoft.BusinessData.dll", "Microsoft.Office.Client.Policy.dll", "Microsoft.Office.Client.TranslationServices.dll",
"Microsoft.Office.DocumentManagement.dll", "Microsoft.Office.Excel.Server.Udf.dll", "Microsoft.Office.Excel.Server.WebServices.dll",
"Microsoft.Office.Policy.dll", "Microsoft.Office.SecureStoreService.Server.Security.dll", "Microsoft.Office.Server.dll",
"Microsoft.Office.Server.Search.Applications.dll", "Microsoft.Office.Server.Search.Connector.dll", "Microsoft.Office.Server.Search.dll",
"Microsoft.Office.Server.Search.ExchangeAdapter.dll", "Microsoft.Office.Server.UserProfiles.dll",
"microsoft.office.sharepoint.clientextensions.dll", "Microsoft.Office.Word.Server.dll", "Microsoft.Office.Workflow.Actions.dll",
"microsoft.office.workflow.tasks.dll", "Microsoft.SharePoint.Client.dll", "Microsoft.SharePoint.Client.DocumentManagement.dll",
"Microsoft.SharePoint.Client.Publishing.dll", "Microsoft.SharePoint.Client.Runtime.dll", "Microsoft.SharePoint.Client.Search.Applications.dll",
"Microsoft.SharePoint.Client.Search.dll", "Microsoft.SharePoint.Client.ServerRuntime.dll", "Microsoft.SharePoint.Client.Taxonomy.dll",
"Microsoft.SharePoint.Client.UserProfiles.dll", "Microsoft.SharePoint.Client.WorkflowServices.dll", "Microsoft.SharePoint.dll",
"Microsoft.SharePoint.Linq.dll", "Microsoft.SharePoint.Portal.dll", "Microsoft.SharePoint.Publishing.dll", "Microsoft.SharePoint.Search.dll",
"Microsoft.SharePoint.Search.Extended.Administration.Common.dll", "Microsoft.SharePoint.Search.Extended.Administration.dll",
"Microsoft.SharePoint.Search.Extended.Administration.ResourceStorage.dll", "Microsoft.SharePoint.Security.dll", "Microsoft.SharePoint.Taxonomy.dll",
"Microsoft.SharePoint.Taxonomy.Intl.dll", "microsoft.sharepoint.WorkflowActions.dll", "Microsoft.SharePoint.WorkManagement.Client.dll",
"Microsoft.Web.CommandUI.dll", "SHTML.dll", "spnativerequestmodule.dll")
$dllsAPP= @("Microsoft.Office.Discovery.Soap.dll", "Microsoft.Office.DocumentManagement.Pages.dll",
"Microsoft.Office.officialfileSoap.dll", "Microsoft.Office.Policy.Pages.dll",
"Microsoft.Office.Server.Search.Applications.ServerProxy.dll", "Microsoft.Office.Server.Search.ServerProxy.dll",
"Microsoft.Office.Server.UserProfiles.ServerStub.dll", "Microsoft.Office.Server.WorkManagement.ServerProxy.dll", "Microsoft.Office.SlideLibrarySoap.dll",
"Microsoft.Office.TranslationServices.ServerStub.dll", "Microsoft.Office.Workflow.Pages.dll", "Microsoft.Office.WorkflowSoap.dll",
"Microsoft.SharePoint.ApplicationPages.dll", "Microsoft.SharePoint.AppMonitoring.ApplicationPages.dll", "Microsoft.SharePoint.OfficeExtension.ApplicationPages.dll",
"Microsoft.SharePoint.Portal.Proxy.dll", "Microsoft.SharePoint.Taxonomy.ServerStub.dll", "Microsoft.SharePoint.WorkflowServices.ApplicationPages.dll",
"Microsoft.SharePoint.WorkflowServices.ServerProxy.dll", "STSSOAP.DLL")
$folder = new-item -type directory $(get-date -f yyyy-MM-dd_HH_mm_ss)
function GetDll([string]$dll, [string]$path) {
$file = $folder.FullName+"\"+$dll
$wc = (New-Object System.Net.WebClient)
write-host "Downloading ",$spUrl,$path,$dll
$wc.DownloadFile($spUrl + $path + $dll, $file)
$item = get-item $file
if($item) {
add-content "$($folder)\info.txt" "$($item.Name) - $($Item.VersionInfo.ProductVersion)"
}
}
foreach($dll in $dllsVTI) {
GetDll $dll "_vti_bin/"
}
foreach($dll in $dllsAPP) {
GetDll $dll "_app_bin/"
}
@nchakvetadze
Copy link

Hot to download Microsoft.SharePoint.Client.ServerRuntime.dll
???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment