SharePoint 2010: Remove existing reusable content items using PowerShell

This same PowerShell could be used for any other list to remove all of the items. I just needed it to remove the OOB reusable content.

[ps] $siteColTemp = Get-SPSite "http://yourSiteCollectionUrl"; $reusableContentList = $siteColTemp.RootWeb.Lists["Reusable Content"]; $reusableContentItems = $reusableContentList.Items; $reusableContentItemsCount = $reusableContentItems.Count; for($x=$reusableContentItemsCount-1;$x -ge 0; $x–){$reusableContentItems[$x].Delete();} [/ps]

Read More >

SharePoint 2010 SP1 Upgrade Error "Unable to create a Service Connection Point in the current Active Directory domain."

Full error: “Unable to create a Service Connection Point in the current Active Directory domain. Verify that the SharePoint container exists in the current domain and that you have rights to write to it.”

After installing SP2010 SP1, PSConfig failed and the log had the above error. I found that the timer service was stopped and restarted it. Retried install - no error.

Read More >

Time moves on. Google makes my extension irrelevant

And that’s a good thing! This morning while working to improve my extension for Google Calendar, I noticed that Google had added the ability to print multiple weeks or months straight from the Google Calendar.

So where does that leave my extension? Well… unpublished and deleted at this point. I don’t see any reason to still make the extension available, maintain it, etc. if you can get the same or better experience straight from Google Calendar.

I knew this would happen at some point. Heck - I was using Google’s own url to generate the printable calendar with a different date range than they were feeding in. A large part of me is glad that Google finally got around to putting this functionality in.

I’m experiencing a different subset of emotion though. It’s a new thing for me. A personal project of mine is no longer needed and is no longer free and available. The closest thing I can compare the emotion to is someone telling you your volunteer services are no longer needed (and they replaced you with some computer software). It’s really quite an odd feeling. Don’t understand me though, I’m very glad that Google put this in place. In fact - it’s about time!

As the extension is the only free project I’ve produced and supported, I feel a little empty without it. What a strange world this is… where developers feel attached to the code they’ve written and released for others’ enjoyment. Guess I’ll need to find something else to build and give away!

Read More >

Easy SharePoint 2010 warmup Script using PowerShell

This idea comes from Kirk Hofer’s blog, but modfied to use the SharePoint 2010 powershell commandlets and not care about specifying credentials in the script. I figured most people would just keep using the credentials specified in their scheduled task.

The script loads the SharePoint plugin, enumerates the zones, and sends a request to each one.

Add-PSSnapin Microsoft.SharePoint.PowerShell;

function Get-WebPage([string]$url)
{
    $wc = new-object net.webclient;
    $wc.credentials = [System.Net.CredentialCache]::DefaultCredentials;
    $pageContents = $wc.DownloadString($url);
    $wc.Dispose();
    return $pageContents;
}

Get-SPAlternateUrl -Zone Default | foreach-object {
    write-host $_.IncomingUrl;
    $html = Get-WebPage -url $_.IncomingUrl;
}
Read More >

SharePoint 2010 Custom Action IDs for Site Settings page

Since the MSDN documentation for Default Custom Action Loacations and IDs is unreliable (they look to have copy+pasted the information from the SharePoint 2007 documentation), our only sure bet is to browse the file system and find the custom action IDs and groups ourselves.

I had need of this information today, and found the items from the site settings page located at: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\SiteSettings\SiteSettings.xml

For those looking specifically for it, here is the custom action for “Delete this site”:

[xml] <CustomAction Id="DeleteWeb" GroupId="SiteTasks" Location="Microsoft.SharePoint.SiteSettings" Rights="ManageWeb,BrowseUserInfo" Sequence="40" Title="$Resources:core,SiteSettings_DeleteWeb_Title;" Description="$Resources:core,SiteSettings_DeleteThisSite_Tooltip;"> <UrlAction Url="_layouts/deleteweb.aspx" /> </CustomAction> [/xml]

If you’re looking for that custom action, you’re probably wanting to hide it. Here’s the xml you’ll need in your elements file:

[xml] <HideCustomAction Id="HideDeleteWeb" GroupId="SiteTasks" HideActionId="DeleteWeb" Location="Microsoft.SharePoint.SiteSettings"> </HideCustomAction> [/xml]

Read More >

subscribe via RSS