Sunday, March 23, 2014

SharePoint Environment Troubleshooting Tools

Tools used to troubleshoot environments......

  • PAL – templates, http://pal.codeplex.com/
  • ULS Viewer – http://archive.msdn.microsoft.com/ULSViewer  (MS)
  • SETH – SharePoint Engineer Troubleshooting Helper – provided by Microsoft Support. 
  • SNAP tool  - Exception Monitor - http://todd-carter.com/post/2012/05/05/Making-Debugging-a-SNAP/ (MS)
  • DebugDiag 2.0 - http://debugdiag.com -   crash dumps, exception dumps.
  • Delegconfig - Kerberos Issues - http://blogs.iis.net/brian-murphy-booth/archive/2009/04/22/delegconfig-v2-beta.aspx
  • Fiddler2 - Headers etc - http://www.telerik.com/fiddler
  • Logparser  – IIS Files - http://www.microsoft.com/en-gb/download/details.aspx?id=24659
  • Process Monitor 3.1 – http://technet.microsoft.com/en-gb/sysinternals/bb896645.aspx
  • Netmon 3.x + NMParsers + SharePoint Parsers 
  • SharePoint Administration and Clean-up Tool
  • iDNA/TTTrace.exe – for tracing any process - provided by Microsoft support
  • PSSDIAG – for SQL Server tracing - provided by Microsoft Support
  • Debugging Tools for Windows(Windbg.exe)

Standard Tools - PowerShell
  • PSConfig
  • NETSH
  • Developer Dashboard
  • SQL Profiler 
  • System.net

Wednesday, September 25, 2013

SharePoint 2010 - Update People Profiles Telephone Numbers With Powershell

A task was assigned to me to update 5000 telephone numbers in SharePoint..... easiest method to script and read from CSV - as so .....


Input file format (CSV) - Important note the headers have to be exactly whats in script

ntname,number
domain\smith,898021889
domain\brown,78798798

Script to read through and update WorkPhone 

#First load the SharePoint commands 
#add-PSSnapIn Microsoft.SharePoint.PowerShell

#Set up the job variables 
$csvfile="TelephoneNumbers.csv" 
$mySiteUrl = "<mysiteurl>
$upAttribute = "WorkPhone"

#Connect to User Profile Manager service 
$site = Get-SPSite $mySiteUrl 
$context = Get-SPServiceContext $site 
$profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context) 

#Create Lists from each item in CSV file 
$csvData = Import-Csv $csvfile 

#Now iterate through the list to update the attribute with new value 
foreach ($line in $csvData)

    #Check to see if user profile exists 
    if ($profileManager.UserExists($line.NTName)) 
        { 
            #Get user profile and change the value 
            $up = $profileManager.GetUserProfile($line.NTName) 
 #           $up[$upAttribute].Value = $line.PropertyVal 
  $up[$upAttribute].Value = $line.number
            $up.Commit() 
        } 
    else 
    { 
        write-host "Profile for user"$line.NTName "cannot be found" 
    } 


#Dispose of site object 
$site.Dispose()

SharePoint 2010 - Object Cache: The super user account utilized by the cache is not configured.

Following error is appearing as warning on Web front ends 

Object Cache: The super user account utilized by the cache is not configured. This can increase the number of cache misses, which causes the page requests to consume unneccesary system resources.
 To configure the account use the following command 'stsadm -o setproperty -propertyname portalsuperuseraccount -propertyvalue account -url webappurl'. The account should be any account that has Full Control access to the SharePoint databases but is not an application pool account.
 Additional Data:
 Current default super user account: SHAREPOINT\system

If you think that having object caching isn't going to cause an issue with content use the following to resolve

1. Verify that you have the following administrative credentials:
To create the user accounts in Central Administration, you must be a member of the Farm Administrators group on the computer that is running the SharePoint Central Administration Web site.
2. On the Central Administration Web site, in the Application Management section, click Manage web applications.
3. Click the name of the Web application that you want to configure.
4. On the Web Applications tab, in the Policy group, click User Policy.
5. In the Policy for Web Application window, click Add Users.
6. From the Zones list, select All zones, and then click Next.
7. In the Users box, type the user name for the Portal Super User account. - domain\spsuperuser
8. Click the Check Names icon to ensure that the account name can be resolved by the authentication providers on the application server.
9. In the Choose Permissions section, check the Full Control - Has full control box.
10. Click Finish.
11. Repeat Steps 5 through 8 for the Portal Super Reader account.
12. In the Choose Permissions section, check the Full Read - Has full read-only access box. - domain\spsuperreader
13. Click Finish.
14. Make note of how the names for the Object Cache Super Reader and Object Cache Super User accounts are displayed in the User Name column. The displayed strings will be different depending on whether you are using claims authentication for the Web application.

Powershell to run 

$wa = Get-SPWebApplication -Identity "<App Identity from IIS>"
$wa.Properties["portalsuperuseraccount"] = "domain\spsuperuser"
$wa.Properties["portalsuperreaderaccount"] = "doamin\spsuperreader"

$wa.Update()

And to rollback ....

$wa = Get-SPWebApplication “http://urlofthewebapplication”
$wa.Properties.Remove("portalsuperuseraccount")
$wa.Properties.Remove("portalsuperreaderaccount")

$wa.Update()