vendredi 13 décembre 2013

SharePoint 2010 / 2013 Get all groups for SPUser including active directory group

SharePoint don't give you groups for SPUser if the right is given by an active directory group.

You have to merge groups specificied directly using user login in sharepoint groups and active directory groups.


private static List<SPGroup> GetAllUserGroups(SPUser user)
{
    List<SPGroup> groups = new List<SPGroup>();
    //Get groups from SharePoint
    foreach (SPGroup spGroup in user.Groups)
    {
        groups.Add(spGroup);
    }
    string userLogin = user.LoginName;

mercredi 10 juillet 2013

SharePoint 2013 , change branding text content

Purpose

You can easily change the SharePoint branding text that appear in the left corner of you site thanks to this powershell code

PowerShell Snippet

Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
$webApp = Get-SPWebApplication http://serveurSP
$webApp.SuiteBarBrandingElementHtml = "Larry's Microsoft Technologies Blog"
$webApp.Update()


 Following this example you can also change the background color using CSS :
/* Modification couleur de la barre d'application */
/*Modification de la couleur du texte de la barre d'application */
#suiteBarLeft
{
background-color: rgb(229,226,221);
color: rgb(0,0,0);
font-weight:bold;
padding-left:5px;
}
This is the final result with suite bar color modification and brand text changing.


 

lundi 17 juin 2013

See all MSDN articles with Silverlight Pivot Viewer control

Affichage des articles MSDN sous forme d'un contrôle Pivot Viewer


Voici une petite page bien sympathique pour retrouver les articles MSDN, j'attire plus particulièrement votre attention sur la recherche (textbox en haut à gauche) qui est très pratique surtout pour rechercher les commandes powershell.

http://www.microsoft.com/resources/Technet/en-us/Office/media/ITProPivotViewer/