Slides from Dog Food Conference 2010

    At the Dog Food Conference 2010 I presented a session titled “SharePoint 2010 and Integrating Line of Business Applications”.  In this session we covered the basics of the Business Connectivity Service (BCS) in SharePoint 2010 and went through a number of demos on how to develop against it.  Click here for my slides.  Thanks to all who attended and had some great questions and interactions.  If you would like more BCS resources or have any feedback on this presentation feel free to leave comments.

 

      -Frog Out

 

Links

“SharePoint 2010 and Integrating Line of Business Applications” Presentation slides

http://cid-9137d132751b949f.office.live.com/view.aspx/.Public/Presentation%20Files/Dog%20Food%20Con%202010/SP2010%20Integrating%20LOB%20Apps.pptx

Slides, Scripts, and Photos from SPTechCon Boston 2010

A big thank you to everyone who attended my “Real-World Deployment of SharePoint 2010 Solutions” at SPTechCon Boston 2010 this week.  I hope you learned some things and can take them back to improve your farms.  This was my first time speaking at SPTechCon and second one attended.  It was great to catch up with countless old friends I haven’t seen in awhile as well as meet new friends.  I’m looking forward to speaking at SPTechCon San Francisco 2011 in Feb, so if you’re attending feel free to stop by one of my sessions.  Registration has already begun, but you can get a discount for registering early.  Based on Boston selling out this year I would recommend registering sooner rather than later to ensure your spot.

On a side note, special thanks to a few of my attendees who after hearing that I really like frogs recommended I stop by Frog Pond at Boston Commons while in town.  Thankfully I was able to swing by on my way to the airport for a few minutes.  Unfortunately the pond was closed for maintenance, but I was able to get my picture taken with a few of the frog statues in the area (see album below).  Yet another unique experience to have while traveling to different cities.

 

Slides and Scripts: click here

 

Photos

Facebook link (with tagging): click here

Live Photos link (higher res):

-Frog Out

Speaking at Columbus Dog Food Conference 2010

DF2010-LOGO     On Thursday Nov 4th I will be speaking at the Columbus Dog Food Conference 2010.  My presentation will be on integrating line of business applications with SharePoint 2010.  Click here for registration information.  Be sure to register soon as spots are limited and fill up quickly.  Hope to see you there.

 

Where: Columbus Dog Food Conference 2010

Title: SharePoint 2010 and Integrating Line of Business Applications

Audience and Level: Developer, Beginner/Intermediate

Abstract: “One of the biggest value adding enhancements in SharePoint 2010 is the Business Connectivity Services (BCS).  In this session we’ll overview the BCS, demonstrate connecting line of business applications and external systems to SharePoint through external content types, and walk through surfacing that data with external lists.”

 

-Frog Out

Announcing “Save PowerShell To SharePoint” CodePlex Project

logo-home[1]

In this post I will talk about a new script I wrote to save PowerShell ISE files to a versioned SharePoint document library as well as a side project I created on CodePlex to host this code and future releases.

Background

Recently I began listening to the PowerScripting Podcast and I’m slowly catching up on old podcasts.  On episodes 121 and 122 (most recent ones I’ve listened to as of this writing) Hal and Jonathan talked about an idea that piqued my interest immediately: using SharePoint as a script repository for PowerShell scripts.  As I was in my car at the time I began to brainstorm ideas on how to accomplish this and what should be in scope for such a project.  As soon as I reached my destination I began working on a proof of concept and subsequent list of additional tasks to flesh this out.  Below you will find an adaptation of my C# code snippet to upload a file to a SharePoint document library (blogged about here) that I worked into a PowerShell script.

Add-Type -TypeDefinition @"

using System.Net;

using System.Text;


public class SharePointFileUploader

{

    public static void UploadFile(string textToOutput, string uploadPath)

    {

        ASCIIEncoding encoder = new ASCIIEncoding();

        byte[] bytesToOutput = encoder.GetBytes(textToOutput.ToString());

        using (WebClient client = new WebClient())

        {

            client.Credentials = System.Net.CredentialCache.DefaultCredentials;

            client.UploadData(uploadPath, "PUT", bytesToOutput);

        }


        return;

    }

}

"@


$documentLibraryPath = Read-Host -Prompt "Enter URL of Document Library";

$documentLibraryPath = $documentLibraryPath.TrimEnd('/')


foreach($aFile in $psise.CurrentPowerShellTab.Files)

{

    $textToOutput = $aFile.Editor.Text;

    $uploadPath = "$documentLibraryPath/$($aFile.DisplayName.Replace('*', ''))";


    [SharePointFileUploader]::UploadFile($textToOutput, $uploadPath)

}

What The Script Does

Note: This script is just a proof of concept that took 15 minutes to write and is not entirely fleshed out.  With that said, this script declares a new type that uploads a string to a specified URL path.  Next it loops through all open files in your PowerShell ISE and uploads the content of these files (even unnamed/unsaved files) to a SharePoint document library using our newly added type.  The beauty is that if you have turned on versioning for your document library the file content will add a new version.

Future Goals

While it is nice to have a script that performs this upload manually, wouldn’t it be nice to have this functionality happen automatically similar to how Microsoft Office Word or Excel auto saves your work every X minutes.  That idea has led me to draw up some additional features I would like to build in as my spare time allows.  Here are a few of those planned features (some already under development or research begun):

  • Create/select SharePoint document library through a form (WPF?)
  • Create background job to automatically run upload process every X minutes while PowerShell host is open
  • Add support for PowerShell console (history commands?)
  • Add support for deploying as a module with configuration settings in profile
  • Add support for SharePoint 2010 native PowerShell commandlets
  • Retrieve past version of script from document library
  • Create help file

After I started writing down these features I began to realize that perhaps there would be enough interest to make this script into a CodePlex project that could be community developed and reviewed.

CodePlex Project

I am happy to announce the creation of Save PowerShell To SharePoint as a new CodePlex project.  I have to admit, I have never created or participated in a CodePlex project up to this point.  Despite my lack of previous involvement I feel like this is a great pet project for me to break into a community project.  This project is currently in the alpha stages while I upload the script code and work on documenting the current status and to-do items.  I’m trying to work towards attainable goals and plan on this being an organic project rather than planning on version X.0 from the get go.

Conclusion

In this post I provided a proof of concept PowerShell script for uploading the currently opened files in a PowerShell ISE instance and also announced the creation of my first CodePlex project Save PowerShell To SharePoint.  Overall I am very excited to begin work on this project as it combines two of my great passions: PowerShell and SharePoint.  A big thank you to Hal and Jonathan for bringing up this idea as I don’t want to steal any of their credit for the formation of the idea.  Once again it amazed me that PowerShell provided a lightweight platform to throw together a useful script in such a short amount of time.  I know that I won’t be able to devote as much time to this as I would like at first, but great things start with baby steps.  Please feel free to try out the script and leave feedback on the project site as development progresses.

-Frog Out

Links

PowerScripting Podcast home page

PowerScripting Podcast Episode 122 – Don Jones Scripting Editor Shoot-Out

PowerScripting Podcast Episode 121 – Jay Dave on UAC and AppLocker

Programmatically uploading files to a SharePoint 2007 document library

Save PowerShell To SharePoint CodePlex project page

Guest Blog Post On “Hey, Scripting Guy!” Published

ee516741_HEY_SCRIPTING_GUY_left

A few days ago I mentioned that I had been busy recently writing a guest blog post for a fairly high profile blog.  Today I can happily announce the details.  My article “Deploy a PowerShell Module with SharePoint Cmdlets” was published on the Hey, Scripting Guy! blog this morning.  Click here for the link.

Anyone familiar with Windows PowerShell will most likely know the Scripting Guy Ed Wilson and his teammate Craig Liebendorfer.  A little over a month ago Ed asked if I would submit a guest blog post and I eagerly agreed.  Please check it out and leave some feedback if you have any.

 

-Frog Out

 

Links

Deploy a PowerShell Module with SharePoint Cmdlets

http://blogs.technet.com/b/heyscriptingguy/archive/2010/09/29/deploy-a-powershell-module-with-sharepoint-cmdlets.aspx?utm_source=twitterfeed&utm_medium=twitter

Adding Intellisense for SharePoint 2010 Custom Workflow .Actions File

    This post will show you how to add inteliisense support for custom workflow .actions files in SharePoint 2010.  During the course of some research for my writing I found out that the SharePoint 2010 SDK doesn’t include intellisense for the .actions files (at least as of the August 2010 release).  As the schema can be a bit difficult to remember off I searched the interwebs to see if anyone had implemented this already.  As luck would have it I was able to find this blog post that included an XSD file, but no instructions on how to install it.  That’s where I’ll help you fill in the gaps.

Steps

  1. Download schema file
  2. Rename schema file from .xml to .xsd
  3. Copy schema file to Visual Studio directory
  4. Update SharePoint catalog files

    First thing to do is download the wssactions.xml file from this location and rename it to wssactions.xsd.  Copy the file to your Visual Studio 2010 XML templates folder which is typically something like “C:Program Files (x86)Microsoft Visual Studio 10.0XMLSchemas”.  Next open the SharePoint catalog files (WssSchemaCatalog64.xml and WssSchemaCatalog.xml) and insert the below child element into the SchemaCatalog element for both.

<Association extension=”actions” schema=”%InstallRoot%/xml/schemas/wssactions.xsd” />

    Once you have completed this you’re all set to go.  No need to even re-launch Visual Studio 2010.  Create a new .xml file named <some_name>.actions.  You should be able to begin receiving intellisense for your workflow action definition file.

Conclusion

    In just a few short minutes you too can have intellisense for your SharePoint 2010 custom .actions files.  Special thanks to the author of the blog with the schema file download (I wasn’t able to find out the author’s name).  Also thanks to Dave Kehring for a template for what and where to add to the catalog files.  Hopefully this will help you get up and running SharePoint 2010 custom actions quicker and more effectively.  Enjoy!

 

      -Frog Out