Browsed by
Tag: SharePoint 2010

Debugging an Explorer View issue

Debugging an Explorer View issue

During a recent SharePoint 2010 upgrade project, we applied SP1 and DEC 2012 CU & encountered a frustrating issue. Everything in the farm was working as expected after we did the installation & ran PSCONFIG, except for an issue where some users could not use Explorer View to open some Document Libraries.

More detailed user testing revealed that the issue only occurred for user who were using computers running Windows Vista or later. Windows XP users could open in explorer view without a problem.

WebDAV vs Front Page RPC

The reason for the OS disparity is due to the different protocols by which SharePoint will try to open in Windows Explorer. As it is explained in a Microsoft white paper from 2006 on SharePoint Explorer View:

“The Explorer View prefers WebDAV over FPRPC. Because of the underlying design of the Explorer View and the default network provider order, it always tries to use SMB first, then WebDAV. Only when SMB and WebDAV have failed does it actually attempt to use FPRPC. This means that forcing the Explorer View to use WebDAV is more a case of creating an environment that makes sure WebDAV is successful instead of actually forcing the Explorer View to choose it.”

While the WebDAV protocol relies on the Web Client Service, the FPRPC protocol does not, instead relying on WebFolders. WebFolders are disabled by default beginning in Windows Vista, but are available in Windows XP which explains why Explorer View worked in XP and not later Windows OS.

Compounding the confusion

This client was leveraging nested managed paths. This caused a secondary issue because the managed path contained a “”, causing the WebDAV protocol not to be able to parse the address. The fix simply involved creating a wildcard Managed Path for the first part of the compound address. So if you have a URL which is “statecounty” you would just add a managed path for “state” and explorer view via WebDAV will work. Here is what this would look like:

clip_image001

Take Away

The lesson here is to avoid using compound Managed Paths in your SharePoint web applications. If you absolutely must use compound managed paths be sure to add a wildcard path for the first part of the compound path.

Thank you’s

A big thank you to Todd Klindt, of Rackspace, for giving us some good leads & Evan Riser from my team for chasing this all the way down the rabbit hole to a resolution.

How to: Create Active Directory Users using PowerShell

How to: Create Active Directory Users using PowerShell

Not unlike several posts in recent weeks, tonight’s adventures in PowerShelling started with from a conversation at SharePoint Saturday New Hampshire with the Iowan treasure Todd Klindt. The conversation was around the script that he used to create Active Directory users. I had my own bit of jumbled together code for this purpose, but his has some snazzy ifelse-ness to it and the ability to set Managers and add Pictures that made it especially appealing.

At the same time there were things in his script that I felt were a bit lacking and it lead to the whole “I can write that code in 2 hours” game not unlike a name that tune style geek-out.

Rather than reiterating all of the goodness that Todd built into his version of the script I will refer you to his post: http://www.toddklindt.com/PoshMakeUsers to read all of his fun comments.

Instead I will regale you with the updates that I have made:

  1. Specify an OU – I am an old school AD guy at heart and I HATE a mess Users directory where I can’t find anything. I always end up moving my SQL & SharePoint Service accounts to their own OU, as well as my dummy test accounts. This tweak to the script asks you what OU you want the accounts created in and then will create the OU if it doesn’t already exist (given you have those rights). If you hit enter it will default to attempting to place the accounts in an OU called “SharePoint Service Accounts”.
  2. Prompt for the CSV input file – I have multiple files that I use in different dev environments for different purposes: a.) SQL service accounts b.) SharePoint service accounts c.) Dummy user accounts d.) Smart user accounts e.) etc, etc, etc. The script now prompts for which CSV file you want to import the users from. Hitting enter when prompted will look for a file called Users.csv in the local running directory.

    **Updated**

  3. Change the default passwordOn Todd’s Netcast tonight he mentioned this little bit of code, however I hadn’t actually written it yet. Nothing like throwing down the gauntlet there, Mr. Klindt! In response I whipped up version 3.1 of the script which now allows you to change the default password as a variable when run. If you choose nothing it will default to the pass@word1 standard.

Here is a copy of the code:

# Script to create Active Directory accounts
# v3.1 11/26/2012
# Updated by Jason Himmelstein
# http://www.sharepointlonghorn.com
# Based upon the script by Todd Klindt
# http://www.toddklindt.com

# Add the Active Directory bits and not complain if they're already there
Import-Module ActiveDirectory -ErrorAction SilentlyContinue

$OU= Read-Host -Prompt "Enter OU name you want. Press Enter for SharePoint Service Accounts"
If ($OU -eq "") {$OU = 'SharePoint Service Accounts'}
$FQDN = (Get-ADDomain).DistinguishedName

If ([adsi]::Exists("LDAP://OU=$OU, $FQDN") -eq $True){
write-host "The OU already exist" -ForegroundColor DarkGreen -BackgroundColor Gray}
else{dsadd ou "ou=$OU,$FQDN"}

$OU_specified = "ou=$OU,$FQDN"

# specify the file location
$csvfile = 'users.csv'
$userfile = Read-Host -Prompt "
Enter the location of the CSV file containing the users you want to import. Press Enter for $csvfile"
If ($userfile -eq "") {$userfile = $csvfile}

# set default password
# change pass@word1 to whatever you want the account passwords to be
$userpassword = Read-Host -Prompt "Enter default password you wish to set for all of these accounts. Press Enter for pass@word1"
If ($userpassword -eq "") {$userpassword = 'pass@word1'}
$password = (ConvertTo-SecureString $userpassword -AsPlainText -Force)

# Get domain DNS suffix
$dnsroot = '@' + (Get-ADDomain).DistinguishedName

# Import the file with the users. You can change the filename to reflect your file
$users = Import-Csv $userfile

foreach ($user in $users) {
if ($user.manager -eq "") # In case it's a service account or a boss
 {
try {
New-ADUser -SamAccountName $user.SamAccountName -path $OU_specified -Name ($user.FirstName + " " + $user.LastName) `
-DisplayName ($user.FirstName + " " + $user.LastName) -GivenName $user.FirstName -Surname $user.LastName `
-EmailAddress ($user.SamAccountName + $dnsroot) -UserPrincipalName ($user.SamAccountName + $dnsroot) `
-Title $user.title -Enabled $true -ChangePasswordAtLogon $false -PasswordNeverExpires  $true `
-AccountPassword $password -PassThru `
                    }
catch [System.Object]
 {
Write-Output "Could not create user $($user.SamAccountName), $_"
 }
            }
 else
 {
try {
New-ADUser -SamAccountName $user.SamAccountName -path $OU_specified -Name ($user.FirstName + " " + $user.LastName) `
-DisplayName ($user.FirstName + " " + $user.LastName) -GivenName $user.FirstName -Surname $user.LastName `
-EmailAddress ($user.SamAccountName + $dnsroot) -UserPrincipalName ($user.SamAccountName + $dnsroot) `
-Title $user.title -manager $user.manager `
-Enabled $true -ChangePasswordAtLogon $false -PasswordNeverExpires  $true `
-AccountPassword $password -PassThru `
                    }
catch [System.Object]
 {
Write-Output "Could not create user $($user.SamAccountName), $_"
 }
             }
 # Put picture part here.
 $filename = "$($user.SamAccountName).jpg"
 Write-Output $filename

 if (test-path -path $filename)
            {
Write-Output "Found picture for $($user.SamAccountName)"

 $photo = [byte[]](Get-Content $filename -Encoding byte)
Set-ADUser $($user.SamAccountName) -Replace @{thumbnailPhoto=$photo} 
            }
   }

If you are looking for the downloadable PowerShell or text file version, please find them linked below. Happy PowerShelling!

powershell notepad

Planning a SharePoint Saturday: A recap of #SPSNH

Planning a SharePoint Saturday: A recap of #SPSNH

We are now almost a month removed from SPSNH and it has been just enough time for the glow to start to fade and for life to start getting back to normal.  The event was wildly successful and somehow managed to receive nothing but positive reviews.  There were a few things that I noted that are worth mentioning:

1.) Drop off between registration and attendance was between 30-40%. 

2.) Doing 6 keynotes instead of 1 made the day interesting, but did not draw people in for the early sessions the way that a big name keynote might have.

3.) Planning 3 tracks (ITPro, Dev, End User) at 2 different skill levels (Beginner & Advanced) and keeping the tracks consistent in the same room so that people weren’t hunting for their next session was a BIG hit.

4.) Todd Klindt is a freaking rock star.  This isn’t something that we learned, but it was certainly reinforced.  The dude stepped up to deliver a session he had never seen until 5 minutes before when someone called in sick for the first timeslot & then presented to a standing room only group later in the day.  Todd’s heroic efforts win the booby prize with Chris McNulty coming in a close second for taking on an extra session with only a day’s notice.  The edge went to Todd because he had less prep time. 

5.) Bags and paper collateral are passé.  Give people a jump drive with digital collateral.

6.) Varying things up between 2010 & 2013 was very positive.  The people who came to hear about 2013 wanted some 2010 as well & the folks who wanted to hear about 2010 were interested in some about 2013 too.

7.) Hot coffee available all day is a MUST.

8.) Speaker gifts instead of speaker shirts.  We gave a nice warm jacket with the SPSNH & NHSPUG logos on them and I am still getting twitter comments about how much the speakers enjoy them.  Plus, SPSRED “borrowed” our idea and their speakers loved them too smile

All in all, I am happy to say that SPSNH was a great success and we are looking forward to doing it again next year.  There are things that we will look to do differently, but with a second SPSNH under our belt I think that we have a pretty good thing going up here in the “Live Free or Die” state.

My presentation from SPSNH can be found here. The slides that Todd presented on 5 minutes notice can be found here. (I had done a webinar the week before, so this was my deck from that)

My pictures from the weekend can be found here on my SkyDrive.

spflogging_32

Hooray, it’s a book!: “Developing Business Intelligence Apps for SharePoint”

Hooray, it’s a book!: “Developing Business Intelligence Apps for SharePoint”

book

Over the past year I have been spending my night’s & weekends working on a book with my co-author, Dave Feldman, and I am proud to say that we have completed our draft of “Developing Business Intelligence Apps for SharePoint”

Through the book you will learn to create dynamic Business Intelligence solutions for SharePoint, using Microsoft Visual Studio LightSwitch, SQL Server 2012, and other tools and technologies. This hands-on book shows you how to create data-rich BI applications with SharePoint faster and with more capabilities than previously possible. You’ll learn the entire process, from high-level concepts, to low-code development and deployment, to setup and configuration.

  • Quickly build a robust schema and applications with Visual Studio LightSwitch
  • Leverage PowerPivot v2 to build a business intelligence semantic model
  • Create reports with Excel Services, Report Builder, and Power View

The happy thing about our book is that we saw the CSOM model of SharePoint 2013 coming down the road and architected our solutions in the book so that they are relevant to both the 2010 & 2013 platforms (and hopefully many versions of SharePoint to come).

The book is available for pre-order on Amazon now and will be available via O’Reilly Early Release.   Dave & I will be at the SharePoint Conference in Las Vegas where O’Reilly will have a form of the book available (not quite sure if it will be a few chapters or what at that point, but there will be something!). 

I will say that Dave & I were warned by Andrew Connell & Scot Hillier when we started talking about writing this book that taking on a book project is much like having a child.  9+ months of long uncomfortable sleepless nights to give birth to something that you hope goes on to do good things in this world (I am paraphrasing a bit here… basically they both said it was going to suck something awful, but we would be happy when it was all over).  Well gents, you were right on all counts.  The fun part is that while I have 2 kids and sort of had an idea of what something like that was going to be like, Dave’s wife is pregnant with their first child and is due this SUNDAY.  Needless to say, we are glad to be done before Baby “Cookie Monster” Feldman arrives. smile

Planning a SharePoint Saturday: A recap of #SPSNH

Planning a SharePoint Saturday: A recap of #SPSNH

We are now almost a month removed from SPSNH and it has been just enough time for the glow to start to fade and for life to start getting back to normal.  The event was wildly successful and somehow managed to receive nothing but positive reviews.  There were a few things that I noted that are worth mentioning:

1.) Drop off between registration and attendance was between 30-40%. 

2.) Doing 6 keynotes instead of 1 made the day interesting, but did not draw people in for the early sessions the way that a big name keynote might have.

3.) Planning 3 tracks (ITPro, Dev, End User) at 2 different skill levels (Beginner & Advanced) and keeping the tracks consistent in the same room so that people weren’t hunting for their next session was a BIG hit.

4.) Todd Klindt is a freaking rock star.  This isn’t something that we learned, but it was certainly reinforced.  The dude stepped up to deliver a session he had never seen until 5 minutes before when someone called in sick for the first timeslot & then presented to a standing room only group later in the day.  Todd’s heroic efforts win the booby prize with Chris McNulty coming in a close second for taking on an extra session with only a day’s notice.  The edge went to Todd because he had less prep time. 

5.) Bags and paper collateral are passé.  Give people a jump drive with digital collateral.

6.) Varying things up between 2010 & 2013 was very positive.  The people who came to hear about 2013 wanted some 2010 as well & the folks who wanted to hear about 2010 were interested in some about 2013 too.

7.) Hot coffee available all day is a MUST.

8.) Speaker gifts instead of speaker shirts.  We gave a nice warm jacket with the SPSNH & NHSPUG logos on them and I am still getting twitter comments about how much the speakers enjoy them.  Plus, SPSRED “borrowed” our idea and their speakers loved them too smile

All in all, I am happy to say that SPSNH was a great success and we are looking forward to doing it again next year.  There are things that we will look to do differently, but with a second SPSNH under our belt I think that we have a pretty good thing going up here in the “Live Free or Die” state.

My presentation from SPSNH can be found here. The slides that Todd presented on 5 minutes notice can be found here. (I had done a webinar the week before, so this was my deck from that)

My pictures from the weekend can be found here on my SkyDrive.

SharePoint Saturday New Hampshire is upon us!

SharePoint Saturday New Hampshire is upon us!

speakerbadge_newhampshire_2_4C4297A5

With only 3 days to the big event things are rapidly coming together.  The bags, speaker gifts, t-shirts, buttons, digital collateral, prizes and jump drives are all here and ready for Saturday.  I am excited for my presentation “ITPro’s taking the SharePoint 2013 “red pill” will be a ton of fun to present and should be informational as well. 

More than anything I am excited that my co-organizers and I have been able to assemble an amazing cast of speakers to come out to New Hampshire and talk about SharePoint on their own time.  We have speakers coming from Texas, Iowa, Indiana, Washington DC, and all of the New England states to share their expertise with our attendees for free. Being a regular speaker at SharePoint Saturdays for the past year and a half I take for granted all of the hard work that goes into these events and all of the people who give freely of their weekends to come out and speak at these events; it could partly be, as my colleague Mike Gilronan likes to tell people, because “Wherever there are two or more people asking about SharePoint, Jason feels obligated to show up and talk”.

I have really enjoyed helping to put this event together and am excited to see our efforts come to fruition.  If you are in the New England area and want to learn about SharePoint, please find your way up to Southern New Hampshire University on Saturday.  You won’t regret it!

To learn more and register to attend this FREE SharePoint training please visit http://www.sharepointsaturday.org/NH

PowerPivot & Claims Based Authentication–Is there hope in SQL 2012?

PowerPivot & Claims Based Authentication–Is there hope in SQL 2012?

I promised an update on this in my previous article and it is time to share what I have learned.

The issue:

As many of us have painfully found, PowerPivot v1 on a Claims Based Authentication web application is not supported in SharePoint 2010.  I had a case open with Microsoft last year that had the aspirations of rectifying that situation.  We had hoped that working with the PowerPivot team (a part of the SQL Server Product team) and the SharePoint Product team that we would be able to find a way for Microsoft to change their stance and provide us a way to allow PowerPivot v1 to be supported. 

The answer for v1:

Sadly, the changes that would have to be made were too drastic for Microsoft to make in the middle of PowerPivot v1’s existing product lifecycle. 

The new and improved question:

That begs the question: Is there hope that PowerPivot v2 will be able to work on a Claims Based Authentication web application?

The caveated answer:

Keeping in mind that the product has not launched yet and things can still change (they won’t, but lets keep hoping) and that all of the SQL 2012 TechNet that are posted currently have the following statement at the top of them:

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

The answer is still no.  In the TechNet article entitled “Hardware and Software Requirements (PowerPivot for SharePoint and Reporting Services in SharePoint Mode)” you will find the section under PowerPivot Sofware Requirements says in reference to SharePoint web applications:

PowerPivot for SharePoint only supports SharePoint web applications that are configured for classic-mode authentication. If you are adding PowerPivot for SharePoint to an existing farm, be sure that the web application you plan to use it with is configured for classic-mode authentication. For instructions on how to check authentication mode, see the section “Verify the Web application uses Classic mode authentication” in Deploy PowerPivot Solutions to SharePoint.“

Well damn.  Is there any hope that this is ever going to change?

Keep your chins up.  Rumor in the interwebs is that there is going to be a new version of SharePoint coming in sometime soon.  I can tell you that Microsoft has heard and continues to hear our cries out about this matter.  The more we raise this up as an issue, the more real it will be to Microsoft and the more likely they will be to invest in making the change.  If there is no perception that this is an issue, then there is no attention that will be paid and no investment dollars that will be spent.

If this is an issue for you, make sure that your Microsoft reps hear about it.  I talk about this with every Product Team member that I can get to listen to me for 5 minutes and I have never met with anything other than a warm reception and a sincere desire to know the feedback on how to make the product better.

Is this going to stop you from deploying PowerPivot v2 and Power View?

Not a snowman’s chance in the hot Jamaica sun.  I cannot wait for the final bits to drop so that I can get this amazing new product suite into the hands of every customer who wants to do BI.  The new BI story is too game changing not to get on the bus, and if I am riding it why not be driving smile

When in doubt, check ALL the permissions…

When in doubt, check ALL the permissions…

Having just completed my last speaking engagement of 2012 it was time to get back into the swing of things and start playing with troubleshooting a bit. 

The dilemma

In a continuing effort to evolve my PowerShell build script for SharePoint I spent a few hours with my team playing with different settings.  One of my team members was driving to get better hands on experience with using PowerShell to configure SharePoint.

We started with the very standard PSConfig script that I have used hundreds of times in the past:
(I left out the variables to save some space)

1

The following error popped its ugly head up in PowerShell’s angriest color when attempting to run this initial farm configuration:

New-SPConfigurationDatabase : Requested registry access is not allowed.

The troubleshooting

Check permissions

Hackles went up immediately when the error was read out loud.  Prior to running the script we had just walked through several Security Best Practice checks, following Microsoft’s guidance in TechNet, partly to see if anything had changed recently (it hadn’t) and partly as a good refresher:

Account permissions and security settings (SharePoint Server 2010)

Plan administrative tasks in a least-privilege environment (SharePoint Foundation 2010)

Plan for administrative and service accounts (SharePoint Foundation 2010)

We went back and doubled checked all of our settings and found that things were configured as prescribed.  The SharePoint install account had local administrator permissions on the SharePoint server and SecurityAdmin and DBCreator rights on the SQL server.

Examine the logs

We visited our Server Event Log and 14 Hive Logs folder but found no evidence that anything was in error.  In fact, no logs entries were created at all…

Check the firewall rules

We validated that for this configuration, in a sandbox without external connections to the world, that the Windows Firewalls were turned off.

Check the connection between servers

Using the trusty Data Sources (ODBC) validation method we were able to make connection from the SharePoint server to the SQL server, and browse the available databases.

Get thyself to Google!

Completely perplexed at this point by an error that doesn’t make any sense due to the fact that the SharePoint install account was a local admin we went to our good friend Google and found, well to be honest a bunch of crap that didn’t help us in any way.  Lots of stuff for people who have lost access to Central Admin due to GPO changes, or had a driver go corrupt, or are trying to write to the registry using C# in ASP.net, & even a forum about people having problem registering their car in Nebraska.

Review of Local Security Policies

One last ditch effort to check the local security policy to see if a new GPO pushed down changes to turned out fruitless, however one of the AD admins mentioned they had seen an issue similar to this once before they changed the User Account Control Settings (UAC). 

The Root Cause

Not even thinking about it my response to the UAC question was “There is no need to do that, you just right-click and launch as Administrator or use my PowerShell script to run as a different user

Upon examination of my team member’s screen it was revealed that: 2

PowerShell ISE have in fact been opened without being run as Administrator.  A costly lesson from a time perspective, but a good learning experience for a newbie at PowerShell for SharePoint.

The most troubling of all however was upon reexamination of the PowerShell error message we needed to only go 2 lines above the big red error message that we were troubleshooting on, to the plain black texted TRUE error: (highlighted here in yellow)

3

Unassuming and unnoticed as we troubleshot the obvious error, the line was thrown by the PSConfig.exe and not a bad PowerShell parameter which explains why PowerShell did not recognize it as an error.

The moral of the story…

Even after following every documented Best Practice out there, we still were able to find a way to cause an error.  While the UI was bad for the error that would have been useful to us, it was at least thrown in our faces.

The easy answer is to always make sure that you open PowerShell or PowerShell ISE as Administrator.  My personal preference is always going to be login in to servers using a non-SharePoint privileged account and then elevate permissions to run in the context of a SharePoint Farm admin or service account as demonstrated in my previous post which sets the run as Administrator for you.

Be sure when you are ready to do any SharePoint Admin work that you see the “Administrator:” in front of your PowerShell ISE path, like this:

4

At the end of a fun troubleshooting session we walked away with a new notch in our troubleshooter tool belt, a fun article to write, and team member who will never forget to fire the RunAs flag ever again.

#SPSDenver Wrap-up

#SPSDenver Wrap-up

banner

I was honored to be a two-day speaker at SPSDenver this past weekend and had a marvelous time doing so.  The conference was well organized, properly planned, and extremely well attended.  Credit to Clayton Cobb and his team for putting on such a great event.  From the care of ensuring that they understood every issue that an attendee had to making sure that the fragile egos of the speakers were well cared for to making sure that every sponsor got the most out of the event, they really had their act together.  That was all before we even got to ShareSki!

Every time I travel for SharePoint I meet new, interesting people and it reinforces my opinion that the SharePoint Community is the greatest group of people with a common technology interest anywhere.  It is always fun to get to know more people in our world and I am humbled to be a part of it.

Needless to say, I was impressed by SPSDenver and am looking forward to returning next year if they are kind enough to have me back.

For those who are looking for the SPSDenver slide decks please find them below:

SharePoint Logging and Debugging

SharePoint Performance Best Practices from the Field

SQL Server 2012 Release Candidate is here!

SQL Server 2012 Release Candidate is here!

SQL2012We are creeping slowly toward the release of SQL Server 2012 and all of its new, fun features for SharePoint 2010!  The first Release Candidate of SQL Server 2012, known as RC0, dropped today and is publicly available for download.  

Here are a some links worth checking out:

Download SQL 2012 RC0 – Get the software here!

SQL Server 2012 Release Candidate is now Available! – SQL Server Reporting Services Team Blog

Announcing Microsoft SQL Server 2012 Release Candidate 0 (RC0) – Analysis Services and PowerPivot Team Blog

What’s New In Power View – SQL Server Reporting Services Team Blog

The Pivot Transform – Now with UI! – SSIS Team Blog

SSIS and PowerShell in SQL Server 2012 – SSIS Team Blog

Microsoft SQL Server 2012 Training Kit Now available for Download

Microsoft® SQL Server® 2012 Semantic Language Statistics RC0

Microsoft® SQL Server® 2012 Release Candidate 0 (RC0) Manageability Tool Kit

Microsoft® SQL Server® 2012 Express RC0

Microsoft® SQL Server® 2012 RC0 Master Data Services Add-in For Microsoft® Excel®

Microsoft® SQL Server® 2012 PowerPivot® for Microsoft® Excel® 2010 Release Candidate 0 (RC0)

I am still digesting all of the changes that the teams were able to bring into RC0 and am excited to spend the weekend working with my team to examine what they all are going to mean for SharePoint 2010 integration with Microsoft BI.

More to come as the weeks go on…