SharePoint Tech Blog

04/08/2009

Extracting the SharePoint dll’s from the GAC using Powershell

Filed under: SharePoint — Tags: , , — kctnpblog @ 7:31 am

To extract the SharePoint dll’s from the GAC using Powershell:

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Portal")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Policy")

[appdomain]::currentdomain.getassemblies() |
where {($_.fullname -match "Microsoft.Office") -OR ($_.fullname –match "Microsoft.SharePoint")} |
copy-item -path {$_.location} -destination c:\temp\ -verbose

Ensure that the c:\temp folder exists and run this code to extract the SharePoint dll’s into that folder.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Create a free website or blog at WordPress.com.