Steps Involved:
- Open Visual Studio 2010.
- Go to File => New => Project.
- Select Class Library template, enter the name and click Ok.
- Add the following references.
-System.Management.Automation.dll (C:Program Files (x86)Reference AssembliesMicrosoftWindowsPowerShellv1.0System.Management.Automation.dll)
-System.Configuration.Install.dll (C:WindowsMicrosoft.NETFrameworkv2.0.50727System.Configuration.Install.dll
-Microsoft.SharePoint.dll (C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions14ISAPIMicrosoft.SharePoint.dll)
-Microsoft.SharePoint.PowerShell.dll (C:WindowsassemblyGAC_MSILMicrosoft.SharePoi