<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[Category: Systems Administration | Chris Weldon]]></title>
  <link href="http://www.chrisweldon.net/blog/categories/systems-administration/atom.xml" rel="self"/>
  <link href="http://www.chrisweldon.net/"/>
  <updated>2014-08-25T03:04:45+00:00</updated>
  <id>http://www.chrisweldon.net/</id>
  <author>
    <name><![CDATA[Chris Weldon]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[Communication Brevity]]></title>
    <link href="http://www.chrisweldon.net/blog/2013/11/26/brevity/"/>
    <updated>2013-11-26T18:50:00+00:00</updated>
    <id>http://www.chrisweldon.net/blog/2013/11/26/brevity</id>
    <content type="html"><![CDATA[<p>Let&rsquo;s talk about something I really don&rsquo;t like: e-mail. Let me clarify this by saying I <em>loathe</em> e-mails on <strong>team</strong> projects. Why? Persistence. Conversations via e-mail have this perception they will be &ldquo;found&rdquo; at a later time, but the proposed value is rarely so useful. Furthermore, new team members or collaborators <em>rarely</em> ever get that context, because it&rsquo;s buried in <strong>another</strong> person&rsquo;s e-mail. This is my approach to how teams should communicate to ensure longevity of this critically important information.</p>

<!--more-->


<p>I&rsquo;m a huge fan of the <a href="http://blogs.atlassian.com/2009/01/2009_email_brev/">e-mail brevity challenge</a>. The idea is simple: keep your e-mails short. 140 characters short. What this limits you to do is <strong>huge</strong>. Do you think you can have technical design discussions with 140 characters? What about researching technical support problems? How about product feature ideas? Clarifying how your team came to the conclusion to disable a feature due to security constraints? You might be able to do this in a bunch of 140 character e-mails, but that&rsquo;s hardly a good use of time.</p>

<h1>The Problem</h1>

<p>For those examples I listed above, how important is it to your team to find that information now or three years from now? Let&rsquo;s face it - most teams undergo turnover at some point and with some degree of variability. Those whom are left find themselves struggling to find the context - the <em>why</em> - beind a particular decision. This becomes more evident the longer time passes since a decision was made.</p>

<p>We have this problem now. I am considering simplifying a system we have currently. Yet, I can&rsquo;t find any context to understand why the system is currently so complex. Everyone agrees there <strong>should</strong> be a reason, but nobody knows <em>why</em> that reason is. The <strong>how</strong> of the system was perfectly documented, but the <em>why</em> was not. If current (and former) history are any sign, it&rsquo;s likely the conversation of <em>why</em> has been lost somewhere along the way.</p>

<h1>The Solution</h1>

<p>As previously indicated, expressing yourself via e-mail in 140 characters or less is hard. You want to know what isn&rsquo;t hard to express under that constraint? A URL.</p>

<p>The solution to this problem is easy. If you shift your conversation online, its longevity or persistance is no longer tied to the life of someone&rsquo;s inbox. We have what we call a &ldquo;posting&rdquo; culture at the firm - a process to keep as many people who are directly involved or <em>may</em> be involved informed about the progress of our work. However, doing so via e-mail is laborious, especially if you leave out a stakeholder. However, if the conversation is non-private, having that conversation on an online social platform enables those stakeholders to opt-in to your updates. They can sit on the sidelines watching the activity, or if they see something that requires their intervention, they can take charge and engage in the conversation.</p>

<p>But what about private conversations? Most social platforms have the capability for engaging in private conversation. Whether this be through closed collaboration/team rooms or direct messages between you and another user. However, once decisions have been made, it becomes easy to promote the relevant pieces of those conversations from private to public - it&rsquo;s already online.</p>

<h1>Additional Benefits</h1>

<p>The problems of traditional e-mail go beyond simply lack of context. Many corporate e-mail platforms <strong>still</strong> don&rsquo;t provide metadata tagging. Searching for e-mail means you search conversations only <em>you</em> were directly involved. Being able to keep track of the conversation thread is dismal with our tools - only a few e-mail clients (and only very recently) are able to present conversations in threaded views. Most people <strong>still</strong> don&rsquo;t know those features exist! Finally, collboration on documents still happens by shipping them via e-mail. Which is the authoritative <em>final</em> version? Finally, what <strong>was</strong> the final decision of that chain of e-mails about how to proceed on our design?</p>

<p>Moving the conversation online to social platforms opens up many other benefits. Tagging (primarily #tags, pronounced as hashtags) are in most platforms. For those not familiar, tagging content with certain keywords enables easier discoverability. When you search for relevant conversations using those keywords, the search engine considers tagged posts more relevant than posts having those words somewhere in the document. A human made the decision that keyword pertains to this conversation, rather than that word being used in a conversation about something completely different. Search is also enhanced as you&rsquo;re now searching all <em>open</em> and <strong>public</strong> conversations, broadening your search potential.</p>

<p>Being able to follow conversations is much easier. Threaded views enable clear visibility and understanding of the flow of conversations. Furthermore, most social platforms (especially in the Q&amp;A space) have options for marking something as a &ldquo;correct&rdquo; or &ldquo;most helpful&rdquo; answer. Leveraging these same features, even for team discussions accomplishes two things:</p>

<ul>
<li>You know exactly which decision was made, even when the content indicating that a decision had been made was unclear.</li>
<li>You have all of the conversation surrounding why that decision was made.</li>
</ul>


<p>Finally, when it comes to sharing and collaborating on content, like Word/Excel/PowerPoint documents, moving that online and providing a <em>single</em> authoritative source for the document reduces confusion on which is the final version and the final copy.</p>

<h1>Give it a Try</h1>

<p>Don&rsquo;t wait. Force yourself into this model. It will be hard - you&rsquo;ll want to revert back to your old ways of typing lengthy e-mails and using distribution lists. When you find yourself writing even just <strong>two</strong> sentences in an e-mail: stop. Immediately move to your online space and continue. Don&rsquo;t be tempted to reply in e-mail to someone sending you the link to the topic thread they started online - keep the conversation where it originated! But move it online if it started in e-mail!</p>

<p>While your team starts adopting this pattern of communication, you&rsquo;ll see some short-term gains (like discoverability, transparency, clarity of decisions, inclusion, etc.). However, this is all about the long-term gains your team will have. The more content you push online, the better it will be for your team when it comes to retaining critical information. It <em>will</em> be worth it!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[SharePoint 2013 My Site Timer Jobs Missing]]></title>
    <link href="http://www.chrisweldon.net/blog/2013/08/02/sharepoint-2013-my-site-timer-jobs-missing/"/>
    <updated>2013-08-02T15:07:00+00:00</updated>
    <id>http://www.chrisweldon.net/blog/2013/08/02/sharepoint-2013-my-site-timer-jobs-missing</id>
    <content type="html"><![CDATA[<p>The way My Sites are created in SharePoint 2013 is vastly different from SharePoint 2010, but for good reason. I won&rsquo;t go into the details of how it&rsquo;s changed, as Wictor Wilen has done an <em>excellent</em> job of this already in his blog post <a href="http://www.wictorwilen.se/sharepoint-2013-personal-site-instantiation-queues-and-bad-throughput">SharePoint 2013: Personal Site Instantiation Queues and Bad Throughput</a>. I encountered problems with a new development workstation not setting up My Sites for users appropriately - blocking us from testing our solution, which was dependent upon a user having a My Site. In looking online (and in Wictor&rsquo;s blog post), everything was pointing to checking the following three timer jobs:</p>

<ul>
<li>My Site Instantiation Interactive Request Queue</li>
<li>My Site Instantiation Non-Interactive Request Queue</li>
<li>My Site Second Instantiation Interactive Request Queue</li>
</ul>


<p>The problem is, those timer jobs were missing from my server!</p>

<!--more-->


<p>I checked for the timer jobs first through Central Administration, and then subsequently thru PowerShell. The following are the results I found:</p>

<pre><code>Get-SPTimerJob | sort Name | ft Name
</code></pre>

<p>{% img center /images/posts/2013-08-02-sharepoint-2013-my-site-timer-jobs-missing/01-missing-timerjobs.png Timer Jobs Missing %}</p>

<p>I decided to check for the My Site timer jobs on a know working SharePoint 2013 farm. Sure enough, they were there:</p>

<p>{% img center /images/posts/2013-08-02-sharepoint-2013-my-site-timer-jobs-missing/02-present-timerjobs.png Timer Jobs Present on Farm %}</p>

<p>I wanted to look for a way to re-register timer jobs. There should be no reason for me to do something drastic like uninstall/reinstall the User Profile Service just to get the timer job re-registered. This timer job, as expected, was in the <code>Microsoft.Office.Server.UserProfiles</code> assembly:</p>

<p>{% img center /images/posts/2013-08-02-sharepoint-2013-my-site-timer-jobs-missing/03-timerjob-definition.png Timer Jobs Definition %}</p>

<p>So, I cracked open dotPeek and decided to hunt for that timer job definition and find who was using it. It turns out, there&rsquo;s a web application-level feature (<code>MySiteInstantiationQueuesFeatureReceiver</code>) which registers these timer jobs:</p>

<p>{% img center /images/posts/2013-08-02-sharepoint-2013-my-site-timer-jobs-missing/04-featurereceiver.png Timer Job Feature %}</p>

<p>There is a public static method inside that feature receiver used for registering the timer jobs.</p>

<p>{% img center /images/posts/2013-08-02-sharepoint-2013-my-site-timer-jobs-missing/05-methodtoregistertimerjobs.png Method to Register Timer Jobs %}</p>

<p>So, I had one of two options: invoke the static method directly, or simply toggle the feature. I opted to toggle the feature:</p>

<pre><code>$feat = Get-SPFeature 65B53AAF-4754-46D7-BB5B-7ED4CF5564E1
Disable-SPFeature $feat -Url http://webapp
Enable-SPFeature $feat -Url http://webapp
</code></pre>

<p>{% img center /images/posts/2013-08-02-sharepoint-2013-my-site-timer-jobs-missing/06-toggle-feature.png Toggle Feature %}</p>

<p>Finally, I double checked and verified the timer jobs were now present!</p>

<p>{% img center /images/posts/2013-08-02-sharepoint-2013-my-site-timer-jobs-missing/07-timerjobspresent.png Timer Jobs Present %}</p>

<p>I then went to the My Site host URL and got into the queue for provisioning. Within 5 minutes, my personal my site was provisioned!</p>

<p>{% img center /images/posts/2013-08-02-sharepoint-2013-my-site-timer-jobs-missing/08-mysite-provisioned.png My Site Provisioned %}</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[MigrateUsersToClaims - Operation Is Not Valid Due to the Current State of the Object]]></title>
    <link href="http://www.chrisweldon.net/blog/2013/04/30/migrateuserstoclaims-operation-is-not-valid-due-to-the-current-state-of-the-object/"/>
    <updated>2013-04-30T11:50:00+00:00</updated>
    <id>http://www.chrisweldon.net/blog/2013/04/30/migrateuserstoclaims-operation-is-not-valid-due-to-the-current-state-of-the-object</id>
    <content type="html"><![CDATA[<p>I&rsquo;m in the process of migrating my customer from SharePoint 2010 to SharePoint 2013. In their SharePoint 2010 environment, they were still using classic-mode authentication, but are switching to claims-based authentication in SharePoint 2013.</p>

<p>The recommended path to upgrade from 2010 to 2013 is a content and service-application database migration. This works great for us since we <strong>have</strong> to do this piecemeal. However, many of the general approaches for converting to claims-based authentication is to do so at the web-application level, rather than the content-database level (source: <a href="http://technet.microsoft.com/en-us/library/gg251985.aspx">TechNet</a>).</p>

<p>In SharePoint 2013, there&rsquo;s actually an <code>SPWebApplication</code> method dubbed <a href="http://msdn.microsoft.com/en-us/library/jj172686.aspx"><code>MigrateUsersToClaims</code></a> that takes 3 arguments:</p>

<ul>
<li>NTAccount</li>
<li>removePermissionsAfter</li>
<li>SPWebApplication.SPMigrateUserParameters</li>
</ul>


<p>There was no guidance on the NTAccount, other than the user &ldquo;performing&rdquo; the operation. I opted to use the farm account to ensure it had the appropriate level of permissions. The true power of the content database migration comes in with the third parameter. We can add individual content databases to migrate with this parameter rather than worrying about the <em>entire</em> web application.</p>

<p>Props go to <a href="http://blogs.technet.com/b/speschka/archive/2012/07/23/converting-a-classic-auth-content-database-to-claims-auth-in-sharepoint-2013.aspx">Steve Peschka</a> who originally pointed this out. However, in his post, the PowerShell to do this upgrade was the following:</p>

<p>{% codeblock %}
&ndash; SNIP &ndash;
$wa.MigrateUsersToClaims($acc, $true, $arguments)
{% endcodeblock %}</p>

<p>For me, that throws the error <code>Exception calling "MigrateUsersToClaims" with "3" argument(s): "Operation is not valid due to the current state of the object."</code> This was strange, and I couldn&rsquo;t figure it out. So, I cracked open the <code>Microsoft.SharePoint.Administration</code> dll and took a look at the <code>MigrateUsersToClaims</code> method:</p>

<p>{% codeblock lang:csharp %}
public bool MigrateUsersToClaims(NTAccount account, bool removePermissionsAfter, SPWebApplication.SPMigrateUserParameters parameters)
{
    if ((NTAccount) null == account)
        throw new ArgumentNullException(&ldquo;account&rdquo;);
    if (removePermissionsAfter &amp;&amp; parameters != null &amp;&amp; (parameters.HasDatabaseToMigrate || parameters.OnlyMigratePolicyUsers))
        throw new InvalidOperationException();
    // The rest
}
{% endcodeblock %}</p>

<p>That second one was the one that I questioned. I know the conditions matched for the first two checks. The question was how my parameters looked. Sure enough:</p>

<p>{% codeblock %}
PS > $arguments</p>

<p>DatabasesToMigrate      HasDatabaseToMigrate        OnlyMigratePolicyUsers</p>

<hr />

<p>{WSS_MigrationTest_&hellip;}                 True                         False
{% endcodeblock %}</p>

<p>With that, if I changed the middle parameter from <code>$true</code> to <code>$false</code>, the migration finally ran (and completed) succesfully.</p>

<p>Why did this happen? This was because my <code>$acc</code> user is my <strong>farm account</strong>. I&rsquo;m also running my PowerShell session as my <strong>farm account</strong>. This is to ensure that I have full, unfettered access to the SharePoint Object Model and the Content Database. The middle parameter states (from <a href="http://msdn.microsoft.com/en-us/library/jj172686.aspx">MSDN</a>):</p>

<p>{% blockquote %}
The <strong>account</strong> will be given the correct permissions to perform the operation. Should this permission be removed when the operation is complete.
{% endblockquote %}</p>

<p>We definitely don&rsquo;t want this for the farm account. So, my updated code, for reference:</p>

<p>{% codeblock %}
$wa = Get-SPWebApplication <a href="http://my-app-url">http://my-app-url</a>
$acc = &ldquo;domain\farm-account&rdquo;
$arguments = New-Object Microsoft.SharePoint.Administration.SPWebApplication+SPMigrateUserParameters</p>

<p>$contentDb = $wa.ContentDatabase[&ldquo;Content Database Name&rdquo;]
$arguments.AddDatabaseToMigrate($contentDb)
$wa.MigrateUsersToClaims($acc, $false, $arguments)
{% endcodeblock %}</p>

<p>Cheers. Once again, thanks go to <a href="http://blogs.technet.com/b/speschka/archive/2012/07/23/converting-a-classic-auth-content-database-to-claims-auth-in-sharepoint-2013.aspx">Steve Peschka</a> for figuring this out.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Sorry, Only Tenant Administrators Can Add or Give Access to This App]]></title>
    <link href="http://www.chrisweldon.net/blog/2013/04/30/sorry-only-tenant-administrators-can-add-this-app/"/>
    <updated>2013-04-30T10:41:00+00:00</updated>
    <id>http://www.chrisweldon.net/blog/2013/04/30/sorry-only-tenant-administrators-can-add-this-app</id>
    <content type="html"><![CDATA[<p>I have just completed building my first SharePoint 2013 application. I came across the error message <code>Sorry, only tenant administrators can add or give access to this app.</code> when trying to deploy the application to my site. This happened regardless if I was deploying using a SharePoint development site or after installing the solution in the app catalog.</p>

<p>{% img center /images/posts/2013-04-30-sorry-only-tenant-administrators-can-add-this-app/error.png Error Message %}</p>

<p>The application required Tenant Read permissions as I&rsquo;m accessing the User Profile through the JavaScript object model. The purpose of using the User Profile JSOM is to get the suggestions of sites and people to follow that SharePoint presents.</p>

<p>Now, the concept of a &ldquo;Tenant&rdquo; makes sense for Office 365 or SharePoint Online. As a hosting provider, there are multiple tenants you want to support in a single environment. However, for an on-premise deployment, this error message didn&rsquo;t make much sense. I started poking around and came across <a href="http://www.social-point.com/tenant-administration-sites">spinning up a tenant administration site</a>, being able to set multiple app tenants through the <a href="http://technet.microsoft.com/en-us/library/jj219772.aspx">App Management Service cmdlets</a>, but none of those really seemed like the right solution for my on-premise deployment. I found an <a href="http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/4e844f6c-2b73-46ff-9cda-05105332b8f8">MDSN Forum Question</a> which seemed closer to the solution. That post recommends splitting the service accounts used to host the App Management and Site Settings services from the farm account. This was critical as the Farm Account is <strong>not allowed</strong> to add apps under its identity whatsoever. You will get an error message when trying to provision, and the ULS logs will indicate that an assertion failed checking that the current account was not the system account.</p>

<p>{% img right /images/posts/2013-04-30-sorry-only-tenant-administrators-can-add-this-app/success.png Provision %}</p>

<p>What did it turn out to be? I just needed to make sure my user account was <strong>directly</strong> added as a member of the <strong>Farm Administrators</strong> group. We have traditionally deployed farm administrators via an Active Directory and local (Administrators) group. However, it appears that the App Management service dislikes this approach and wants users <em>explicitly</em> permissioned to the <strong>Farm Administrators</strong> group. Additionally, after granting your user direct permissions, you need to issue an <code>iisreset</code> so those changes take effect. Then, you can provision your app successfully.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Editing the SharePoint 2013 My Sites Web Part Pages]]></title>
    <link href="http://www.chrisweldon.net/blog/2013/04/25/editing-the-sharepoint-my-sites-web-part-pages/"/>
    <updated>2013-04-25T08:24:00+00:00</updated>
    <id>http://www.chrisweldon.net/blog/2013/04/25/editing-the-sharepoint-my-sites-web-part-pages</id>
    <content type="html"><![CDATA[<p>The last two weeks have been interesting. I&rsquo;ve been trying to deploy an app part built as part of a SharePoint 2013 app I developed recently. The app part re-creates the &ldquo;Suggestions&rdquo; functionality that you see when visiting the &ldquo;Followed Sites&rdquo; and &ldquo;Followed People&rdquo; pages in your My Site. Those web parts were <strong>not</strong> easily reused in other parts of My Sites. The purpose of creating this app part was to be able to add suggestions directly to the Newsfeed page to make it a more useful information radiator. Unfortunately, editing the Newsfeed page (or any page) in the &ldquo;My Site Host&rdquo; was not nearly as intuitive as I had hoped.</p>

<p>{% img right /images/posts/2013-04-25-editing-the-sharepoint-my-sites-web-part-pages/site-edit-page.png Edit Page in Ribbon %}</p>

<p>I&rsquo;m used to having the ribbon to edit pages in SharePoint, regardless if they are standard publishing pages or web part pages. However, in the &ldquo;My Site Host&rdquo;, there is no ribbon for the standard pages, even when you are a farm administrator. I jumped to the conclusion that I could add the App Part via SharePoint Designer. Sadly, this wasn&rsquo;t the case. SharePoint Designer does not list <strong>any</strong> app parts.</p>

<p>I tried to go through the rigarmarole of adding the app to a separate site through the web editor, then copying the code from within SharePoint Designer and pasting it into the Newsfeed page, only for that to fail. The identifiers for the apps are completely different.</p>

<p>{% img left /images/posts/2013-04-25-editing-the-sharepoint-my-sites-web-part-pages/gear-edit-page.png Edit Page in Settings Menu %}</p>

<p>This is when I stepped back and though that the solution should be simpler than this. It turns out, it was. Click the gear icon (settings menu) in the upper-right corner of SharePoint and you&rsquo;ll find the <strong>Edit Page</strong> link. I felt liberated and frustrated at myself for not checking there earlier. From there, you have complete control to edit the Newsfeed web part page (or any page in the &ldquo;My Site Host&rdquo;).</p>

<p>{% img center /images/posts/2013-04-25-editing-the-sharepoint-my-sites-web-part-pages/newsfeed-web-part.png Newsfeed Web Part Page %}</p>
]]></content>
  </entry>
  
</feed>
