SharePoint Experts, Information Architects, Expert Witness

SICG provides a broad array of business and technology consulting from architecture to design to deployment of global systems with a focus on surfacing data in the enterprise. We focus on the "How", not just the possible. Contact me direct: or call 704-873-8846 x704.

Search This Blog

Wednesday, January 16, 2019

Setting Time Servers (Windows)

A note here for future reference! You might find yourself off time on a server, laptop, pc, etc. and it is a great idea to sync with a known time service. While you have to have admin rights on the individual box (or VM), you can set the time servers using an elevated Command prompt (i.e. Run as Administrator).

I happen to use the NTP servers in the US for synching all of my servers. So - how to set these? A few simple commands - stop the time service, set the sync option with server list, set as reliable and start it back up - the last two commands show you the configuration and status.

Open a command prompt (cmd) using Run as administrator and enter the following (careful, second line is wrapped):

net stop w32time
w32tm /config /syncfromflags:manual /manualpeerlist:",,,"
w32tm /config /reliable:yes
net start w32time

w32tm /query /configuration
w32tm /query /status

All set!

Wednesday, January 9, 2019

Active Directory Error 0X800708C5

I get questions about this error all the time - the answer is usually very simple - the password you are attempting to apply does not meet the criteria required.

Hope that helps!

Saturday, November 24, 2018

The timer service failed to recycle

This is one I see all the time on client sites - under Review problems and solutions you see the message "The timer service failed to recycle". The problem is actually due to running other jobs that conflict with the recycle process - in short, something else is running.

Many have a habit of having long running jobs start after Midnight (00:00) which is generally around the time the Recycle job runs - if something else is running, the job fails. The solution is quite simple - either A) review and modify jobs that run at the same time as the Recycle job and make sure they don't overlap or B) simply change the time that the recycle happens. Since A may take some time, B is quite simple.

Open Central Administration and click Monitoring then Review job definitions and look for "Timer Service Recycle" (you'll have to page through to find it). Click to open the job and change the Starting time to be either earlier or later than other long running jobs. In most cases (depending on the installation and/or 24 x 7 usage), you can usually set it for late evening (like 10 PM).

For more reference, see here:

SharePoint Most Popular does not appear in Lists

As we all know, document libraries have the option to review Most Popular items. While there can be issues with this (showing no counts for example), it does work in most cases. Assuming you are getting counts, you might notice that this option does not appear in Lists.

Enabling this is easy enough - simply activate the Cross Site Publishing feature - Site Settings > Site Collection Features > Cross-Site Collection Publishing.

Saturday, November 10, 2018

ULS Logs Searching for the Correlation ID

Having forgotten about this myself, I am posting here. In many cases, there's instances where you want to scan across ULS in SharePoint for a single Correlation ID. Notepad/Notepad++ are not much help here since messages are mixed. The ULS Viewer isn't always the best either.

The proper way to help you narrow down what you are looking for is "Merge-SPLogFile". This little gem searches across the ULS logs and helps you dump it into a single file.

Format is simple (obviously run one of the farm servers):

Merge-SPLogFile - Path <File Path> -Correlation <Correlation ID> -Overwrite

Overwrite is optional - it simply overwrites an existing file. So for example:

Merge-SPLogFile -Path "c:\temp\MyLogsMerged.log" -Correlation 7d88815d-17d5-412d-a71d-f0d124c8ad7c -Overwrite

And you can add the date (or time):

Merge-SPLogFile -Path "c:\temp\MyLogsMerged-$(Get-Date -f yyyy-MM-dd).log" -Correlation 7d88815d-17d5-412d-a71d-f0d124c8ad7c -Overwrite

Now you can use this merged log file in the ULS viewer so you can take your time to review an entire event without having to filter.

There are actually a lot of things you can use to filter - Correlation is just one. It can be an Event ID, service name, etc. - see the details here:

Merge-SPLogFile on

Monday, November 5, 2018

Trouble adding a Custom Action in SharePoint 2016

Minor annoyances. I had this problem a while back and just haven't worked with it in a while so I figured I'd share.

When working with creating a Custom Action to add it to say the EditControlBlock, it's easy to make a common mistake. When you are adding it, you have to add it to the collection separately instead of directly on the list/library. So for example, this does not work (where DL is the Document Library to add to) - notice the bolded lines in each:

SPUserCustomAction TheCopyAction = DL.UserCustomActions.Add();
TheCopyAction.Title = "Copy to Extranet";
TheCopyAction.Sequence = 0;
TheCopyAction.Name = TheCopyAction.Id.ToString();
TheCopyAction.Url = "http://mdsp13sp2:83/hdtintra/eng/_layouts/15/copy.aspx?SourceUrl=http://mdsp13sp2:83{ItemUrl}&FldUrl=http://mdsp13sp2:83/eng/MyDocs/&Source=http://mdsp13sp2:83/hdtintra/eng/";
TheCopyAction.Location = "EditControlBLock";
TheCopyAction.Description = "Copy this file to the extranet site";

BUT, using the collection DOES work:

SPUserCustomActionCollection CustomActionCollection = DL.UserCustomActions;
SPUserCustomAction TheCopyAction = CustomActionCollection.Add();
TheCopyAction.Title = "Copy to Extranet";
TheCopyAction.Name = "Copy this file to the extranet site";
TheCopyAction.Sequence = 0;
TheCopyAction.Location = "EditControlBlock";
TheCopyAction.Url = "http://mdsp13sp2:83/hdtintra/eng/_layouts/15/copy.aspx?SourceUrl=http://mdsp13sp2:83{ItemUrl}&FldUrl=http://mdsp13sp2:83/eng/MyDocs/&Source=http://mdsp13sp2:83/hdtintra/eng/";

Oddly, you can see this in Designer - two added via C#, the first by the the top way and 2nd by the 2nd way:

Kudos to:
(after spending 3 hours on this due to failure of memory, thanks!)

Saturday, September 8, 2018

Get the Public Key Token for a strongly named assembly in Visual Studio

So this is a rehash of an older post by Jeremiah Clark - original URL at the bottom of this post.

I have often needed to get the Public Key Token of a strong named assembly and have always done it by hand using sn.exe or the folder method. So the issue is how to get the Public Key Token easily - particularly when you need to create a Safe Control or otherwise add it to the web.config file. Of course, you can always build it, deploy to the GAC and find it in the c:\Windows\\assembly folder under the appropriate folder:

GAC_32 = 32 bit
GAC_64 = 64 bit

You'll find it there and the Public Key Token is part of the folder name. However, this is a pain - so this method turned out to work outstandingly well.

Step 1 - Find where sn.exe resides - where it is depends on which version of Visual Studio you are running. Open the Developer Command Window and type in:

where sn.exe

In my case, it found it under c:\Program Files (x86)\Microsoft SDKs\Windows\v10.0a\bin\NETFX 4.6.1 Tools\sn.exe:

Step 2 - Open Visual Studio, click Tools in the tool bar then select External Tools. When the pop up opens, click Add. Set the Title, Command and Arguments:

Title = Get SN Token
Command = c:\Program Files (x86)\Microsoft SDKs\Windows\v10.0a\bin\NETFX 4.6.1 Tools\sn.exe (the path to sn.exe)
Arguments = -T $(TargetPath)

Next, click the Checkbox to Use Output Window

This looks like this:

Click OK to save it.

Step 3 - Get the Public Key Token. When the project is opened (and you've built it at least once), just click Tools in the tool bar and select Get SN Token - this opens the output window as shown:

Done deal!

Jeremiah's original post