Sharepoint Powershell Basis To Enable SharePoint cmdlets in powerShell: Add-PSSnapin "MIcrosoft.SharePoint.PowerShell" 1. Sample SharePoint cmdlets Get-SPWebApplication => to displat all webapplication Get-Command -PSSnapin "Microsoft.SharePoint.PowerShell" | format-table name =>show all commands Get-SPSite "http://senthil-pc:8010/*" Get-SPWeb -site http://senthil-pc:8010/sites/site2 Get-SPSite "http://senthil-pc:8010/*" | Get-SPWeb|Select Title Get-SPUser -Web "http://senthil-pc:8010" Get-SPFeature -Limit ALL | Where-Object {$_.Scope -eq "http://senthil-pc:8010"} 2. Create a web application $name = "Web Application Created using Powershell" $port = 20000 $url = "http://senthil-pc" $appPoolName = "SP Default App Pool" $appPoolAccount = Get-SPManagedAccount "senthil-pc\Administrator" New-SPWebApplication -Name $name -Port $port -URL $url -Applicati...
Posts
Showing posts from February, 2017