- This topic is empty.
04/04/2013 at 5:53 am #5841
Hi Bill, thanks for the very detailed response.
One last question: in Central Admin we can control which individual Web Part/s are available in a Site Collection and or Web App. Can we use PowerShell Scripts to work at this level?
04/04/2013 at 10:35 am #5385
To deploy QuickApps from the SharePoint Management Shell you would do the following:
1. Run Add-SPSolution to upload the .wsp package to the farm.
e.g. Add-SPSolution "C:\Downloads\Quick.Apps.wsp"
2. Run Install-SPSolution to schedule deployment of the package to one or more Web Applications. Make sure that the SharePoint Administration service is running before executing this cmdlet.
e.g. Install-SPSolution -Identity Quick.Apps.wsp -GACDeployment -AllWebApplications
When this cmdlet finishes, it does not mean that the deployment has completed. You can use Get-SPSolution to check the status of the deployment job.
This next step is not absolutely necessary, but it is recommended. Each Web Application has a QuestConfiguration feature that will add the essential entries to the web.config file for the web application. You can do this manually with the Configuration Editor, but the QuestConfiguration feature automates this process (mostly). Run the following cmdlet to activate this feature:
e.g. Enable-SPFeature -Identity QuestConfiguration -Url http://mywebapplication
Next you should activate the remaining features as required using the Enable-SPFeature cmdlet. The features to be activated are listed here:
– QuestLists – Site Feature
– QuestWebParts – Site Collection Feature
– QuestMyFirstApp – Site Feature in version 6.0 (Moved to the Site Collection in version 6.1)
Enable-SPFeature -Identity QuestWebParts -Url http://mywebapplication/mysitecollection
Version 6.0 of QuickApps had a dependency between QuestMyFirstApp and QuestWebParts. If you are going to activate QuestMyFirstApp, make sure you activate the QuestWebParts feature first.
If you are going to put it into a script, there are numerous enhancements that you can make. For example, you can use the following cmdlets to iterate through the WebApplications, Site Collections and SubSites to simplify the activation of features:
After running the PowerShell cmdlets, you should run the Configuration Editor to add any remaining settings to the web.config file. These remaining settings are not essential to the core functionality of the Web Parts, but they are necessary for the proper functioning of some advanced features.
Let me know if you have any questions.
04/05/2013 at 9:02 am #5840
As far as I know there are no PowerShell cmdlets available for managing the web part gallery, but it is possible to write a PowerShell script to access the .Net SharePoint Server Object Model. Here is a blog post that describes how this can be done (there may be better blog posts, this is just one of the first ones that I got on a Google search).
Now for my big disclaimer:
I have not validated the script on this blog post. Manipulating the gallery in this manner is not something that we recommend or support. Do this at your own risk!
I would definitely validate any scripts that you create in a lab environment before trying it in a production environment.
04/05/2013 at 11:19 am #4396
Hi, can we use Powershell commands to control the deployment of Web Parts by Site Collection? We can do this from the UI in Central Admin. I have infrastructure customers that would prefer to do this from PowerShell if possible. Thank you.
04/05/2013 at 11:19 am #5839
Thanks Bill. Great information.
You must be logged in to reply to this topic.