📚 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 TelegramPosts of Windows OS Hub for SysAdmins
🔥 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 Telegram📚 How to Fix a Temporary User Profile in Windows (Including RDS) Logging in with a temporary user profile is a well-known failure that affecting both Windows workstations and Windows Server RDS hosts, when the User Profile Service fails to load the user's authentic profile. The user gets the banner We can’t sign in to your account, an empty desktop, and the warning that all changes will be lost after sign-out. You can check profile path was actually used for user sign-in using the command: $env:USERPROFILE If the temporary profile is used, the command will return something like this: C:\Users\TEMP.yourHOSTNAME. To find out the user SID and the name of the folder where the user's actual profile is stored, run: whoami /user Get-CimInstance Win32_UserProfile | Select LocalPath, Loaded, SID Then check the Event Viewer (Windows Logs > System) for User Profile Service events, which usually contain information about the source of the problem. For example, look for Event IDs: 🔹 1511 - signed in with a temporary profile 🔹 1502 or 1508 — permissions or corrupted NTUSER.DAT 📚 The post walks through the common scenarios: missing profile directory, changing the profile path in the registry, ACL issues, antivirus locking NTUSER.DAT, and cleanly creating a new profile with data migration. We Can’t Sign In to Your Account: Fix Temporary User Profile in Windows
Open in Telegram📹 (Video): Repair Windows with DISM and SFC: The Correct Order Explained https://www.youtube.com/watch?v=tz8ftJ5rTSE SFC (System File Checker) and DISM (Deployment Image Servicing and Management) are both built-in Windows command-line repair tools used to fix corrupted system files, but they operate at different levels of the operating system. 🔹 DISM (System Image Level): Repairs the underlying Windows component store (WinSxS) and system image. 🔹 SFC (File Level): Scans protected individual operating system files and replaces damaged or missing ones using the local component store
Open in TelegramSet Up SSH Key Authentication for Windows OpenSSH 📟 The built-in OpenSSH server in Windows supports SSH key-based authentication, enabling you to perform remote logins without entering a password, which is useful for performing various remote administration and automation tasks. To set it up, generate an SSH key pair on the client machine as usual. Then, add the public key to the authorized_keys file on the Windows machine running the OpenSSH server. However, there’s a Windows-specific quirk that often catches administrators out: the location of the authorized_keys file depends on whether or not the user is a member of the local Administrators group. ⚠️ On Windows, the location of the file containing the public keys depends on the account's privileges. The default locations differ: 🔹 Regular (non-admin) users: C:\Users\%username%\.ssh\authorized_keys 🔹 Members of the local Administrators group: C:\ProgramData\ssh\administrators_authorized_keys The following option in the sshd_config file enables this behaviour by default: Match Group administrators AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys If you comment out this block in sshd_config, the override no longer applies. Unless a different location is specified in another sshd option, OpenSSH will use the standard ~/.ssh/authorized_keys file in the user's profile, including for local administrators. 📚 The article covers configuring key-based SSH authentication on Windows 10/11 and Windows Server, including: ✅ Generating SSH keys on the client machine ✅ Adding public keys on a Windows host running the OpenSSH server ✅ Configuring the sshd_config file on the server side ✅Auditing OpenSSH auth logs How to Configure SSH Key-Based Authentication in Windows
Open in Telegram🛠 How to Install Microsoft Office LTSC 2024 Office LTSC 2024 is a perpetual, volume-licensed Office edition designed for organizations that do not need a Microsoft 365 subscription and may operate in environments with limited internet access. This Office release designed for organizations with specific long-term servicing and deployment requirements. Microsoft Office LTSC 2024 can be deployed using the Office Deployment Tool (ODT), which provides administrators with control over installation, configuration, and Office deployment without relying on the standard interactive installer. In this guide, we cover the deployment process, from preparing the installation files to installing Office using the command line. 📌 What’s covered: 🔹Downloading the Office Deployment Tool 🔹 Configuring the Office deployment using DeployOffice2024LTSC.xml 🔹 Specifying the Office edition, update channel, language, and installation options 🔹 Using XML configuration to standardize deployments across multiple computers You can only downlow the installation files from the Microsoft CDN: setup.exe /download DeployOffice2024LTSC.xml Or immediately install the Office LTSC 2024 on a computer: setup.exe /configure DeployOffice2024LTSC.xml 📺 Video tutorial: https://www.youtube.com/watch?v=1EaLVyP-rtI 📖 Step-by-step guide: https://woshub.com/install-microsoft-office-ltsc-2024/
Open in Telegram📚 Rclone on Windows: Automate backup and sync files with Google Drive and other cloud storage providers. As an alternative to official cloud clients, you can use Rclone a small command-line tool often described as rsync for the cloud. It supports Google Drive and many other cloud storage providers, including S3-compatible object storages, allowing you to automate the synchronization of local folders with the cloud using scripts. Install Rclone on Windows using winget: winget install Rclone.Rclone Run the interactive configuration wizard to connect to Google Drive: rclone config One-way folder copying to cloud storage: rclone copy "C:\Backup" gdrive:MyPCBackup --progress Mirror a local directory to a cloud (one-way sync). This makes the destination identical to the source by copying new files and deleting removed ones: rclone sync "C:\Backup" gdrive:MyPCBackup --progress ⚠️ Be careful with sync! If you delete a file from the source directory, it will also be deleted from the cloud during synchronization. If you want to use the copy in the cloud storage as a backup, consider using the --backup-dir option to move older versions of modified or deleted files into an archive. 💡 What else can you do with Rclone? 🔹 Automate cloud backups with simple scripts 🔹 Mount cloud storage as a regular network drive with a drive letter assigned (WinFSP required). 🔹 Migrate data between cloud providers 🔹 Encrypt files transparently before uploading them to cloud using the rclone crypt command Rclone, unlike official cloud clients, doesn't sit in the system tray and consume system resources. It is highly versatile, makes switching cloud providers easier, and is ideal for scripting and automation tasks. 📚 The article covers Rclone installation and configuration on Windows, how to connect to cloud storage (Google Driver in this example), using copy and sync commands, scheduled backups, and data encryption. It also includes a simple PowerShell script that: 🔹 Syncs selected local folders with Google Drive 🔹 Copies deleted and modified files to the cloud archive 🔹 Automatically removes old file versions 🔹 Runs on a schedule via Windows Task Scheduler ✅ rclone on Windows: Sync and Backup Files to Google Drive and Other Clouds
Open in Telegram⚠️ UAC prompt with missing “Yes” button A classic case that still confuses many admins and users: you right-click an app to run it elevated → Run as administrator and the User Account Control dialog appears… but there’s only a No button. The Yes button is completely missing in UAC. This behavior means there are no enabled local administrator accounts left on the computer that can approve the elevation request. The currently signed-in account has lost membership in the local Administrators group and is now just a regular standard user. ✅ Fix: UAC Yes button missing in Windows 11
Open in Telegram⌨️ The built-in Windows Keyboard Filter feature allows administrators to prevent users from using specific keyboard shortcuts. This can be useful for devices operating in kiosk mode, as well as for operator workstations, terminals and other computers with restricted user interfaces. For example, you can deny the use of standard keyboard shortcuts such as Alt+Tab, Alt+F4, Ctrl+Alt+Del, Ctrl+Shift+Esc, Ctrl+C/Ctrl+V, as well as custom key combinations or individual keys. This feature can be installed using the following PowerShell command: Enable-WindowsOptionalFeature -Online -FeatureName Client-KeyboardFilter The registry key HKLM\SOFTWARE\Microsoft\Windows Embedded\KeyboardFilter contains a list of predefined Windows keyboard shortcuts. To block one of them, simply change the value of the corresponding registry item to Blocked. To block the Alt+Tab shortcut, for example, change this registry entry: reg add "HKLM\SOFTWARE\Microsoft\Windows Embedded\KeyboardFilter" /v "Alt+Tab" /t REG_SZ /d "Blocked" /f A custom key combination can be added under CustomFilters: reg add "HKLM\SOFTWARE\Microsoft\Windows Embedded\KeyboardFilter\CustomFilters" /v "Ctrl+C" /t REG_SZ /d "Blocked" /f An individual key can be blocked by its scan code. For example, to block the left Windows key: reg add "HKLM\SOFTWARE\Microsoft\Windows Embedded\KeyboardFilter\CustomScancodes" /v "E05B" /t REG_SZ /d "Blocked" /f 📚 The article also covers how to create custom filters for individual keys and combinations, block keys by scan code, and check active policies using Event Viewer and PowerShell. ⚠️ Unfortunately, Keyboard Filter is only supported in the Enterprise, Education, IoT Enterprise and LTSC editions of Windows. Also, the filter does not work in RDP sessions. How to Block Specific Keyboard Shortcuts in Windows with Keyboard Filter
Open in Telegram🔐 How to Extract Saved Passwords from Windows Credential Manager Using PowerShell In this new video, we focus specifically on extracting passwords saved in Windows Credential Manager using PowerShell. We cover: 🔹 Listing stored Credential Manager entries 🔹 Identifying the target credential 🔹 Using PowerShell to retrieve the saved password 🔹 How Windows DPAPI protects stored credentials 🔹 Why the extraction must be performed in the same user's security context that originally saved the credential 🔹 Why running the commands as SYSTEM, another user, or after a forced password reset may result in an empty password or access error 🎥 Watch the video: https://www.youtube.com/watch?v=eBbUa6_aLjI 📖 Full guide: https://woshub.com/saved-passwords-windows-credential-manager/
Open in Telegram🕐 Synchronizing Active Directory Domain Time with an External NTP Time Server In an Active Directory domain, a strict hierarchical time synchronization scheme is used: 🔹 The PDC Emulator in the root domain is the primary time source for the domain 🔹 Other domain controllers (DCs) synchronize their time from the PDC Emulator 🔹 Domain-joined workstations and member servers get their time from the nearest domain controller ⚙️ By default, the PDC syncs its time with the local CMOS (hardware) clock of the physical server (or the hypervisor CMOS if it's running in a VM). If the hardware clock is inaccurate, it can cause problems with authentication and interaction with external systems. That's why you should configure the PDC to synchronize with a reliable external NTP time source and disable synchronization with the local hardware clock/hypervisor. ✅ In this article, we look at how to properly configure time synchronization in an Active Directory domain and what to do if something isn't working correctly. Configuring Time Synchronization in an Active Directory Domain
Open in Telegram🕐 Resource-intensive jobs in Windows launched via Task Scheduler can run significantly slower than when started manually. I encountered an issue with a Robocopy backup task launched via Task Scheduler on a high-load server. The scheduled task failed to complete overnight, but it finished in just a couple of hours when the backup script was run manually. The reason: by default, Windows Task Scheduler creates tasks with priority 7 (Below Normal). As a result, on high-load hosts, processes launched by Task Scheduler receive less CPU time than processes running at normal priority. ⚙️ The classic way to change a scheduled task's priority, which works on all versions of Windows, is to export the task to an XML file, open the file in a text editor, and change the Priority value from 7 (the default for all Task Scheduler tasks) to either 5 (Above Normal) or 6 (Normal). Then, the original task needs to be deleted and re-imported from the XML file with the new settings. However, if the task's settings are later changed through the graphical taskschd.msc console, its priority will be reset to its original value (7). ⚙️ Change the task priority with PowerShell ✅ Therefore, it is better to use the PowerShell cmdlets from the built-in ScheduledTasks module to change task priorities. Check the current task priority: $myTask = "py_Inspect" (Get-ScheduledTask -TaskName $myTaskName).Settings.Priority Set it to 5 (Above Normal): Set-ScheduledTask -TaskName $myTask -Settings (New-ScheduledTaskSettingsSet -Priority 5) 📖 How to Set Task Priority in Windows Task Scheduler
Open in Telegram