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 →
PowerShell is a powerful scripting language that provides the tools to automate various tasks on Windows systems. One of its handy features is the ability to send HTTP requests using the Invoke-WebRequest cmdlet. In this blog post, we’ll explore using … Continue reading →
This blog explains how we can use PowerShell to run an application as the current logged in user. There are times, for example when deploying an application or a script via SCCM, that the launching process will run as a … Continue reading →
In this blog we provide an example of how we can create a scheduled task using PowerShell or Schtasks. Create a Scheduled Tasking using PowerShell As a minimum, a scheduled task needs an action (something to perform) and a trigger … Continue reading →
When using PowerShell CSOM modules for SharePoint, I randomly stumbled into the error message: Cannot convert argument query with value Microsoft.SharePoint.Client.CamlQuery. I was seeing the error when running a CAML query and calling GetItems(): $query = New-Object Microsoft.SharePoint.Client.CamlQuery $query.ViewXml = … Continue reading →