I want to get my Custom WebPart by name and add into a Page with PowerShell from (Web part gallery):
--> Edit Page --> Insert --> Web Part --> Custom
WebParts in image are added from Custom Feature(.wsp package) generated by Visual Studio
function AddWebPartsSolution($webAppURL){
$userSolutionFileName = $Infrastructure.WebApplication.UserSolutionFile
Add-SPSolution $scriptBase\Solution\$userSolutionFileName
Install-SPSolution –Identity $userSolutionFileName –WebApplication $webAppURL –GACDeployment
}
function EnableWebPartsFeature($siteCollectionURL){
#Get all Features --> Get-SPFeature | Sort -Property DisplayName
$featureName = $Infrastructure.WebApplication.UserSolutionName
Enable-SPFeature -Identity featureName -Url $siteCollectionURL
}
Image:
I read this example, but PowerShell script get web part from local system. I need to get web part from image.
Where is the folder of Webparts from WebPart Gallery?
How to do this?