How to Load the Required SharePoint Assemblies - PowerShell


Sathish Nadarajan
SharePoint MVP
Published On :   14 May 2016
Visit Count
Today :  3    Total :   3461
Plan, Migrate, Secure, Report
SharePoint & Office 365 Tool. Simple & Easy to Use. 15-Day Trial!

SharePoint Office 365 Tool
Simple & Powerful Tool for Migration, Security & Reporting. Free Trial


In this article, let us see how to Load the required assemblies before executing the PowerShell.

Almost many of the below assemblies will be required to be loaded before any of the Script execution.

 [System.Reflection.Assembly]::Load("Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") 
 [System.Reflection.Assembly]::Load("Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")
 [System.Reflection.Assembly]::Load("Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") 
 [System.Reflection.Assembly]::Load("Microsoft.SharePoint.AdministrationOperation, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") 
 [System.Reflection.Assembly]::Load("Microsoft.Office.InfoPath.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") 
 [System.Reflection.Assembly]::Load("Microsoft.Office.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") 
 [System.Reflection.Assembly]::Load("Microsoft.Office.InfoPath, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") 
 
 [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.InfoPath.Server")
 [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
 

Happy Coding,

Sathish Nadarajan.

SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Categories

Migratiin Tools for SharePoint