Accéder au contenu principal

Articles

Affichage des articles du septembre, 2013

SharePoint 2013 : Ajouter un alias pour SQL Server via PowerShell

  Voici une fonction PowerShell, basée sur un script posté par ZACHARY MILLIS sur son Blog : Create a SQL Alias with a PowerShell Script Il a été amélioré pour ajouter les exceptions via gestion d’erreur, et les mises à jour. Function AddSQLServerAlias {     # SQL Server client alias Based on this message     # From Zach's post:  http://habaneroconsulting.com/Insights/Create-a-SQL-Alias-with-a-PowerShell-Script.aspx          Try     {         [string]$AliasName = "SQLServerForSharePoint"         [string]$ServerName =  "MySQLServerFullQulifiedName"  #$env:computername         #These are the two Registry locations for the SQL Alias locations         [string]$x86 = "HKLM:\Software\Microsoft\MSSQLServer\Client\ConnectTo"      ...

SharePoint 2013 : Fonction PowerShell pour créer une ferme SharePoint

  Dans la   liste des fonctions utilisables dans vos scripts   de configuration de ferme SharePoint, voici celle qui permet de créer la ferme en faisant les étapes suivantes : Création de la base de données de configuration avec les paramètres personnels Demande du compte de service avec une boite d’authentification (pas de password de service dans le fichier) Création de la Centrale Administration selon les paramètres personnels Activation des fonctionnalités additionnelles [string]$AliasName = "MySQLServerAlias" [string]$configPassphrase = "MySharePointPassPhrase!" $s_configPassphrase = (ConvertTo-SecureString -String $configPassphrase -AsPlainText -force) [string]$dbConfig = "My_SP2013_ConfigDB" [string]$dbCentralAdmin = "My_SP2013_CentralAdmin_ContentDB" [integer]$caPort = 2013 [string]$caAuthProvider = "NTLM" Function CreateSPFarmDBAndCentralAdmin {     Try     {         ################################...

SharePoint 2013 : Fonction PowerShell pour configurer l’envoi de message via SMTP (Outgoing Email)

  Dans la   liste des fonctions utilisables dans vos scripts   de configuration de ferme SharePoint, voici une nouvelle fonction pour configurer SharePoint afin d’utiliser le serveur de messagerie SMTP : [string]$SMTPServer = "MySMTP-Server.com" [string]$emailAddress = "EmailAddress@myCompany.com" [string]$replyToEmail = "EmailAddress@myCompany.com" Function ConfigureOutgoingEmail {     Try     {         Write-Host -ForegroundColor White " - Configuring Outgoing Email..."         $loadasm = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")         $spGlobalAdmin = New-Object Microsoft.SharePoint.Administration.SPGlobalAdmin         $spGlobalAdmin.UpdateMailSettings($SMTPServer, $emailAddress, $replyToEmail, 65001)      }     catch  [system.ex...

SharePoint 2013 : Fonction PowerShell pour ajouter une source de contenu au moteur de recherche

  Basé sur différents scripts disponibles sur Internet, dont : SharePoint 2013 - Configure Content Source and Search Result Source using Powershell Ce script fonctionne sur SharePoint Server et SharePoint Foundation 2013 (validé sur la plateforme Foundation) : Function AddSearchLocalContentSource {     Try     {         [string]$serviceAppName = "Search Service Application" #Give the Search App Name         [string]$ContentSourceName = "Another Search Content"         [string]$ContentSiteurl = “ http://mynewcontentURL ”         [string]$ContentSourceType = "SharePoint" #specify the Type (Web, File, ….)         Write-Host "Add the new content source : $ContentSourceName - $ContentSiteurl"         $SearchServiceApplication = Get-SPEnterpriseSearchS...