Powershell : Modification du SMTP SharePoint 2013

# Adresse du serveur SMTP$smptServer = 'smtp.server.com'# Adresse mail d envoi$fromAddr = 'noreply@mydomaine.com'# Adresse mail de réponse$replyAddr = 'noreply@mydomaine.com'#Ne rien modifier à partir de cette ligne#serveurs smtpAdd-PSSnapin Microsoft.SharePoint.PowerShell$SMTPSvr = $smptServer$FromAddr = $fromAddr$ReplyAddr = $replyAddr$Charset = 65001

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 GetAllUserGroups(SPUser user){    List groups = new List();    //Get groups from SharePoint    foreach (SPGroup spGroup in user.Groups)    … Continue reading SharePoint 2010 / 2013 Get all groups for SPUser including active directory group

Modify Site Collection URL SharePoint 2010

In order to rename a Site collection in SharePoint 2010 you need to backup the site first and restore it on an new Site collection.To do that you can use the following PowerShell :Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue    #Get the Source Site Collection URL $sourceURL = Read-Host “Enter the Source Site Collection URL:”   #Get the Target … Continue reading Modify Site Collection URL SharePoint 2010

Sort DataTable DataView ascending with null or empty last.

You first need to specify the sorting column in 'param' and replace the original DataTable by 'collection'.In this example I filter a DataTable with the SelectedValue given by my DropDownList control (ddlFiltre).In the DataRow array 'nameNotNull' I simply simply the data that are not null for my parameter and sort them.And in the DataRow array … Continue reading Sort DataTable DataView ascending with null or empty last.

Modifier les pages SharePoint par défaut. (AccessDenied.aspx, Confirmation.aspx, Error.aspx, Login.aspx, RequestAccess.aspx, Signout.aspx, WebDeleted.aspx)

Il est possible d'avoir de modifier l'url des pages suivantes et de les surcharger pour intégrer le design de l'entreprise : AccessDenied (Specifies AccessDenied.aspx) Confirmation (Specifies Confirmation.aspx) Error (Specifies Error.aspx) Login (Specifies Login.aspx) RequestAccess (Specifies ReqAcc.aspx) Signout (Specifies SignOut.aspx) WebDeleted (Specifies WebDeleted.aspx)Avec les classes correspondantes se trouvant dans le namespace : Microsoft.SharePoint.ApplicationPagesIl est aussi nécéssaire de modifier la masterpage de votre page d'application par :MasterPageFile="~/_layouts/simple.master"Et d'hériter la classe correspondante UnsecuredLayoutsPageBase pour … Continue reading Modifier les pages SharePoint par défaut. (AccessDenied.aspx, Confirmation.aspx, Error.aspx, Login.aspx, RequestAccess.aspx, Signout.aspx, WebDeleted.aspx)