Tuesday, August 11, 2015

Power shell commands

==========================
1) Convert the web application from classic to Claims
==========================
Convert-SPWebApplication -Identity http://site url -From Legacy -To Claims -

RetainPermissions

==========================
2)To get the Site collection administrators list in web application
==========================

$web = Get-SPWeb http://site url
$web.SiteAdministrato

==========================
3)Test the site before to start the  migration
==========================

Test-SPContentDatabase -Name "database name" -WebApplication "site url"

==========================
4)Mount the data base
==========================

Mount-SPContentDatabase -Name "database name" -WebApplication "site url"

==========================
5)DisMount the data base
==========================

Dismount-SPContentDatabase -Name "database name" -WebApplication "site url"

==============================
6) Migrate users in web application
==============================
$wa = get-SPWebApplication http://mum-its-spqa1:91
$wa.MigrateUsers($true)
$wa.ProvisionGlobally()
==============================
7) Add/deploy/Remove the solutions in web application
==============================

Add-SPSolution -LiteralPath c:\contoso_solution.wsp

Install-SPSolution -Identity contoso_solution.wsp -GACDeployment -CompatibilityLevel 15



Uninstall-SPSolution -Identity contoso_solution.wsp


Remove-SPSolution -Identity contoso_solution.wsp 


No comments:

Post a Comment