Skip to main content
Blogging about SharePoint

Blogging about SharePoint

Search BlumenthalIT.Net:  
Search
Home
Blogging about SharePoint
Public Speaking
  

Michael Blumenthal's BlumenthalIT.NET > Blogging about SharePoint
This is the blog where I discuss tips and tricks and lessons learned in my work with SharePoint.
New Blog

I’ve started a Wordpress blog at http://michaelblumenthal.me because of the reasons I explain in my first blog post on that site. I will probably make most of my updates on that site going forward. 

--Michael

Why I like CloudShare

I promised Chris Riley (@HoardingInfo) that I would write a blog post about how and why I use CloudShare.  As a part of one of their community programs, I get a complimentary license for their ProPlus plan, which I find very handy.  That’s the disclaimer – I have a financial incentive to write this post – that free CloudShare license.

I’ve used CloudShare in two scenarios. One was for a project for a customer. We were building a SharePoint intranet.  We needed to quickly spin up SharePoint development environments so the developers on the project team could have independent SharePoint environments in which to write and unit test code.  By using a CloudShare template for a single server SharePoint farm, and then connecting the VM to the Team Foundation Server (TFS) instance we were using, we were able to get from “never used CloudShare before” to “I have a development farm and the latest source code, and the project successfully builds in Visual Studio” in under an hour.  This way, the client didn’t have to invest in additional on premise physical or virtual machines when new staff joined the dev team.  They did choose to have an on premise staging farm, and an on premise production farm.

If we would have had to build our own development farms, it would have taken hours to set up each farm, not including time to install Visual Studio.

The other scenario I use my CloudShare VM for is for when I give my introductory talk on PowerShell for SharePoint. I’ve given this talk 3 or 4 times in the last year.  I don’t want to spend a lot of time setting up my farm.  I need a SharePoint 2013 VM that I can access quickly.  I found running HyperV on my laptop was just not fun – I can’t justify the cost of adding a lot of ram, I have to swap out the CD player for the SSD drive, and if I really want optimal performance, I need to reboot into the VM rather than run it as a guest OS.  With CloudShare, I can stay in my Windows desktop where I have all my daily productivity tools, and just access my CloudShare VM via browser or Remote Desktop session. I can focus on setting up my demos, not setting up the farm underneath them.  Of course, I do require internet access, but that’s pretty ubiquitous. As a presenter, I usually find that the presentation podium has a wired internet connection, so I don’t have to worry about the vagaries of wifi at conferences.

Another nice thing about the CloudShare Vm I use for my PowerShell+SharePoint lectures is that I can share it.  I can provide a link and people can explore a copy of the VM for a limited time.

So there you go.  CloudShare is great in those scenarios.  If you are doing team server-side development with SharePoint, and you don’t want to deal with the infrastructure of each developer having their own farm, CloudShare is a great way to go.

--Michael

Bill English coming to town August 22, 2013

Bill English, renown SharePoint MVP, and organizer of the SharePoint Best Practices Conference, will be speaking to CSPUG this Thursday night at the Microsoft office in the Loop.

Be there!

There are also two other big SharePoint events in Chicago in the next few months:

SharePoint Fest Chicago is October 7-9 in Rosemont.  Jack Fruh (one of the organizers of SharePoint Saturday Chicago Suburbs) and I  will be delivering a half day PowerShell workshop on Monday, and I’ll be speaking on PowerShell on both Tuesday and Wednesday.

Also at SharePoint Fest Chicago, Monday night October 7th, we will have our October CSPUG meeting featuring a discussion panel of some of the speakers from SharePoint Fest! 

To save 15% when attending SharePoint Fest, use code CSPUG when registering at http://www.sharepointfest.com/Chicago.

Then Saturday November 2, 2013, SharePoint Saturday Chicago (City edition) will be at the Hard Rock Hotel. http://www.sharepointsaturdaychicago.com/

See you there!

Using PowerShell and the .NET CSOM to Query SharePoint 2013 Online

Hello from the Microsoft SharePoint Conference 2012!

One of the things I wanted to do while here was learn how to use PowerShell to interact with SharePoint 2013 remotely.  Now remotely can mean two separate things here: 1) Using PowerShell remoting to send POSH commands to a server to be run locally, or 2) using remote APIs (in this case the .NET client side object model, aka .NET CSOM).  Since I want to have POSH that can work with both SharePoint on premise and SharePoint online, I decided to use the .NET client side object model.  I was developing against a free developer instance of SP2013 online, which you can request at http://msdn.microsoft.com/en-US/library/office/apps/fp179924.  At first, I tried using the example on how to retrieve a list that I found here: http://msdn.microsoft.com/en-us/library/ee538683.aspx After converting it to POSH, it was:

$loadInfo1 = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
$loadInfo2 = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")
$webUrl = Read-Host -Prompt "HTTPS URL for your SP Online 2013 site"

$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($webUrl)
$web = $ctx.Web
$lists = $web.Lists
$ctx.Load($lists)

I ran it and got this error:

Exception calling "ExecuteQuery" with "0" argument(s): "The remote server returned an error: (403) Forbidden."
At line:11 char:1
+ $ctx.ExecuteQuery()
+ ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

That kind of made sense, as I wasn’t passing any identity information, and the Microsoft Account associated with my Windows 8 domain account was not my SP Online Microsoft Account.

I looked and looked on MSDN, and didn’t find much helpful.  I tried setting the $ctx.FormsAuthenticationLoginInfo but that didn’t work.

Eventually, I gave up and decided to catch up on my reading of the Product Team Blog, in particular this post: http://sharepoint.microsoft.com/blog/Pages/BlogPost.aspx?pID=1048

At the end of the post is a PowerShell script that passes SharePointOnline credentials!

$ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)

So now, I included that in my script, and I have:

#This works on SharePoint Online sites!

$loadInfo1 = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client")
$loadInfo2 = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime")
$webUrl = Read-Host -Prompt "HTTPS URL for your SP Online 2013 site" #"
https://michaelbl.sharepoint.com"
$username = Read-Host -Prompt "Email address for logging into that site" #michaelbl@michaelbl.onmicrosoft.com"
$password = Read-Host -Prompt "Password for $username" -AsSecureString


$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($webUrl)
$ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $password)
$web = $ctx.Web
$lists = $web.Lists
$ctx.Load($lists)
$ctx.ExecuteQuery()

$lists| select -Property Title

which outputs:

Title                                                                                                                                                  -----

App Packages 

appdata

Apps in Testing

Composed  Looks     

Content type publishing error log

Converted Forms

Documents

Form

Templates

Get started with Apps for Office and SharePoint

List Template Gallery

Master Page Gallery 

Project Policy Item List                    

Site Assets

Site Pages       

Solution Gallery

Style Library

TaxonomyHiddenList

Theme Gallery

User Information List

Web Part Gallery

wfpub

There you have all the lists in this particular SharePoint Online (Office 365, SharePoint 2013) site!

--Michael

SharePoint Fest 2012 Recap

I had a great time at SharePoint Fest Chicago this year! It started off Tuesday night (September 25, 2012) with our CSPUG (Chicago SharePoint Users Group) meeting. We had over 100 people register and most of them show up (every event always loses some attendees between registration and the event). We had a decidedly full room in the Stephens Convention Center in Rosemont. I had the honor of being the emcee for the evening. Our panel consisted of Brian Culver, Todd Klindt, Sean McDonough, Gary Newman, Dux Raymond Sy, Randy Williams, and Jeff Willinger. The event was recorded, and I’ll tweet about it when the video is available online.

The next day, Wednesday, I presented my Introduction to PowerShell in “SIA 100 - PowerShell with SharePoint 2010 & 2013”. You can use PowerShell to work with MOSS 2007 too, but you don’t have any pre-defined cmdlets to start from, so you need a script like define-sharePoint-functions.ps1 that you can get from my CodePlex project: http://psbb.codeplex.com/SourceControl/changeset/view/20689#259920

Fortunately, all of my audience was running SharePoint 2010, so they get to use all the 500+ cmdlets that ship with the product, as well as any they download or write. My slides for the session can be found in this folder:http://blog.blumenthalit.com/files/spfest2012chi.  It’s the PDF called PowerShell for SharePoint Developers and Administrators.

I did a brand new demo in that session, which I call “WebParts On The Bus”.

So far, it consists of three scripts:

  1. Create the “Bus” site collection using the Blank Site template (STS#1), and open IE to display it.
  2. Use my Make-Flashcards script to create images for the site’s home page.
  3. Rotate which web parts are in which web part zones, so the web parts on the page go round and round, and make the computer sing along.

There’s plenty of room for further automation, such as uploading the images, creating the web part page, adding the Image Viewer web parts to the page and configuring them to use the right images.

Also, only the third of these three scripts is compliant with my own best practice of being written in a way where running the script file is harmelss and error free by default.  What I mean by this is that script #3 only defines a function and announces the function has been defined, but does not do anything unless you call the function.  The other two scripts have lines of powershell that would be executed when you run the script.  For example, the second script defines the Make-Flashcards cmdlet, but also tries to make flashcards, saving them into a folder that likely does not exist on your machine. Don’t run them until you’ve read them and adjusted them for your environment.  In other words, use all three AT YOUR OWN RISK, no warranties expressed or implied, et cetera, et cetera…

The scripts can be found in http://blog.blumenthalit.com/files/spfest2012chi.  A number of other PowerShell scripts can be found in http://blog.blumenthalit.com/files/powershell%20scripts, but again, use at your own risk.

After I gave my session, I walked around the expo hall, and met with a number of new and old friends.  Here’s a quick rundown of the expo hall highlights, focused on the ISVs.

  • K2 was there, with Chris Geier at the booth.  K2 provides workflow solutions.  I’m sure that oversimplifying, but my primary goal was to learn about the vendors I hadn’t heard of before, and secondarily to talk to the vendors I already knew.
  • Newsgator was there.  Better than out of the box Social communities for SharePoint.  They can integrate Yammer feeds into activity streams!
  • LimeLeap has a web-forms-on-SharePoint product called Pistachio
  • ShareGate – Migration tools
  • Actiance – compliance solutions for social computing
  • BA Insight is now focused on helping you create search-based applications (whereas before I thought of them primarily for their Longitude product which enhances the SharePoint search experience with rich previews).
  • Ontolica by Surfray was also there. 
  • Both BA Insight and Surfray offer ways of enhancing the SharePoint out of the box search experience with better previews and more. See http://www.surfray.com/products and http://www.bainsight.com/Pages/sharepoint-fast-search-document-preview.aspx
  • Axceler – Management tools for SharePoint
  • Idera – SharePoint tools for administration and bulk metadata updates,  tools for PowerShell, SQL, and backup.
  • mylyli Arc – a solution for publishing intranet content to an extranet without content duplication.
  • SharePoint Hosting – Rackspace and FPWeb were there.  FPWeb hosts my blog and CSPUG.org.  I’ve also had a client that has used Rackspace successfully, so I only have nice things to say about both companies.
  • A number of companies have a variety of different solutions for compliance and data security. Among these are:
    • Imperva.  Again over simplifying, they provide a set of application firewalls, such as a web app firewall, a db firewall, and a file server firewall.
    • Varonis – Admin tools focused on “data governance”
    • Both of these offer, among other things, a way to report on security / permission assignments.
  • CLM Matrix has a solution focused on management of contract documents.
  • Arx CoSign provides a way of applying cryptography based (rather than digital ink based) signatures to documents in a SharePoint site.  No more printing out documents just so they can be signed and scanned back in!
  • HP was there demonstrating a scanner that scans documents directly into document libraries with the help of an application that watches a network share for the scanned files.

Although they weren’t in the exhibit hall, I met with several people from Claysys and got a brief product demo of their InfoPath-like web-based-forms-and-workflow-on-top-of-SharePoint product.  Makes it even easier to build business applications via configuration rather than coding….

I didn’t include links to websites for each product above, because I want to get this post written tonight and you can Bing on any of the product or company names and I am sure you will find them.

On the second day, I had the honor of co-presenting a PowerShell workshop with Todd Klindt.  This was an open format session where attendees could bring their SharePointy PowerShell questions, and we would try to answer them live.

My slide deck for this workshop is at PowerShell for SharePoint Workshop although I also showed some slides from PowerShell for SharePoint Developers and Administrators and there is significant overlap between the two. 

One of the questions asked was about checked out files with no checked in versions, and I pointed out the link on the list settings page to view these.  That’s ManageCheckedOutFiles.aspx in _layouts. 

[Sidenote: Handy tip for being able to view POSH scripts in Windows Explorer’s Preview Pane]

To further explore the issue, I uploaded a file to a document library, and then we looked at some of its properties, in particular, the Level property.

$web =get-spweb $siteURL
$list = $web.Lists["Shared Documents"]
$doc = $list.items[0]

As I explained at the time, indexing into the items collection is fine when you know you have only a few (in this case one) list items.  However, it can have significant memory impact when it’s a large list.

Once we had the document in $doc, we could do things like this:

$doc.File.Level

#This showed that the file was checked out.

$doc.File.CheckIn("checked in by code")

$doc.File.CheckOut()

$list.Items | foreach {write-host $_.Name, $($_.File.Level)}

#could be memory intense for a large list

 

Todd talked about how the SharePoint Product Team had to comply with the naming standards set forth by the PowerShell product team.  Here’s how to see all the verbs that are used in SharePoint cmdlets:

get-command -noun "SP*" |foreach {$_.Name.Split("-")[0]} | select -Unique

Someone asked a question about running these cmdlets remotely.  Since we are working on the server object model, they need to execute on the Web Front End or an App Server.  However, you can use a remote PowerShell session. To find out more about running PowerShell commands remotely on a server, get-help about_Remote . To find out about the commands you can use to work with remote sessions, try: get-command -name "*pssession" There was another question about the User Information List, which caused me to do this:

$web = get-spweb http://pac.contoso.local/sites/bus

$web.Lists

$web.Lists | select -p Title

$web.Lists["User Information List"]

$web.Lists["User Information List"].items | Out-GridView

Note that Out-GridView only exists if you have the ISE installed.  Todd talked about how he doesn抰 use the ISE because you can抰 use Start-Transcript in the ISE. Whereas I do most of my work in the ISE, and use the script pane rather than the execution pane so I can keep track of what I抳e done.

Finally, someone had a question about getting a list of the servers in a farm, so I did this:

Get-SPServer

get-help get-spserver -examples

Another small PowerShell example is that earlier that morning, I had saved my presentation deck to JPEGs, but the first 9 slides had single digit slide numbers.  Here抯 a little script to rename those slides to prefix the single digit with a zero:

Get-ChildItem "C:\Users\michaelbl\Documents\profdev\2012\09-Sept\SPFest\jpegs" | where Name -like "Slide?.JPG" | foreach {
$newname = "Slide0" + $_.Name.Substring(5)
Move-Item $_.Name $newname
}

Had no one asked questions, I was prepared with a few scripts to show off.   Since we had a good set of questions, I never had a chance to show this:

  1. First, I started with a blog post of Todd抯: http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=362
  2. I ignored the download link he provided, and copied the script into the ISE, INCLUDING THE LINE NUMBERS, then saved it as a file called CreateUsersTK.ps1
  3. To clean up the line numbers, I just removed the first three characters from each line:

get-content .\createUsersTK.ps1 | foreach {
$_.Substring(3)
} > .\createUsersTK2.ps1

After that, I took the script and giftwrapped it by turning it into a function which you can find here:giftwrap.ps1.  Note that I've not tested the result yet.

We gave a away a few books at the end of the session. After that, I attended a few sessions and spent more time in the exhibit hall, and had a chance to sit down with Jamie Story and Leo Doyle to plan upcoming CSPUG meetings.

Alisa Swann gave a good presentation on what's new in Office 2013.  Seamlessly switching between devices and your recent file list syncs  - cool.

I think that about covers it.

I'm looking forward to the next one!

--Michael

September 2012 in Chicago–Full of SharePoint Events!

There’s a lot going on next month that is SharePoint related! Check out these events:

  1. The Elgin  SharePoint Users Group meets on the 5th.
  2. SharePoint Fest is coming to Chicago (Rosemont really) September 25-27. 
    1. There are some excellent preconference sessions (including Dan Holme’s governance workshop, not to be missed!).
    2. That evening, the Chicago SharePoint Users Group (which I help run), will have a panel discussion featuring some of the speakers from the conference.  The following day, I’ll be giving my presentation on PowerShell and SharePoint.  Again, PowerShell is a key tool for working with SharePoint (2007,2010, and 2013), both for developers and for Admins, and if you don’t know the PowerShell language, now’s the perfect time to start! 
    3. On the last day of the conference, I have the honor of co-presenting a PowerShell Workshop with SharePoint MVP and expert SharePoint Admin Todd Klindt!  Bring all your PowerShell questions!
    4. The conference website is http://www.sharepointfest.com/Chicago/.  Use coupon code CSPUG-15 to save 15% when you register today!
  3. SharePoint Saturday Chicago is slated for September 29th.  Watch http://sharepointsaturday.org/chicago/default.aspx for more info.

If you are are interested in Business Intelligence, you should be aware that Magenic is having a Business Intelligence Summit in Chicago August 23rd.  More info at: http://magenic.com/Locations/ChicagoMidwestRegion/BISummit.aspx

If you are a SharePoint Developer, but SharePoint isn’t all you do, then this event may also be of interest: Code Mastery Chicago. It’s on September 12th, at Microsoft’s Downers Grove office.

--Michael

SPFestChicago2012

More SharePoint Blogging–at work!

You may have noticed that the frequency of my blogging fell off a cliff about 2.5 years ago – coinciding with the birth of my son, our second child.  However, recently I have started co-authoring some blog posts with my colleagues in Magenic’s SharePoint practice, in particular David Lozzi and Ralph Rivas.  The first of these blog posts can be found at http://magenic.com/Blog/tabid/182/tag/SharePoint/Default.aspx, and another one is coming soon. Plus there are a few other good SharePoint-related posts there.

Michael

Thank you SharePoint authors and publishers!

While I was attending SharePoint Connections Chicago, I sent out a few requests for more books in order to restock the Chicago SharePoint User Group’s virtual treasure chest of give away items for the raffle at the end of each meeting.  While at the conference, I also picked up a box of 2010 SharePoint Shepherd books from the always generous MVP Rob Bogue. 

Over the last few days, I’ve been delighted to receive three boxes of books.

My restocked treasure chest now contains over a foot and a half of SharePoint books!

  1. MS Press
    1. Managing and Implementing Microsoft SharePoint 2010 Projects by Geoff Evelyn – Safari Books Online Link
    2. Developing Microsoft SharePoint Applications Using Windows Azure – Special Excerpt – Not For Resale by Steve Fox
    3. MOS 2010 Study Guide by John Pierce and Geoff Evelyn
      1. That’s Microsoft Office Specialist MOS not Microsoft Office SharePoint Server MOSS
    4. Business Intelligence in SharePoint 2010 by Norm Warren, Mariano Teixeira Neto, John Campbell, and Stacia Misner
    5. SharePoint 2010 Plain and Simple by Johnathan Lightfoot and Chris Beckett
    6. SharePoint Designer 2010 Step by Step by Penelope Coventry
    7. SharePoint Foundation 2010 Step by Step by Olga Londer and Penelope Coventry
    8. SharePoint 2010 Administrator’s Companion by Bill English, Brian Alderman, and Mark Ferraz
    9. SharePoint 2010 Administrator’s Pocket Reference by Ben Curry
    10. Designing Solutions for Microsoft SharePoint 2010 by Jason Lee, Chris Keyser, Rob Bogue, and Todd Baginski
    11. Inside Microsoft SharePoint 2010 by Ted Pattison, Andrew Connell, Scot Hillier, and David Mann
    12. SharePoint 2010 Developers Reference by Paolo Pialorsi
  2. Wrox (more books are on the way)
    1. Beginning SharePoint 2010 Development by Steve Fox
  3. Manning:
    1. SharePoint 2010 Workflows In Action by Phil Wicklund
    2. SharePoint 2010 Web Parts in Action by Wictor Wilén
    3. Learn Windows PowerShell in a Month of Lunches by Don Jones
  4. IHF Publishing: Enterprise Application Development in SharePoint 2010 by Ira Fuchs. If you want to buy this book, come to one of our meetings to get a discount code.
  5. SharePoint 2010 Branding in Practice by Yaroslav Pentsarskyy
    1. Yaroslav also wrote Top 60 custom solutions built on SharePoint 2010, of which he gave us several copies that I have given away at previous CSPUG meetings. He also is involved with VanSPUG ( the Vancouver SPUG), blogs at ShareMuch.com, and has a SharePoint branding webinar at http://www.sharepoint-videos.com/sharepoint-2010-branding-dvd/ – yes, Asif’s site.  Asif is one of my fellow co-leaders of CSPUG and its resident MVP .
  6. The SharePoint Shepherd’s Guide for End Users, 2010 edition by MVP Rob Bogue at Thor Projects
  7. Several sets of Quick Reference Cards (not technically a book) for MOSS, SP2010, and Office 365, from Brain Storm Inc.

 

We will be giving away all of the above books over the course of our next several CSPUG meetings. 

Resources for supporting a SharePoint User Group

If you run a SharePoint User Group, you should know about these:

· Dave Bost (dbost AT microsoft DOT com) and Clark Sell (csell AT microsoft DOT com ) run a monthly phone call for midwest User Group leaders.  You can ask them if there is an equivalent call for other geographies.

· You can affiliate with INETA (http://ineta.org/ ) and/or GITCA (http://www.gitca.org/Pages/default.aspx).   

· http://inetachamps.com/ - keep a log of your efforts to run the group and get recognized for it.

· Get Books:

· User Group Support Services (UGSS)

o They send kits quarterly

o https://www.technicalcommunity.com/Pages/default.aspx

Also, make sure your group is listed at http://www.sharepointpros.org/Pages/SharePointUserGroups.aspx

 

And if you video your meetings, you could put them here: http://usergroup.tv/

 

--Michael

Slides from Rockford.NET User Group Meeting
On July 26, 2011 I spoke at the Rockford .NET User Group meeting. I planned to speak about SharePoint and PowerShell, but ended up speaking mostly on PowerShell. I covered the first half of my slide deck, which is at http://blumenthalit.net/Files/RockfordNUG/PowerShell%20for%20SharePoint%20Developers%20and%20Administrators.pptx.
 
 
1 - 10 Next