none
Erreur script installation SharePoint Server 2010 RRS feed

  • Question

  • Bonjour à tous,

    Je me permets de vous joindre car j'ai besoin d'aide j'essaie d'automatiser l'installation d'une ferme d'installation avec du SharePoint Server 2010 et quand je lance le script, j'ai une plusieurs erreurs qui apparaissent j'ai vraiment besoin d'aide. Le script est écrit en PowerShell

     Cordialement,

    lundi 16 juillet 2012 14:10

Réponses

  • Bonjour,

    J'ai trouvé l'erreur, enfaite c'est les "Get-SPServiceInstance" qui déconne.. il faut toute les mettre en commentaire, et retirer la section ##search

    ## end search:

    Voici le code qui FONCTIONNE:

    Il faut juste changer le nom de la base de donné + le compte de service

    Oubliez pas de SUPPRIMER tous vos service, afin d'eviter les erreurs..

    ################################################################################
    ## This script replicates most of the functionality found in the SharePoint Products Configuration Wizard##
    ################################################################################
     
     
    Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
     
    ## Settings you may want to change ##
    $databaseServerName = "gokmaniasrv-sql\MSSQLSP2010"
    #$searchServerName = $databaseServerName
    $saAppPoolName = "SharePoint Web Services"
    $appPoolUserName = "gokmania\spfarm"
     
     
    ## Service Application Service Names ##
    $accesssSAName = "Access Services"
    $bcsSAName = "Business Data Connectivity Service"
    $excelSAName = "Excel Services Application"
    $metadataSAName = "Managed Metadata Web Service"
    $performancePointSAName = "PerformancePoint Service"
    $searchSAName = "SharePoint Server Search"
    $stateSAName = "State Service"
    $secureStoreSAName = "Secure Store Service"
    $usageSAName = "Usage and Health Data Collection Service"
    $userProfileSAName = "User Profile Synchronization Service"
    $visioSAName = "Visio Graphics Service"
    $WebAnalyticsSAName = "Web Analytics Service"
    $WordAutomationSAName = "Word Automation Services"
     
     
     
    $saAppPool = Get-SPServiceApplicationPool -Identity $saAppPoolName -EA 0
    if($saAppPool -eq $null)
    {
      Write-Host "Creating Service Application Pool..."
     
      $appPoolAccount = Get-SPManagedAccount -Identity $appPoolUserName -EA 0
      if($appPoolAccount -eq $null)
      {
          Write-Host "Please supply the password for the Service Account..."
          $appPoolCred = Get-Credential $appPoolUserName
          $appPoolAccount = New-SPManagedAccount -Credential $appPoolCred -EA 0
      }
     
      $appPoolAccount = Get-SPManagedAccount -Identity $appPoolUserName -EA 0
     
      if($appPoolAccount -eq $null)
      {
        Write-Host "Cannot create or find the managed account $appPoolUserName, please ensure the account exists."
        Exit -1
      }
     
      New-SPServiceApplicationPool -Name $saAppPoolName -Account $appPoolAccount -EA 0 > $null
         
    }
     
     
     
     
    Write-Host "Creating Usage Service and Proxy..."
    $serviceInstance = Get-SPUsageService
    New-SPUsageApplication -Name $usageSAName -DatabaseServer $databaseServerName -DatabaseName "UsageDB" -UsageService $serviceInstance > $null
     
     
     
     
    Write-Host "Creating Access Services and Proxy..."
    New-SPAccessServiceApplication -Name $accesssSAName -ApplicationPool $saAppPoolName > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Access Database Service"} | Start-SPServiceInstance > $null
     
     
     
     
    Write-Host "Creating BCS Service and Proxy..."
    New-SPBusinessDataCatalogServiceApplication -Name $bcsSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName "BusinessDataCatalogDB" > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Business Data Connectivity Service"} | Start-SPServiceInstance > $null
     
     
     
     
    Write-Host "Creating Excel Service..."
    New-SPExcelServiceApplication -name $excelSAName –ApplicationPool $saAppPoolName > $null
    Set-SPExcelFileLocation -Identity "http://" -ExcelServiceApplication $excelSAName -ExternalDataAllowed 2 -WorkbookSizeMax 10 -WarnOnDataRefresh:$true
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Excel Calculation Services"} | Start-SPServiceInstance > $null
     
     
     
     
    Write-Host "Creating Metadata Service and Proxy..."
    New-SPMetadataServiceApplication -Name $metadataSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName "MetadataDB" > $null
    New-SPMetadataServiceApplicationProxy -Name "$metadataSAName Proxy" -DefaultProxyGroup -ServiceApplication $metadataSAName > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Managed Metadata Web Service"} | Start-SPServiceInstance > $null
     
     
     
     
    Write-Host "Creating Performance Point Service and Proxy..."
    New-SPPerformancePointServiceApplication -Name $performancePointSAName -ApplicationPool $saAppPoolName > $null
    New-SPPerformancePointServiceApplicationProxy -Default -Name "$performancePointSAName Proxy" -ServiceApplication $performancePointSAName > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "PerformancePoint Service"} | Start-SPServiceInstance > $null
     
     
     
    Write-Host "Creating State Service and Proxy..."
    New-SPStateServiceDatabase -Name "StateServiceDB" -DatabaseServer $databaseServerName | New-SPStateServiceApplication -Name $stateSAName | New-SPStateServiceApplicationProxy -Name "$stateSAName Proxy" -DefaultProxyGroup > $null
     
     
     
     
    Write-Host "Creating Secure Store Service and Proxy..."
    New-SPSecureStoreServiceapplication -Name $secureStoreSAName -Sharing:$false -DatabaseServer $databaseServerName -DatabaseName "SecureStoreServiceAppDB" -ApplicationPool $saAppPoolName -auditingEnabled:$true -auditlogmaxsize 30 | New-SPSecureStoreServiceApplicationProxy -name "$secureStoreSAName Proxy" -DefaultProxygroup > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Secure Store Service"} | Start-SPServiceInstance > $null
     
     
     
     
    Write-Host "Creating User Profile Service and Proxy..."
    $userProfileService = New-SPProfileServiceApplication -Name $userProfileSAName -ApplicationPool $saAppPoolName -ProfileDBServer $databaseServerName -ProfileDBName "ProfileDB" -SocialDBServer $databaseServerName -SocialDBName "SocialDB" -ProfileSyncDBServer $databaseServerName -ProfileSyncDBName "SyncDB"
    New-SPProfileServiceApplicationProxy -Name "$userProfileSAName Proxy" -ServiceApplication $userProfileService -DefaultProxyGroup > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "User Profile Service"} | Start-SPServiceInstance > $null
     
     
     
     
    Write-Host "Creating Visio Graphics Service and Proxy..."
    New-SPVisioServiceApplication -Name $visioSAName -ApplicationPool $saAppPoolName > $null
    New-SPVisioServiceApplicationProxy -Name "$visioSAName Proxy" -ServiceApplication $visioSAName > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Visio Graphics Service"} | Start-SPServiceInstance > $null
     
     
     
     
    Write-Host "Creating Web Analytics Service and Proxy..."
    $stagerSubscription = "<StagingDatabases><StagingDatabase ServerName='$databaseServerName' DatabaseName='StagerDB'/></StagingDatabases>"
    $reportingSubscription = "<ReportingDatabases><ReportingDatabase ServerName='$databaseServerName' DatabaseName='WarehouseDB'/></ReportingDatabases>"
    New-SPWebAnalyticsServiceApplication -Name $WebAnalyticsSAName -ApplicationPool $saAppPoolName -ReportingDataRetention 20 -SamplingRate 100 -ListOfReportingDatabases $reportingSubscription -ListOfStagingDatabases $stagerSubscription > $null 
    New-SPWebAnalyticsServiceApplicationProxy -Name "$WebAnalyticsSAName Proxy" -ServiceApplication $WebAnalyticsSAName > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Web Analytics Web Service"} | Start-SPServiceInstance > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Web Analytics Data Processing Service"} | Start-SPServiceInstance > $null
     
     
     
    Write-Host "Creating Word Conversion Service and Proxy..."
    New-SPWordConversionServiceApplication -Name $WordAutomationSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName "WordAutomationDB" -Default > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Word Automation Services"} | Start-SPServiceInstance > $null


    My blog: SharePoint Pirate http://www.gokanozcifci.be
    Microsoft Certified Technology Specialist: SharePoint 2010, Configuring
    SharePoint Server 2010 Contributor on BTgonulluleri.com
    SharePoint Server 2010 Contributor on NothingButSharepoint.com
    SharePoint Server 2010 Contributor on SPCNL.NL
    SharePoint Server 2010 Contributor on MSHOWTO.org

    Linkedin Profile

    • Marqué comme réponse Martou26 lundi 23 juillet 2012 13:14
    lundi 23 juillet 2012 11:16

Toutes les réponses

  • Bonjour Martou 26,

    L'erreur que vous recevez est tout a fait normal. Car les services que vous créez existe deja..

    • Le service Access Services "existe deja"
    • Le service Excel Services "existe deja" 
    • Le service BDC Services "existe deja" 

    Supprimez ces services via l'administration central, et ré-esseyer votre script ..

    Courage,

    Gokan


    My blog: SharePoint Pirate http://www.gokanozcifci.be
    Microsoft Certified Technology Specialist: SharePoint 2010, Configuring
    SharePoint Server 2010 Contributor on BTgonulluleri.com
    SharePoint Server 2010 Contributor on NothingButSharepoint.com
    SharePoint Server 2010 Contributor on SPCNL.NL
    SharePoint Server 2010 Contributor on MSHOWTO.org

    Linkedin Profile

    lundi 16 juillet 2012 14:23
  • Merci pour la réponse Gokan, je vais faire la manip et je vous tiens informé.

    Cordialement,

    lundi 16 juillet 2012 14:30
  • Bonjour Gokan,

    Je me permets à nouveau de poster un nouveau message sur le blog car malgré le fait d'avoir supprimer les services:

    • Le service Access Services "existe deja"
    • Le service Excel Services "existe deja" 
    • Le service BDC Services "existe deja" 

    J'ai ré-essayer le script mais j'ai toujours des erreurs qui apparaissent même si certains services ont été créer par le script. J'ai pu prendre diffèrents captures lors de l'exécution du script ainsi que les sevices crées.

    Cordialement,

    ,

    mardi 17 juillet 2012 08:50
  • Bonjour Martou26,

    ah ceci est tout a fait une autre erreur. Vous n'avez plus l'erreur de "Service existant" .. Donc une bonne chose deja.

    Pour l'erreur 40 ( Usage Service and Proxy et Metadata ) regardez ceci: http://www.marieemmanuellehamon.fr/error-40-impossible-douvrir-une-connexion-a-sql-server/

     Assurez-vous aussi que le SQL Browser sur le serveur SQL soit bien lancé dans les services

    Merci,

    Gokan


    My blog: SharePoint Pirate http://www.gokanozcifci.be
    Microsoft Certified Technology Specialist: SharePoint 2010, Configuring
    SharePoint Server 2010 Contributor on BTgonulluleri.com
    SharePoint Server 2010 Contributor on NothingButSharepoint.com
    SharePoint Server 2010 Contributor on SPCNL.NL
    SharePoint Server 2010 Contributor on MSHOWTO.org

    Linkedin Profile

    mardi 17 juillet 2012 11:34
  • Bonjour,

    Attention dans votre script le nom de votre server de base de donnée est le même que votre serveur de recherche, pour moi il faut plutôt paramétrer comme ceci :

    ## Settings you may want to change ## 
    $databaseServerName = "Server Name"
    $searchServerName = "VOTRE SERVEUR"
    $saAppPoolName = "SharePoint Web Services"
    $appPoolUserName = "DOMAIN\SAAppPoolAccount"
      
    
    bon courage

    Thierry Buisson

    mercredi 18 juillet 2012 10:31
    Modérateur
  • Re-bonjour,

    Après avoir changer les paramètres:

    ## Settings you may want to change ##
    $databaseServerName
    = "SQLServer"
    $searchServerName
    = "SPServeur"
    $saAppPoolName
    = "SharePoint Web Services"
    $appPoolUserName
    = "DOMAIN\SAAppPoolAccount"

    J'ai toujours les mêmes erreurs au niveau du script lors que je l'exécute pour la création des différents services. On me parle d'instance introuvable sur mon serveur SharePoint.

    Merci pour vos réponses.

    mercredi 18 juillet 2012 11:21
  • Bonjour,

    Avant de créer les service d'applications, assurez-vous d'avoir AUCUN service configurer..

    Je vois dans le 2ième image qu'il y'a juste un problème et c'est que SearchServiceInstance n'est pas trouvé, etes vous sure de l'avoir bien écrit, existe t'il?

    Merci,

    Gokan


    My blog: SharePoint Pirate http://www.gokanozcifci.be
    Microsoft Certified Technology Specialist: SharePoint 2010, Configuring
    SharePoint Server 2010 Contributor on BTgonulluleri.com
    SharePoint Server 2010 Contributor on NothingButSharepoint.com
    SharePoint Server 2010 Contributor on SPCNL.NL
    SharePoint Server 2010 Contributor on MSHOWTO.org

    Linkedin Profile

    jeudi 19 juillet 2012 14:27
  • Bonjour Martou26,

    Avez-vous tester ce que je vous ai proposé?

    Au pir des cas, envoyer moi votre script et je verra si je peux le faire fonctionner chez moi..

    Merci,

    Gokan


    My blog: SharePoint Pirate http://www.gokanozcifci.be
    Microsoft Certified Technology Specialist: SharePoint 2010, Configuring
    SharePoint Server 2010 Contributor on BTgonulluleri.com
    SharePoint Server 2010 Contributor on NothingButSharepoint.com
    SharePoint Server 2010 Contributor on SPCNL.NL
    SharePoint Server 2010 Contributor on MSHOWTO.org

    Linkedin Profile

    lundi 23 juillet 2012 07:08
  • Bonjour Gokan,

    J'ai fait les tests que vous m'avait demandé de faire, j'arrive tout de même à créer plusieurs services mais pas tous. Je te prie de trouver le script joint à mon post.

    Cordialement,

    ################################################################################ 
    ## Ce script reprend la plupart des fonctionnalités présentes dans l'Assistant Configuration des produits SharePoint ## 
    ################################################################################ 
      
     # 		Author	: Martial Pouani
    #		Date	: 17 Juillet 2012 
    Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue 
      
    ## Settings you may want to change ## 
    $databaseServerName = "sqlserver.ati.local"
    $searchServerName = "spserveur.ati.local"
    $saAppPoolName = "SharePoint Web Services"
    $appPoolUserName = "ATI\SAAppPoolAccount"
      
      
    ## Noms des différents services d'applications de service ## 
    $accesssSAName = "Access Services"
    $bcsSAName = "Business Data Connectivity Service"
    $excelSAName = "Excel Services Application"
    $metadataSAName = "Managed Metadata Web Service"
    $performancePointSAName = "PerformancePoint Service"
    $searchSAName = "SharePoint Server Search"
    $stateSAName = "State Service"
    $secureStoreSAName = "Secure Store Service"
    $usageSAName = "Usage and Health Data Collection Service"
    $userProfileSAName = "User Profile Synchronization Service"
    $visioSAName = "Visio Graphics Service"
    $WebAnalyticsSAName = "Web Analytics Service"
    $WordAutomationSAName = "Word Automation Services"
      
      
      
    $saAppPool = Get-SPServiceApplicationPool -Identity $saAppPoolName -EA 0 
    if($saAppPool -eq $null) 
    { 
      Write-Host "Création d'un pool d'applications de service..."
      
      $appPoolAccount = Get-SPManagedAccount -Identity $appPoolUserName -EA 0 
      if($appPoolAccount -eq $null) 
      { 
          Write-Host "Veuillez fournir le mot de passe pour le compte de service..."
          $appPoolCred = Get-Credential $appPoolUserName
          $appPoolAccount = New-SPManagedAccount -Credential $appPoolCred -EA 0 
      } 
      
      $appPoolAccount = Get-SPManagedAccount -Identity $appPoolUserName -EA 0 
      
      if($appPoolAccount -eq $null) 
      { 
        Write-Host "Impossible de créer ou de trouver le compte géré $appPoolUserName, Veuillez vous assurer que le compte existe bien."
        Exit -1 
      } 
      
      New-SPServiceApplicationPool -Name $saAppPoolName -Account $appPoolAccount -EA 0 > $null
          
    } 
      
      
      
      
    Write-Host "Création du Service Usage Service eand Proxy..."
    $serviceInstance = Get-SPUsageService
    New-SPUsageApplication -Name $usageSAName -DatabaseServer $databaseServerName -DatabaseName "UsageDB" -UsageService $serviceInstance > $null
      
      
      
      
    Write-Host "Création du Service Access Services and Proxy..."
    New-SPAccessServiceApplication -Name $accesssSAName -ApplicationPool $saAppPoolName > $null
    Get-SPServiceInstance | where-object {$_.TypeName -eq "Access Database Service"} | Start-SPServiceInstance > $null
      
      
      
      
    Write-Host "Création du Service BCS Service and Proxy..."
    New-SPBusinessDataCatalogServiceApplication -Name $bcsSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName "BusinessDataCatalogDB" > $null
    Get-SPServiceInstance | where-object {$_.TypeName -eq "Business Data Connectivity Service"} | Start-SPServiceInstance > $null
      
      
      
      
    Write-Host "Création du service Excel Service..."
    New-SPExcelServiceApplication -name $excelSAName –ApplicationPool $saAppPoolName > $null
    Set-SPExcelFileLocation -Identity "http://" -ExcelServiceApplication $excelSAName -ExternalDataAllowed 2 -WorkbookSizeMax 10 -WarnOnDataRefresh:$true 
    Get-SPServiceInstance | where-object {$_.TypeName -eq "Excel Calculation Services"} | Start-SPServiceInstance > $null
      
      
      
      
    Write-Host "Création du Service de Metadonnées and Proxy..."
    New-SPMetadataServiceApplication -Name $metadataSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName "MetadataDB" > $null
    New-SPMetadataServiceApplicationProxy -Name "$metadataSAName Proxy" -DefaultProxyGroup -ServiceApplication $metadataSAName > $null
    Get-SPServiceInstance | where-object {$_.TypeName -eq "Managed Metadata Web Service"} | Start-SPServiceInstance > $null
      
      
      
      
    Write-Host "Création du Service Performance Point Service and Proxy..."
    New-SPPerformancePointServiceApplication -Name $performancePointSAName -ApplicationPool $saAppPoolName > $null
    New-SPPerformancePointServiceApplicationProxy -Default -Name "$performancePointSAName Proxy" -ServiceApplication $performancePointSAName > $null
    Get-SPServiceInstance | where-object {$_.TypeName -eq "PerformancePoint Service"} | Start-SPServiceInstance > $null
      
      
    ##START SEARCH 
      
    Write-Host "Création du Service de Recherche et Proxy..."
    Write-Host "  Starting Services..."
    Start-SPEnterpriseSearchServiceInstance $searchServerName
    Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $searchServerName
      
    Write-Host "  Création du Service de Recherche d'Application..."
    $searchApp = New-SPEnterpriseSearchServiceApplication -Name $searchSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName "SearchDB"
    $searchInstance = Get-SPEnterpriseSearchServiceInstance $searchServerName
      
    Write-Host "  Création du Service Administration Component..."
    $searchApp | Get-SPEnterpriseSearchAdministrationComponent | Set-SPEnterpriseSearchAdministrationComponent -SearchServiceInstance $searchInstance
      
      
    ##Crawl 
    Write-Host "  Création du Service Crawl Component..."
    $InitialCrawlTopology = $searchApp | Get-SPEnterpriseSearchCrawlTopology -Active
    $CrawlTopology = $searchApp | New-SPEnterpriseSearchCrawlTopology
    $CrawlDatabase = ([array]($searchApp | Get-SPEnterpriseSearchCrawlDatabase))[0] 
    $CrawlComponent = New-SPEnterpriseSearchCrawlComponent -CrawlTopology $CrawlTopology -CrawlDatabase $CrawlDatabase -SearchServiceInstance $searchInstance
    $CrawlTopology | Set-SPEnterpriseSearchCrawlTopology -Active
      
    Write-Host -ForegroundColor white "  Waiting for the old crawl topology to become inactive" -NoNewline
    do {write-host -NoNewline .;Start-Sleep 6;} while ($InitialCrawlTopology.State -ne "Inactive") 
    $InitialCrawlTopology | Remove-SPEnterpriseSearchCrawlTopology -Confirm:$false
    Write-Host
      
      
      
    ##Query 
    Write-Host "  Création du Service Query Component..."
    $InitialQueryTopology = $searchApp | Get-SPEnterpriseSearchQueryTopology -Active
    $QueryTopology = $searchApp | New-SPEnterpriseSearchQueryTopology -Partitions 1  
    $IndexPartition= (Get-SPEnterpriseSearchIndexPartition -QueryTopology $QueryTopology) 
    $QueryComponent = New-SPEnterpriseSearchQuerycomponent -QueryTopology $QueryTopology -IndexPartition $IndexPartition -SearchServiceInstance $searchInstance
    $PropertyDatabase = ([array]($searchApp | Get-SPEnterpriseSearchPropertyDatabase))[0]  
    $IndexPartition | Set-SPEnterpriseSearchIndexPartition -PropertyDatabase $PropertyDatabase
    $QueryTopology | Set-SPEnterpriseSearchQueryTopology -Active
      
      
    Write-Host "  Création du Proxy..."
    $searchAppProxy = New-SPEnterpriseSearchServiceApplicationProxy -Name "$searchSAName Proxy" -SearchApplication $searchSAName > $null
      
      
    #####END SEARCH 
      
      
    Write-Host "Création du Service State Service and Proxy..."
    New-SPStateServiceDatabase -Name "StateServiceDB" -DatabaseServer $databaseServerName | New-SPStateServiceApplication -Name $stateSAName | New-SPStateServiceApplicationProxy -Name "$stateSAName Proxy" -DefaultProxyGroup > $null
      
      
      
      
    Write-Host "Création du Service Secure Store Service and Proxy..."
    New-SPSecureStoreServiceapplication -Name $secureStoreSAName -Sharing:$false -DatabaseServer $databaseServerName -DatabaseName "SecureStoreServiceAppDB" -ApplicationPool $saAppPoolName -auditingEnabled:$true -auditlogmaxsize 30 | New-SPSecureStoreServiceApplicationProxy -name "$secureStoreSAName Proxy" -DefaultProxygroup > $null
    Get-SPServiceInstance | where-object {$_.TypeName -eq "Secure Store Service"} | Start-SPServiceInstance > $null
      
      
      
      
    Write-Host "Création du Service User Profile Service and Proxy..."
    $userProfileService = New-SPProfileServiceApplication -Name $userProfileSAName -ApplicationPool $saAppPoolName -ProfileDBServer $databaseServerName -ProfileDBName "ProfileDB" -SocialDBServer $databaseServerName -SocialDBName "SocialDB" -ProfileSyncDBServer $databaseServerName -ProfileSyncDBName "SyncDB"
    New-SPProfileServiceApplicationProxy -Name "$userProfileSAName Proxy" -ServiceApplication $userProfileService -DefaultProxyGroup > $null
    Get-SPServiceInstance | where-object {$_.TypeName -eq "User Profile Service"} | Start-SPServiceInstance > $null
      
      
      
      
    Write-Host "Création du Service Visio Graphics Service and Proxy..."
    New-SPVisioServiceApplication -Name $visioSAName -ApplicationPool $saAppPoolName > $null
    New-SPVisioServiceApplicationProxy -Name "$visioSAName Proxy" -ServiceApplication $visioSAName > $null
    Get-SPServiceInstance | where-object {$_.TypeName -eq "Visio Graphics Service"} | Start-SPServiceInstance > $null
      
      
      
      
    Write-Host "Création du Service Web Analytics Service and Proxy..."
    $stagerSubscription = "<StagingDatabases><StagingDatabase ServerName='$databaseServerName' DatabaseName='StagerDB'/></StagingDatabases>"
    $reportingSubscription = "<ReportingDatabases><ReportingDatabase ServerName='$databaseServerName' DatabaseName='WarehouseDB'/></ReportingDatabases>" 
    New-SPWebAnalyticsServiceApplication -Name $WebAnalyticsSAName -ApplicationPool $saAppPoolName -ReportingDataRetention 20 -SamplingRate 100 -ListOfReportingDatabases $reportingSubscription -ListOfStagingDatabases $stagerSubscription > $null  
    New-SPWebAnalyticsServiceApplicationProxy -Name "$WebAnalyticsSAName Proxy" -ServiceApplication $WebAnalyticsSAName > $null
    Get-SPServiceInstance | where-object {$_.TypeName -eq "Web Analytics Web Service"} | Start-SPServiceInstance > $null
    Get-SPServiceInstance | where-object {$_.TypeName -eq "Web Analytics Data Processing Service"} | Start-SPServiceInstance > $null
      
      
      
    Write-Host "Création du Service Word Conversion Service and Proxy..."
    New-SPWordConversionServiceApplication -Name $WordAutomationSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName "WordAutomationDB" -Default > $null
    Get-SPServiceInstance | where-object {$_.TypeName -eq "Word Automation Services"} | Start-SPServiceInstance > $null

    lundi 23 juillet 2012 07:56
  • Bonjour,

    J'ai trouvé l'erreur, enfaite c'est les "Get-SPServiceInstance" qui déconne.. il faut toute les mettre en commentaire, et retirer la section ##search

    ## end search:

    Voici le code qui FONCTIONNE:

    Il faut juste changer le nom de la base de donné + le compte de service

    Oubliez pas de SUPPRIMER tous vos service, afin d'eviter les erreurs..

    ################################################################################
    ## This script replicates most of the functionality found in the SharePoint Products Configuration Wizard##
    ################################################################################
     
     
    Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
     
    ## Settings you may want to change ##
    $databaseServerName = "gokmaniasrv-sql\MSSQLSP2010"
    #$searchServerName = $databaseServerName
    $saAppPoolName = "SharePoint Web Services"
    $appPoolUserName = "gokmania\spfarm"
     
     
    ## Service Application Service Names ##
    $accesssSAName = "Access Services"
    $bcsSAName = "Business Data Connectivity Service"
    $excelSAName = "Excel Services Application"
    $metadataSAName = "Managed Metadata Web Service"
    $performancePointSAName = "PerformancePoint Service"
    $searchSAName = "SharePoint Server Search"
    $stateSAName = "State Service"
    $secureStoreSAName = "Secure Store Service"
    $usageSAName = "Usage and Health Data Collection Service"
    $userProfileSAName = "User Profile Synchronization Service"
    $visioSAName = "Visio Graphics Service"
    $WebAnalyticsSAName = "Web Analytics Service"
    $WordAutomationSAName = "Word Automation Services"
     
     
     
    $saAppPool = Get-SPServiceApplicationPool -Identity $saAppPoolName -EA 0
    if($saAppPool -eq $null)
    {
      Write-Host "Creating Service Application Pool..."
     
      $appPoolAccount = Get-SPManagedAccount -Identity $appPoolUserName -EA 0
      if($appPoolAccount -eq $null)
      {
          Write-Host "Please supply the password for the Service Account..."
          $appPoolCred = Get-Credential $appPoolUserName
          $appPoolAccount = New-SPManagedAccount -Credential $appPoolCred -EA 0
      }
     
      $appPoolAccount = Get-SPManagedAccount -Identity $appPoolUserName -EA 0
     
      if($appPoolAccount -eq $null)
      {
        Write-Host "Cannot create or find the managed account $appPoolUserName, please ensure the account exists."
        Exit -1
      }
     
      New-SPServiceApplicationPool -Name $saAppPoolName -Account $appPoolAccount -EA 0 > $null
         
    }
     
     
     
     
    Write-Host "Creating Usage Service and Proxy..."
    $serviceInstance = Get-SPUsageService
    New-SPUsageApplication -Name $usageSAName -DatabaseServer $databaseServerName -DatabaseName "UsageDB" -UsageService $serviceInstance > $null
     
     
     
     
    Write-Host "Creating Access Services and Proxy..."
    New-SPAccessServiceApplication -Name $accesssSAName -ApplicationPool $saAppPoolName > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Access Database Service"} | Start-SPServiceInstance > $null
     
     
     
     
    Write-Host "Creating BCS Service and Proxy..."
    New-SPBusinessDataCatalogServiceApplication -Name $bcsSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName "BusinessDataCatalogDB" > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Business Data Connectivity Service"} | Start-SPServiceInstance > $null
     
     
     
     
    Write-Host "Creating Excel Service..."
    New-SPExcelServiceApplication -name $excelSAName –ApplicationPool $saAppPoolName > $null
    Set-SPExcelFileLocation -Identity "http://" -ExcelServiceApplication $excelSAName -ExternalDataAllowed 2 -WorkbookSizeMax 10 -WarnOnDataRefresh:$true
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Excel Calculation Services"} | Start-SPServiceInstance > $null
     
     
     
     
    Write-Host "Creating Metadata Service and Proxy..."
    New-SPMetadataServiceApplication -Name $metadataSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName "MetadataDB" > $null
    New-SPMetadataServiceApplicationProxy -Name "$metadataSAName Proxy" -DefaultProxyGroup -ServiceApplication $metadataSAName > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Managed Metadata Web Service"} | Start-SPServiceInstance > $null
     
     
     
     
    Write-Host "Creating Performance Point Service and Proxy..."
    New-SPPerformancePointServiceApplication -Name $performancePointSAName -ApplicationPool $saAppPoolName > $null
    New-SPPerformancePointServiceApplicationProxy -Default -Name "$performancePointSAName Proxy" -ServiceApplication $performancePointSAName > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "PerformancePoint Service"} | Start-SPServiceInstance > $null
     
     
     
    Write-Host "Creating State Service and Proxy..."
    New-SPStateServiceDatabase -Name "StateServiceDB" -DatabaseServer $databaseServerName | New-SPStateServiceApplication -Name $stateSAName | New-SPStateServiceApplicationProxy -Name "$stateSAName Proxy" -DefaultProxyGroup > $null
     
     
     
     
    Write-Host "Creating Secure Store Service and Proxy..."
    New-SPSecureStoreServiceapplication -Name $secureStoreSAName -Sharing:$false -DatabaseServer $databaseServerName -DatabaseName "SecureStoreServiceAppDB" -ApplicationPool $saAppPoolName -auditingEnabled:$true -auditlogmaxsize 30 | New-SPSecureStoreServiceApplicationProxy -name "$secureStoreSAName Proxy" -DefaultProxygroup > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Secure Store Service"} | Start-SPServiceInstance > $null
     
     
     
     
    Write-Host "Creating User Profile Service and Proxy..."
    $userProfileService = New-SPProfileServiceApplication -Name $userProfileSAName -ApplicationPool $saAppPoolName -ProfileDBServer $databaseServerName -ProfileDBName "ProfileDB" -SocialDBServer $databaseServerName -SocialDBName "SocialDB" -ProfileSyncDBServer $databaseServerName -ProfileSyncDBName "SyncDB"
    New-SPProfileServiceApplicationProxy -Name "$userProfileSAName Proxy" -ServiceApplication $userProfileService -DefaultProxyGroup > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "User Profile Service"} | Start-SPServiceInstance > $null
     
     
     
     
    Write-Host "Creating Visio Graphics Service and Proxy..."
    New-SPVisioServiceApplication -Name $visioSAName -ApplicationPool $saAppPoolName > $null
    New-SPVisioServiceApplicationProxy -Name "$visioSAName Proxy" -ServiceApplication $visioSAName > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Visio Graphics Service"} | Start-SPServiceInstance > $null
     
     
     
     
    Write-Host "Creating Web Analytics Service and Proxy..."
    $stagerSubscription = "<StagingDatabases><StagingDatabase ServerName='$databaseServerName' DatabaseName='StagerDB'/></StagingDatabases>"
    $reportingSubscription = "<ReportingDatabases><ReportingDatabase ServerName='$databaseServerName' DatabaseName='WarehouseDB'/></ReportingDatabases>"
    New-SPWebAnalyticsServiceApplication -Name $WebAnalyticsSAName -ApplicationPool $saAppPoolName -ReportingDataRetention 20 -SamplingRate 100 -ListOfReportingDatabases $reportingSubscription -ListOfStagingDatabases $stagerSubscription > $null 
    New-SPWebAnalyticsServiceApplicationProxy -Name "$WebAnalyticsSAName Proxy" -ServiceApplication $WebAnalyticsSAName > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Web Analytics Web Service"} | Start-SPServiceInstance > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Web Analytics Data Processing Service"} | Start-SPServiceInstance > $null
     
     
     
    Write-Host "Creating Word Conversion Service and Proxy..."
    New-SPWordConversionServiceApplication -Name $WordAutomationSAName -ApplicationPool $saAppPoolName -DatabaseServer $databaseServerName -DatabaseName "WordAutomationDB" -Default > $null
    #Get-SPServiceInstance | where-object {$_.TypeName -eq "Word Automation Services"} | Start-SPServiceInstance > $null


    My blog: SharePoint Pirate http://www.gokanozcifci.be
    Microsoft Certified Technology Specialist: SharePoint 2010, Configuring
    SharePoint Server 2010 Contributor on BTgonulluleri.com
    SharePoint Server 2010 Contributor on NothingButSharepoint.com
    SharePoint Server 2010 Contributor on SPCNL.NL
    SharePoint Server 2010 Contributor on MSHOWTO.org

    Linkedin Profile

    • Marqué comme réponse Martou26 lundi 23 juillet 2012 13:14
    lundi 23 juillet 2012 11:16
  • Merci Gokan pour ta réponse.
    lundi 23 juillet 2012 13:14