Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

Blog posts December 2025

PowerShell File Renaming: How to Reorder Files Sequentially Using a CSV Map

I recently received a task to rename a bunch of files by changing their numbering in the filename while working on a PowerShell DevOps project. I had multiple Markdown files with numbers at the start of their names, and I needed to change these numbers with the filename based on a mentioned in CSV f…

Read more

High-Performance Network Auditing: Custom Ping and TCP Port Testing in PowerShell .Net Objects

This article dives into the Test-TcpPort function, a compact script that resolves hostnames to IPs, pings for basic reachability, and tests port connectivity with a timeout. I will break down its mechanics in short. At its core, Test-TcpPort leverages .NET's System.Net and System.Net.Sockets namespa…

Read more

Building a Unified Ping and Port Connectivity Report with PowerShell

In this article, I will explore two PowerShell scripts that test network connectivity (Ping) and port availability (Port Query) on multiple computers. I will discuss the scripts, their differences, and how to use them effectively. First Script is used for Synchronous Network Testing. The first scrip…

Read more

A Smart Bash Script to Reset Remote User Passwords — With Automatic Sudo Mode Detection

I had a requirement to reset some user password on Linux remotely, below is the simple script which helps to reset password locally, it uses simple passwd command. Save below file as reset_password.sh.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18

Read more

4 blog posts

Blog Search

Page Views

1 4 6 1 6 3 9 4

Archive

Follow me on Blogarama