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

11 November 2014

SharePoint PowerShell error - The local farm is not accessible - Cmdlets with FeatureDependencyId are not registered

When you're new to a SharePoint farm, you may try to open the SharePoint Management Shell expecting to work in PowerShell.  Even though your account may be a local administrator on the server as well as a member of the SharePoint Farm Administrators group in Central Admin, you may still receive this error message:

The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.




The issue is related to access to the configuration database for SharePoint.  What you need to do is grant access to the user in question, to the configuration database in SQL Server.  This can be done with the following two PowerShell commands:


$db = Get-SPDatabase | where {$_.Type -eq "Configuration Database"}
Add-SPShellAdmin "domain\username" -database $db

We begin by using the Get-SPDatabase cmdlet to get a reference to the SharePoint databases.  When you execute Get-SPDatabase by itself, it will provide you a listing of all SharePoint databases in the farm.  By filtering the type of database to only "Configuration Database" via the where clause, we are able to return on the configuration database in the farm.
Using the returned reference from this, we can use the Add-SPShellAdmin cmdlet to grant the user in question access to the configuration database.

Happy SharePointing!
C

image

12 April 2014

How do I – Add an InfoPath Data Connection to consume the UserProfileService.asmx web service – Complete


As we know, InfoPath forms have the ability to consume data from SharePoint’s User Profile Service Application through the SharePoint Web Services or to be more exact, through the UserProfileService.asmx web service specifically. The question is how to do that? It can be achieved by following a few simple steps as outlined below.

1. From InfoPath, click the “Data” tab in the top menu.

2. From the Data tab ribbon that opened, click “Data Connections”.



3. The “Data Connections” dialog window opens.

4. There should be one data connection named “Main Data Connection” displayed already.

5. Click the “Add” button to add a new connection.



6. The “Data Connection Wizard” appears.

7. Select the “Create a new connection to:” radio button.

8. Select the “Receive data” radio button. NOTE: These are usually set by default, but if they’re not selected on your form, select them.

9. Click the “Next” button.



10. Select the “SOAP Web service” radio button. This should be the default value, but if it isn’t, select it.

11. Click the “Next” button.



12. Now enter the location of the target service to be consumed in the edit box. In our case, we are trying to consume the “UserProfileService.asmx” service which resides in the /_vti_bin/ virtual location off your current SharePoint site. Simply copy the site URL of your site and append “/_vti_bin/UserProfileService.asmx” to it. For example, if your site URL is http://www.crayveon.com/sites/SuperTeam/default.aspx, drop the page reference and append the above text to give you a value of http://www.crayveon.com/sites/SuperTeam/_vti_bin/UserProfileService.asmx which you enter into the edit box.

13. Click the “Next” button.



14. InfoPath will connect to the web service and display the list of valid operations.

15. Scroll down the list and locate the “GetUserProfileByName” operation and select it.

16. Click the “Next” button.



17. On the parameter screen, simply click the “Next” button.



18. Ensure that the “Store a copy of the data in the form template” option is unchecked.

19. Click the “Next” button.



20. On the next screen, you can specify the name you wish to give this data connection. By default it will be called “GetUserProfileByName”, but you can change it if you’d like.

21. Click the “Finish” button.



22. The new data connection is now shown in the “Data Connections” dialog window.

23. Click the “Close” button.



Now by simply using this data connection in your form, you have access to the vast array of data made available to you via SharePoint’s User Profile Service Application.



Cheers
C

How do I – Add an InfoPath Data Connection to consume the UserProfileService.asmx web service – Part 3



Continued from…

How do I – Add an InfoPath Data Connection to consume the UserProfileService.asmx web service – Part 1

How do I – Add an InfoPath Data Connection to consume the UserProfileService.asmx web service – Part 2



17. On the parameter screen, simply click the “Next” button.



18. Ensure that the “Store a copy of the data in the form template” option is unchecked.

19. Click the “Next” button.



20. On the next screen, you can specify the name you wish to give this data connection. By default it will be called “GetUserProfileByName”, but you can change it if you’d like.

21. Click the “Finish” button.



22. The new data connection is now shown in the “Data Connections” dialog window.

23. Click the “Close” button.



Now by simply using this data connection in your form, you have access to the vast array of data made available to you via SharePoint’s User Profile Service Application.



For the sake of improved load time and user experience, this article is divided into three parts. If you wish to read or print the complete article, it can be found here:



How do I – Add an InfoPath Data Connection to consume the UserProfileService.asmx web service – Complete









Cheers
C

How do I – Activate my MSDN copy of Visio 2013 Professional?



Situation: You have a MSDN subscription and you have downloaded Office 2013 or one of the Office products, like Visio 2013 Professional, from Microsoft and have installed said product. You have a license key provided by MSDN, but the installer never prompts you for the license key. This is a departure from traditional installer behavior where you would enter the license key before the install can even be done. Once you’ve completed the install, you open your product and are confronted by this little gem of a warning just below the Ribbon:



Since you have a license key, you click the “Activate” button. You are presented with this screen which is there for a while, so be patient:



Eventually, you’re presented with a Sign In screen like this:



Having gotten your license key from MSDN, you promptly enter your MSDN UserID and password and click the “Sign in” button. Unfortunately, you’re presented with an error thus:



After trying the login a couple more times (just in case you fat fingered the password), you click the “Can’t access your account?” button. Your browser opens and you’re taken to this page:



Again, you enter your MSDN UserID as well as the CAPCHA code and click the “Next” button. This time you’re presented with an error screen stating that your ID doesn’t exist thus:



So now what?

This is the problem with the new installer. In order to use our MSDN license key, we’re going to have to follow these steps:
Click “Start”.
On the popup menu, click “Control Panel”.
In the Control Panel, double click the “Programs and Features” icon.
Scroll down through the list of installed products and locate the product in question. In this example it was “Microsoft Visio Professional 2013”.
Select the target product.
In the toolbar above the list, click the “Change” button.
When the configuration window appears, select the “Enter a Product Key” radio button and click “Continue”.
No enter your product key and click “Continue”.
Unfortunately, you have to go through the configuration piece again. For a simple license key addition, I don’t see the need in this, but that how it works for now. You could just click “Continue” but in my case, I wanted to make sure nothing was getting reset so I clicked “Customize”.
Ensure your configuration settings are as desired and click the “Continue” button.
It sets in the Configuration Progress screen for quite a while. Just be patient.
Once the configuration completes, click the “Close” button.
Finally re-launch the application and the red warning should now be gone.



This took me a while to figure out, so hopefully this saves someone some time.



Cheers
C

11 April 2014

Heartbleed – You MUST take action!


What is Heartbleed?

If you haven’t heard of the Heartbleed (CVE-2014-0160) bug in the OpenSSL library, it’s time to pay attention! I’m not going to regurgitate already available information here, but I’ll provide some pointers for you to get more of said information. There’s a good explanation of the bug located here. If you think it isn’t serious, consider the fact that services such as Google, Facebook and YouTube were affected while at the same time, hardware manufacturers did not escape scott free either. Cisco published a security advisory here noting affected equipment as well as equipment being investigated for the vulnerability.
What do I need to do?

Here’s a non exhaustive list of things to do in order to address this:
Make a list of services you use. CNet maintains a page with a list of the top 100 US sites which should give you a good starting point. If you are not using a password manager such as RoboForm, now might be a good time to consider starting to use one. I personally use RoboForm and because I do, all my services are within easy reach. It makes the creation of this list automatic and more importantly, it will have services on your list that you may forget about because you don’t use them on a daily basis. Remember, this bug has been around for 2 years!!! Any vulnerable service you accessed over the past two years could have resulted in your security passwords being stolen.
Once you have the list, check each of the services for the vulnerability. There are several checkers out there like this one from LastPass. Personally, I like this one published by Filippo Valsorta.
Once your service site clears the check, change your password. It’s important NOT to change your password until the service provider has both patched their software AND updated their SSL certificates. Changing your password before both of these are done, would still leave you vulnerable.
DO NOT access any vulnerable services until they’ve been patched and are secure again. The very first login to a previously vulnerable service should be to change your password. Once changed, logoff completely and then log back onto the service using the new password. For an extra measure of security I would recommend doing it in Incognito or InPrivate mode in your browser, closing the browser between logons.
If you’re responsible for hardware, be it at home or at work, do research to see if your hardware such as routers are affected. If your hardware is affected, patch it! If no patch is available, pull the hardware and replace it with something that isn’t vulnerable.

It’s important to realize that it’s going to take time to patch all the services, especially smaller sites, and that continued use of these services will remain risky unless they’ve been properly secured.

Well what are you waiting for???!!! Get started!!! (And you thought you’re going to be doing this and that over the weekend… )



Cheers
C

How do I – Add an InfoPath Data Connection to consume the UserProfileService.asmx web service – Part 2



Continued from…

How do I – Add an InfoPath Data Connection to consume the UserProfileService.asmx web service – Part 1



10. Select the “SOAP Web service” radio button. This should be the default value, but if it isn’t, select it.

11. Click the “Next” button.



12. Now enter the location of the target service to be consumed in the edit box. In our case, we are trying to consume the “UserProfileService.asmx” service which resides in the /_vti_bin/ virtual location off your current SharePoint site. Simply copy the site URL of your site and append “/_vti_bin/UserProfileService.asmx” to it. For example, if your site URL is http://www.crayveon.com/sites/SuperTeam/default.aspx, drop the page reference and append the above text to give you a value of http://www.crayveon.com/sites/SuperTeam/_vti_bin/UserProfileService.asmx which you enter into the edit box.

13. Click the “Next” button.



14. InfoPath will connect to the web service and display the list of valid operations.

15. Scroll down the list and locate the “GetUserProfileByName” operation and select it.

16. Click the “Next” button.





Click HERE to continue to Part 3







Cheers
C

10 April 2014

How do I – Add an InfoPath Data Connection to consume the UserProfileService.asmx web service – Part 1



For the sake of improved load time and user experience, this article is divided into three parts. If you wish to read or print the complete article, it can be found here:

How do I – Add an InfoPath Data Connection to consume the UserProfileService.asmx web service – Complete



As we know, InfoPath forms have the ability to consume data from SharePoint’s User Profile Service Application through the SharePoint Web Services or to be more exact, through the UserProfileService.asmx web service specifically. The question is how to do that? It can be achieved by following a few simple steps as outlined below.

1. From InfoPath, click the “Data” tab in the top menu.

2. From the Data tab ribbon that opened, click “Data Connections”.



3. The “Data Connections” dialog window opens.

4. There should be one data connection named “Main Data Connection” displayed already.

5. Click the “Add” button to add a new connection.



6. The “Data Connection Wizard” appears.

7. Select the “Create a new connection to:” radio button.

8. Select the “Receive data” radio button. NOTE: These are usually set by default, but if they’re not selected on your form, select them.

9. Click the “Next” button.





Please click HERE to continue to Part 2





Cheers
C

05 March 2014

How do I – Install Windows Server 2012 R2?



Here’s a quick video on the simple steps to first install Windows Server 2012 R2.

[youtube=https://www.youtube.com/v/d0xfkV4r3tY&autoplay=1&rel=0&w=800]





Cheers
C

31 January 2014

InfoPath is dead!



InfoPath is dead! We all knew it had to happen eventually. The Office Team blogged on the Office Blog today noting the death of InfoPath. From the third paragraph:

“This means that InfoPath 2013 is the last release of the desktop client, and InfoPath Forms Services in SharePoint Server 2013 is the last release of InfoPath Forms Services. The InfoPath Forms Services technology within Office 365 will be maintained and it will function until further notice.”

There will be no future version of InfoPath. Not much beyond that is shared at this time, except the assurance that there’s another 9 years left of official support for On-Prem InfoPath deployments. A sneak peak of what’s to come is supposed to be in the “Update on InfoPath and SharePoint Forms” session at the SharePoint Conference in March. We all knew it was coming so it shouldn’t be a big surprise that it’s finally here. I think more surprising is the fact that Microsoft waited this long to announce that the 2013 version was the last version. That should make for some interesting developments as far as SharePoint forms go.

Microsoft Authentication Library (MSAL) Overview

The Microsoft Authentication Library (MSAL) is a powerful library designed to simplify the authentication process for applications that conn...