Powershell Principles Functions - Conjunction Junction What's Your Function? Functions are snippets of code that you define and give a name that you can call from other places in your code repeatedly. Functions are reusable and help both simplify your code and make your code easier to read. Parts of a FunctionA function consists of a few parts, a
Powershell Principles Loops - I Did It Again Loops are the part of your code that let you perform a set of actions for some number of iterations (an iteration is doing everything in the loop once without repeating). While you can write a script without loops, you can condense your code and make things a lot simpler.
Powershell Principles Decision Making - Or else... Getting data into variables and making changes to them are helpful but being able to make decisions in your code based on those variables is where a programming language really starts to become powerful. In Powershell there are a couple of decisions making statements available to use. IfIf is used
Powershell Principles Operators - Can you trace this call Operators are the part of the programming language that lets you manipulate variables. They can be used for math, comparing objects, assigning values, accessing functions, and more. Arithmetic OperatorsYou already know how four the five arithmetic operators work, they're the ones you use for every day math as well as
Powershell Principles Arrays - Zero is the loneliest number In simple terms an array is an organized list of variables. Arrays are organized by index, as objects are added to the list they are automatically given the next whole number as their index. Arrays in most languages, including Powershell, are zero-indexed, which means that the first object in the
Powershell Principles Variables - An Unchanging Constant Variables are used to store information temporarily while a program is running. As implied by their name they are generally changeable but not in every case. In many languages variables are statically typed, which means that when you first declare a variable you define what type of variable it is.
Powershell Principles Powershell Basics - You Can't Dodge a Blue Shell The basics of Powershell are important to understand if you want to write a script that won't have you pulling your hair out halfway through. Understanding the basics will set you up for success going forward. What is Powershell?Powershell is both a command-line shell and a scripting language, specifically