Month: November 2011

SharePoint 2010–Extracting a .WSP Solution File Out of Your Farm

So any SharePoint consultant who has been out there for a while knows that sometimes you walk into a farm and it’s a mess.  Configurations aren’t right, which at least you have a good change of fixing… However, one of the more interesting situations is when you walk in and the farm is running fine, but the company has a bunch of .WSPs that are deployed to the farm and they don’t know what versions they are or what they do.  So how does one go about extracting a WSP from the farm so that we can then either deploy it to a migration farm or crack it open and reverse engineer it via a .CAB extractor? Turns out that PowerShell makes it pretty easy for us to look like heroes.  Now why this very useful feature isn’t built into the UI I’ll never know, but if you log into the server and run these commands you’re able to quickly extract the .WSP files that have been deployed to the farm. $farm = Get-SPFarm $file = $farm.Solutions.Item("solution.wsp").SolutionFile $file.SaveAs("c:\wsp\solution.wsp") Obviously, just substitute the name of the solution you want to extract for the “solution.wsp” in the code.  And it really is just that...

Read More

What the Hell was NetFlix Thinking?

Sadly, I do own stock in NFLX, and looking back on how they’ve handled themselves this summer I have to say what the hell?  This company is probably a textbook case of how to take a perfectly good business model and run it into the ground.  Perhaps they were trying to encourage their competitors over at BlockBuster to stick around a bit longer?  Better yet, why take great brand recognition and create the Qwikster debacle?  Don’t take your perfectly good service and make it more expensive, harder to use, and alienate your customer base.  I can only assume that...

Read More

SharePoint PowerShell–Delete Old Versions of Documents and Items

Within our SDLC farms (Dec, QA, UAT) we have limited amounts of resources.  As these are testing and integration environments there is often no reason to keep more than one or two copies of versions in the document libraries, especially as they are refreshed from production content databases on a regular basis. Often there are 10-20GB of actual latest content, and 50GB of versions.  In some cases we can remove them from production, in others we only need to clear out all but the latest, as with the case of our SDLC farms.  Here is the PowerShell script that can be used to remove old versions.  You can set the limit lower for SDLC environments and higher if you want to trim production. Get-SPWebApplication | Get-SPSite -Limit All | Get-SPWeb -Limit All | ForEach-Object { ForEach($list in $_.Lists) { If($list.EnableVersioning -eq $true) { $list.MajorVersionLimit = 1; $list.Update(); ForEach($item in $list.Items) { $item.URL; $item.SystemUpdate() } } } }   You can see that it… Gets all web applications in the farm All site collections All webs Loops through all lists  ( you can filter for Title if you wish: if($_.Title -eq "Shared Documents") in order ot only handle the default Shared Documents folder ) If versioning’s enabled, it sets the major version limit to 1, you can set it higher for production environments In order to remove old versions, it...

Read More

SharePoint 2010 | Information Architecture Diagram Using PowerShell and Visio

As SharePoint consultants, we don’t always have the luxury of building our farms and the site structures from the ground up.  Sometimes we walk into a situation where the farm and sites have already been up for several years.  However, having a well-planned Information Architecture is critical for any successful SharePoint implementation.  As SharePoint gains in popularity and use, sites are created as one-offs, and after a while our environments start to run wild.  Sites are created without our knowledge or placed as sub-sites of other sites where they don’t really belong.  The power of SharePoint to make web technology accessible to...

Read More

Use the Microsoft Virtual Academy for FREE training on SharePoint Online and Office365

The Microsoft Virtual Academy is a great resource and will help you improve your IT Skill set and help advance in your career with a free, easy to access training portal. You can learn at your own pace, focusing on Microsoft technologies, gain points and get recognition. The MVA is a free program delivering structured learning paths for IT Professionals on various Microsoft products and solutions. If you are not yet registered on Microsoft Virtual Academy, it takes only a second to do so, please register here. Also, go to the new TechNet Cloud Hub where you can get...

Read More

October 2011 Cumulative Update Breaks User Profile Picture Uploads

So if you have installed the Oct 2011 CU, you may have noticed a little issue… especially painful for someone who didn’t test and deployed to production as of course CUs cannot be rolled back (Unless of course you’re using the VM snapshots, and even then it’s a pain).  Now the issue comes up when the user attempts to upload a profile picture when editing their profile in mySites.  Instead of uploading they get this ridiculous msCryptic error message: Now there are quite a few code changes between the August 2011 CU version and the October 2011 CU, and it looks like the LoadPictureLibrary method is the culprit for this gaff.  Unfortunately, what this means is that this will prevent Administrators from uploading profile pictures via PowerShell as well.  So there is no method in the currently released October CU to upload profile pictures that is currently functional.  I know it’s a lot to test, and Microsoft does say that their CUs are not fully regresssion tested, but really?   Thanks Microsoft. EDIT: A more detailed explanation of the code issue can be found...

Read More