This blog post provides an example of how we can call a PowerShell function in another PowerShell script. Let’s first assume that we have a function in a script called AlkaneFunctions.ps1 that enables us to install an MSI using PowerShell … Continue reading →
This blog post explains using PowerShell bitwise comparison operators to check and set bit flags. You can also use PowerShell to calculate bit flags by creating your own enum if desired. We must first start with a (really) basic primer … Continue reading →
Sometimes we want to blind copy (BCC) a group of users into an email, without specifying the To address. In this blog post we find a solution to send bulk emails with PowerShell using only BCC. In an earlier post … Continue reading →
Command-line arguments allow us to pass information to our scripts dynamically, making them more flexible and versatile. In this blog post, we’ll explore handling command-line arguments in PowerShell. Handling Command-Line Arguments in PowerShell Using Args When we execute a PowerShell … Continue reading →
In this blog post, we’ll explore how to comment out code in PowerShell using both single-line and multi-line comments. Single-Line Comments Single-line comments are used to annotate a single line of code in PowerShell. These comments are helpful when we … Continue reading →
The “Do While” and “Do Until” loops provide valuable options for executing code based on specified conditions. In this blog post, we’ll dive into using the PowerShell Do While loop and Do Until loop, their syntax, and how we can … Continue reading →
One of the essential looping constructs in PowerShell is the “For” loop. In this blog post, we’ll delve into using the PowerShell For loop, its syntax, and how we can utilise it effectively in our scripts. Understanding the For Loop … Continue reading →
Downloading and running scripts from the internet has become a common practice. However, security remains a top concern and we need to ensure that the scripts we obtain online are safe and won’t harm our systems. In this blog post, … Continue reading →
Sometimes when we try to run a PowerShell script, we might encounter the PowerShell warning running scripts on this system is disabled This error is related to PowerShell’s script execution policies. In this blog post, we’ll explore the different script … Continue reading →
In this blog post, we’ll explore using the PowerShell ForEach loop and how it can be used to process and manipulate data efficiently. Understanding the For-Each Loop The ForEach loop in PowerShell allows us to iterate over collections of objects, … Continue reading →