Category: Powershell
-

How to Monitor Folder Changes Using PowerShell and FileSystemWatcher
Monitoring a specific folder or file for changes can be efficiently achieved using PowerShell with the built-in .NET FileSystemWatcher class. This approach allows for real-time detection of changes such as creation, deletion, renaming, or modification of files within a specified directory. By utilizing the FileSystemWatcher, you can automate actions in response to these events, such…
-

A Step-by-Step Guide to Safely Disable IPv6 on Windows
Although the IPv6 protocol is enabled by default in all Windows versions, it is not commonly used in home and small office networks. As a result, many sources recommend disabling IPv6 to resolve network issues. However, Microsoft advises against completely disabling IPv6 unless absolutely necessary, especially on Windows Server, where various components rely on link-local…
-

How to Identify Computers with Pending Reboot Status Using PowerShell
After installing certain patches or security updates on Windows systems, a restart may be necessary for them to take effect. However, users may delay rebooting their computers, or automatic reboots might be disabled on servers or workstations using Group Policy settings. This situation can lead to numerous computers in large enterprise networks remaining stuck in…
-

How to Change the Default Organizational Unit for New Computers and Users in Active Directory
When a computer is joined to a domain using the System Properties GUI, its account is created in the default Computers container. This container is not an Organizational Unit (OU), meaning that it does not support Group Policy assignments, relying instead on root domain Group Policies like the Default Domain Policy. This setup can lead…
-

A Step-by-Step Guide to Removing Unused PowerShell Modules
To remove old or unused PowerShell modules from your Windows computer, you can follow these straightforward steps. These actions may help to resolve issues like slow startup times in PowerShell or conflicts between different modules. Listing Installed Modules First, to see which third-party PowerShell modules are installed, you can use the following command: Get-InstalledModule This…
-

How to Fix Slow Startup Times for PowerShell Console and Scripts
I have observed that the PowerShell console can be slow to open across various computers, sometimes taking several minutes. This slow start impacts not only the command shell (powershell.exe or pwsh.exe) but also the execution of logon PowerShell scripts via Group Policy Objects (GPO) or scheduled tasks. In this piece, we will explore possible causes…
-

A Comprehensive Guide to Writing Logs to the Windows Event Viewer Using PowerShell and CMD
To log event information directly to the Windows Event Viewer using PowerShell or Command Prompt, you can utilize the Write-EventLog cmdlet. This approach is beneficial for tracking script execution without creating text log files. Here’s how you can do it: Log an Information Event:Use the following command to write an informational entry to the Application…
-

How to Hide or Block a Specific Windows Update: A Step-by-Step Guide
Sometimes, after installing a Windows update, users may face issues such as the operating system, specific programs, or drivers malfunctioning. In such cases, it is necessary to uninstall the troublesome update and prevent its reinstallation. This guide outlines how to temporarily pause updates and block unwanted updates from the Windows Update service. Using the Microsoft…
-

Understanding the Maximum Concurrent Connections Limit in Windows 10 and 11: What You Need to Know
The desktop editions of Windows 10 and 11 impose a strict limit on the number of simultaneous network connections, allowing only 20 incoming connections. This restriction can cause issues when using these operating systems as file or print servers, leading users to encounter an error message indicating that no more connections can be made due…
-

Configuring Windows Firewall Logging: A Step-by-Step Guide and Log Analysis Techniques
If you suspect that the built-in Windows Defender Firewall is obstructing network connections from a specific program or service, it’s unwise to disable it entirely. Instead, you can log all network traffic passing through the firewall to identify filtered or dropped packets, as well as find relevant ports and source/destination IP addresses. This will allow…