Saturday, September 29, 2012

Updating SharePoint 2010 Managed Accounts & SQL Server Passwords

If you need to update the passwords for your managed accounts in SharePoint, you have a few different options. To check out your settings/options, navigate to:

Central Admin -> Security -> Configure Managed Accounts

  1. SharePoint can manage the password for you and change it automatically on based certain intervals
  2. Update the password directly within Central Admin
  3. Change the password of the account in Active Directory first, then update the account's password via Central Admin
Your organization's policies can determine which option you choose. In my experience, most organizations have a separate team of System Administrators who maintain all accounts within Active Directory and enforce password policies there.

Let's say a new password policy is coming out next week. You will need to get ahead of the curve and update all of your passwords prior to the changes taking place, otherwise you are afraid your farm will come to a sudden halt. Your system administrators will be updating the passwords but are nice enough to tell you what they are for each service account SharePoint uses. In order to update the passwords in SharePoint, navigate to:

Central Admin -> Security -> Configure Managed Accounts -> Change Password Now -> Use Existing Password -> Enter the password provided by your System Administrator -> Ensure that Enable Automatic Password Change is NOT checked-> Click Ok

The SQL administrator password needs to change to, but uh-oh, that's not one of SharePoint's managed accounts (nor should it be). Your System Administrators, have just changed the password in Active Directory and have notified you. To update the SQL passwords related to SharePoint you will need to update 2 services. Follow the steps below:
  1. Log on as administrator to the SQL Server
  2. Click Start and search for Server Manager
  3. Expand Configuration-> Services.
  4. Find the service called SQL Server (MSSQLSERVER) and right-click -> Properties
  5. Log On tab -> Type in new password -> Click OK
  6. Select Yes when a dialog box pops up informing you that services will need to be restarted in order for the changes to take effect
  7. Right click on the same service and select Stop
  8. Right click again and select Start
Follow the same steps above to update the password for the SQL Server Agent (MSSQLSERVER) service as well.

Check your SQL Server's Windows Application Event Logs. If you receive errors, be sure that the SP Timer Service has been restarted on the Web Front End server.

Change the SharePoint 2010 Farm Passphrase

If you need to change your SharePoint 2010 Farm's Passphrase, it's definitely doable. A farm passphrase is created when running PSConfig and when joining new servers to the farm. If you inherit a SharePoint farm from someone else and they have forgotten the passphrase (or they left the company), you can always reset the passphrase. You are going to use SharePoint Management Shell (PowerShell) to make this quick and easy change. Here is what you will enter into PowerShell:

$passphrase = ConvertTo-SecureString -asPlainText -Force

PowerShell will then ask you what the new passphrase is going to be....

Once you have that typed in, you will need to enter another line into PowerShell:

Set-SPPassPhrase -PassPhrase $passphrase -Confirm

You will need to confirm the passphrase you entered before. Click Y to confirm this change. Now your farm's passphrase is updated!

Error When Deleting Search Service Application in SharePoint 2010

Scenario: You attempt to delete your Search Service Application in SharePoint 2010 through Central Admin but the process never completes or takes too long to complete (and does not actually delete the application). You attempt to delete the Search Service Application again through Central Admin but now receive an error.

You then decide PowerShell is next viable option when deleting so you use the following script:

$spapp = Get-SPServiceApplication -Name ""
Remove-SPServiceApplication $spapp -RemoveData


You receive another error and are still unable to delete the Search Service Application.

Fix: STSADM becomes your friend again here. You will first need to grab the GUID for the Search Service Application. You can do this by...

  1. Log into the server hosting Central Admin
  2. Open SharePoint 2010 Management Shell (PowerShell) as Administrator
  3. Enter Get-SPServiceApplication
  4. Find the Service Application you wish to delete and copy the GUID (You can do this by right clicking in the PowerShell window -> hitting Select All -> Control + C -> Right Click and Paste into a fresh Notepad document -> copy the GUID from the application you wish to delete)
  5. While still in PowerShell, type: stsadm -o deleteconfigurationobject -id *type in GUID here*
This will delete your Search Service Application completely!

Friday, September 28, 2012

Error When Deleting a SharePoint 2010 Web Application

Scenario: You have just created a new Web Application in SharePoint 2010 but realized after hitting the "ok" button that you have mistyped an application pool name or even entered the wrong port number. You try deleting this newly created Web Application through Central Admin and PowerShell but unfortunately receive the following error:

"Unprovisioning (your web application name) already exists under the parent Microsoft.SharePoint.Administration.SPWebService named "". Rename your object or delete the existing object."

Fix: You need to delete the Timer Job Definition called "Unprovisioning Web Application (your web application name)". This is because SharePoint is still trying to delete the Web Application from your unsuccessful steps before. 

To delete this Timer Job Definition, go to Central Admin -> Monitoring -> Review Job Definitions -> Paginate to the Job Definition called "Unprovisioning Web Application (your web application name)". Click on it and select Delete. 

Now you can delete your Web Application successfully.