2303, 2022

How to Create Log File using Start-Transcript cmdlet in PowerShell

By |Tags: , , , , , , , |0 Comments

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

903, 2022

Where to use the –replace operator and Replace() method & its difference

By |Tags: , , , , , , |0 Comments

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

112, 2021

How to Pass function as a parameter in PowerShell

By |Tags: , , , |0 Comments

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

1711, 2021

When to use Tee-Object Cmdlet in PowerShell

By |Tags: , , , , , |0 Comments

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

2809, 2021

How to add XML values to the PSCustomObject using Powershell

By |Tags: , , , , , |0 Comments

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

1108, 2021

Performance comparison between FOREACH LOOP and FOREACH-OBJECT using PowerShell

By |Tags: , , , |0 Comments

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

1706, 2021

How to Check if a PowerShell Script is Running with Admin Privileges

By |Tags: , , , , , |0 Comments

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