Quantcast
Channel: PowerShell Basics Archives - TechGenix
Browsing all 84 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

What does a question mark mean in PowerShell commands?

A few weeks ago, I received an email message from someone who is relatively new to PowerShell. They had followed some of the techniques that I outlined in some of my other articles and mimicked my...

View Article


Image may be NSFW.
Clik here to view.

PowerShell concatenation: How to use this powerful feature

In today’s world, data is the most powerful asset for every organization. But this data is not always structured the way we want, especially for analysis. Hence, it becomes necessary to concatenate or...

View Article


Image may be NSFW.
Clik here to view.

PowerShell regular expressions: Making string evaluation easier

I have been working on a couple of PowerShell projects recently that have involved some complex string manipulations. In doing so, one of the things that I have found that has made string evaluation...

View Article

Image may be NSFW.
Clik here to view.

Working with dates in PowerShell revisited

A few years ago, I wrote an article here at TechGenix in which I talked about performing date-related functions in PowerShell scripts. For those who might have missed that original article, I...

View Article

Image may be NSFW.
Clik here to view.

Reading and extracting values from XML files with PowerShell

XML is used in everything from configuration files to Microsoft Office documents. Not surprisingly, PowerShell is also XML aware. By using PowerShell, you can extract values from an XML file, and if...

View Article


Image may be NSFW.
Clik here to view.

Working with CSV files in PowerShell

One of the things that I have always liked about PowerShell is that it allows you to extract data from various types of objects. In the past, I have often used PowerShell to examine system services and...

View Article

Image may be NSFW.
Clik here to view.

Which type of PowerShell loop should you be using?

Loops are very commonly used in PowerShell scripts, and the vast majority of the scripts that I have written over the years have included at least one loop. Even so, looping isn’t quite as...

View Article

Image may be NSFW.
Clik here to view.

PowerShell errors are easy to suppress — but should you?

There is an old saying that if you ignore something long enough, it will eventually go away. Admittedly, this saying isn’t always the best advice in day-to-day life, but it does have its place when it...

View Article


Image may be NSFW.
Clik here to view.

Reading a Windows INI file into PowerShell

Lately, I have been finding that it can be really useful to read the contents of an INI file into PowerShell. Not only does Windows and some applications store some of its configuration data in INI...

View Article


Image may be NSFW.
Clik here to view.

Building PowerShell hash tables

Hash tables are easily one of the most useful data structures that you can create in PowerShell. A hash table is essentially a list of key/value pairs. These tables have countless uses. I often use...

View Article

Image may be NSFW.
Clik here to view.

How malicious PowerShell scripts evade detection

Over the last few years, PowerShell has increasingly become a favorite tool among those who have malicious intent. After all, PowerShell is installed natively as a part of Windows, it has the ability...

View Article

Image may be NSFW.
Clik here to view.

Reading text files with PowerShell and Linux bash shell

If you are a Linux administrator, you may be familiar with tail, head, and grep commands when reading text files, and they are convenient when looking at log files. (If you are not familiar, we are...

View Article

Image may be NSFW.
Clik here to view.

Using JSON with PowerShell: A guide for IT professionals

If you are an IT professional and part of your activities is to manage Microsoft Azure, coding scripts, or Kubernetes, then JSON and YAML files should be part of your daily routine. In this article, we...

View Article


Image may be NSFW.
Clik here to view.

PowerShell Gallery: A great free resource for finding scripts

As someone who writes numerous articles about PowerShell, I have gotten in the habit of creating all of my PowerShell scripts from scratch. It doesn’t have to be that way, though. There are numerous...

View Article

Image may be NSFW.
Clik here to view.

Overview of PowerShell versions and how to check what version you have?

PowerShell is one of the most popular scripting languages and it is installed by default on all Windows operating systems starting from Windows 7 SP1. It consists of a Command Line Interface (CLI) and...

View Article


Image may be NSFW.
Clik here to view.

Setting the style in PowerShell 7.2

One of the most welcome new features that Microsoft has built into PowerShell 7.2 is support for ANSI escape sequences. If you aren’t familiar with ANSI escape sequences, they are an industry standard...

View Article

Image may be NSFW.
Clik here to view.

Creating a New Team using PowerShell

In a recent article on this site, I explained that PowerShell is a better overall tool for the bulk management of Microsoft Teams then the GUI is. While the GUI interface does work, it really doesn’t...

View Article


Image may be NSFW.
Clik here to view.

Getting Started with PowerShell for Microsoft Teams

Although you can manage Microsoft Teams through the Teams Admin Center, GUI based management tools tend not to scale very well. If you need to manage Teams in bulk, then using PowerShell will likely be...

View Article

Image may be NSFW.
Clik here to view.

Scripting help from the Windows Admin Center

While it may be tempting to think of the Windows Admin Center as little more than an alternative to the Server Manager, the Windows Admin Center includes some helpful features that often go unnoticed....

View Article

Do You Like Your PowerShell Wet or Dry?

It’s really interesting to see how PowerShell scripting has evolved over the years. Early on, PowerShell scripts tended to be simplistic in nature, and focused on performing a single repeatable task....

View Article
Browsing all 84 articles
Browse latest View live