Mindblown: a blog about philosophy.
-
If-Else Statement
When we need to execute the block of statements either when the condition is true or when the condition is false, we must use the if-else statement. If the condition, which is a Boolean expression evaluates to True, then the statements inside the ‘if‘ body will be executed. And if the condition evaluates to false, then the…
-
If Statement
When we need to execute the block of statements only when the specified condition is true, use an If statement. This statement consists of a Boolean or logical expression followed by one or more statements. If the condition, which is a Boolean expression evaluates to True, then the statements inside the If statement will be executed. And if the…
-
Split and Join Operators
The Split and Join operators are used in PowerShell to divide and combine the substrings. -Join Operator The -Join operator is used in PowerShell to combine the set of strings into a single string. The strings are combined in the same order in which they appear in the command. The following two statements are the syntax to…
-
Redirection Operators
The Redirection operators are used in PowerShell to redirect the output from the PowerShell console to text files. The following table shows the numbers which are used by the PowerShell redirection operators to represent the available output streams: Stream Description Introduced in 1 Success Stream PowerShell 2.0 2 Error Stream PowerShell 2.0 3 Warning Stream PowerShell 3.0…
-
Logical Operators
The logical operators are used in PowerShell to connect expressions or statements together to form a single expression. Those expressions which contain these operators usually results in the Boolean values True or False. These operators allow us to use a single expression to test for multiple conditions. PowerShell supports the following logical operators: -and (Logical AND) The AND operator is the logical…
-
Comparison Operators
The comparison operators are used in PowerShell to compare the values. By default, all comparison operators are case-sensitive. These operators help us to find, test, compare, modify, and replace the data and information. PowerShell supports the following comparison operators: Equality Operators The equality operators are those operators, which check the equality of two values and also check that one…
-
Assignment Operators
The assignment operators are used in the PowerShell to assign one or more values and change or append the values to the variable. These operators can perform the numeric operations before assigning the values to the variables. The most commonly used operator is an assignment operator (=), which assigns the values to the variable. PowerShell supports…
-
Arithmetic Operators
The arithmetic operators are used in a PowerShell to perform the calculation of the numeric values. By using the arithmetic operators, we can add (+), subtract (-), multiply (*), or divide (/) the values. These operators also include the modulus (%) operator to calculate the remainder of the division operation. In PowerShell, the addition and multiplication operator may also be used with the…
-
PowerShell Operators
Like any other programming or scripting languages, Operators are the building blocks of the Windows PowerShell. An operator is a character that can be used in the commands or expressions. It tells the compiler or interpreter to perform the specific operations and produce the final result. PowerShell supports the following different types of operators: Arithmetic…
-
PowerShell Hast table
The PowerShell Hashtable is a data structure that stores one or more key/value pairs. It is also known as the dictionary or an associative array. In the PowerShell, there exists a Hashtable (System.Collections.Hashtable) object for each hash table. We can use the properties and methods of the Hashtable object in the PowerShell. The key and the values in the…
Got any book recommendations?