SharePoint MySite – PowerShell script to get the “Activities I am following” preferences

So i was asked to collect the preferences of “Activities I am following” (image below) f

M.G.R and his songs

What is that makes every human, think he is waking up on the wrong side of the ‘luck’ co

Audrey Hepburn – Unending Love

After watching “Roman Holiday“, i was already adoring the princess yearning for a lass l

 

SharePoint MySite – PowerShell script to get the “Activities I am following” preferences

March 28, 2012 in SharePoint

So i was asked to collect the preferences of “Activities I am following” (image below) for all the users of our SP2010 My Site.

The resources on web for this being  surprisingly limited , i was left with no other option but to turn to my cup of coffee  for solution . The coffees helped, the following script lists out the status of options available under “Activities i am following ” of My Site Edit Profile page in SharePoint 2010 , for each user.

$mySiteURL = "https://xxxx"
$site = Get-SPSite $mySiteURL
$context = Get-SPServiceContext $site;
$upm = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context);

$val = "Username,ActivityName,Value"
Add-content -path "d:\activity_preference.txt" -value $val

foreach ($profileupm in $upm.GetEnumerator())
{
$myprofile = $profileupm;
$usrprofile = $profileupm;

$am = New-Object Microsoft.Office.Server.ActivityFeed.ActivityManager($myprofile,
 $context)
$type = $am.GetType()

$methodInfo = $type.GetMethod("CopyBasicUserInfo",
 [reflection.bindingflags]"nonpublic,instance",
 $null, $usrprofile.GetType(), $null)

$methodInfo.Invoke($am, $usrprofile)

$preftype = $am.ActivityPreferences.GetActivityPreferencesPerType();

foreach($pr in $preftype)
{
foreach($a in $am.ActivityTypes)
{
if ($pr.ActivityType -eq $a)
{
$val = $usrprofile["AccountName"].ToString() +
 "," + $a.ActivityTypeName.ToString() +
 "," + $pr.IsSet.ToString()

 Add-content -path "d:\activity_preference.txt" -value $val
} }  } }

M.G.R and his songs

July 12, 2011 in Art

What is that makes every human, think he is waking up on the wrong side of the ‘luck’ couch. Well as Woody allen says ‘Life is full of misery loneliness and sorrow, and its allover quite too soon’ . That holds true . We need sorrow to cherish the happiness.

Blue is the color my friends,the yellow sunshine should last for a glimpsing moment and so it does. And if you do have that moment, relish in it, for it lasts then and then only .

Very few personalities can give us those moments to relish, M.G.Ramachandran former chief minsiter of Tamil Nadu ( most urbanised state in India) being one such personality.

No kidding, but whenever i used to be hearing classic tamil songs on TV my mom used to make me hear to his songs. I developed a taste to his songs from her. Today i do realize why his songs transcend generations, its bcoz it quenches the thirst amongst all of us to have the moment of hope and fullfillment .His songs do give us those moments to relish. I call the songs MGR acted in as his songs, because its a well know factor that MGR took extra care in the lyrics department which is out of bounds for the actor. However MGR understood the importance .

here are some of my fav MGR songs …

Enna than nadakum

Audrey Hepburn – Unending Love

May 31, 2011 in Art

After watching “Roman Holiday“, i was already adoring the princess yearning for a lass life. By the time i was watching “My fair lady” , and saw the lass perfecting , “The rain in Spain”, i was envying Professor Higgins.

I, like the million others around the world, consider Audrey to be celestial.

Audrey Hepburn .

Audrey Hepburn

Audrey Hepburn

The Indian connection

At Audrey’ funeral , Gregory Peck went on camera and tearfully recited her favourite poem, “Unending Love” by Rabindranath Tagore:

I seem to have loved you in numberless forms, numberless times…
In life after life, in age after age, forever.
My spellbound heart has made and remade the necklace of songs,
That you take as a gift, wear round your neck in your many forms,
In life after life, in age after age, forever.

Whenever I hear old chronicles of love, it’s age-old pain,
It’s ancient tale of being apart or together.
As I stare on and on into the past, in the end you emerge,
Clad in the light of a pole-star piercing the darkness of time:
You become an image of what is remembered forever.

You and I have floated here on the stream that brings from the fount.
At the heart of time, love of one for another.
We have played along side millions of lovers, shared in the same
Shy sweetness of meeting, the same distressful tears of farewell-
Old love but in shapes that renew and renew forever.

Today it is heaped at your feet, it has found its end in you
The love of all man’s days both past and forever:
Universal joy, universal sorrow, universal life.
The memories of all loves merging with this one love of ours –
And the songs of every poet past and forever.

Something simple & primevial ..

April 17, 2011 in About Godwin

There is in every man, deep down in his nature, something simple and primevial. In my case i am the prince of the legion that is prisoner to being captivated by life.

All my life i have cherished the sublime aspects of it, like certain pictures of landscape, of which i have caught a glimpse in my travels, as broken hints of beauty that are embellished forever in my mind.

For in my realm of senses, i have been captivated constantly. Albeit must admit neither by one single thing nor indefinitely by multiple things (Audrey Hepburn being the only exception).

The vicious wheel of captivity within me comes into being, flourishes, withers and descends to an unlamented grave only to be later revived , acclaimed and again rejected by me. Its like the ultimate truth of life “Nothing lives continuously, but nothing wholly die”

Welcome

January 29, 2011 in Uncategorized

Welcome to Godwin Paul’s Site. This is my first post in WordPress, after my brief outing with Joomla ended this week.

As you know by now, the site is under development , rather migration ! ?

This site is protected by Comment SPAM Wiper.