Setting up SPDiag

Setting up SharePoint Diagnostic Studio 2010 (SPDiag 3.0) (SharePoint Server 2010) requires running scripts on the client machine:

Enable-PSRemoting -force

Enable-WSManCredSSP -role Client -DelegateComputer “<target_computer>” -force

However, Enable-WSManCredSSP would always result in Enable-WSManCredSSP : This command cannot be executed because the setting cannot be enabled. This can happen if no network connection is present.

After executing the following instead, I was able to create the project in SPDiag. (Create project also required listing the server as

Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowFreshCredentialsDomain -Name WSMan -Value "WSMAN/*"
Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowFreshCredentials -Name WSMan -Value "WSMAN/*"
Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowFreshCredentialsWhenNTLMOnly -Name WSMan -Value "WSMAN/*"

On the server, in addition to running:

Enable-PSRemoting -force
Enable-WSManCredSSP -role Server -force
Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 1000
Set-ExecutionPolicy RemoteSigned
get-item wsman:\localhost\Service\RootSDDL

I ran:

Add-SPDiagnosticsPerformanceCounter -Category "Network Interface" -Counter "Bytes Sent/sec" -WebFrontEnd
Add-SPDiagnosticsPerformanceCounter -Category "Network Interface" -Counter "Bytes Received/sec" -WebFrontEnd
Add-SPDiagnosticsPerformanceCounter -Category "Network Interface" -Counter "Bytes Total/sec" -WebFrontEnd
Add-SPDiagnosticsPerformanceCounter -Category "PhysicalDisk" -Counter "Current Disk Queue Length" -Instance "*" -WebFrontEnd
Add-SPDiagnosticsPerformanceCounter -Category "PhysicalDisk" -Counter "% Disk Time" -Instance "*" -WebFrontEnd
Add-SPDiagnosticsPerformanceCounter -Category "PhysicalDisk" -Counter "Avg. Disk Queue Length" -Instance "*" -WebFrontEnd
Add-SPDiagnosticsPerformanceCounter –category SQLServer:Locks –counter "Average Wait Time (ms)" –allinstances -databaseserver
Add-SPDiagnosticsPerformanceCounter –category LogicalDisk –counter "Disk Reads/sec" –allinstance -databaseserver
Add-SPDiagnosticsPerformanceCounter –category LogicalDisk –counter "Disk Writes/sec" –allinstance –databaseserver
get-sptimerjob job-usage-log-file-import | Set-SPTimerJob -Schedule "Every 5 minutes between 0 and 59"

Print All PDF Files in Folders

I wonder if there’s a way to do this against a SharePoint Library: Print All PDF Files in Folders

50 SharePoint 2010 Interview Questions With Answers

You should know and understand these questions and answers. I’ll be using a few of these when interviewing candidates for one of our projects.

50 SharePoint 2010 Interview Questions With Answers

Do you use ShareVis?

I’m forming a user discussion group for ShareVis. Please come join if you use ShareVis.

ShareVis Discussion
Visit this group

Setting the Document Library “New Folder” default to False

How to make the default of ‘Display “New Folder” command on the New menu’ equal to No instead of Yes.

Modify the DocumentLibrary.xml in the 12 Hive (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\DocumentLibrary\ListTemplates)

<?xml version=”1.0″ encoding=”utf-8″?>

<Elements xmlns=””&gt;














Perform an iisreset to activate.

Replacing Multiple Hyperlink Values in a List

I rather embarrassed of this solution, but I’m hoping that if I post what I’m doing some else out there will know of a better way.


I have a long list with hyperlinks. I reuse this list in multiple locations and need to change the location name in the URL. I export the list to a spreadsheet and launch the Visual Basic editor. I then run the following code:


Sub ReplaceHyperlinkAdresses()

Dim hypLink As Hyperlink

Dim ws As Worksheet


For Each ws In Worksheets

For Each hypLink In ws.Hyperlinks

If hypLink.Address Like “http://server/sites/department/Documents/Forms/OLDLOCATION.aspx*” Then

hypLink.Address = _

Replace(hypLink.Address, “http://server/sites/department/Documents/Forms/OLDLOCATION.aspx“, “http://server/sites/department/Documents/Forms/NEWLOCATION.aspx“)

End If

Next hypLink

Next ws

End Sub


Afterwards, I copy and paste the column with the hyperlinks back into my list using the datasheet view. It works, but I feel like there should be a better way to update a list of hyperlinks in a SharePoint list.