scripting

Get Most Used Document Libraries and Lists in SharePoint

Lately I have been putting a lot of my time into developing useful PowerShell scripts for managing Windows environments. While working on these scripts I’ve developed some really cool 1-liner scripts that are extremely easy to run. In the below 1-liner PowerShell scripts you will get the top 10 most used Document Libraries and Lists by item count. The nice thing about SharePoint and PowerShell is the majority of the scripts written for SharePoint 2010 will work in SharePoint 2013; in this case it does!

Top 10 Document Libraries:

Get-SPSite -Limit All | Get-SPWeb -Limit All | % { $_.Lists} | ? { $_ -is [Microsoft.SharePoint.SPDocumentLibrary] } | Sort-Object { $_.ItemCount } -Descending | Select-Object Title, Description, ItemCount, ParentWebUrl -First 10

 Top 10 Lists:

Get-SPSite -Limit All | Get-SPWeb -Limit All | % { $_.Lists} | ? { $_ -isnot [Microsoft.SharePoint.SPDocumentLibrary] } | Sort-Object { $_.ItemCount } -Descending | Select-Object Title, Description, ItemCount, ParentWebUrl -First 10

PowerShell One Liner for Count of all Documents in SharePoint 2010 Farm

Last week I had a client reach out to me, asking for a count of all documents in their SharePoint 2010 internal farm. They were planning on implementing Metalogix StoragePoint and were working on estimates for the deployment.
After a bit of work with PowerShell, I was able to throw a single line of PowerShell that sum’s the entire environment for me.

Get-SPSite -Limit All | Get-SPWeb -Limit All | % { $_.Lists} | ? { $_ -is [Microsoft.SharePoint.SPDocumentLibrary] } | % { $total+= $_.ItemCount} ; $total

PowerShell v4 Desired State Configuration Deep Dive

During my time at Microsoft TechEd many new things were announced. My all time favorite announcement was PowerShell v4. There are many great things coming out with PowerShell v4, things that I haven’t really gotten a chance to dig into much yet. However the one of the few things I have run through would be the Desired State Configuration which I will refer to as DSC throughout this blog.

DSC is a way to manage the configuration for multiple servers utilizing a single script for the deployment. In the example I will use is managing an IIS Configuration across multiple servers. However as the DSC is developed there will be other usability options for this. …

Perform Survey’s and Randomly Selecting Users – Using Office Web Apps

Next week we have the first Indianapolis PowerShell User Group meeting and I was tasked with getting the survey for our meetings setup. I did not want to follow the standard here is a piece of paper please fill out and turn back in. So I decided to use the “cloud” way of passing out surveys.

The nice thing about SkyDrive is the Office Web Apps. These web apps include Word, Excel, PowerPoint and OneNote. With Excel you are able to create Survey’s and provide anyone the link. These surveys are saved in an Excel document and synced with any computer that you have SkyDrive running on. These documents are being saved to my local machine gives me the ability to execute a PowerShell script on them which will throw out winners from the list of people who submitted the survey.

Excel_Survey_WebApp

Lets start…