SQLServerCentral Article

Anything Remotely Useful

,

PowerShell 'remoting' is powerful magic. It allows a PowerShell process to set off and access full PowerShell sessions on any remote windows systems that is suitably enabled. I love scripting regular tasks because I can get them done quicker, and more accurately. Remoting brings as radical an expansion in the power of scripting as we've seen for many years.

I was stuck by the way that the PowerShell-based BoxStarter used the feature to be able to install anything up to a complete Windows environment on a fresh OS install or virtualized machines. It makes the build-test-release cycle of application development far more painless. Configuration-management problems? PowerShell remoting can make the process so much simpler. When one reads of the problems solved by BoxStarter with such things as reboots and Windows updates, there is little doubt that PowerShell has the means to automate a great deal of the development process right through to delivery. Obviously, PowerShell's facility with automating SMO and executing SQL batches makes it ideal for testing and deploying database applications.

Third-Party applications such as Thoughtworks Go, Jetbrains TeamCity and Octopus Deploy use 'agents' to work similar magic. An agent, in this sense, is a third party service that deals with processes that are triggered from a remote workstation. For Go, it makes sense since it works across Windows, Linux, Mac OSX and Solaris. However, if you are developing Windows applications or deploying SQL Server databases, you may decide that this is overkill. If the operating system has excellent tools for the job, why get a third-party tool to do it?

The downside of PowerShell, of course, has always been that it is a scripting language rather than an easily-learned turnkey GUI. Various people have been creative in thinking up ways to get developers and DBAs familiar with PowerShell, but it still can be a culture shock to use the keyboard more than the mouse. It also feels wrong to have to write code to deliver an application as well as to write it. Perhaps the way forward in automating delivery in Windows environments is to use PowerShell-based packages such as SQLPSX, Boxstarter and Chocolatey that do all the generic work for you, and reserve the hand-crafted scripting for the stuff that is particular to your needs.

Phil Factor.

Rate

5 (1)

You rated this post out of 5. Change rating

Share

Share

Rate

5 (1)

You rated this post out of 5. Change rating