📚 The OSLicense module is a new built-in PowerShell module designed to manage Windows activation, intended to supersede the legacy slmgr.vbs script. As we mentioned previously, Microsoft has deprecated the VBScript engine in Windows and it is expected to be removed from the OS in upcoming releases over the next couple of years. Therefore, existing VBScript scripts will gradually be replaced by PowerShell equivalents or WMI classes. In the September updates for Windows 11, a new PowerShell module called OSLicense was added. It is designed to supersede the well-known slmgr.vbs script, which has served as the primary command-line tool for managing Windows licensing and activation for over two decades. Check whether the module is installed on the computer: Get-Module -ListAvailable -Name OSLicense Check your Windows license type and its activation status: Get-OSLicenseInfo | Select Name, Version, LicenseStatus, Description Let's look at how to manually activate Windows against a KMS server using the OSLicense module. Install a GVLK product key for you Windows version: Invoke-OSLicense -InstallProductKey "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX" Specify the KMS server address and port: Set-KmsLicenseInfo -ServerName kms1.woshub.com -Port 1688 Activate Windows on the specified KMS server: Invoke-OSLicense -ActivateOnline 📝System administrators can now proactively audit their environment for dependencies and search for scripts, MDT/SCCM task sequences, Intune/RMM automation and Group Policy scripts containing slmgr.vbs or cscript calls, and begin migrating their automation logic to the modern PowerShell cmdlets. When Microsoft disables VBScript Feature on Demand (FoD) component by default around 2027 (Phase 2 of deprecation), slmgr.vbs will stop working out of the box because it is a VBScript file. Any scripts, task sequences, or helpdesk procedures that call slmgr.vbs will fail. 📌 The post covers how OSLicense cmdlets correspond to slmgr.vbs options, along with typical usage examples, including installing and uninstalling a Windows product key, checking license status, KMS and offline activation. 📚 PowerShell OSLicense Module: Manage Windows Activation Without slmgr.vbs
Open in Telegram
Windows OS Hub for SysAdmins
Windows System Admin's Blog 🌐https://woshub.com ▶️ https://www.youtube.com/@woshub ⚙️ Detailed guides cover Windows Server, Active Directory, GPO, PowerShell, Exchange, Microsoft 365, VMware, Linux and more.
Average views per post by day
By publication day
Show as table
| Date | Avg views per post |
|---|---|
| Nov 3, 2026 | 518 |
| Nov 4, 2026 | 553 |
| Nov 11, 2026 | 411 |
| Nov 12, 2026 | 434 |
| Nov 13, 2026 | 513 |
| Nov 18, 2026 | 402 |
| Nov 20, 2026 | 410 |
| Nov 24, 2026 | 246 |
| Nov 25, 2026 | 216 |
| Nov 27, 2026 | 224 |
Most viewed this month
- 01Views553Forwards—Reactions13Comments—
- 02Views518Forwards—Reactions15Comments—
- 03Views513Forwards—Reactions15Comments—
- 04Views434Forwards—Reactions7Comments—
Latest posts
🔥 By default, the built-in Windows Firewall doesn’t log dropped packets or successful network connections. If you suspect that the Windows Firewall is blocking connections to a specific port or IP address, you can enable firewall logging to identify the issue without disabling the firewall completely. Let’s look at how to enable logging of rejected (DROP) connections, find the connection attempts in the logs (source and port), and create the appropriate allow rule. 🧱 ☑️ The following PowerShell command configures Windows Defender Firewall to log blocked network traffic for the Public profile to a plain text file: Set-NetFireWallProfile -Profile Public -LogBlocked True -LogMaxSize 20480 -LogFileName "%systemroot%\system32\LogFiles\Firewall\pfirewall.log" -Verbose ☑️ Or you can send the network connection logs to the Windows Event Viewer. This can sometimes be more convenient than grepping plain text files. To do this, enable the following audit policy: Auditpol /set /category:"System" /SubCategory:"Filtering Platform Packet Drop" /failure:enable Then you can use the following PowerShell function to analyze firewall log files, which presents the log as a convenient graphical table using Out-GridView. function Get-WindowsFirewallLog { param( [parameter(Position=0,Mandatory=$false)] [ValidateScript({Test-Path $_})] [string]$LogFilePath = "$env:SystemRoot\System32\LogFiles\Firewall\pfirewall.log" ) $headerFields = @("date","time", "action","protocol","src-ip","dst-ip","src-port","dst-port","size", "tcpflags","tcpsyn", "tcpack","tcpwin","icmptype","icmpcode", "info","path") $firewallLogs = Get-Content $LogFilePath | ConvertFrom-Csv -Header $headerFields -Delimiter ' ' $firewallLogs | Out-GridView } Get-WindowsFirewallLog ✅ This guide explains how to enable Windows Firewall logging and the basic methods for searching and analyzing firewall logs. 📖 How to Enable and Analyze Windows Firewall Logs
Open in Telegram📚 PowerShell modules are packaged collections of cmdlets that can be used to manage various Windows features, server roles and cloud services. PS modules are used for infrastructure management and the automation of various tasks. The central PowerShell Gallery repository contains hundreds of ready-made modules from Microsoft, third-party vendors, and independent developers that can be downloaded and installed on computers. ⚙️ PSGallery is the official, public Microsoft repository, which is registered by default on Windows. To list all registered repositories: Get-PSRepository Windows admins can connect additional PS repositories, including private and local ones. For example, I want to install a UEFI (BIOS) management PowerShell module for my DELL laptop. To search for a specific PowerShell module across the connected repositories: Find-Module *BIOS* Find the required module in the list, copy its name, and then install it: Install-Module DellBIOSProvider To list all the third-party PowerShell modules installed on a computer: Get-InstalledModule To show a list of modules loaded (imported) into the current PowerShell session: Get-Module The article at the link provides more details about other aspects of managing PowerShell modules and repositories in Windows. ✅ How to Manage PowerShell Modules and Repositories in Windows: Install, Update, and Remove
Open in Telegram📹 (Video): How to Reset a Forgotten Local Administrator Password with WinRE & CMD This video walkthrough shows how to use a well-known Windows admin trick to reset a local administrator password or regain administrative privileges when the password has been lost or forgotten. This trick involves modifying the accessibility components of the Windows Recovery Environment (WinRE) or the Windows installation media in order to obtain a privileged command prompt when normal administrative access is unavailable. ✅ We will demonstrate how to replace the Ease of Access executable (utilman.exe) with cmd.exe in the Windows Recovery Environment. After a reboot, clicking the Accessibility icon on the sign-in screen drops you into a command prompt running as NT AUTHORITY\SYSTEM. https://www.youtube.com/watch?v=_VwZCs-0TAg
Open in Telegram📝 In complex PowerShell and BAT scripts, in addition to text-based logging, it can often be useful to write important events directly to the Windows Event Log. Custom script events in Event Viewer can be used for monitoring, triggering tasks via Task Scheduler, or centralized log collection. To write events to the Windows Event Log, use the built-in PowerShell cmdlet Write-EventLog. 🔹 Write a simple event to the standard Application log: Write-EventLog -LogName Application -Source "Application" -EntryType Information -EventID 1001 -Message "DB backup script completed successfully" 🔹 To make it easier to filter events by source, you can create a custom event source. New-EventLog -LogName Application -Source "MyScript" Then you can write an informational event to the Application log using your custom source: Write-EventLog -LogName Application -Source "MyScript" -EntryType Information –EventID 1 –Message "Querying the DB server status (DBMonitoring.ps1)" The new entry will be added to the event log. 🔹 You can create a custom EVTX log file for your script events: New-EventLog -LogName CustomPSLog -Source PS1Script ✅ In BAT scripts, you can use the built-in eventcreate.exe command to write events to Event Viewer: eventcreate /t information /l application /id 1 /d "BAT script started" Write to the Windows Event Log in PowerShell and CMD Scripts
Open in TelegramSafe Cleanup of C:\Windows\Installer Folder: Find Orphaned MSI and MSP Files 🛠 One of the common causes of running out of free space on the system drive in Windows is the C:\Windows\Installer folder. Over time, it can grow to dozens of gigabytes. This folder contains the system cache for packages installed through the Windows Installer service, including cached copies of installers in the .MSI format, as well as their update packages (.MSP format). The msiserver automatically caches installation packages to the %windir%\Installer directory when applications are installed or updated, even if the installation is subsequently cancelled. These cached copies of MSI installation files allow you to safely uninstall, repair, or modify installed Windows apps, even if the source installation files have been deleted. During a standard program uninstallation, MSI and MSP files in this folder should be removed automatically. In practice, orphaned packages often remain as a result of interrupted installations, the use of third-party uninstallers, or outdated versions being left behind after updates. ⚠️ The key point to remember is that you should never manually delete files from %windir%\Installer without thinking. You might run into issues when trying to uninstall or repair installed apps properly if you don't have cached MSI and MSP packages. ✅ We have a ready-to-use PowerShell script in our GitHub repository that queries the Windows Installer service for the list of registered packages and compares it with the files physically stored in C:\Windows\Installer. Any MSI/MSP files that exist on disk but are missing from the msiexec database are considered orphaned. The script implements the same logic as the popular third-party PatchCleaner tool. You can download this PowerShell script here. The script only lists orphaned MSI and MSP packages that are no longer associated with any installed program. It does not remove anything. Download and run the script: Set-ExecutionPolicy RemoteSigned -Scope Process .\Get-OrphanedMSIInstallers.ps1 In my case, the script found several orphaned MST patches for Adobe Acrobat Reader. These were taking up about 7 GB of space. 📚 How to Properly Clean Up the Windows Installer Folder
Open in TelegramHow to Shrink WSL2 or Docker Desktop VHDX Files in Windows 11 🐧 When using Windows Subsystem for Linux (WSL2), the Linux distribution's virtual disk file (ext4.vhdx) can grow to tens of gigabytes. However, deleting files inside the WSL distro environment doesn’t automatically reduce the size of the VHDX file on the Windows filesystem. Dynamic VHDX files can grow as new data is written to them, but they do not automatically shrink when data is deleted inside the virtual disk from within the guest OS. ⚠️ For example, the ext4.vhdx file on the Windows system drive might occupy 50 GB, even though only 3 GB is actually being used inside WSL. These VHDX files can be manually compacted offline. 📌 To check how much space is actually being used inside WSL image: df -h / To find the path to your WSL distribution's VHDX file, first list all installed WSL distributions: wsl.exe --list –verbose Then retrieve the virtual disk information for the specified WSL image from the registry: $distro='Ubuntu-26.04' $vhdx=(Get-ChildItem -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss | Where-Object { $_.GetValue("DistributionName") -eq $distro}).GetValue("BasePath") + "\ext4.vhdx" Stop the running WSL instance: wsl --shutdown Compact the VHDX file using PowerShell: Optimize-VHD -Path "..\fullpath\ext4.vhdx" -Mode Full Or using diskpart: select vdisk file="..\fullpath\ext4.vhdx" attach vdisk readonly compact vdisk detach vdisk Similarly, you can compact the Docker Desktop VHDX file after removing any unused images and containers. Optimize-VHD -Path "$env:LOCALAPPDATA\Docker\wsl\disk\docker_data.vhdx" -Mode Full 📚 In this article, we'll explore where WSL and Docker Desktop VHDX disks are stored, how to determine actual disk space usage, clean up data, and reduce the size of virtual disks using Optimize-VHD or diskpart. It also covers the experimental WSL2 sparse mode, which can automatically return unused space to the host system. How to Shrink a WSL2 or Docker Desktop Virtual Disk in Windows
Open in Telegram🛡 Audit Windows Certificate Stores for Suspicious Certs with Sysinternals Sigcheck 🤝The Sigcheck tool from Microsoft Sysinternals can compares the list of installed certificates with the list of Trusted Root Certification Authorities published by Microsoft (Microsoft Certificate Trust List), and returns third-party certificates that are not on that list. These could be legitimate certificates that you added yourself, such as internal CA or self-signed certificates, or certificates injected by malware or other rogue certs. For security purposes, it is recommended to periodically scan local trusted certificate stores for suspicious third-party certificates. You can either download Sigcheck locally or run it directly from the internet via the Sysinternals Live UNC path. ✅ Scan the machine’s certificate stores for any valid certificates that are not rooted in the Microsoft Certificate Trust List. \\live.sysinternals.com\tools\sigcheck64.exe -tv * ✅ Scan the user's cert store: \\live.sysinternals.com\tools\sigcheck64.exe -tuv * ✅ Delete a certificate by its thumbprint: certutil -delstore Root 540D460E0BB3FA7C30673E879CF73D71815A315C 📖Find Suspicious Certificates in the Windows Cert Store with Sysinternals Sigcheck
Open in Telegram🔐 OpenVPN is a lightweight, easy-to-deploy, open-source VPN solution that can be used to implement secure VPN connections in small organizations and home networks. The OpenVPN Server can run not only on Linux but also on Windows machines A common use case is securing remote access to Windows VDS/VPS hosts when you don't want to expose an unprotected RDP port directly to the Internet. One of the major changes in OpenVPN 2.7 is the complete removal of the Wintun driver (due to licensing restrictions imposed by its developer and conflicts with other VPN clients). OpenVPN 2.7 on Windows now uses ovpn-dco-win driver (OpenVPN Data Channel Offload) by default. It moves traffic processing and encryption into the Windows kernel, delivering significantly better performance. 📚 The article has been completely updated for OpenVPN 2.7 and covers: 🔹 PKI generation using Easy-RSA 3 🔹 Using ovpn-dco-win instead of Wintun driver 🔹 Using tls-crypt instead of tls-auth 🔹 NAT and routing configuration 🔹 Certificate revocation 🔹 Pushing LAN routes to VPN clients 🔹 Configuring redirect-gateway 💡 You can deploy an OpenVPN server not only on Windows Server but also on desktop editions including Windows 10 and 11. ✅ This guide will show you how to set up an OpenVPN server on a Windows 11 workstation and how to connect to it remotely from another Windows computer. How to Install and Configure OpenVPN Server on Windows
Open in Telegram👥 In large enterprise environments, where the same infrastructure servers can be managed by multiple administrators or support teams, it sometimes happens that someone accidentally removes a specific app or agent from a management host. To investigate such incidents and identify the exact user who installed or uninstalled a specific app, you can search for the app installation and removal events in the Windows Event Viewer. 📝 Events relating to the installation or removal of classic Windows apps via the MSI installer are logged in the Event Viewer: 📥 11707 – event code for successful installation of the MSI application. 🗑 11724 – event code for uninstalling the MSI-based app You can open the Event Viewer log console (eventvwr.msc) and enable filtering for event IDs 11707 and 11724 for the Application log, or use a simple PowerShell script to find the related events. For example, the following PowerShell script returns information about who installed or uninstalled the Zabbix agent on a Windows host and when this occurred: $app_name='*Zabbix*' Get-WinEvent -FilterHashtable @{LogName="Application"; ID=11707,11724; ProviderName='MsiInstaller'}| Where-Object { $_.Message -like $app_name }| Select TimeCreated, @{Name='Username'; Expression={(New-Object System.Security.Principal.SecurityIdentifier($_.userid)).Translate([System.Security.Principal.NTAccount]).Value}}, Message How to Detect Which User Installed or Removed a Program on Windows using Event Viewer
Open in TelegramConnections
Similar channels
NetAngels@netangelsTechnologies1.03K
PrivateKey AI | Claude Code и вайбкодинг@privatekey_aiTechnologies1.03K
VibeLab@vibelab_newsTechnologies1.03K
SNK-S. Про аудио, видео@snk_s_officialTechnologies1.03K
DC8800@dc8800Technologies1.03K
WingsNodeTeam ®@wingsnodeteamTechnologies1.03K
MARK37.COM@mark37publicTechnologies1.04K
FlexGIS - Карты для ваших задач@flexgisTechnologies1.03K