17 August 2015

How do I - Fix the problem where SharePoint Designer 2013 crashes upon opening a site?

This one is REALLY annoying!

I never understood why software vendors always assume that users are on the latest and greatest version of their software.  Furthermore, they assume you're only using the current version by itself.  The REAL WORLD REALITY is much further removed from the utopian vision most vendors have of their products.

In my case, this was a problem back in the previous version cycle, when I upgraded from SharePoint 2007 to 2010.  My clients were migrating from 2007 to 2010 thus having content in both formats.
Of course, this problem didn't go away or get fixed, but instead it persists to this day with the version upgrade from SharePoint 2010 to 2013 and I'll be you dollars to donuts we'll see this problem going from 2013 to 2016 as well.

Synopsis

A large company with multiple terabytes of content decides to upgrade from SharePoint 2010 to 2013.  Given the large amount of data, it's a phased migration over time.  As a result, some sites are in 2010 and some are in 2013.  End user support staff will need to be able to support both 2010 and 2013 sites.  When these users install SharePoint Designer 2013 and then try and open a SharePoint 2013 site with SPD 2013, without uninstalling SPD 2010 i.e. running 2010 and 2013 parallel, then SPD could crash consistently.  Oh, and forget about going back to 2010 also.  It will also now be crashing upon opening a site.  I consider this to be a product bug.
I really wish concurrent version testing would have higher priority with software vendors.

Solution

To solve this little conundrum, we're going to have to hack the system... time to fire up good old REGEDIT.  Follow these steps to clear up the problem.

  1. Click the Windows start button.
  2. Type "regedit" and press enter.
  3. In the registry editor, locate the following key:
    HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\Open Find\Microsoft SharePoint Designer\Settings\Open Site
  4. Delete the "ClientGUID" key located here.
  5. Locate the next key:
    HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\Open Find\Microsoft SharePoint Designer\Settings\Open Site
  6. Delete the "ClientGUID" key here.

Now restart SharePoint Designer and your sites should open as expected.

NOTE:  Your most recently used list will now show both 2010 and 2013 sites.  It's recommended to keep using SPD 2010 with SharePoint 2010 sites and 2013 with 2013 sites.

Hopefully this post saves someone some time and frustration.

Later
C

20 July 2015

Powershell Quick Tip - How do I get the Powershell Version?

I often get asked how to determine the version of Powershell running in an environment.  I wish it was a simple as just typing "ver", but alas, it's slightly more complex than that.  You'll need this statement:

$PSVersionTable.PSVersion

This will output the version table looking like this:

PS C:\> $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
4      0      -1     -1

Enjoy
C

15 June 2015

How do I - Select data from a table using TSQL while not returning any duplicates?

When working with large lists of data that are not guaranteed to be unique, you often have to filter out duplicate values.  To do this in SQL Server using TSQL, you can leverage the GROUP BY/HAVING combination of statements thus:


Enjoy
C

10 January 2015

SharePoint Audit Log reporting

SharePoint has some built in Audit Log reporting that can be leveraged for rudimentary auditing purposes.  In order to these reports to become available, you will need to configure the Audit Settings on a per site collection basis from the /_layouts/15/settings.aspx page.
  1. From your site collection root, click the Settings gear in the top left of the page.
  2. On the dropdown menu, click "Site Settings".
  3. Under the "Site Collection Administration" section, click the "Site collection audit settings" (/_layouts/15/AuditSettings.aspx) link.
  4. On the "Configure Audit Settings" page, you can configure a multitude of options such as audit log trimming and the different events to audit.
  5. Once you've configured your desired settings, click the "OK" button to close the page and enforce the settings.
You will have to wait for the audit processing timer jobs to run before reports will become available.  The delay time will depend on your system's configuration, but by default these jobs run daily.
To view the reports, simply return to the site settings page and click "Audit log reports" (/_layouts/15/Reporting.aspx?Category=Auditing) under the Site Collection Administration section.
From this page, you will have several report options.



Play around with these reports and see what's useful to you.
Happy SharePointing!

Later
C

16 December 2014

How do I - Fix SharePoint ULS Logs not being written?

From time to time, you will run into a situation where you're looking for ULS logs in their regular place i.e. %CommonProgramFiles%\Microsoft Shared\Web Server Extensions\15\LOGS\ but there aren't any log files being written.  Most of the time, the problem is simply that an admin might have changed the logging location.
  1. Ensure you're checking the correct logging location.
  2. Navigate to Central Admin >>> Monitoring >>> Configure Diagnostic Logging
  3. Check the Path value.  You can copy the value and paste it into your Windows Explorer address bar for quick access to the logging location.
If the logging location is correct, but you're still not getting logs on the server, check the Trace service.
  1. Open the Service console from the server where the logs aren't being written.
  2. Scroll down and check that the "SharePoint Tracing Service" is running.
  3. If the service is running, you may want to restart it for good measure.
  4. Most likely it's NOT running though.  If it's not, start the service.
  5. If the service does not use Local System for the account, but instead uses a domain account, it's likely that the password might have changed recently.  Obtain the new password and reset the credentials for the service and then restart the service.
If that isn't the issue, there's sometimes some access issue with the logging location at the time the service started up.  You could try toggling the logging location path value.
  1. Navigate to Central Admin >>> Monitoring >>> Configure Diagnostic Logging
  2. Check the Path value.  Change it to a folder that does exist.
  3. Click OK.
  4. Navigate back to the "Configure Diagnostic Logging" page.
  5. Change the Path value back to %CommonProgramFiles%\Microsoft Shared\Web Server Extensions\15\LOGS\ and click OK.
I'll continually add more steps as I uncover more reasons logging doesn't work in SharePoint. ;-)

Later
C

25 November 2014

How do I - Manually force SharePoint patches or CU installations to complete using PSConfig.exe

SharePoint patching has always been a sore subject.  The installation of Cumulative Updates can leave your environment in a non functional state which is why Microsoft always recommend that you only install CUs if you are absolutely sure that the CU actually fixes something that is broken within your environment.  As with all other installation recommendations, it's always recommended that patches and CUs follow a proper change management path of DEV >>> QA >>> PROD in order to ensure minimal impact to production systems.

My standing recommendation to all my clients is as follows:


  1. Do NOT install any CU until it's been in the wild for at least a month.  There has been many retractions and re-publishings of CUs over the course of history and unfortunately, Microsoft's track records with CU regressions is not stellar.  The last thing you need to to install a CU that breaks your production environment.  By waiting a month, any obvious issues with the CU would become known before you apply it to your environment.
  2. Install the target patch or CU into DEV first.  Let it simmer in this environment for 2 weeks.  Ensure that you have the ability to roll back the CU through VM snapshots.  Since most DEV environments are virtual these days, this isn't really a problem.  If ANY issue is reported by developers in the DEV environment, investigate it and do NOT proceed to step 3 until you're sure the problem was not caused by the CU.  If the CU is the cause of the problem, simply roll back to your previous snapshot. Be sure this policy is well published and communicated, especially within your developer community as developers would lose any code that resided on the DEV farm without being checked into source control, when you conduct the rollback.  But that never happens, right?  Developers always check their code into source control, right? ;-)
  3. Once the CU passed the DEV test, it's time to move it to your QA environment for validation against what should be in PROD.  Again, the assumption here is that your QA environment is a true representation of the PROD environment.  If the CU breaks anything in QA, simply stop the process and do NOT proceed to step 4.  As with step 2 above, if your QA environment is also virtual (most are these days) then you can simply roll it back as well when problems are encountered.  Leave the CU in the QA environment for at least 2 weeks to simmer before advancing to step 4.
  4. Finally deploy the CU to your PROD environment.  Since there is no uninstall for CUs, and given that a lot of PROD SQL Servers are still physical, once you get to this point, there's no going back.  If some regression issues are discovered after you've installed to PROD, you're at the mercy of Microsoft releasing a patch to resolve the issue.  It is best to open a support ticket as soon as possible to help them determine how widespread and serious the regression is. 
Now in each of the install steps above, you'll sometimes find that running PSConfig.exe or the Configuration Wizard after completing the CU/Patch installation, would fail or get stuck.  This leaves you in no man's land and has to be resolved in order to complete the installation/upgrade.

NOTE:  A CU/PATCH INSTALLATION IS NOT COMPLETE UNLESS YOU HAVE A SUCCESSFUL RUN OF PSCONFIG ALL ALL YOUR SERVERS IN TURN!!!

When this happens, you can manually run PSConfig to force the completion as follows:

  1. Run the SharePoint Management Shell as admin.  (Right click icon, Run as Administrator)
  2. There should be a path to BIN already defined in the management shell, but if you get a command not found error when you enter PSConfig, you could manually change directory to C:\Program Files\Common Files\Microsoft Shared\web server extensions\14\BIN
  3. Execute psconfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures

If PSConfig fails on step 9 or 10, proceed as follows:

  1. Edit C:\ProgramData\Microsoft\SharePoint\Config\GUID\cache.ini
  2. Reset value to 1
  3. From the SharePoint Management Shell, execute stsadm -o execadmsvcjobs
  4. From the SharePoint Management Shell, execute psconfig.exe -cmd upgrade -inplace b2b -wait -force
This should complete your update successfully.

REMEMBER THAT YOU HAVE TO DO THE ABOVE PSCONFIG FOR EACH AND EVERY SERVER IN YOUR SHAREPOINT FARM.  START WITH THE CENTRAL ADMIN SERVER AND THEN PROCEED WITH EACH SERVER IN TURN ONCE THE PREVIOUS SERVER COMPLETED.

It is said that you don't HAVE to run PSConfig in a single threaded fashion as stated above, but from personal experience, whenever I've had issues with CU installations, it was because PSConfig was run concurrently on multiple servers in the farm, but I'd recommend you let your own personal experience be the judge.

Enjoy
C




18 November 2014

How do I - Update the SharePoint Search Service Application Default Content Access account credentials using Powershell

When corporate security policy require that account passwords be updated, the Default Content Access Account used for the Search Service Application needs to be manually updated as well.  If your Search Service is in a funky state, this might not be possible using the browser UI.  When this happens, you'll need to resort to Powershell to save the day using the following script:

$userid = "domain\search_account";
$password = "account_password";
$ssa = Get-SPEnterpriseSearchServiceApplication "Search Service Application";
$sac = New-Object Microsoft.Office.Server.Search.Administration.Content($ssa);
$sac.SetDefaultGatheringAccount($userid, (ConvertTo-SecureString $password -AsPlainText -force));

Enjoy
C

SharePoint Remote Event Receivers are DEAD!!!

 Well, the time has finally come.  It was evident when Microsoft started pushing everyone to WebHooks, but this FAQ and related announcement...