Skip to content

Month: June 2014

Lost SharePoint Admin Password?

Today, I faced a situation where I was given a SharePoint 2013 Environment to which none of my colleague seemed to have access. Well, the situation wasn’t too bad as it was just a development environment and not a real test/production SharePoint environment.

And it’s one of the common scenario’s which we see that even though you are a Local Administrator on the server, there is not direct way to add yourself as SharePoint Farm Administrator. I wrote another post sometime back on the same theme where I described how to add local administrator as SQL Server Administrator using a script.

Ivan Josipovic has written a PowerShell script which displays the SharePoint Managed Accounts password including the Farm Account, without requiring the current user to be a part of the SharePoint Farm Admin Group.

This script will retrieve the Farm Account credentials and show the passwords for all of the SharePoint Managed Accounts

Download Recover-SPManagedAccounts Script

Get SharePoint Managed Account Password

As you see in the screenshot above, the script would return all the managed accounts and their corresponding passwords from the Secure Service Store.

One of the managed account returned would be Farm Administrator account which is kind of ‘super user’ in SharePoint and you can use this account to log in to Central Administrator and grant yourself Farm Administrator Privileges.

As an alternate, you can run PowerShell with the above account and execute the following script which would serve the same purpose and grant a user Farm Administrator rights on your SharePoint Environment.


Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue

# Creates a new Farm Administrator

$newFarmAdministrator = Read-Host -Prompt 'Please provide the name of the new Farm Administrator in the form of DOMAIN\Username'

$caWebApp = Get-SPWebApplication -IncludeCentralAdministration | where-object {$_.DisplayName -eq "SharePoint Central Administration v4"} 
$caSite = $caWebApp.Sites[0] 
$caWeb = $caSite.RootWeb

$farmAdministrators = $caWeb.SiteGroups["Farm Administrators"] 
$farmAdministrators.AddUser($newFarmAdministrator, "", $newFarmAdministrator, "Configured via PowerShell")

$caWeb.Dispose() 
$caSite.Dispose()

$caDB = Get-SPContentDatabase -WebApplication $caWebApp 
Add-SPShellAdmin -Database $caDB -Username $newFarmAdministrator

And the result is as follows. Even without having any access to the SharePoint environment, I could add myself as the SharePoint Farm Administrator.

SharePoint Farm Admins

How to create default groups in SharePoint 2013 Host-Name Site Collection?

What is Host-Named Site Collection?

Host-named site collections enable you to assign a unique DNS name to site collections. For example, you can address them as http://TeamA.contoso.com and http://TeamB.contoso.com. This enables you to deploy many sites with unique DNS names in the same web application. It also enables hosters to scale an environment to many customers. If you do not use host-named site collections, your SharePoint web application will contain many path-based site collections that share the same host name (DNS name). For example, Team A has a site collection at http://contoso.com/sites/teamA, and Team B has a site collection at http://contoso.com/sites/teamB.

You can read more about the Host-named site collection architecture and deployment in SharePoint 2013 here. This article has listed a very good comparison of host-name site collections to the path based site collections. However, one of the key advantage which host-named site collection offers is the transparent experience to the end users which was difficult to achieve in earlier versions of SharePoint. Till SharePoint 2010, the only way to have a dedicated URL mapping was on a Web Application level through alternate access mapping.

It should be noted that there is no user interface to create a host-named site collection from SharePoint 2013 Central administration and is possible only via PowerShell command, which is not very complex either. Below example shows how to create a host-name site collection which can be accessed via the DNS entry http://manasbhardwaj.net


Add-PSSnapin Microsoft.SharePoint.PowerShell 

$currentUser = "$env:USERDOMAIN\$env:USERNAME" 
$siteCollectionUrl = "http://manasbhardwaj.net"
$siteCollectionName = "Manas Dev Site"
$webApplicationUrl = "http://manas"

New-SPSite -Url $siteCollectionUrl -OwnerAlias $currentUser -Name $siteCollectionName -Language 1033 -HostHeaderWebApplication $webApplicationUrl -Template sts#0

Create Default Groups in a Host-Named Site Collection

However, when you use the above script to create a host-named site collection it does not create the default groups (such as Owners, Members and Visitors) which are available if the site collection is created using the Central Administration user interface.

Host Named Site Collection

Look at the image above and you can see the groups are missing. But the good news is that it is still possible to create the default groups using a couple of lines of script.


Add-PSSnapin Microsoft.SharePoint.PowerShell 

$currentUser = "$env:USERDOMAIN\$env:USERNAME" 
$siteCollectionUrl = "http://manasbhardwaj.net"
$siteCollectionName = "Manas Dev Site"
$webApplicationUrl = "http://manas"

New-SPSite -Url $siteCollectionUrl -OwnerAlias $currentUser -Name $siteCollectionName -Language 1033 -HostHeaderWebApplication $webApplicationUrl -Template sts#0

$web = Get-SPWeb $siteCollectionUrl
$web.EnsureUser($currentUser)
$web.CreateDefaultAssociatedGroups($currentUser, "", "")

What you need to do is call the CreateDefaultAssociatedGroups once your site collection has been created. And this will ensure that the default groups are created for the specified site collection.

Host Named Site Collection_With Groups

Update hosts file (on local Development Environment)

If you want to create a host-named site collection on your development environment, you might need to update your local host file to create an entry for the specified Url. In a real test or production environment, you would have a actual DNS VIP entry which you can use to redirect to your site collection. So, for e.g.


# localhost name resolution is handled within DNS itself.
#	127.0.0.1       localhost
#	::1             localhost

127.0.0.1 manasbhardwaj.net

SharePoint 2013 – Drives are running out of free space

Query all database sizes on SQL Server

On any SharePoint Environment, the SQL Server databases can take a lot of space. The space can be used by Usage Database or even the transaction logs. The below query returns the Database name and the file size used by data and log files receptively.

Shrink all databases on SQL Server

You can use the following query to basically shrink all databases on your SQL Server. However, read the blog post here to understand why you should not be doing this.


EXEC sp_MSForEachDB 'DBCC SHRINKDATABASE (''?'' , 0)'

Change the recovery model for all databases on SQL Server

Disable Configure usage and health data collection

On a development environment, you might consider to completely turn off the ‘Configure usage and health data collection’.

Configure Usage Analysis

Change Set-SPUsageDefinition for all events

Or use the following script to retain the events in usage to database for minimum time (for e.g. 1 day)


Get-SPUsageDefinition | ForEach-Object {Set-SPUsageDefinition -Identity $_.name -DaysRetained 1}

A beginner’s guide on Balanced Scorecard

Introduction

“I often say that when you can measure what you are speaking about, and express it in numbers, you know something about it; but when you cannot measure it, when you cannot express it in numbers, your knowledge is of a meager and unsatisfactory kind.
If you cannot measure it, you cannot improve it.” – Lord Kelvin

Performance control has been thought-provoking topic which has been applied in many organizations around the globe. Due to the nature of all these different organizations, many types and forms of performance controls have been developed both by academics and practitioners.
Performance control or management systems are used by organizations to cater multidimensional roles:

  1. Communicate the company’s strategic objectives.
  2. Motivate employees to help the company achieve its strategic objectives.
  3. Evaluate the performance of managers, employees, and operating units.
  4. Help managers allocate resources to the most productive and profitable opportunities.
  5. Provide feedback on whether the company is making progress in improving processes and meeting the expectations of customers and shareholders.

Over the years, various frameworks have been proposed and implemented such as Balanced Scorecard, Total Quality Management, Shareholder value etc. Based on research by (Lawson, et al., 2008) balanced scorecard is the most popular and used among by 62% of organizations as a performance management system.

The Balanced Scorecard

(Kaplan & Norton, 1992) suggested what you measure is what you get. They introduced the balanced scorecard in 1992 and believed that measurement was as fundamental to managers as it was for scientists. If companies were to improve the management of their intangible assets, they had to integrate the measurement of intangible assets into their management systems. While formulating the balanced scored, they emphasized on the aspect that the Balanced Scorecard does not become a benchmarking exercise. They further acknowledged that even high-performing companies succeeded with strategies that were quite different from each other.

Figure 1: Balanced scorecard developed by Kaplan and Norton (1992)

The figure above shows the original structure for the Balanced Scorecard which retains financial metrics as the ultimate outcome measures for company success, but supplements these with metrics from three additional perspectives – customer, internal process, and learning and growth – that we proposed as the drivers for creating long-term shareholder value.
The balanced scorecard allows the organizations to measure their performance from different angles and incorporate the necessary key performance indicators. The four perspectives shown in the above figure can be summarised and explained as follows:

  1. Customer, how are we perceived by our customers?
  2. People/ growth assets/ innovation, what is the level of capacity for the organization to grow and learn?
  3. Financial, what is the impact of performance on shareholder value?
  4. Internal processes, what core competencies do we possess and what can we develop more?

The Balanced Scorecard retains financial metrics as the ultimate outcome measures for company success, but supplements these with metrics from three additional perspectives – customer, internal process, and learning and growth – that we proposed as the drivers for creating long-term shareholder value.
(Lipe & Salterio, 2000) described the balanced scorecard as an integrated set of leading and lagging performance measures designed to capture the organization’s strategy.
(Bloomfield, 2002) noted that automation is essential in order to manage the vast amount of information related to a company’s mission and vision, strategic goals, objectives, perspectives, measures, causal relationships, and initiatives. The alternative is a manual process, which significantly increases the effort and cost of scorecard development and sets back progress in the early stages of the balanced scorecard development, when momentum is critical.

Advantages of balanced scorecard

Apart from the fact that the balanced scorecard covers the for various performance indicators of an organization, there are other advantages associated as well.
By using the balanced scorecard approach, the organizations can make sure that it’s not only the current or short term future which is evaluated but the results can give the stakeholders an overview of the health of the organization at short, intermediate and long term.
By using a balanced scorecard, a company can be sure that any strategic action implemented matches the desired outcomes. It might, if the customer is satisfied with that product, or if the processes involved with creating that product make the product of a higher quality.

Disadvantages of balanced scorecard

While there a lot of advantages in balanced scorecard, there are certain disadvantages and limitations associated as well. One of limitation of using balanced scorecard is that it needs a proper forethought process before implementation. This means that it is not a tool which can be used to solve the problems in quick span of time without a proper plan. Various authors such as (Johnson, 1980) have supported this argument that companies should focus on improving quality, reducing cycle times, and improving companies’ responsiveness to customers’ demands. Doing these activities well, they believed, would lead naturally to improved financial performance.
It is recommended while implementing a balanced scorecard in an organization to hold a meeting plan to state all the objectives which are to be met. Once you have the clearly stated objectives, these can be broken down in to further smaller objectives which meets the planned outcome.
While balanced scorecard gives you a holistic view of the four dimensional factors, it is often not the complete picture what is happening within the organization. Thus, it is recommended that the balanced scorecard is treated at the organization’s strategy that includes multiple success factors.
Some authors such as (Jensen, 2001) have also stated that Balanced Scorecard theory is flawed because it presents managers with a scorecard which gives no score – that is no single-valued measure how they have performed. Thus managers evaluated with such a system have no way to make principled or purposeful decisions.

Summary

We live in a competitive world and organizations want to gain the advantage by transforming them based on the information available. The performance management systems are not only important and applicable to the organizations but they can be applied to human resources, products or even processes to measure their effectiveness and learn about the areas which needs attention. Balanced Scorecard is one of the most popular and effective measurement systems used by organizations. One of the primary reasons for its popularity is of course the reason that it not only limits the measurement in one area but also adds multiple side dimensions to get a more holistic view.

Further Reading

Using the Balanced Scorecard as a Strategic Management System

Balanced Scorecard: Panacea or poisoned chalice?

New Ways to Improve Communications and Risk Management

Using Balanced Scorecard to Measure Software Quality

Balanced Scorecard: 6 Ways to Turn Business Strategy Into Business Success

Challenges of Implementing Action Learning

In his book ‘ABC of Action Learning’, (Revans, 1983) discussed the essential logistics for implementing the action learning in an organization.

  1. Exchange Options
  2. Individual and Teams
  3. Sponsors, Clients, Client Groups and Participants
  4. Problems not Puzzles
  5. The Learning Equation
  6. The Essential Character of a Set
  7. Induction Exercises
  8. Programme Phases

Each of the individual logistic can pose a challenge while implementing the action learning in an organization. The concept can be strongly resisted by the community or the leadership. The training community can see it as threat to the existing defined learning methodologies. In my opinion, some basic challenges which can be faced while implementing action learning can be:

Defining a problem

Selecting a problem statement is one of the most important aspects in action learning and it needs to be done very carefully. The problem statement would also later lead to the formulation of participants who would a common goal to solve the problem. An incorrect or vague problem statement would lead to a group formed which is not in best capacity to solve the particular problem.

Set Formation

Composing a set or group to solve a problem is strategic decision. It cannot be done randomly as the group should be comprised of people with programmed knowledge and questioning insights. There can be an issue with the learning styles of different people. Another issue can be the diversity of the group. There can be people which are like minded or friends and will not really challenge each other while questioning.

(Cusins, 1996) outlines five anti-group behaviours which hinder effective action learning in a set:

  1. The bully (excessive threatening behaviour)
  2. The blocker (repeatedly blocking other people’s ideas)
  3. The joker (continually using jokes to avoid real issues)
  4. The cop-out (excessive withdrawal from discussion with implied disapproval)
  5. The rambler (talk on and on without getting to the point)

Facilitator Role

The facilitator or the learning coach is one of the key elements of the action learning process.  He or she can be a major factor deciding the direction of the action learning process. Though a learning coach is not a member of set, they have to control the set and make sure that the members of group/set ensure that action learning principles are followed during the exercise. One of challenge could be to ensure that the action learning team has one such coach available all the time. For the short term an option could be employ the external facilitators. But as the very core of action learning methodology suggests to solve the problem in own capacity, in my opinion it’s worth to consider if the organization’s own resources could be trained to fill the role of a facilitator.

Resistance to Change

As similar to implementing a new process or methodology in an organization, the action learning can as well face resistance from all the corners. Generally, it could be from the learning community, department and leadership to mention the few. Learning community may be threatened by the fact that introduction of action learning methodology can all of a sudden change the way learning has happened and thought of in the organization. This would be also mean that the employees need to be retrained to understand and follow the new approach.  Leadership also need to get educated and convinced with the action learning approach. For all those problems which were resolved by external consultants or parties can be very well solved within the organization and the local teams. To achieve this, leadership needs to build a trust on the methodology and its own employees that they are capable of programmed knowledge and questioning insights to solve the various problems within the organization.