Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Get-ScriptDirectory
- {
- $Invocation = (Get-Variable MyInvocation -Scope 1).Value
- Split-Path $Invocation.MyCommand.Path
- }
- #cls
- Set-Location (Get-ScriptDirectory)
- $webSiteUrl = Read-Host -Prompt "URL du site à installer"
- $Override = $True
- #DO NOT CHANGE ANYTHING BELOW THIS LINE.
- Add-PSSnapIn Microsoft.SharePoint.PowerShell
- $spWeb = Get-SPSite $webSiteUrl | Get-SPWeb
- Write-Host "Will install and set parameters to : $spWeb"
- Write-Host "Press [ENTER] to set or Ctrl-C to abort."
- Read-Host
- Write-Host "Install Solution"
- $WSPPath = (Get-ScriptDirectory) + "\Tech.SharePoint.Core.Params.wsp"
- Add-SPSolution -LiteralPath $WSPPath
- # Add-SPSolution [-LiteralPath] <String> [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-Language <UInt32>] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
- Install-SPSolution -Identity Tech.SharePoint.Core.Params.wsp -Force -GACDeployment
- # -WebApplication ($spWeb.Site.WebApplication)
- # Install-SPSolution [-Identity] <SPSolutionPipeBind> [-AllWebApplications <SwitchParameter>] [-AssignmentCollection
- # <SPAssignmentCollection>] [-CASPolicies <SwitchParameter>] [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>
- # ] [-GACDeployment <SwitchParameter>] [-Language <UInt32>] [-Local <SwitchParameter>] [-Time <String>] [-WebApplicat
- # ion <SPWebApplicationPipeBind>] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
- Write-Host "Press [ENTER] to continue or Ctrl-C to abort."
- Read-Host
- [System.Reflection.Assembly]::Load("Tech.SharePoint.Core.Params, Version=1.0.0.0, Culture=neutral, PublicKeyToken=73d53a117b0ec4ff");
- [Tech.SharePoint.Core.Params.TechUtils]::SetParam($spWeb, "Application", "ParamName", "ParamValue", "Description", $Override);
- Remove-PSSnapIn Microsoft.SharePoint.PowerShell
- Write-Host "Parameters Set !"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement