SharePoint By Yagya Shree

Posts Tagged ‘powershell

How to find site collection creation date

leave a comment »


Please run below script in SharePoint 2013 Management Shell

 

$w = Get-SPWeb https://this_is_Site_Collection_url

$w.Created

Create_date

Written by Yagyashree

July 17, 2017 at 11:28 pm

Posted in sharepoint

Tagged with , , , ,

HOW TO RETRIEVE ALL APPS INSTALLED ON A SHAREPOINT 2013 WEB APPLICATION THROUGH POWERSHELL

leave a comment »


For my reference:

 

Add-PsSnapin Microsoft.SharePoint.PowerShell
$webApp = Get-SPWebApplication "http://sp2013"
foreach($site in $webApp.Sites)
{
    Write-Host $web.Url -BackgroundColor DarkGreen
    foreach($web in $site.AllWebs)
    {
        $appInstance = Get-SPAppInstance -Web $web.Url | select Title,Appwebfullurl,Id
        if($appInstance -ne $null)
        {     
	   $appInfo = $appInstance.Title + " - " + $appInstance.Appwebfullurl     
           Write-Host $appInfo
        }
    }
}

Written by Yagyashree

October 31, 2016 at 6:22 pm

Posted in powershell, sharepoint

Tagged with ,

SP2013: Find All search crawl Property

leave a comment »


Requirement:

How to find all search crawl property in a TEXT or EXCEL file for a specific site collection using PowerShell

 

Resolution:

1st Phase:

Find the GUID for site collection by running below script from Windows PowerShell ISE on any of the sharepoint servers in farm.

Add-PSSnapin “Microsoft.SharePoint.PowerShell”
$site = Get-SPSite https://sharepoint.contoso.com/sites/SP2013
$siteguid = $site.id
echo $siteguid

2nd Phase

Once you got the GUID for site collection from phase 1, run below script

Add-PSSnapin “Microsoft.SharePoint.PowerShell”
$searchapp = Get-SPEnterpriseSearchServiceApplication
Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication $searchapp -SiteCollection <Site_GUID> -limit All >C:\Temp\crawlproperty.csv

Written by Yagyashree

September 19, 2016 at 8:23 pm

%d bloggers like this: