Archive | July 2011

Powershell in sharepoint 2010

In 2007 we had stsadm to perform administrative task , though in 2010 they have official deprecated and removed support for several commands in stsadm it can be used in several occasions .However stsadm has been now replaced with Powershell , that i’m sure we will be using more in the coming days.

Powershell scripts are more faster , unlike stsadm they help us in accessing file system and registry . Handling powershell scripts are relatively easier , yet another advantage of using powershell is unlike stsadm you need not restart services after your wsp deployments. Though i’m a great fan of stsadm i like using powershell because of my above observations.

Some of the commands i have executed with powershell :

1.Install Solution
Add-SPSolution -LiteralPath  C:\krishna\MySolution.wsp

2.Deploy Solution
Install-SPSolution –Identity MySolution.wsp –WebApplication http://mysites

We can use -AllWebApplications , if not to limit our deployment to a single application.

3. Retract Solution
Uninstall-SPSolution –Identity MySolution.wsp –WebApplication http://mysites

4.Remove Solution
Remove-SPSolution –Identity MySolution.wsp

Use -SPUserSolution to perform any of the above said activities on the sandbox solutions for the respective site collections.

5.Activate Feature
Enable-SPFeature –Identity FeatureName–url http://mysites

6.Deactivate Feature
Disable-SPFeature –Identity FeatureName–url http://mysites


Differences between Sharepoint 2007 and Sharepoint 2010

The differences between the 2 versions is purely based on my observations .

Sharepoint 2007 Sharepoint 2010
Uses 12 Hive as the repository for the sharepoint resources . Uses 14 Hive as the repository for the sharepoint resources
Deployment is comparatively cumbersome. Deployment is easier , as it is done with VS 2010.
Has only Global solution store, like farm level solutions. Has sandbox and farm level solutions ,that makes 2010 more scalable.
Shared service providers[SSP] provides wide features of MOSS 2007. SSP is replaced by Service application, thus making the environment more scalable.
Doesn’t have site/web creation events. Incorporated with site/web creation feature
Look and feel – Tabs,Menus Look and feel – Ribbons , like Office 2010.
Backup/restore wasn’t granular. However it could have been done extending APIs. Backup/restore is more granular , that can be achieved out of the box itself.
BDC wasn’t editable. BDC is renamed to BCS with 2 way data binding.