Quantcast
Channel: SharePoint & .NET Blog » Powershell
Viewing all articles
Browse latest Browse all 2

Stsadm vs Powershell scripts for Add/Deploy Solution in SharePoint 2010

$
0
0

Add Solution
1.       stsadm
a.       stsadm -o addsolution -filename “SolutionFile”
Ex:
stsadm -o addsolution -filename “E:\HealthFirst\R&D\ListItemLimitSolution\ListItemLimitSolution\bin\Debug\ListItemLimitSolution.wsp”

2.       Powershell
a.      Add-SPSolution -LiteralPath “SolutionFile”
Ex:
Add-SPSolution -LiteralPath “E:\HealthFirst\R&D\ListItemLimitSolution\ListItemLimitSolution\bin\Debug\ListItemLimitSolution.wsp”


Delete Solution

1.       stsadm
a.   Stsadm -o deletesolution -name “SolutionName”
Ex:
Stsadm -o deletesolution -name “ListItemLimitSolution.wsp”
2.       Powershell
a.       Remove-SPSolution -Identity “SolutionName”
Ex:
Remove-SPSolution -Identity “ListItemLimitSolution.wsp”

Deploy Solution
1.       stsadm
a.       All Web Applications
i.      stsadm -o deploysolution -name “SolutionName” -immediate -allowgacdeployment –allcontenturls
Ex: stsadm -o deploysolution -name “listitemlimitsolution.wsp” -immediate -allowgacdeployment –allcontenturls

b.      Particular Web Application
i.      stsadm -o deploysolution -name “listitemlimitsolution.wsp”-immediate -allowgacdeployment -url  “SiteURL”
Ex: stsadm -o deploysolution -name “listitemlimitsolution.wsp”-immediate -allowgacdeployment -url  “http://Site:1000”

2.       PowerShell
a.       All Web Application
i.      Install-SPSolution “SolutionName” -AllWebApplication  –GACDeployment
Ex: Install-SPSolution “ListItemLimitSolution.wsp” -AllWebApplication  –GACDeployment

b.      Particular Web Application
i.    Install-SPSolution “SolutionName” -WebApplication   “SiteURL” -GACDeployment
Ex: Install-SPSolution “ListItemLimitSolution.wsp” -WebApplication “http://Site:1000″ -GACDeployment

Retract Solution
1.       Stsadm
a.       All WebApplication
i.      stsadm -o retractsolution -name “SolutionName” -immediate –allcontenturls

b.      Particular WebApplication
i.      stsadm -o retractsolution -name “listitemlimitsolution.wsp”-immediate -url “http://Site:1000″

2.       PowerShell
a.       All WebApplication
i.      Uninstall-SPSolution “SolutionName” -AllWebApplication ”
b.      Particular WebApplication
i.      Uninstall-SPSolution “ListItemLimitSolution.wsp” -WebApplication  “http://Site:1000

Enable Feature
1.       Stsadm
a.       All WebApplication
—– Not Available—-

b.      Particular WebApplication
i.      stsadm -o activatefeature -name “FeatureName” -url  “SiteURL”
Ex: stsadm -o activatefeature -name “listitemlimitsolution_Feature1″ -url  “http://Site:1800″

2.       PowerShell
a.       All WebApplication
i.      Get-SPWebApplication | ForEach-Object {Enable-SPFeature
“FeatureName” -Url $_.Url -confirm:$false}
Ex: Get-SPWebApplication | ForEach-Object {Enable-SPFeature “listitemlimitsolution_Feature1″ -Url $_.Url -confirm:$false}

b.      Particular WebApplication
i.      Enable-SPFeature -Identity “FeatureName” -Url “SiteURL”
Ex: Enable-SPFeature -Identity “listitemlimitsolution_Feature1″ -Url “http://Site:1000″

Disable Feature

1.       Stsadm
a.       All WebApplication
—– Not Available—-

b.      Particular WebApplication

i.      stsadm -o deactivatefeature -name “FeatureName” -url   “SiteURL”
Ex:
stsadm -o deactivatefeature -name “listitemlimitsolution_Feature1″ -url
“http://Site:1800”

2.       PowerShell
a.       All WebApplication
i.      Get-SPWebApplication | ForEach-Object {Disable-SPFeature
“FeatureName” -Url $_.Url -confirm:$false}
Ex:
Get-SPWebApplication | ForEach-Object {Disable-SPFeature
“listitemlimitsolution_Feature1″ -Url $_.Url -confirm:$false}
b.      Particular WebApplication


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images