Author Archives: admin

PowerShell – Query SharePoint Farm for Critical Errors

#Search ULS Logs for Critical Events in the last two days. # ######################################################## #Add-PSSnapin Microsoft.SharePoint.PowerShell # #Calulate Dates $now = Get-Date $now_date_string = $now.ToString(“MM/dd/yyyy HH:mm:ss”) $fn_date = $now.ToString(“MM-dd-yyyy”); $yesterday = $now.AddDays(-1) #$yesterday = $now.AddHours(-4) $yesterday_date_string = $yesterday.ToString(“MM/dd/yyyy HH:mm:ss”) #Set up … Continue reading

Posted in Powershell, SharePoint 2010, SharePoint 2013 | Leave a comment

PowerShell – Find SharePoint Lists (and Libraries) with unmanaged versions

#Script Name: Find Lists (and Libraries) with un-managed Versions $webApps = Get-SPWebApplication foreach($webApp in $webApps) { #$webApp.URL foreach($site in $webApp.Sites) { if(!$site.URL.Contains(“archive”)) { #$site.URL foreach($web in $site.AllWebs) { foreach($list in $web.Lists) { #Skip the ootb or system libraries. $ootb_libs = … Continue reading

Posted in Powershell, SharePoint 2010, SharePoint 2013 | Leave a comment

PowerShell – Disable Folders in SharePoint lists and libraries

#Script Name: Disable Folder Creation ########################### $webApps = Get-SPWebApplication foreach($webApp in $webApps) { #$webApp.URL foreach($site in $webApp.Sites) { if(!$site.URL.Contains(“archive”)) { $site.URL foreach($web in $site.AllWebs) { foreach($list in $web.Lists) { #Skip the ootb or system libraries. $ootb_libs = @(“Converted Forms”, “Master … Continue reading

Posted in Powershell, SharePoint 2010, SharePoint 2013 | Leave a comment

PowerShell – Disable SharePoint Designer 2010

[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”) > $null $wa1 = “http://webapp1″ $wa2 = “http://webapp2″ $wa3 = “http://webapp2″ $wa4 = “http://webapp3″ $webapps = @($wa1, $wa2, $wa3, $wa4); foreach($webapp in $webapps) { Write-Host(” “); Write-Host(” “); Write-Host(“#####################”) Write-Host(“## PROCESSING WEB APP:”) Write-Host(“## ” + $webapp); Write-Host(” “) … Continue reading

Posted in Powershell, SharePoint 2010 | Leave a comment