Follow the steps to achieve this :
- Open the Notepad,
Write the code below,
#pass the source path "$ source",e.g d:\wspfolder\
$source ="D:\wspfolder\"
$files = Get-ChildItem $source | where {$_.extension -eq ".wsp"}
foreach($my_file in Get-ChildItem $files){Add-SPSolution -LiteralPath $my_file.FullName}
foreach($my_file in Get-ChildItem $files){Install-SPSolution -Identity $my_file.Name -AllWebApplications -GACDeployment} - Save the file with some name and having extension ".ps1"(e.g installer.ps1).
- Next task to create Batch file.Open the Notepad again,write the following code,
Powershell.exe -Command Set-ExecutionPolicy "Bypass"
Powershell.exe -Command "& {d:\wspfolder\Installer.ps1}"
Pause - Save As file with name "install.bat".
- Now its done. Hope you like this blog and will save your time too.

Piyush AgarwalPosted Mar 9, 2018, 5:16 AM
Does this work in Sharepoint 2013 as well....