Translate

Wednesday, March 12, 2014

SharePoint - Database Cleanup

From what I've read it seems that one of the common things that can happen when you're working with SharePoint is that you end up with orphaned databases on your SQL server or in SharePoint. Here are some PowerShell commands to help clear that up.
List all databases that are being used by SharePoint:
Get-SPDatabase | Sort-Object disksizerequired -desc | Format-Table Name
Use the returned list to compare with the databases on your SQL server and delete any databases that are not on the list.

List all databases that are being used by SharePoint that are not on the database:
Get-SPDatabase | where {$_.exists -eq $false}
Delete the orphaned databases:
Get-SPDatabase | where {$_.exists -eq $false} | foreach {$_.delete()}

Tuesday, March 11, 2014

SharePoint - Is It SharePoint Search Or FAST Search

If you set up your SharePoint site to use FastSearch and you want to make sure that your SharePoint site is using FAST run the "Get-SPEnterpriseSearchExtendedQueryProperty" PowerShell command. If you have FAST set up correctly you should see something like this:

PS C:\> Get-SPEnterpriseSearchExtendedQueryProperty -SearchApplication "Search Service Application" 
PropertyKey Value ----------- ----- FASTSearchContextProperties SPS-Location,SPS-Responsibility FASTSearchAdminServiceAuthenticationUser comp\svc_spadmin FASTSearchAdminServiceLocation http://intranet.contoso.com:13257 FASTSearchQueryServiceLocation http://intranet.contoso.com:13287 FASTSearchContextCacheTimeout FASTSearchManagedPropertyResultMapping FASTSearchDisableUserContext FASTSearchResourceStoreLocation http://intranet.contoso.com:13255 FASTSearchAlternateAccessMapProperties
A regular SharePoint search setup would show something like this:

PropertyKey                               Value  
-----------                               -----  
FASTSearchContextProperties               SPS-Location,SPS-Responsibility 
FASTSearchAdminServiceAuthenticationUser  
FASTSearchAdminServiceLocation  
FASTSearchQueryServiceLocation  
FASTSearchContextCacheTimeout  
FASTSearchManagedPropertyResultMapping  
FASTSearchDisableUserContext  
FASTSearchResourceStoreLocation  
FASTSearchAlternateAccessMapProperties  

SharePoint - Check Content Source Connection

The Windows PowerShell for Search Server 2010 reference can be found at technet. I was troubleshooting our FAST setup and used the "Ping-SPEnterpriseSearchContentService" to check if I could reach the content source from our SharePoint server.

ping-spenterprisesearchcontentservice -hostname fastsearch.mydomain.local:13391

Here is my result. If you scroll to the right you will see one line for the FASTSeachCert has true for ConnectioSuccess.
CertificateName                      Thumbprint                          ExpiryDate                       ConnectionSuccess
---------------                      ----------                          ----------                       -----------------
No certificate                       No certificate                      None                             False
CN=ForefrontIdentityManager          47FA1E8786C5E940887F10176FEFA88A... 12/31/2039 6:59:59 PM            False
SERIALNUMBER=77961234, CN=Go Dadd... 7C4656C3061F7F4C0D67B319A855F60E... 11/15/2026 8:54:37 PM            False
OU=Go Daddy Class 2 Certification... DE70F4E2116F7FDCE75F9D13012B7E68... 6/29/2024 1:06:20 PM             False
CN=WMSvc-MOSS                        BEE607B03C17EBC1075F7F8708C334B5... 6/25/2020 9:39:36 AM             False
E=info@valicert.com, CN=http://ww... 317A2AD07F2B335EF5A1C34E4B57E8B7... 6/25/2019 8:19:54 PM             False
CN=*.mydomain.org, OU=Domain Con...  370441FEFE89736CA69A611E45B0D7A6... 3/23/2017 5:26:48 PM             False
CN=FASTSearchCert                    2E76CBC921BEF69387E89C9152848AB2... 3/10/2015 11:16:27 AM             True
CN=FASTSearchCert                    443B3C48B3182409E7E2D7906397B175... 11/15/2014 10:57:28 AM           False
CN=FASTSearchCert                    DAD3BBABB12E1F4F309B591761993B71... 11/4/2014 3:02:53 PM             False
CN=mysite.mydomain.org, OU=Domai...  51205810A0700BB6F03A138746B682AF... 3/22/2013 4:05:18 AM             False

Sunday, March 9, 2014

Delete A Service Application In SharePoint

I needed to delete a service application in SharePoint. Tried to delete it using Central Admin and PowerShell and neither one worked. Good old Staadm was able to delete it. Here is the command:

stsadm.exe -o deleteconfigurationobject -id "87349a22-0cd6-4b35-b420-78fa2dff8c26"

You can find the ID of the service application in the address bar of Central Admin:
You can find the ID using PowerShell:

PS C:\Users\argolebiowski> Add-PSSnapin Microsoft.SharePoint.PowerShell
PS C:\Users\argolebiowski> Get-SPServiceInstance -server moss

TypeName                         Status   Id
--------                         ------   --
Managed Metadata Web Service     Online   c0b5f68e-424c-434f-8e06-71960fe6afe6
User Profile Synchronization ... Online   5ffb0768-ec34-4186-bb72-6c28faced877
Business Data Connectivity Se... Online   09549ad7-bc47-491c-9d73-bfb588c1a8c7
Secure Store Service             Online   4a14360b-3fba-4f90-83f9-97e03eded38d
Claims to Windows Token Service  Disabled 2ea5d177-7e5f-4b90-a3cb-8ed5c65d4e3c
Microsoft SharePoint Foundati... Online   fe30e019-4353-4560-9c8c-90584f8161ac
PerformancePoint Service         Online   c1d2e240-7186-446d-8b1a-24e5ecddd02c

Sunday, March 2, 2014

Add Google Play Services to an Eclipse Project

I was setting up the example applications for week 7 of the Coursera Android Class and I needed to install and add Google Play Services two of the examples. The information for setting up the sevices can be found at:
http://developer.android.com/google/play-services/setup.html