How to Remove Array Element by Index in PowerShell?

Remove Array Element by Index in PowerShell

Recently, I got a requirement to remove an array element by index in PowerShell. In this PowerShell tutorial, I will explain different ways to remove array elements by index in PowerShell. To remove an element by index in PowerShell, you can use the array slicing method to create a new array without the element. For … Read more

How to Copy Files from One Folder to Another in PowerShell?

Copy Files from One Folder to Another in PowerShell

Do you need to copy files from one folder to another folder? In PowerShell, it is easily possible. In this tutorial, I will show you how to copy files from one folder to another folder in PowerShell using various methods. To copy a file from one folder to another in PowerShell, you can use the … Read more

How to Write String to File in PowerShell: Tips and Tricks

Write String to File in PowerShell

Writing strings to files in PowerShell is a task you might perform regularly as a system administrator or a developer. In this PowerShell tutorial, we’ll explore how to write string to file using PowerShell using various methods and scenarios, including appending and overwriting content, avoiding newlines, and ensuring UTF-8 encoding. To write a string to … Read more

How to Find Strings in Files in PowerShell?

If you are working with strings in PowerShell, this tutorial will help you. In this PowerShell tutorial, we’ll explore various methods to find strings in files using PowerShell. To find a string in a file using PowerShell, you can use the Select-String cmdlet, which is similar to grep in Unix/Linux. For instance, Select-String -Path “C:\MyFolder\file.txt” … Read more

Connect-SPOService : Current site is not a tenant administration site

connect-sposervice current site is not a tenant administration site. error

I will show you a very simple solution to fix the error “connect-sposervice current site is not a tenant administration site“. I got this error while trying to connect to SharePoint Online using PowerShell. Current site is not a tenant administration site When I was trying the below PowerShell cmdlet to connect to SharePoint Online … Read more

PowerShell foreach where-object example

PowerShell foreach where-object

Do you want to iterate over collections and filter items based on certain conditions in PowerShell? In this PowerShell tutorial, I will explain how to use where-object in foreach in PowerShell. Finally, I will show you some examples related to “PowerShell foreach where-object“. To iterate over a collection and filter items in PowerShell, you can … Read more

PowerShell Where-Object Does Not Match [With Examples]

PowerShell Where-Object Does Not Match

PowerShell Where-Object cmdlet allows users to filter objects based on their properties and values. In this PowerShell tutorial, we’re going to delve into the -NotMatch parameter of the Where-Object cmdlet in PowerShell and how it can filter objects that do not match a specified pattern. PowerShell Where-Object Does Not Match The Where-Object cmdlet in PowerShell is used to filter objects from … Read more

How to Replace Text in a File Using PowerShell?

Replace Text in a File Using PowerShell

When working with text files in Windows, you might often need to replace certain strings or characters. PowerShell, a powerful scripting language and command-line shell, provides several ways to perform text replacements. This blog post will guide you through different methods to replace text in files using PowerShell, complete with examples and scripts. To replace … Read more

How to Save Output to File in PowerShell?

How to Save Output to File in PowerShell

Do you want to save the output of your commands and scripts to a file for later review, logging, or processing in PowerShell? In this tutorial, I will show you several methods to save output to file in PowerShell with examples. To save output to a file in PowerShell, you can use the Out-File cmdlet, … Read more

100 PowerShell cmdlets download free

100 POWERSHELL CMDLETS E-BOOK

FREE Download an eBook that contains 100 PowerShell cmdlets with complete script and examples.