Turn off e-mail notifications for SharePoint 2013 newsfeed

I was looking for a way to turn off all e-mail notifications for SharePoint 2013 newsfeed and found a script to do it but had to calculate the final number which is 126 if you want to turn them all off.

So here it is the script and the number for it:

credit to http://sharepointannoyances.wordpress.com/2013/11/

# Run with account that has permission for
# spshelladmin
# AND
# Full control on User Profile Service
#http://blog.sharepointclick.com/2013/04/userprofileapplicationnotavailableexcep.html

add-pssnapin microsoft.sharepoint.powershell
[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”)
[System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.Office.Server.UserProfiles”)

$site = get-spsite -Identity http://c4968397007:3695 #central Admin, can be other sites

#Get Context
$serviceContext = Get-SPServiceContext($site)

#Instantiate User Profile Manager
$userProfileConfigManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext);

#Get All User Profiles
$profiles = $userProfileConfigManager.GetEnumerator();

#Loop through all user profiles and display account name
foreach($profile in $profiles)
{
$profile.get_Item(“AccountName”);
$profile["SPS-Emailoptin"].value = 126;
$profile.Commit();
}

Install SharePoint 2013 on Windows Azure VMs

So, you got SharePoint 2013 and you need some servers to install it on? Why not try Windows Azure VMs?

I followed the same process I had followed before to install SharePoint 2010 on Windows Azure VMs, and lo and behold, it also works for SharePoint 2013 – just make sure not to skimp on the RAM.
Here’s my first SharePoint 2013 screenshot: http://twitpic.com/a8npcy

I used one Medium VM for the DB Server (SQL Server 2012) and one Large VM for the SharePoint 2013 server. That’s 3.5GB + 7GB of RAM. And honestly I feel it wasn’t quite enough because the whole thing felt usable but a little bit slow (Microsoft is recommending 12GB for the SharePoint box when the SQL Server is in a separate box, 24GB if you use the same machine for SharePoint+SQL).

You can follow the tutorials on how to create the machines and install the software here: (just use SharePoint 2013 on Windows Server 2008 R2 instead of SharePoint 2010)  http://blogs.msdn.com/b/hanuk/archive/2012/06/21/setup-sharepoint-farm-on-windows-azure-virtual-machines.aspx

A few notes:

There are no fixed IP addresses yet on Windows Azure VMs and that can make you go “uh?” when you think about promoting the SharePoint machine to Domain Controller. After all, you will need to setup DNS on the SQL box to point to the Domain Controller. Don’t worry, the IP addresses may be dynamic, but honestly they don’t seem to change.

You may get a “The virtual machine cannot restart. The current virtual machine state is RoleStateUnknown.” error if you shutdown one of the machines to change some settings. If you do, just delete the machine and create a new one based on the one you just deleted:
http://social.msdn.microsoft.com/Forums/en-US/WAVirtualMachinesforWindows/thread/5b7063d7-51b4-4258-bff5-2269dd385f85

On Windows Azure VMs when you “delete” a VM you don’t actually delete it, it just goes into the machine templates list, so when you create a machine the deleted one just shows up as a template.

When you shutdown a VM, it is still consuming “computing hours”, so to avoid this go ahead and delete the VM, and later create a new one – as stated above, the deleted machine will show up in the template list.

Using AutoSPInstaller with Language Packs

AutoSPInstaller is a very neat utility that allows you to automate the SharePoint 2010 installation process, creates clean names for the databases, and allows you much better control on what gets done than the Farm Configuration Wizard.

However there are some bugs when you try to use AutoSPInstaller with SharePoint Language Packs. I personally got these:

http://autospinstaller.codeplex.com/discussions/262342

http://autospinstaller.codeplex.com/discussions/262160

If you’re going the AutoSPInstaller route do yourself a favor and leave the Language Packs out of the equation, and just install them after the whole AutoSPInstaller thing is done.

Update: A few hours after I published this post Brian Lalancette, the author of AutoSPInstaller, was kind enough to point me to some updates that were pushed to CodePlex today (July 6th 2012):
http://autospinstaller.codeplex.com/SourceControl/changeset/changes/92525

Personalizar uma intranet através do Managed Metadata

Repost de um artigo que escrevi para o site da Comunidade Portuguesa de SharePoint a 17 Janeiro 2011

Personalizar uma intranet através do Managed Metadata 

Num projecto recente para a criação de uma intranet para uma empresa nacional que opera em várias localizações geográficas fui confrontado com um desafio: Apresentar, sempre que possível, a informação relevante ao utilizador e minimizar o número de locais diferentes a visitar para obter informação relevante.

 

Sendo este um projecto a desenvolver sobre SharePoint 2010, e tendo a equipa já alguns meses de experiência com esta versão, decidimos recorrer ao Managed Metada e “casá-lo” com o User Profile como forma de personalizar a informação.

Eis os pontos-chave desta ideia:

1. Escolher campos-chave do User Profile (Localização, Departamento, Grupo, entre outros)

2. Criar uma hierarquia de termos no Managed Metadata com os nomes dos campos-chave seleccionados contendo todos os termos possíveis (todas as Localizações, todos os Departamentos, etc…)

3. Determinar, na Arquitectura de Informação do projecto, quais as listas e document libraries onde utilizar colunas do tipo Managed Metadata mapeadas para a hierarquia referida acima

4. Criar webparts para filtrar estas listas e document libraries de acordo com as user profile properties do utilizador que está “logged in”

Esta solução permitiu-nos criar, por exemplo, listas de notícias personalizadas para cada utilizador (as notícias do Meu Departamento, as notícias da Minha Localização…), ou resultados de pesquisa com “afinadores” que permitem filtrar todos os resultados por propriedades que o utilizador já conhece e sabe utilizar.

Sendo o Managed Metadata um ponto “central” de definição e armazenamento de meta-informação sabemos que podemos fazer crescer a intranet sempre com este ponto de apoio, seja na criação de listas, seja na utilização de “Tags & Notes” que permite a qualquer colaborador da empresa classificar qualquer tipo de conteúdo de acordo com aquilo que são, na prática, propriedades de perfil do utilizador.

http://www.sharepointpt.org/archive/2011/01/17/personalizar-uma-intranet-atrav%C3%A9s-do-managed-metadata.aspx

 

Errors in FIMSynchronizationService – SharePoint 2010

If you’re getting an error in the Event Viewer of the App Server doing the User Profile Synchronization that is similar to the one bellow, you may need to do a Full Profile Synchronization.

And while you’re troubleshooting User Profile Synchronization don’t forget to use SharePoint’s built in FIM tool:
“C:\Program Files\Microsoft Office Servers\14.0\Synchronization Service\UIShell\miisclient.exe”
The error you might see in Event Viewer (replaced actual user and domain values by XXs):

The server encountered an unexpected error in the synchronization engine:

“ERR: MMS(2888): tower.cpp(578): DN mismatch: row (DN=CN=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,DC=XXXXXXXXXX,DC=XXXXXXXXXX), tower(old DN=CN=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,DC=XXXXXXXXXX,DC=XXXXXXXXXX)
BAIL: MMS(2888): tower.cpp(579): 0x8023031c (The tower has a distinguished name that is different from that of the store.)
BAIL: MMS(2888): tower.cpp(322): 0x8023031c (The tower has a distinguished name that is different from that of the store.)
Loading CS object with DN=’CN=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,DC=XXXXXXXXXX,DC=XXXXXXXXXX’, modt=’MODT_ATTRIB_UPDATE’ (0x3)
*Hologram:
<entry dn=”CN=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,DC=XXXXXXXXXX,DC=XXXXXXXXXX”>
<anchor encoding=”base64″>Gk9DoAH/qUWNNAoxKVWPxQ==</anchor>
<parent-anchor encoding=”base64″>loW6LYMAS0+WeMRPZmoFBA==</parent-anchor>
<primary-objectclass>user</primary-objectclass>
<objectclass>
<oc-value>top</oc-value>
<oc-value>person</oc-value>
<oc-value>organizationalPerson</oc-value>
<oc-value>user</oc-value>
</objectclass>

(…)

BAIL: MMS(2888): tower.cpp(123): 0x8023031c (The tower has a distinguished name that is different from that of the store.)
BAIL: MMS(2888): csobj.cpp(7040): 0x8023031c (The tower has a distinguished name that is different from that of the store.)
WARNING: MMS(2888): csobj.cpp(21990): Recover tower without deltas: CN=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,DC=XXXXXXXXXX,DC=XXXXXXXXXX
ERR: MMS(2888): mafilter.cpp(152): Filter: conflicting container incl/excl (OU=FIM,DC=XXXXXXXXXX,DC=XXXXXXXXXX,DC=XXXXXXXXXX)
WARNING: MMS(2888): syncstage.cpp(826): Fixing corrupted object for MA”XXXXXXXXXX” with change “obsolete”: CN=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,OU=XXXXXXXXXX,DC=XXXXXXXXXX,DC=XXXXXXXXXX