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