sharepoint 2013

SharePoint powershell script to find unique permissions in sharepoint

#This script loops through all the sites in a site collection and then writes out any that have unique permissions. [System.Reflection.Assembly]::Load(“Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”) | out-null $siteurl = “Enter URL Here” $site=new-object Microsoft.SharePoint.SPSite($siteurl) foreach($web in $site.AllWebs) { if ($web.HasUniqueRoleAssignments) {…

Sharepoint powershell loop all site collection, sites, sub sites

[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”) > $null   $farm = [Microsoft.SharePoint.Administration.SPFarm]::Local $websvcs = $farm.Services | where -FilterScript {$_.GetType() -eq [Microsoft.SharePoint.Administration.SPWebService]} $webapps = @()   foreach ($websvc in $websvcs) { write-host “###############Web Applications################” foreach ($webapp in $websvc.WebApplications) { write-host “Webapp Name :”$webapp.Name “Webapp URL :”$webapp.URL…

Clear the SharePoint Timer Cache using Powershell

Write-Host -foregroundcolor White “” Write-Host -foregroundcolor White “Clear SharePoint Timer Cache“ #************************************************************************************** # References #************************************************************************************** [void][reflection.assembly]::LoadWithPartialName(“Microsoft.SharePoint“) [void][reflection.assembly]::LoadWithPartialName(“Microsoft.SharePoint.Administration“) [void][reflection.assembly]::LoadWithPartialName(“System“) [void][reflection.assembly]::LoadWithPartialName(“System.Collections“) #************************************************************************************** #************************************************************************************** # Constants #************************************************************************************** Set-Variable timerServiceName -option Constant -value “SharePoint 2010 Timer“ Set-Variable timerServiceInstanceName -option Constant -value “Microsoft SharePoint Foundation…

Bitnami