Saturday, August 16, 2014



Tuesday, August 12, 2014

How to: Get User Profile Activities from SharePoint Database

Though, it is not recommended way to query SharePoint database tables sometimes due to critical requirements we might need to extract user profile log report.
SharePoint stores the user profile update events in [UserProfileEventLog] table. If there is any profile update occured, the activity event will get saved in [ActivityEventsPublished] and [ActivityEventsConsolidated] tables.
  • ActivityEventsPublished – Stores the data relevant to that particular user only. Unique record for that event.
  • ActivityEventsConsolidated – Stores the data which the user shared to rest of all the users (colleagues). SharePoint adds an entry in this table about the user’s event against all his/her colleagues (say, 1:1000 | ActivityEventsPublished  : ActivityEventsConsolidated )
There is limitation using SharePoint Object model to fetch the user profile data beyond more dates. Alternatively, we can query SQL database directly and get the required data easily.
Run the following SQL query to get it done.
SELECT [EventId]    
      ,[ChangeType]
      ,[EventTime]    
      ,[ChangedPropertyId]
  FROM [Profile_DB].[dbo].[UserProfileEventLog]
  ORDER BY convert(datetime, [EventTime], 103) ASC

Note: SharePoint maintains the event log of user profile only for a limited period of time so that can restrict the database growth.

Sunday, August 10, 2014

How to: Register Provider hosted app in SP2013

In SharePoint 2013 Online, to add a provider hosted app into your SharePoint site collection. It  is required to register the app with SharePoint App store. Only on successful registration of the app, we can add our custom provider hosted apps into any of our site collection.

Assuming that you are having knowledge on Provider Hosted apps in SharePoint 2013. Again to say as one liner,  Provider Hosted Apps are simply a SharePoint app where the code in your app runs in a space you provide (Normally Windows Azure).

To make your custom web app (hosted in Azure box) render inside SharePoint Online 2013 site collection, Your app should be authenticated by SP2013 environment. For this, we need to register it in SP2013 environment. To do so,

Navigate to “…/_layouts/15/appregnew.aspx”

regnew

  • Click on “Generate” button against Client Id & Client Secret to add values in respective fields
  • Specify a “Title” for your application registration.
  • Specify your remote app server domain URL(e.g: remoteserver.com)
  • Specify the web app URL say, your custom web application’s start page hosted in IIS of azure box (https://remoteserver:com/pages/default.aspx).

Clicking on “Create” after successful validations, your app is registered and you need to use this Client ID & Client Secret key in your custom provider hosted web app’s web.config file

<configuration>
……

<appSettings>
    <add key="ClientId" value="bde1f191-18d6-4cf3-8498-6ce577375223" />
    <add key="ClientSecret" value="6j9zxbbStn9vX9kPb0mTfTLnZd5PlbSKhL5t0aUPfsE=" />
  </appSettings>

……

</configuration>

Now your app is registered successfully in SharePoint Online environment.

To retrieve the registered app information afterwards, navigate to the URL “../_layouts/15/appinv.aspx”

To retrieve a list of app principals, navigate to URL “../layouts/15/appprincipals.aspx”

Hope you find your required information. Feel free you post your comments. Thanks.

Saturday, August 9, 2014

Install Powershell for SharePoint 2013 Online

 

1. Working with Office 365 using PowerShell:

Windows Server 2008 R2 by default has Windows PowerShell 2.0 which does not support SharePoint office 365 object tools. We need to update the Windows PowerShell 2.0 to 3.0.

Below are the prerequisites and procedure to install/configure PowerShell 3.0.

2. Prerequisites:
2.1 Install PowerShell 3.0 on Windows server 2008 R2 / Windows 7:

We can check the current version of the PowerShell using the command ”$PSVersionTable” in Windows PowerShell.

clip_image002

2.2 Install the .NET Framework 4.0 :

ü Windows PowerShell 3.0 requires .NET Framework 4.0. The easiest way to find the Windows PowerShell 3.0 download package is to access it directly from the Microsoft TechNet Script Center.

clip_image004

ü Go to the Windows PowerShell 3.0 download pages. The download page is shown as below:

clip_image006

ü Determining which version of the package to download, and also need to know version of computer we have (for example, is it 64-bit or x86). Get this information from Windows PowerShell. The command used is:

PS C:\Users\administrator> $env:PROCESSOR_ARCHITECTURE

x86

ü The available packages and the applicable operating system are listed here:

Windows 7 Service Pack 1:

· 64-bit versions: Windows6.1-KB2506143-x64.msu

· 32-bit versions: Windows6.1-KB2506143-x86.msu

Windows Server 2008 R2 SP1:

· 64-bit versions: Windows6.1-KB2506143-x64.msu

Windows Server 2008 Service Pack 2:

· 64-bit versions: Windows6.0-KB2506146-x64.msu

· 32-bit versions: Windows6.0-KB2506146-x86.msu

ü Download and install the package.

clip_image008

Note:   Make sure you have Windows PowerShell closed prior to performing the actual installation.

clip_image010

ü When the installation completes, it requests a reboot. Following the reboot, Windows does a bit of configuration that will take a couple of minutes. The following screen displays during the configuration.

clip_image012

ü Open the Windows PowerShell console and type $psversiontable. The following data returns:

clip_image014

ü Check out the new version of the Windows PowerShell ISE. The new Command Add-On, the single Windows PowerShell console pane, the Click to run feature. This is shown here:

clip_image016

3. SharePoint Online Management shell :

SharePoint Online Management Shell is a Windows PowerShell module that you can use to efficiently manage SharePoint Online users, sites, site collections, and organizations. Command-line operations in Windows PowerShell are composed of cmdlets. A cmdlet, pronounced "command-let," is a verb-noun pair that is always separated by a hyphen (-) without spaces Install the SharePoint Online Management Shell from the Microsoft Download Center.

· Install the SharePoint Online Management Shell from the Microsoft Download Center.

clip_image018

clip_image020

· Select the 64-bit version of the package, permit pop-ups, and say it can run with Admin rights. I am presented with the following:

clip_image022

· After I accept the license agreement and click Install, the installation runs to completion.

clip_image024

· Open the Windows PowerShell console with Admin rights, and once again I use the Get-Module –ListAvailable command.

Get-Module -ListAvailable *Online.SharePoint*

clip_image026

Import-Module 'C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell'

· Press ENTER and import the module, if the following warning message apears, which states that the module contains some unapproved verbs. This means it needs to look for other than the standard Get and Set types of verbs, but the module should work anyway.

clip_image029

4. Connect to the SharePoint Online service:

To connect the SharePoint Online Service, Use the Connect-SPOService cmdlet. The command is a bit complex, and if we are going to do this on a daily basis, it would be better to write a function to include in my profile. More about that in a minute, but for now, here is the Connect-SPOService command:

Connect-SPOService -Url <<SharePoint Online Admin Center URL>> -Credential (Import-Clixml C:\fso\cred.xml)

Note Keep in mind that credentials are stored in a Cred.xml file.

After we type this command, we are connected to the SharePoint Online site.

Function is shown here:

Connect-SharePointOnline

Function Connect-SharePointOnline

{

$cred = Import-Clixml C:\fso\cred.xml

Import-Module 'C:\Program Files\SharePoint Online Management Shell\Microsoft.Online.SharePoint.PowerShell' -DisableNameChecking

Connect-SPOService -Url https://ScriptingGuy-Admin.SharePoint.Com -Credential $cred

}

Thursday, August 7, 2014

About Publishing Points in Windows Media Services (WMS)

A client (browser / web applications) connecting to a Windows Media server must use the server and publishing point names as part of the address. If no publishing point name is given, the Windows Media server will direct the request to the default publishing point.
3
Windows Media Services provides two methods for adding a publishing point: the Add Publishing Point Wizard and the Add Publishing Point (Advanced) dialog box.
We can use either Wizard or Advanced as per our need. On choosing the Wizard type, it will ask for each settings and add the publishing point in to WMS.
Following are the information we need provide while creating any Publishing Point:
  1. Name
  2. Content Type
    1. Encoder – For live streaming of videos in client applications on demand
    2. Playlist – Similar to our Media player playlist file
    3. Single File streaming (.wma, .wmv, .asf)
    4. Directory Files – Mostly useful for e-Learning videos etc.,
  3. Publishing Point type
    1. Broadcast
    2. On demand – Commonly used type
    3. 2
  4. Video Files Location – Click “Browse” and select the Directory where the video files are located (Just a file location…)
  5. Allowing Playback options for end users
    1. Loop – For On Demand play back
    2. Shuffle – For random order of playing files without replay
  6. Logging
  7. Completing (Most Important)
    1. Before clicking Finish button, ensure the “Add announcement” checkbox is selected in last page of the wizard.
1
After the wizard finishes, create an announcement using the wizard which automatically pops out. This will provide option to create 2 files (.asx & .htm). Remember to select both the checkboxes in this step. On completing this wizard, you will get an window to test the video streaming and test the html file from browsers.
Edit the test.html file in notepad, you can get the code for embedding the video object into your file. Just copy this and use inside your required web pages.
I will continue how to troubleshoot the media service issues on my next post.
Cheers !!

Wednesday, August 6, 2014

SAP Buddy Walk-In Drive-9th August 2014


Saturday, August 2, 2014

Yammer Quick Look

Friday, August 1, 2014

Buddy Referral - Oracle DBA - Immediate Opening


Email me your resume for referral

Opening for EBiz Consultants - Oracle BU


Email me your resume for referral
velmurugan.shunmugasundaram@lntinfotech.com

Opening for Hyperion Essbass Consultants - Oracle BU


Are you "Hyperion Essbass Consultants - Oracle", Drop your CV to me for immediate opening.

--
Velmurugan S