Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

 :) Latest Topic
AJAX
VB.NET
SQL Query
UDDI
CLASS
JavaScript Questions
SharePoint Interview
SilverLight
WCF
general knowledge
 ASP.NET
 :) Hot Jobs
 
 :) Latest Articles


  

 
CreamKids


Basic SharePoint administrator power shell commands
Question Posted on 01 Dec 2015

Home >> SharePoint >> Powershell Questions >> Basic SharePoint administrator power shell commands




Below are the most used Power Shell commands for SharePoint administrator and these are also the basic commands.

(1)To get the current build version of SharePoint
get-spfarm |select buildversion

(2)To get the list of Shell administrators:
Get-SPShellAdmin

(3)To add a user as to a Shell administrator:
Add-SPShellAdmin -UserName user_name -Database database_name

(4)Command to remove a user from Shell Admin:
Remove-SPShellAdmin -UserName user_name -Database database_name

(5)How to know the deleted site
Get-SPDeletedSite | select Path , siteid

(6)Commmand to restore the deleted site
Restore-SPDeletedSite -Identity (SiteId)

(7)How to check the error on a content database
Test-SPContentDatabase -name WSS_Content_DB –webapplication

(8)How to do Backup
Backup-SPSite -Identity SiteCollectionGUIDorURL -Path Backup_File [-Force] [-NoSiteLock] [-UseSqlSnapshot] [-Verbose]

(9)How to Restore
Restore-SPSite -Identity SiteCollectionURL -Path Backup_file [-DatabaseServer DatabaseServer_Name] [-DatabaseName ContentDatabase_Name] [-HostHeader Host_header] [-Force] [-GradualDelete] [-Verbose]

(10)How to Deploy
Add-SPSolution mention_path
Install-SPSolution -Identity filename.wsp -AllWebApplications -GACDeployment
Enable-SPFeature Projectfile_feature1 -url http://[ServerName]/ –force

(11)When we need to install patches and to Update the SharePoint Database we must manually run psconfig
PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures

(12)To get the sharepoint database
Get_SPDatabase

(13)Command to know the site collection under specified webapplication
Get-SPWebApplication url_upto_webapp | Get-SPSite -LimitAll

(14)Command to know the sites under specified site collection
Get-SPSite urlofsite | Get-SPWeb -LimitAll
0
0



 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


Other Important Questions
Basic SharePoint administrator power shell commands






 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |