Automate Application Installation with Powershell - powershell

I need to write a powershell script that would install my team's web application and all the web application's dependencies (ie: telerik, asp.net mvc3, third-party assemblies) with a single click of a button. Is this possible? Or does someone have to click "Next" to go through an installation wizard?

Sounds like a job for MSDeploy. This ships with PowerShell cmdlets (and a regular console executable.)
http://www.iis.net/download/webdeploy
Features
Seamless integration with IIS 7.0
Manager and Visual Studio 2010
interface for creating packages and
deploying them onto a machine, both
locally and remotely.
Seamless integration with the Web
Platform Installer to install
community web applications simply and
easily.
Web application packaging:
Ability to package a Web application
or an entire site, including the
associated databases.
Ability to package ACLs, COM, GAC and
registry settings.
Supports both live servers and zipped
packages as a source or destination.
Web application deployment:
Administrative privileges are not
required in order to deploy Web
applications.
Ability to add powerful parameters to
change text in files when they are
deployed (such as prompting to
replace a connection string when
deploying from QA to staging
environments).
Integration with the IIS 7.0 Web
Management Service (WMSVC) for remote
deployment by non-administrators.
Server administrators have granular
control over the operations that can
be performed and can delegate tasks
to non-administrators.
Web server migration and synchronization:
Ability to synchronize or migrate the
entire Web server, a Web site or
application. Synchronizes only the
data that has changed.
Ability to detect missing
dependencies during synchronization.
Automatically gathers content, IIS
configuration, SSL certificates and
ASP.NET configuration when you sync a
Web site.
In addition to the IIS Manager and Visual Studio 10, tasks can be performed using the command-line or public APIs.
-Oisn

Related

Can Windows services be deployed from Visual Studio as easily as web projects?

I'm running an ASP.NET Core web service that's dead easy to deploy to IIS on a Windows Server using WebDeploy: Right-click the project in VS, choose Publish, done. The currently running site is backuped and then updated. Couldn't be easier.
However, Windows services are another matter. I'm taking over maintenance of a service that is currently updated by building the Release config, remote desktoping to the server, stopping the current service, renaming the folder the service executable resides in (for easy rollback in case something goes wrong), copying over the build output from the dev machine, renaming the copied folder to the service folder name so the service finds the executable, and starting the service.
Is there a way to publish/update Windows services that is as easy as running WebDeploy? I haven't found any. There's always the possibility of abusing WebDeploy and just replacing the Windows service head project with an ASP.NET head project running on IIS, but the service has nothing to do with the web and I have no idea whether there would be any side effects to this solution.
(I could of course just write a script that performs the copying etc., but a built-in VS deployment process as with web projects would be optimal. As for continuous integration/deployment, it is unfortunately not something we have ever done at my company.)

How to upload pure HTML site with TFS build

Our web site solution consists of frontend folder, where pure html/css/js application resides, and an ASP.NET WebAPI backend. I am setting up a TFS build for dev and qa environment.
Currently, I have made WebAPI backend to publish automatically via WebDeploy. Html/js fronend also has a site setup on a target IIS machine where I am trying to deploy to. But WebDeploy only works with ASP.NET sites. What mechanism I could utilize to copy files of fronend to target folder on IIS machine?
This might help:
http://www.incyclesoftware.com/2014/06/deploying-uncompiled-resources-release-management/
I haven't had a chance to test it myself yet.

Understanding lightswitch deployment

I wish to deploy a lightswitch application for a small company. I want a central server hosting the database and then the silverlight client to run inside the network connecting to the server and updating the database with clients, etc.
I have made a working system using the intrinsic database in VS2013, but now I come to deploy it and am having problems, despite hours reading MSDN and following tutorials.
I create a deployment package on my development machine, which I then install on the server, but I then need to create a client only package, which points to the server? Does this mean I need to specify the central database as an external data source? Or does this switch happen automatically? Can I publish only the server, and install that on the server machine, (I have already installed the web server package) then publish a separate client package for installing the application on the clients? I need all the clients to update a single database, not all have their own local copies and local databases...
When you "create a client only package" the intrinsic database is running on the client, so nothing point to the server.
A external data source is always external regardless of the app type.
What type of a LightSwitch Application you've selected?
A 2-tier desktop application runs on an end-user Windows desktop. The
database and server components are deployed to the end-user computer.
A 3-tier desktop application runs on an end-user Windows desktop. The
database and server components are deployed to an Internet
Information Services (IIS) server or to Windows Azure.
A 3-tier Web application runs in an end-user web browser. The
database and server components are deployed to an Internet
Information Services (IIS) server or to Windows Azure.

Using Nuget to Install into an IIS Applications Root Site

I have several ASP.NET application running under a common IIS Site and would like to use a NuGet package to transform their config while copying versioned JavaScript file to the IIS Site's Root application Content folder.
Can NuGet be used like this? I.e. can it be determine during package installation/updating which IIS Sites root application an ASP.NET project is being run under (using the preinit powershell script for example).
The tool you are looking for is Octopus Deploy It install nuget packages on IIS, as windows service, etc. Moreover it gives raeally nice GUI for management.
NuGet is a dependency manager, and as such is appropriate for use at development/build, not deployment time.
Take a look at Inedo's BuildMaster. It can take care of the process from source control through production deployment. There's also a free version that will most certainly handle your requirements, and it also has a module to manage your configuration files so you don't need to worry about doing transforms.
(disclaimer: I work for Inedo)

InstallShield MVC2 Application deployment on IIS

I want to be able to deploy a MVC2 application as a web application on IIS using the installshield. When I try to deploy the application it just simple copies the whole solution to IIS instead of converting it to a web application. I created an MSI using VS2010 which converts the code into web application and then called that through installshield installer (which basically does some other stuff as well). But it creates two references in installed programs visible through Add/Remove Programs which in turn makes me uninstall both in order to completely remove the application. Any suggestions on how to go about at this?