Deploy SharePoint 2010 Web Parts Using windows PowerShell

Related Posts :
Windows Powershell Interview questions SharePoint 2010

Deploy sharepoint 2007 web parts in sharepoint 2010

Steps To open up the PoweShell:

On the Start menu, click All Programs.

Click Microsoft SharePoint 2010 Products.

Click SharePoint 2010 Management Shell.

At the Windows PowerShell command prompt (PS C:\>), type the following command, and then press ENTER:

Note : You are a member of the SharePoint_Shell_Access role on the configuration database and a member of the WSS_ADMIN_WPG local group on the computer where SharePoint 2010 Products is installed.


Deploy\Install WebPart

Install-SPWebPartPack -LiteralPath "FullPathforCabfile" -Name "WebPartName"

FullPathforCabfile - is the full path to the CAB file that is being deployed.

WebPartName - is the name of the Web Part that is being deployed.


Install Activate and Deactivate Feature using Windows Powershell

Install Feature :

$MyFeatureId = $(Get -SPFeature -limit all where {$_.displayname -eq "myfeatureName"}).Id

Install -SPFeature $MyFeatureId


Activate\Enable Feature :

$singleSiteCollection = Get -SPSite -Identity http://MySingleSiteCollectionURL

Enable -SPFeature $MyFeatureId -Url $singleSiteCollection.URL


Deactivate\Disable Feature :

$singleSiteCollection = Get-SPSite -Identity http://MySingleSiteCollectionURL

Disable -SPFeature $MyFeatureId -Url $singleSiteCollection.URL


Related Posts :

Common SharePoint PowerShell Commands

PowerShell 2010 For SharePoint - Resources

1 comments:

  1. SharePoint 2010 Blogs - http://www.fewlines4biju.com/search/label/SharePoint%202010
    MOSS 2007- http://www.fewlines4biju.com/search/label/MOSS%202007
    Personal Blogs - http://www.fewlines4biju.com/search/label/Personal
    Jobs- http://www.fewlines4biju.com/search/label/Jobs
    Interview Questions - http://www.fewlines4biju.com/search/label/Interview%20Questions
    C#.Net: http://www.fewlines4biju.com/search/label/C%23.net
    Asp.Net - http://www.fewlines4biju.com/search/label/asp.net

    ReplyDelete

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer or anyone else. Should you have any questions or concerns please e-mail me at sharepointprogrammingblogger@gmail.com .

Copyright (c) 2010 @ myshaepointwork.blogspot.com. All rights are reserved.Do Not Copy.

@ Learning SharePoint.com