Posts

Sleepy Time for SharePoint 2010 PowerShell

Sleepy Time for SharePoint 2010 PowerShell There are times when you'll want SharePoint to wait and perform an action later.  In my case I wanted someone to start a script when it was at the end of their shift while a file copy was still running on my side with an hour left before it would complete. Start-Sleep -s 60  (sleeps for 60 seconds) Start-Sleep -s 5400 (sleeps for 90 minutes) There's an option for miliseconds, but no minutes or hours setting.

Recycle Bin still not removing files SharePoint 2010

Image
We ran into an issue as we had a site collection that we wanted to save off as a template for creating new site collections.  The problem was all the documents were still there and the backup file was 20 GB large. The first thing to do was create a backup and then restore it to a new site collection.  After that, we deleted all the documents.  Next, we cleared out the recycle bin.  Then we cleared out the site collection recycle bin. The backup of this site collection was still the same size (20 GB). Next, I ran a script to list all the files.  I found that the deleted files were still there. Here's that script: select type, dirname, LeafName, size, TimeLastModified  FROM [WSS_Content_Delete].[dbo].[AllDocs]  where (TimeLastModified < '2013-01-02')  AND (Size is NOT NULL)  AND (LeafName not like '%.aspx')  and (DirName not like '%_catalog%')  and (DirName not like '%Style Library%')   and (DirName not like '%_themes%...

Save a site as a template when the option is not available

Image
Save a site as a template when the option is not available - SharePoint 2010 The option (under Site actions, site settings) to Save Site as Template exists for a team site, but not a collaboration site.  To use that function anyway you'll need to hand edit your URL http://sharepoint.name/site1/_layouts/savetmpl.aspx Simply hand add everything from  _layouts onward to access this hidden page.  

Tagging your SharePoint 2010 servers

Image
Tagging your SharePoint 2010 Servers for debugging purposes There are times when you'll need to know which server you're connecting to to try to debug an issue.  If you're using load balancing, that can be pretty tricky, but here's an easy way to tell at a glance. Here, the help icon (normally a ?) has been replaced with a number 2.  It still functions as help, but it's an easy way to tell where you are.  To make this change you'll need to edit the FGIMG.PNG file found at: c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES on every server.  You'll need a graphic editor that can preserve transparency, or else the blue ball will have a white square around it.  I use paint.net which is free( www.getpaint.net ) I also chose to tag my app servers in black to differentiate them from web servers, because our naming conventions reuse 1,2,3. Below are the graphics you can download.  If you find this useful, let me know. ...

Creating a Second SharePoint Farm on a SQL Named Instance

Image
Creating a Second SharePoint Farm There are times when you might want to create a second SharePoint Farm that uses the same content as an existing Farm.   A second URL can be accomplished by creating an alternate access mapping, but that uses the same farm, same search, user database, service applications, etc.   To create new versions of all of that from scratch, you need to create a second SharePoint farm. The Second Farm method is also useful when you want to keep the same SQL server machine and the same content while performing an upgrade of everything else. First, create a second SQL Instance.   You’ll need the SQL Server 2008 R2 install media.   Run through the install as if you’re doing a fresh install, but you’ll create it as a Named Instance.   To access a SQL Server Named Instance, use SERVERNAME\InstanceName. Create a new web front end (WFE) server.     Install SharePoint and f...

Fixing: The workbook cannot be opened SharePoint 2010

Fixing: The workbook cannot be opened in SharePoint 2010 The error "The workbook cannot be opened" is thrown when opening an excel file in the browser or visiting a page with an excel page viewer webpart embedded. This is a failure in Excel services. To check that the service was added, go to Central Administration (CA) and click "Manage Service Applications" In that list you should see Excel Services Application Web Service Application and Excel Services Application Web Service Application Proxy. Then, you need to know that excel services is running on at least 1 server in your farm. Go back to the CA homepage and click "Manage Servers in this Farm" There you should also see "Excel Calculation Services".  If not, click on one of your app or web servers on that page  then click the link to start the service. Next we need to know which service account is running Excel services.  In CA, click "Security" then "Configure Service Accou...

Fixing: Manage Content and Structure in SharePoint 2010

Fixing: Manage Content and Structure in SharePoint 2010 After my "C" network migration, the link for Manage content and Structure under site actions was failing. Looking through the logfiles I found the relevant error: Failed to determine the setup path of the list schema for feature {e32e1e6f-fb94-4090-...}, list template 100. I googled the GUID, and came up with nothing. This was not one of the standard site features. This was some golden nugget of excrement that a prior admin must've found and installed on a whim. Or something useful. Or a Fab 40 Template. Hard to say which with nothing to go by but a guid. I searched web configs with no success. To find out which list was the offending one I had to open all the lists. Never mind sites and document libraries, just lists as the error said "list". I went to site actions, view all site content and popped each list open in a new tab. All of them came up but one (fortunately). This list was ...