Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Powershell magic in WSP deployment
WhatsApp
Ravishankar Singh
13y
7.9
k
0
1
25
Blog
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.
Powershell magic in WSP deployment
Up Next
Download Deployed Solutions (WSP) from Central Admin with PowerShell in SharePoint 2013
Ebook Download
View all
Configure MinRole Search and Cloud Hybrid Features in SharePoint Server 2016 and Office 365
Read by 1.6k people
Download Now!
Learn
View all
Membership not found