Check Windows Servers Activation Status

I needed a quick way to check activation status of Windows Servers in a domain. This is the solution I came up with using PowerShell to run the slmgr.vbs script for output. I’m not great with PowerShell, and I’m sure this can be cleaned up or made more efficient, but this ‘hack’ worked for me.

$computers = get-adcomputer -filter "OperatingSystem -Like '*Windows Server*' -and Enabled -eq 'True'" | select-object name

foreach($computer in $computers) {
	write-host $computer.name
	Invoke-Command { (cscript /Nologo "C:\Windows\System32\slmgr.vbs" /xpr) -join '' } -ComputerName $computer.name
}

The output will be one of the following, with variation to the edition:

Windows(R), ServerStandard edition:    Windows is in Notification mode
Windows Server(R), ServerDatacenter edition:    The machine is permanently activated.

Restore Windows 11 Right-Click Context Menu

I’m not a huge fan of the new right-click context menu in Windows 11 because there are some utilities I use that I constantly need to select “Show More Options…” on.

To revert the new style right-click context menu to the old style, a simple Registry modification can be made; here’s the command line.

reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve

Sign out of your Windows account and back in, or you can reboot.

To revert back to the new style right-click context menu, use the following command.

reg delete "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f

Windows 11 – 0x80070026 Reached the end of the file.

I’ve been plagued by the following error when copying small files to/from a NAS on my LAN using Windows 11 22H2.

0x80070026 Reached the end of the file.

There doesn’t seem to be a rhyme or reason to this. It’s on a TeraStation Pro II NAS. If I copy large files, no issue. Sometimes I can compress the file on the NAS into a ZIP and then copy it to my system.

I don’t think its an offline files cache issue: https://docs.microsoft.com/en-us/troubleshoot/windows-client/networking/access-offline-files-file-server-removed-from-network

Putting this here so I can come back and document my solution.

Test 1

If I create a share on my system as follows, I can copy the file to/from my NAS through the share.

mkdir c:\share
net share PUBLIC=c:\share /grant:everyone,FULL

Interesting to note: If I try to copy the file to c:\share\ again, it will error AND delete the existing file that was successfully copied.

Window Server 2019 – 1809, 1903, 1909 Servicing Channels

It can get a bit confusing. The below website summarizes the server releases.

https://docs.microsoft.com/en-us/windows-server/get-started/windows-server-release-info

There are two servicing models for Windows server – a long term servicing channel and a semi annual channel.

The Long Term Servicing Channel (LTSC) is like the old server releases of 2008, 2012 etc. They are major releases that are supported for a long time. While they do get security updates, they don’t get many (if any) feature updates. The idea behind these version of Windows Server is that it is stable, so it’s a good choice for your core infrastructure.

The other servicing option is is the Semi-Annual Channel (SAC). This version of Windows Server has new features, but a much shorter support period. The new features tend to be geared more towards things like Containers and Microservices – devops stuff. This version of windows is unavailable with a GUI – it is in core mode only.

Unless you need any of the features in the SAC branch (1909, 1903) then there isn’t really a need to upgrade. Nearly all of our clients are on 1809 because it is stable – only a couple have deployed 1903 or 1909 and these are for very specialised reasons.

As 1809 and 1909 are two different servicing channels, they cannot be upgraded in place.

https://docs.microsoft.com/en-us/windows-server/get-started-19/servicing-channels-19

Hope this information is helpful.

Windows Server releaseServicing optionEditionsAvailabilityBuildMainstream support end dateExtended support end date
Windows Server 2022Long-Term Servicing Channel (LTSC)Datacenter, Standard2021-08-1820348.1692026-10-132031-10-14
Windows Server, version 20H2Semi-Annual ChannelDatacenter Core, Standard Core2020-10-2019042.5082022-08-09Not applicable
Windows Server, version 1909Semi-Annual ChannelDatacenter Core, Standard Core2019-11-1218363.418End of servicingNot applicable
Windows Server 2019 (version 1809)Long-Term Servicing Channel (LTSC)Datacenter, Essentials, Standard2018-11-1317763.1072024-01-092029-01-09
Windows Server 2016 (version 1607)Long-Term Servicing Channel (LTSC)Datacenter, Essentials, Standard2016-10-1514393.0End of servicing2027-01-11

Support Dates

ListingStart DateMainstream End DateExtended End Date
Windows Server 2019Nov 13, 2018Jan 9, 2024Jan 9, 2029

Key differences

The following table summarizes the key differences between the channels:

DescriptionLong-Term Servicing Channel (Windows Server 2019)Semi-Annual Channel (Windows Server)
Recommended scenariosGeneral purpose file servers, Microsoft and non-Microsoft workloads, traditional apps, infrastructure roles, software-defined Datacenter, and hyper-converged infrastructureContainerized applications, container hosts, and application scenarios benefiting from faster innovation
New releasesEvery 2–3 yearsEvery 6 months
Support5 years of mainstream support, plus 5 years of extended support18 months
EditionsAll available Windows Server editionsStandard and Datacenter editions
Who can use it?All customers through all channelsSoftware Assurance and cloud customers only
Installation optionsServer Core and Server with Desktop ExperienceServer Core for container host and image and Nano Server container image

Clear Windows Event Log and Reliability History Command Line

Clear all the Windows Event Logs, resetting reliability history, from the command line.

Command Line Method

for /F "tokens=*" %1 in ('wevtutil.exe el') do wevtutil.exe cl "%1"

Batch Script Method

@echo off
for /F "tokens=*" %%E in ('wevtutil.exe el') do wevtutil.exe cl "%%E"

Powershell Method

wevtutil el | Foreach-Object {Write-Host "Clearing $_"; wevtutil cl "$_"}