We create Sitecore .update packages using TDS and Visual Studio. The update packages can be installed using /sitecore/admin/updateinstallationwizard.aspx. Is there a way to install these packages using Powershell?
Thanks
It depends on the tooling you want to use.
If you can work with Sitecore PowerShell Extensions, it has a convenient Install-UpdatePackage cmdlet (not the Install-Package - this one works with regular Sitecore packages exclusively) that can deploy them in your environment. You can read more about it in our GitBook
You can also create those using the Get-UpdatePackageDiff and Export-UpdatePackage if you do not have access to TDS.
Now to do this on the server directly that's just something that you would run from the Web UI using SPE ISE, but to upload those from your dev environment you can utilise the SPE Remoting again as described in this Gitbook page
If you don't have or want to have SPE deployed on your server you can utilise Sitecore Ship and automate that in Windows PowerShell without the use of Sitecore PowerShell Extensions. The functionality of Sitecore Ship module is limited to doing the task of deploying Sitecore Update packages but this might be just what you want.
You can use for Sitecore Powershell command:
Install-Package [[-Path] ] [-InstallMode ] [-MergeMode ]
More details can be found here:
https://sitecorepowershell.gitbooks.io/sitecore-powershell-extensions/content/appendix/commands/Install-Package.html
Related
I need to install Web Deploy 3.6 for Hosting Servers. Normally you would use the Web Platform Installer, but I need to deploy this using PowerShell. I have found the download for Web Deploy 3.6 and can use PowerShell to install the .MSI of that, but that is different that Web Deploy 3.6 for Hosting Servers.
Does anyone know where I can download Web Deploy 3.6 for Hosting Servers or know how to use PowerShell to install via the Web Platform Installer?
I have located the answer. The Web Platform Installer has an API so you can call the .exe with PowerShell akin to this:
& "C:\Program Files\Microsoft\Web Platform Installer\WebPICMD.exe" /List /ListOption:Available
There are install options as noted here: https://learn.microsoft.com/en-us/iis/install/web-platform-installer/web-platform-installer-v4-command-line-webpicmdexe-rtw-release
How would I run a program installer (in C:\Downloads) using a Powershell V1 script?
I do not have control over the Powershell version so please do not ask me to update to newer version.
If I do it manually, there will be a few options for me to choose before installing. I also have to specify the location for the application.
If I have to do it via scripts, how do I set which options to choose and specify the location?
I have searched the application support page and they do not have anything I need for the installation of the software via scripts.
I am not a very skilled person when it comes to scripting as I just started out months ago.
Do you know about Chocolatey? It's a Windows package manager that allows you to install Windows applications using CLI.
To install Chrome for example:
choco install googlechrome
You can find all the available packages here.
I'm having trouble with installing PowerShell 5 on Windows Server 2012 R2 using Packer.
To install PowerShell 5.1, I'm using chocolatey
powershell
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
choco install PowerShell -y
I need to to do this for two packer builder:
Amazon Web Services EC2 AMI.
Hyper-V Vagrant.
With the Amazon Web Services EC2 AMI I've tried executing the above from the following locations
As part of the user_data_file script.
As an inline provision script.
I've added the windows-restart provision in the flow after the execution of the fragment.
Similarly I've tried the same with the Hyper-V Vagrant both as part of the Autounattend flow and as an inline provision.
In both cases the installation fails because the user profile is not created. At least I think that is the problem. As a reference, I've faced the exact same problem when installing sql server express.
Has anyone managed to accomplish this flow and what is your recommendation?
PowerShell package uses MSU (Windows Update file). There are a couple of considerations here:
Ensure Windows Updates Service is turned on. Chocolatey doesn't do that yet, although there is an issue filed.
MSUs must be run locally from the machine. So if you are running over WinRM, you instead need to have it set up a scheduled task to call choco install and then run it that way.
Yes, that second point is accurate. No, it is not Chocolatey's fault. That's a Microsoft design decision with MSU files. It's a real PITA.
FYI - BoxStarter handles it appropriately, and it can be used with Packer. You will find less pain if you look there.
HTH
I have a build definition on visual studio online which creates an msi installation package using WiX.
How can I automatically deploy the msi package from VSO build agent to Azure VM after the build completes successfully?
Note: I prefer to use a post-build batch or powershell script as part of the build process. The script should copy the msi to the vm and install it.
You should use Release Management Online. It comes with VSO and allows you to easily orchestrate installing an MSI on any Azure server.
http://nakedalm.com/building-release-pipeline-release-management-visual-studio-2013/
Microsoft just added RM in VSO and its simple to use. I setup an end to end web app deployment, buy as its just a PowerShell to do the install an MSI would be trivial. RM takes care of getting all of the bits to the right spot...
http://nakedalm.com/create-release-management-pipeline-professional-developers/
Honestly, it sounds hard, but is much easier than trying to do it all yourself.
Can you please enlighten me on my task?
My task is to create a nightly builds of MSI (done in WiX) and install it to our web server using powershell.
TFSBuild server build an MSI
Run Powershell to uninstall and install the newly build MSI.
Run Powershell to Start the windows service.
The WiX MSI contains WindowsService and a Web Application.
Below are list of what i have done so far:
Solution.sln : Configuration Manager and "x86|debug" (check all the files that needs to be built '.wixproj' already checked)
Created a build definition and set "x86|debug" for configurations to build and set projects to build is my solution file.
but after the build has completed, there is no MSI files on the binaries build folder on the build server. :(
Thanks in advance.
Few pointers:
Have you installed Wix on the buildserver?
Which version of Team Build are you using? 2010 has the preference here as the tooling has progressed a lot since 2008.
Did you configure to run msbuild in auto or x86 mode (auto can result in 64-bit which has some issues with the latest stable version of wix) link link
Is your build agent running on a 64 bit server? If so, you either need to run the build agent under an administrative account or do some mucking around in the registry to fix issues with Wix. link
To install the build using Powershell, I personally prefer TFSDeployer, which can monitor your build output and trigger powershell scripts based on the build outcome. It takes away the deployment responsibility from the build server and saves a lot of headaches around security and account configurations.