Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Windows PowerShell for .NET Developers - Second Edition

You're reading from   Windows PowerShell for .NET Developers - Second Edition Efficiently administer and maintain your development environment with Windows PowerShell

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781785287435
Length 330 pages
Edition 2nd Edition
Arrow right icon
Toc

Imperative versus declarative programming

Imperative programming means describing the computations in terms of statements, as we do in procedural programming. In imperative programming, we instruct the computer on which operation to do and how to do it. It is an explicit sort of coding. For example, we use imperative programming to perform certain operations and catch all the exceptions that may occur, or to install software if it does not exist on a specific machine. PowerShell uses imperative programming style, except in the DSC feature. In the preceding topic, we installed the PowerShell ISE using the ServerManager module, which is an imperative programming practice. Let's revisit it—what we will do here is check whether the PowerShell ISE feature is installed; if not, we will proceed with the installation.

We removed the PowerShell ISE using the Remove-WindowsFeature cmdlet. Now, we will execute the following code to install the PowerShell ISE:

Import-Module ServerManager...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image