Tuesday, December 17, 2013

Speed-up troubleshooting with Merge-SPLogFile cmdlet

If there is a medium or large Server Farm you are managing then it is a pain when it comes to troubleshooting using Log file entries.

Thankfully there is a simple cmdlet that merges the log files from ALL THE SERVERS in the farm and provides the entries in a user-define output file. What's more, we can even filter based on several key parameters such as CorrelationID, Date, Area, Category etc.

Here's the syntax for the same -

Merge-SPLogFile -Path  [-Area ] [-AssignmentCollection ] [-Category ] [-ContextFilter ] [-Correlation ] [-EndTime ] [-EventID ] [-ExcludeNestedCorrelation ] [-Level ] [-Message ] [-Overwrite ] [-Process ] [-StartTime ] [-ThreadID ]

Technet reference http://technet.microsoft.com/en-us/library/ff607721.aspx


Saturday, November 16, 2013

Fetching Social Posts data using .NET CSOM in SharePoint 2013

I was looking up on how to work with Social Feeds using the .NET CSOM and worked out some code. Here's the code the retrieves all the Social feed post for a given user and displays them. It also provides option to enter a reply, which is then posted to that Thread.


Friday, October 04, 2013

SharePoint 2013 August 2013 Cumulative Update

Recently I rebuilt SP2013 on my box and updated to the latest SP 2013 August '13 Cumulative update. As usual I stopped the following services before running the updates -

1. IIS Admin Service
2. SharePoint Timer Job Service
3. All Search Services

Stopping the services is to make the update run faster, else it takes many many hours to complete. After running the update, restart and run the Configuration Wizard.

Once the update and re-config is completed, you should be able to see the version number of the Servers and DBs updated to 15.0.4535.1000.

Please note that only the Update for SP2013 Server needs to be run. There is no need to run the update for SP2013 Foundation.as it's included within the SP2013 Server update. An of course the March 2013 Public update needs to be in place before running this update. (The Aug 2013 update included the April and June updates so no need to run those either).

Here are the download Links - 

- SharePoint 2013 August '13 Cumulative Update (CU) - http://support.microsoft.com/hotfix/KBHotfix.aspx?kbln=en-us&kbnum=2817517

- SharePoint 2013 March '13 Public Update - http://www.microsoft.com/en-US/download/details.aspx?id=36989





UserProfile Synchronization with Active Directory Direct Import

Since importing User profiles from AD using Forefront Identity Manager Sync Service is problematic and buggy, SharePoint 2013 includes a new type of import which bypasses the Forefront Identity garbage all together and directly imports from AD. The upside of this approach is that the import is blazing fast and the down-side is that it can be done only one-way. However, a one-way import is more than sufficient for most environments.

In this post i am going to show the steps involved in configuring and running the AD Direct import -

1. The first thing is to make sure that you have a User Profile Service Application provisioned and running. If it's not then you will have to create one and make yourself the Administrator of the same.

2. Once the User Profile Service Application is ready, click on the Manage button under Application Management and Manage Service Applications to come to the list of service applications. Scroll down and click on the User Profile Service Application.

3. Doing step 2 should bring us to the "Manage User Profile" page.

4. On this page, under the second heading called "Synchronization", click on the "Configure Synchronization Settings" link.

5. In the page that follows, scroll down to Synchronization Options and select the second radio button labelled "Use SharePoint Active Directory Import". Now scroll all the way down and click the OK button.



6. Now go back to the User Profile Settings page and click on "Configure Synchronization Connections" under the Synchronization heading.


You will see a page that shows all the connections. If this is the first time, then there will be no connections. Now click the "Create New Connection" link.

7. In the "Add New Synchronization Connection" page enter the Domain details and the Sync Account name and password. The Sync account is a service account having "Replicate Directory Changes". I created a service account called "spupsync" and gave it "Replicate directory changes" permission.



On the page, scrolldown a bit and click on the "Populate Containers" button. If the User account has rights and everything is alright with your AD then you should see the Domain name (NETBIOS name) populated. Now expand and uncheck everything except users.


Finally press "OK" button on this page. You should then be able to see the newly created connection.

8. Now create the "Synchronization Timer Job" by first clicking on "Configure Synchronization Timer Job" on the main User Profile Settings page. Then chose the correct import interval (i chose once every day) and click ok.



9. Finally start the Profile Synchronization by clicking on the "Start Profile Synchronization" link. This will run the Synchronization Timer Job and pull the user details from AD very quickly.

Here are some limitations of direct AD Import -

1. Sync in one-way (Import only)

2. We cannot map AD attributes to "System" SharePoint Profile properties

3. We cannot map two different AD properties to the same Profile property

4. We cannot do cross string type mappings (a value string attribute to a multi value string property or vice versa)



Wednesday, July 17, 2013

Visual Studio 2012 Update 3

The Update 3 of Visual Studio 2012 is now available  here - http://support.microsoft.com/kb/2835600

It has improvements for TFS integration and other bug fixes.

Wednesday, June 26, 2013

Saturday, June 22, 2013

Installing the April 2013 Cumulative Update for SharePoint Server 2013

I have been having issues with the original RTM version of SP2013 that i have installed on my Amazon EC2 VM. So i decided to try and install the Cumulative updates that are available for SharePoint 2013.

The latest CU that is available is the April 2013 CU for SharePoint 2013 Server and Foundation. So I downloaded the same and tried installing. On running the installer, it gives the error - "Required Product not found on this machine". This is because if we want to install the April 2013 CU then first we have to install the March 2013 Public Update (PU) first. So points to note are -

1. Install the March 2013 Public Update for SharePoint 2013 first.

2. Do not download the March 2013 Public Update for SharePoint 2013 FOUNDATION as it's included in the SharePoint 2013 Server Public Update itself.

The March 2013 public update for SharePoint 2013 server can be found here -

http://www.microsoft.com/en-us/download/details.aspx?id=36987

After running the installer and mandatory reboot, run the SharePoint 2013 Configuration wizard & check that everything is working fine in SharePoint.

Now download, extract and run the April 2013 CU for SharePoint Server 2013 (DO NOT DOWNLOAD THE APRIL 2013 CU FOR SP2013 FOUNDATION). The April 2013 CU for SharePoint Server 2013 can be found here -

http://support.microsoft.com/hotfix/KBHotfix.aspx?kbln=en-us&kbnum=2726992

After the installation & reboot, run the Products and Technologies Configuration Wizard to complete the Update.

I found some good links for reference and included the same here -

http://technet.microsoft.com/en-us/sharepoint/jj891062.aspx

http://technet.microsoft.com/en-US/office/ee748587.aspx

http://technet.microsoft.com/en-us/library/ff806331(v=office.15)

http://technet.microsoft.com/en-us/library/ff806338(v=office.15)

http://blogs.technet.com/b/stefan_gossner/archive/2013/04/27/april-2013-cu-for-sharepoint-2013-has-been-released.aspx

http://blogs.technet.com/b/stefan_gossner/archive/2013/03/21/march-public-update-for-sharepoint-2013-available-and-mandatory.aspx

http://blogs.msdn.com/b/russmax/archive/2013/04/01/why-sharepoint-2013-cumulative-update-takes-5-hours-to-install.aspx



Monday, May 20, 2013

What's New in Office 365 - Article on SharePoint Team Blog

A nice article on the new features of SharePoint Online by the SharePoint Team can be found here -

http://blogs.office.com/b/sharepoint/archive/2013/04/02/what-s-new-in-sharepoint-online-top-10.aspx

Hope it helps in understanding the capabilities of the updated SharePoint online.

SharePoint 2013 - March 2013 and April 2013 CU

The latest CUs (Cumulative updates) for SharePoint 2013 have been released. The links are provided in this Technet Article -

http://technet.microsoft.com/en-us/sharepoint/jj891062.aspx

You can find the April 2013 CU's here -

SPF 2013 April 2013 CU - http://support.microsoft.com/kb/2751999
SP 2013 April 2013 CU - http://support.microsoft.com/kb/2726992

I am hoping that these CUs address some of the issues I am having with making the User Profile Sync service up and running :-)

IT Professional Reviewer's Guide for SharePoint 2013

If you are looking at getting a very quick & to-the-point document on the new capabilities of SharePoint 2013 then download the "IT Professional Reviewer's Guide" from the following link -

http://www.microsoft.com/en-us/download/details.aspx?id=34023

Thursday, May 02, 2013

Setting up Service Applications to run SharePoint 2013 Apps

If you have just installed SharePoint 2013 (and not run the Farm Configuration wizard that instantiates all Service Applications to save memory) and would like to try out some Apps, you will get an error during deployment from Visual Studio 2012.

To enable running of SharePoint 2013 Apps we need to setup the following Service Applications -

1. SharePoint, App Management Service
2. Microsoft SharePoint Foundation Subscription Settings Service

The App Management Service can be created from the Central Admin and does not need any special steps. Just create it like any other Service Application.

The Microsoft SharePoint Foundation Subscription Settings Service cannot be instantiated using the UI and can only be created using the following using PowerShell script -


Monday, April 29, 2013

Creating an App Domain for SharePoint Hosted Apps in SharePoint 2013

I just finished setting up a local development environment on my laptop (Guess the configuration? Corei3, 6GB RAM) and find that in spite of the low end configuration of the laptop, SharePoint 2013 runs decently (I have not configured any of the services such as Access Services, Excel Services etc. since my focus is only on doing some App Development).

One of the things that we have to do to make SharePoint 2013 run SharePoint-hosted Apps is to configure a   separate Domain in the DNS. Some people call it the AppDomain and it's misleading because we also have the concept of AppDomains in .NET. 

The first step is to create an instance each of the "App Management Service Application" and "SharePoint 2013 Foundation Subscription Settings Service Application". The App Management service can be created from Central Admin whereas the Subscription service can only be created using PowerShell. I will discuss both in my next post. But make sure that you have both the Service Applications instantiated and associated with your HostWeb (Site to which the Apps will be added).

For now let's look at the steps required to create an App Domain using the DNS Manager in Windows Server. I am running Windows Server 2008 R2 and screens might slightly differ in Windows Server 2012.

Step 1 : Open the DNS Manager

You can find it at Start > Administrative tools > DNS

Step 2 : Create a new Forward lookup Zone

Right click on the Node called "Forward Lookup Zones" and click on "New Zone..."



Step 3 : Select Zone Type

In Zone Type screen, choose "Primary Zone"



Step 4 : Under "Active Directory Zone Replication Scope" choose either the first or second option depending on your domain (For enterprise domains choose the first option, for standalone domain on a dev box choose the second option).



Step 5 : Enter the App Domain Name

This is the interesting part, If your parent domain is called MYDOMAIN.INT, then choose a name such as
APPS.MYDOMAIN.INT.

In my case my domain is called TRAINING.INT so i entered APPS.TRAINING.INT.

Remember, when you deploy your Apps, each App will run under an address such as -

http://app-fdfd323.apps.training.int/

There is also an option to prefix a string to the encoded domain value (more of that later).


Step 6 : Specify Dynamic Updates

Choose the last option "Do not allow dynamic updates"



Step 7 : Verify and Press Finish

Verify the details and press the "Finish" button to complete the Wizard. 



Step 1 - 7 will create a new Domain under which SharePoint Host Apps will run.

Step 8 : Create a wildcard CNAME entry for the App Domain and Point the CNAME to your SharePoint Server

The last step in the DNS Manager is to create a CNAME (Canonical Record) DNS Entry by first expanding the Forward Lookup Zones node, right clicking on the App Domain node and then choosing "New CNAME..". 

In the New Resource Record Dialog, enter * in the Alias name field and in the FQDN field, specify the Host Name of the SharePoint Server.

In my case, the SharePoint server is called "SHAREPOINT" and domain name is "TRAINING.INT" so I entered "SHAREPOINT.TRAINING.INT"

Now press OK to complete the creation of CNAME entry.



Well that's all you have to do in the DNS Manager, but we are not done yet. The final step is to configure APP URLs in the Central Admin. So open up the Central Administration Website and follow these steps - 

Step 1 : Open up Central Admin and Click on Apps

Now enter the App Domain name that we just created in DNS and optionally specify a prefix (If we specify a prefix such as "app" then the Apps will run under a URL such as http://app-fdfd43ed.apps.training.int/...)




If everything has been done correctly (and you have also created and associated the required Service Applications) the you're ready to start running SharePoint-hosted Apps now!


Using Recoil with SPFx Try out the latest alternative to Redux with SPFx When developing with Redux or MobX, we have ha...