How to Create Log File using Start-Transcript cmdlet in PowerShell
What is Start-Transcript? As per MSDN, The Start-Transcript cmdlet creates a record of all or part of a PowerShell session to a text file. The transcript includes all commands that the user types and all
Where to use the –replace operator and Replace() method & its difference
In this post, you’re going to learn where to use the PowerShell replace() method and PowerShell replace operator. The tutorial will cover the basics and even drive into some regular expressions. .Replace is a .NET
How to Extract Specific Files from ZIP Archive using PowerShell
When is this required (Real-time Scenario)? In our blog, we already discussed the zip and unzip files using Powershell. In this post, we are going to discuss how to extract specific files from the zip.
How to Pass function as a parameter in PowerShell
I got a few questions to my inbox, that is "How to pass the function as a parameter (calling function from another function) using PowerShell". To answer this, I thought to write a quick article
When to use Tee-Object Cmdlet in PowerShell
In this blog post, we will discuss about Tee-Object cmdlet in PowerShell. Previously I am not got a chance to use this cmdlet in any of my automation and currently using the same in my
How to add XML values to the PSCustomObject using Powershell
We already discussed the reading/Writing XML file using PowerShell in previous posts and How to add values to the string array from XML using Powershell. Now in this post, we will discuss How to add
Performance comparison between FOREACH LOOP and FOREACH-OBJECT using PowerShell
If you're familiar with any programming language then you're probably also familiar with a ForEach loop. A ForEach loop is a simple language construct that enables you to iterate through a set of items in
How to Check if a PowerShell Script is Running with Admin Privileges
In one of my PowerShell automation, the automated script needs to run with Admin mode. So to avoid the error during the scrip execution, we need to check whether the script is running in the