Windows Defender Firewall: Management

The Windows Defender Firewall is a critical component of Windows security, controlling inbound and outbound network traffic to protect my system from unauthorized access and malicious activity. While often misunderstood, managing it effectively is essential for both security and application functionality. This post clarifies the distinction between “Windows Firewall” and “Windows Defender Firewall,” and provides command-line and PowerShell methods to manage its state (on/off) and configure rules. 1. “Windows Firewall” vs “Windows Defender Firewall” The naming of Windows’ built-in firewall can be a source of confusion, but the reality is simpler than it seems. ...

November 13, 2025 · The PwshTips Team

$PSScriptRoot & %~dp0: Script's Home

When writing portable scripts, one of the first challenges is locating files relative to the script itself. Whether in PowerShell or a classic Batch file, I need a reliable way to find my script’s “home” directory. This guide breaks down the two most important tools I use for this job: $PSScriptRoot for PowerShell and %~dp0 for Batch. 1. The Batch Method cd /d %~dp0 In Windows Batch scripting (.bat, .cmd), the magic variable %~dp0 is the standard for getting the script’s directory. I often use it with cd to change the working directory. ...

November 12, 2025 · The PwshTips Team

File Transfer Speed: SCP vs. Robocopy vs. Copy-Item

When it comes to transferring large files (10–100 GB) between Windows systems, the tool I choose can have a massive impact on speed, reliability, and security. In this ultimate showdown, I compare three titans of file transfer: the secure and universal SCP (OpenSSH), the multi-threaded powerhouse Robocopy (SMB), and the PowerShell-native Copy-Item (WinRM). I tested them across different network conditions, from a high-speed 10 GbE LAN to a real-world 5G wireless connection, to help me decide which tool reigns supreme for my specific needs. ...

November 7, 2025 · The PwshTips Team

Automate Office 2021 Install & Remove Old Versions

When deploying Microsoft Office 2021, one of the key considerations is how to handle older, existing versions like Office 2010. By default, the modern Office installer will automatically remove these older versions, but for automated or customized deployments, you need more control. This guide will walk you through how I used the Office Deployment Tool (ODT) to create a silent, automated installation of Office 2021 that also cleanly removed any older Office versions. ...

November 4, 2025 · The PwshTips Team

Fixing Office Activation Firewall Issues

When I tried to activate Microsoft Office in a corporate or restricted network environment, I encountered frustrating activation failures. Even with a valid license, Office activation can fail if it cannot communicate with Microsoft’s activation servers. This is almost always due to a firewall blocking the necessary outbound traffic. Note: This guide assumes you have already installed Microsoft Office. If you need a guide on how to automate the installation of Office 2021, see our companion article: Automate Office 2021 Install & Remove Old Versions ...

November 4, 2025 · The PwshTips Team

Test if a Network Port is Open

When diagnosing network connectivity issues, one of the most fundamental steps is to determine if a specific TCP port is open and listening on a remote host. A closed, blocked, or unresponsive port is often the root cause of application failures, and knowing how to test it is a critical skill for me. This guide provides a comprehensive overview of the most common and reliable methods to test port connectivity on Windows, from modern PowerShell cmdlets to classic command-line tools. ...

November 5, 2025 · The PwshTips Team

Clone a Bootable USB to an ISO

Creating a full, bootable backup of a USB drive as an .iso or .img file is a critical task for IT professionals and tech enthusiasts. Whether I am archiving a custom Windows installer, preserving a Linux live environment, or creating deployment images, a sector-by-sector clone ensures that the bootloader, partition table, and all data are perfectly preserved. This guide provides three reliable methods to clone a bootable USB drive, catering to different user preferences: the command-line power of PowerShell with WSL, the simplicity of a GUI tool on Windows, and the classic dd command on Linux. ...

November 2, 2025 · The PwshTips Team

Unblock-File Cmdlet in PowerShell

If I’ve ever downloaded a script, installer, or even a help file from the internet, I’ve likely encountered a frustrating Windows security feature: the file is “blocked,” preventing it from running or displaying correctly. This is due to the “Mark of the Web,” a security mechanism designed to protect me from potentially malicious content. PowerShell provides a simple and elegant solution to this problem: the Unblock-File cmdlet. This guide will explain what the Mark of the Web is, how to identify blocked files, and how to use Unblock-File to safely manage them. ...

October 29, 2025 · The PwshTips Team

Manage Pinned Taskbar Items with PowerShell

For system administrators, creating a standardized desktop environment often involves customizing the Windows taskbar. While pinning items is easy for a user, automating the process of listing or unpinning applications can be surprisingly difficult. Windows intentionally does not provide a simple, built-in command to manage pinned items to prevent applications from pinning themselves without user consent. However, with a bit of PowerShell scripting, I can gain control over the taskbar. This guide will walk through the most effective methods I use to list, unpin, and manage taskbar items programmatically. ...

October 28, 2025 · The PwshTips Team

Access a USB Drive in WSL

If I am a user of the Windows Subsystem for Linux (WSL), I might have noticed that when I plug in a USB flash drive, it doesn’t automatically appear in my Linux environment. Unlike my C: drive, which is typically mounted at /mnt/c, WSL does not automatically mount removable drives. Fortunately, accessing my USB drive from within WSL is a straightforward process. This guide will walk through the two primary methods I use for mounting a USB drive in WSL2, from a simple drive letter mount to accessing the raw physical disk. ...

October 28, 2025 · The PwshTips Team