Skip to content

Instantly share code, notes, and snippets.

View Lukaszeq's full-sized avatar

Lukasz Pojezierski Lukaszeq

View GitHub Profile
@Lukaszeq
Lukaszeq / is-TPM-active.ps1
Created November 24, 2022 11:48
Is TPM activated on this machine?
$tpmCheck = Get-Tpm
$isTpmOn = $tpmCheck."TpmActivated"
Write-Host "Is TPM activated on this machine?"
$isTpmOn = [bool]$isTpmOn
if (($isTpmOn) -eq $true) {
Write-Host "Yes, TPM is activated." -ForegroundColor Green
}
else {
@Lukaszeq
Lukaszeq / stop-Win11-upgrade-prompt.bat
Created November 4, 2022 11:38
Stop nagging an user to upgrade from Win 10 to Win 11
@echo off
cls
mkdir %HOMEDRIVE%\stopWin11\
cd %HOMEDRIVE%\stopWin11\
echo Windows Registry Editor Version 5.00 > win11-stop-update.reg
echo. >> win11-stop-update.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate] >> win11-stop-update.reg
echo "ProductVersion"="Windows 10" >> win11-stop-update.reg
echo "TargetReleaseVersion"=dword:00000001 >> win11-stop-update.reg
echo "TargetReleaseVersionInfo"="26H2" >> win11-stop-update.reg