⚡ Windows Admin & Automatyzacja • Playbook 2026

Windows Zero-Click: Automatyzacja PowerShell & Inżynieria OOBE

Wyeliminuj ręczne klikanie w Windows 10, 11 i Server. Kompletny zbiór gotowych procedur i skryptów PowerShell: instalacja bez konta Microsoft w fazie OOBE (BypassNRO, Shift+F10, Audit Mode), ciche aktualizacje systemu i aplikacji przez Winget, onboarding nowego PC, ratowanie zablokowanego Windows Update oraz bezpieczny debloat.

Windows Zero-Click Automation & OOBE

📑 Szukasz podręcznej karty serwisowej A4?

Sprawdź karty A4 do druku: Windows Server & Active Directory oraz Windows Helpdesk & Desktop Support.

Otwórz Runbook A4 ➔

1. Inżynieria Windows OOBE: Obejście Wymogu Sieci i Konta Microsoft

Podczas pierwszej konfiguracji Windows 11 na ekranie powitalnym OOBE (Out-Of-Box Experience) instalator blokuje dalszy postęp, jeśli komputer nie ma połączenia z internetem lub wymaga zalogowania kontem Microsoft (MSA). Poniżej zestawiono oficjalne i sprawdzone procedury inżynierskie umożliwiające ominięcie tych blokad, instalację sterowników Wi-Fi w locie oraz wejście w tryb inspekcji (Audit Mode).

Skrót serwisowy: W dowolnym momencie fazy OOBE naciśnij Shift + F10 (lub Shift + Fn + F10 na laptopach), aby otworzyć uprzywilejowany Wiersz Poleceń (NT AUTHORITY\SYSTEM).

Obejście wymogu sieci (BypassNRO)

OOBE CORE

W oknie Shift+F10 wpisz poniższe polecenie. Komputer zrestartuje instalator OOBE i odblokuje przycisk 'Nie mam internetu', pozwalając na utworzenie konta lokalnego.

OOBE\BYPASSNRO 📋

Wymuszenie BypassNRO przez Rejestr

REGISTRY

Ręczny wpis do rejestru wymuszający wyłączenie wymogu sieciowego (jeśli polecenie OOBE\BYPASSNRO nie jest rozpoznawane w starszych kompilacjach).

reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE /v BypassNRO /t REG_DWORD /d 1 /f && shutdown /r /t 0 📋

Wstrzykiwanie sterowników w OOBE (Wi-Fi / RST)

PNPUTIL

Brak widocznego dysku NVMe (Intel VMD/RST) lub brak karty Wi-Fi w instalatorze. Włóż pendrive ze sterownikami .inf i zainstaluj je bez przerywania instalacji:

pnputil /add-driver D:\Drivers\*.inf /subdirs /install 📋

Tryb Inspekcji (Audit Mode: Ctrl+Shift+F3)

SYSPREP

Na pierwszym ekranie OOBE wciśnij Ctrl+Shift+F3. Windows uruchomi pulpit jako Administrator. Po zakończeniu konfiguracji zapieczętuj system dla klienta:

%WINDIR%\system32\sysprep\sysprep.exe /oobe /generalize /shutdown 📋

Obejście wymagań sprzętowych Windows 11 (TPM 2.0 / Secure Boot) w WinPE

LABCONFIG

Gdy instalator zgłasza 'Ten komputer nie spełnia minimalnych wymagań', wciśnij Shift+F10 na pierwszym ekranie instalatora i wklej:

reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassTPMCheck /t REG_DWORD /d 1 /f && reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassSecureBootCheck /t REG_DWORD /d 1 /f && reg add "HKLM\SYSTEM\Setup\LabConfig" /v BypassRAMCheck /t REG_DWORD /d 1 /f 📋

2. update-all.ps1 — Bezobsługowa Pełna Aktualizacja & WinSxS

Prawdziwa bezobsługowość: instaluje moduł PSWindowsUpdate bez interaktywnych pytań, pobiera i wdraża wszystkie poprawki jakościowe i sterowniki OEM, aktualizuje wszystkie programy firm trzecich przez Winget oraz oczyszcza bazę WinSxS i usuwa stare wersje bibliotek, uwalniając często 5-15 GB na dysku systemowym.

⚡ One-Liner w PowerShell (Uruchom jako Administrator):

INSTANT EXEC

Kopiuj i wklej do okna PowerShell z uprawnieniami administratora:

irm https://specinfo.org/win/update-all.ps1 | iex 📋
👁️ Pokaż pełny kod źródłowy skryptu .ps1
<#
.SYNOPSIS
    SpecInfo Windows Zero-Click: Unattended System, Driver & Third-Party App Updates with WinSxS Cleanup.
.DESCRIPTION
    This script automatically:
    1. Installs the PSWindowsUpdate module non-interactively.
    2. Downloads and installs all pending Windows Updates, security patches, and hardware drivers.
    3. Silently upgrades ALL installed third-party applications via Windows Package Manager (winget).
    4. Performs advanced Component Store cleanup (DISM StartComponentCleanup ResetBase) and clears update download caches.
    5. Evaluates pending reboot status.
.NOTES
    Author: SpecInfo Engineering Team (https://specinfo.org)
    Version: 1.0.0
    Requirements: PowerShell 5.1+ or PowerShell 7+, Administrator Privileges.
#>

#Requires -RunAsAdministrator

[CmdletBinding()]
param (
    [switch]$SkipDismCleanup,
    [switch]$AutoReboot
)

$ErrorActionPreference = "Continue"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

function Write-SpecHeader {
    param([string]$Title)
    Write-Host ""
    Write-Host ("=" * 70) -ForegroundColor Cyan
    Write-Host " [SpecInfo Zero-Click] $Title" -ForegroundColor Green
    Write-Host ("=" * 70) -ForegroundColor Cyan
}

function Write-SpecStep {
    param([string]$Message)
    Write-Host " [*] $Message" -ForegroundColor Yellow
}

function Write-SpecSuccess {
    param([string]$Message)
    Write-Host " [✓] $Message" -ForegroundColor Green
}

function Write-SpecWarning {
    param([string]$Message)
    Write-Host " [!] $Message" -ForegroundColor Magenta
}

Clear-Host
Write-Host "======================================================================" -ForegroundColor Cyan
Write-Host "   SPECINFO WINDOWS ZERO-CLICK AUTOMATION: UPDATE & MAINTENANCE       " -ForegroundColor Yellow
Write-Host "   https://specinfo.org | Enterprise Unattended Automation Deck       " -ForegroundColor DarkGray
Write-Host "======================================================================" -ForegroundColor Cyan

# STEP 1: Verify & Install PSWindowsUpdate Module
Write-SpecHeader "STEP 1/4: Verifying and installing PSWindowsUpdate module"
if (-not (Get-Module -ListAvailable -Name PSWindowsUpdate)) {
    Write-SpecStep "Configuring NuGet package provider..."
    Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Confirm:$false | Out-Null
    
    Write-SpecStep "Installing PSWindowsUpdate module from PowerShell Gallery..."
    Set-PSRepository -Name 'PSGallery' -InstallationPolicy Trusted -ErrorAction SilentlyContinue
    Install-Module -Name PSWindowsUpdate -Force -Confirm:$false -SkipPublisherCheck
}
Import-Module PSWindowsUpdate -Force
Write-SpecSuccess "PSWindowsUpdate module loaded and operational."

# STEP 2: Windows Update & Hardware Drivers
Write-SpecHeader "STEP 2/4: Scanning and installing Windows Updates & Drivers"
Write-SpecStep "Executing unattended patch scan (OS, Security, Hardware Drivers)..."
try {
    Get-WindowsUpdate -AcceptAll -Install -IgnoreReboot -Verbose
    Write-SpecSuccess "Windows Update deployment cycle completed."
} catch {
    Write-SpecWarning "Windows Update exception: $_"
}

# STEP 3: Third-Party Applications via Winget
Write-SpecHeader "STEP 3/4: Upgrading third-party software packages (Winget)"
$wingetPath = (Get-Command winget.exe -ErrorAction SilentlyContinue)?.Source

if ($wingetPath) {
    Write-SpecStep "Winget engine detected. Initiating unattended upgrade for all installed packages..."
    try {
        winget upgrade --all --silent --accept-source-agreements --accept-package-agreements --include-unknown
        Write-SpecSuccess "All detected application packages upgraded successfully."
    } catch {
        Write-SpecWarning "Some packages required closing active background processes: $_"
    }
} else {
    Write-SpecWarning "winget.exe not found in this environment context. Skipping app upgrades."
}

# STEP 4: Component Store & Storage Cleanup
Write-SpecHeader "STEP 4/4: Optimizing WinSxS Component Store & purging temporary buffers"
if (-not $SkipDismCleanup) {
    Write-SpecStep "Executing DISM Component Cleanup (consolidating superseded binaries)..."
    try {
        Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase
        Write-SpecSuccess "WinSxS Component Store optimized and compacted."
    } catch {
        Write-SpecWarning "DISM execution warning: $_"
    }
}

Write-SpecStep "Purging completed update downloads in SoftwareDistribution\Download..."
$dlPath = "$env:windir\SoftwareDistribution\Download"
if (Test-Path $dlPath) {
    Get-ChildItem -Path $dlPath -Recurse -Force -ErrorAction SilentlyContinue | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
    Write-SpecSuccess "SoftwareDistribution download cache purged."
}

# STEP 5: Summary & Reboot Assessment
Write-SpecHeader "EXECUTION SUMMARY"
$rebootRequired = (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired") -or 
                  (Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending")

if ($rebootRequired) {
    Write-Host ""
    Write-Host " [!] SYSTEM REBOOT IS PENDING TO FINALIZE PATCH INSTALLATION." -ForegroundColor Red -BackgroundColor Black
    if ($AutoReboot) {
        Write-SpecStep "-AutoReboot flag is active. System will reboot in 60 seconds..."
        shutdown /r /t 60 /c "SpecInfo: Rebooting after unattended system update cycle."
    } else {
        Write-Host "     Please restart the machine when convenient: Restart-Computer" -ForegroundColor Yellow
    }
} else {
    Write-SpecSuccess "All tasks completed successfully. No system reboot required."
}

Write-Host ""
Write-Host "======================================================================" -ForegroundColor Cyan
Write-Host "   CYCLE COMPLETED SUCCESSFULLY | SpecInfo.org                        " -ForegroundColor Green
Write-Host "======================================================================" -ForegroundColor Cyan

3. new-pc.ps1 — Bezdotykowy Onboarding Nowego Stanowiska PC

Przygotowuje nowy komputer w 3 minuty. Twardo wyłącza Fast Startup (likwidując problem blokowania partycji NTFS i dirty bit przy dual-boot z Linuxem), aktywuje profil Wysoka Wydajność, usuwa reklamy i wyszukiwarkę Bing ze Startu, włącza widoczność rozszerzeń plików oraz ukrytych folderów i cicho instaluje pakiet podstawowy (7-Zip, Chrome, Firefox, VLC, Notepad++, Adobe Reader).

⚡ One-Liner w PowerShell (Uruchom jako Administrator):

PROVISIONING

Kopiuj i wklej do okna PowerShell z uprawnieniami administratora:

irm https://specinfo.org/win/new-pc.ps1 | iex 📋
👁️ Pokaż pełny kod źródłowy skryptu .ps1
<#
.SYNOPSIS
    SpecInfo Windows Zero-Click: Automated Workstation Provisioning & Hardening.
.DESCRIPTION
    This script automatically:
    1. Disables Fast Startup (prevents NTFS volume lock and dual-boot dirty bit corruptions).
    2. Activates High Performance power profile and optimizes CPU sleep states.
    3. Purges Start Menu Bing web search suggestions, consumer promotions, and telemetric tracking.
    4. Configures File Explorer ergonomics: exposes file extensions, reveals hidden files, launches to "This PC".
    5. Silently installs essential IT toolchain (7-Zip, Chrome, Firefox, VLC, Notepad++, Adobe Reader).
    6. Forces authoritative time synchronization via Windows Time (NTP).
.NOTES
    Author: SpecInfo Engineering Team (https://specinfo.org)
    Version: 1.0.0
    Requirements: PowerShell 5.1+, Administrator Privileges.
#>

#Requires -RunAsAdministrator

[CmdletBinding()]
param (
    [switch]$SkipAppInstall
)

$ErrorActionPreference = "Continue"

function Write-SpecHeader {
    param([string]$Title)
    Write-Host ""
    Write-Host ("=" * 70) -ForegroundColor Cyan
    Write-Host " [SpecInfo Zero-Click] $Title" -ForegroundColor Green
    Write-Host ("=" * 70) -ForegroundColor Cyan
}

function Write-SpecStep {
    param([string]$Message)
    Write-Host " [*] $Message" -ForegroundColor Yellow
}

function Write-SpecSuccess {
    param([string]$Message)
    Write-Host " [✓] $Message" -ForegroundColor Green
}

Clear-Host
Write-Host "======================================================================" -ForegroundColor Cyan
Write-Host "   SPECINFO WINDOWS ZERO-CLICK: NEW PC ONBOARDING & PROVISIONING      " -ForegroundColor Yellow
Write-Host "   https://specinfo.org | Enterprise Unattended Automation Deck       " -ForegroundColor DarkGray
Write-Host "======================================================================" -ForegroundColor Cyan

# STEP 1: Disable Fast Startup & Hybrid Sleep
Write-SpecHeader "STEP 1/5: Disabling Fast Startup (NTFS Integrity & Dual-Boot Protection)"
$powerKey = "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power"
if (Test-Path $powerKey) {
    Set-ItemProperty -Path $powerKey -Name "HiberbootEnabled" -Value 0 -Type DWord -Force
    Write-SpecSuccess "Fast Startup disabled permanently (protects against dirty bit locks)."
}

# STEP 2: High Performance Power Profile
Write-SpecHeader "STEP 2/5: Activating High Performance power plan"
try {
    # Attempt High Performance scheme GUID (8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c)
    powercfg /setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 2>$null
    Write-SpecSuccess "High Performance power profile is now active."
} catch {
    Write-SpecStep "Default active power scheme maintained."
}

# STEP 3: File Explorer Ergonomics & Privacy Hardening
Write-SpecHeader "STEP 3/5: Configuring File Explorer ergonomics & stripping Start Menu ads"
$advExplorerKey = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
if (Test-Path $advExplorerKey) {
    Set-ItemProperty -Path $advExplorerKey -Name "HideFileExt" -Value 0 -Type DWord -Force
    Set-ItemProperty -Path $advExplorerKey -Name "Hidden" -Value 1 -Type DWord -Force
    Set-ItemProperty -Path $advExplorerKey -Name "LaunchTo" -Value 1 -Type DWord -Force # 1 = This PC
    Write-SpecSuccess "File extensions (.ext) and hidden files are now visible. Default path: This PC."
}

# Disable Bing search and consumer suggestions in Start Menu
$searchKey = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search"
if (-not (Test-Path $searchKey)) { New-Item -Path $searchKey -Force | Out-Null }
Set-ItemProperty -Path $searchKey -Name "BingSearchEnabled" -Value 0 -Type DWord -Force
Set-ItemProperty -Path $searchKey -Name "CortanaConsent" -Value 0 -Type DWord -Force

$policySearchKey = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search"
if (-not (Test-Path $policySearchKey)) { New-Item -Path $policySearchKey -Force | Out-Null }
Set-ItemProperty -Path $policySearchKey -Name "DisableWebSearch" -Value 1 -Type DWord -Force
Write-SpecSuccess "Start Menu Bing search suggestions and sponsored links disabled."

# STEP 4: Essential Toolchain Installation via Winget
Write-SpecHeader "STEP 4/5: Silent installation of essential productivity software"
if (-not $SkipAppInstall) {
    $apps = @(
        "7zip.7zip",
        "Google.Chrome",
        "Mozilla.Firefox",
        "VideoLAN.VLC",
        "Notepad++.Notepad++",
        "Adobe.Acrobat.Reader.64-bit"
    )
    
    $winget = (Get-Command winget.exe -ErrorAction SilentlyContinue)?.Source
    if ($winget) {
        foreach ($app in $apps) {
            Write-SpecStep "Installing package: $app..."
            winget install --id $app --silent --accept-source-agreements --accept-package-agreements --disable-interactivity --ignore-warnings | Out-Null
            Write-SpecSuccess "Package deployed: $app"
        }
    } else {
        Write-SpecWarning "Winget is not available in current execution context. Skipping app deployment."
    }
} else {
    Write-SpecStep "Software deployment skipped (-SkipAppInstall switch)."
}

# STEP 5: Authoritative NTP Time Sync
Write-SpecHeader "STEP 5/5: Synchronizing system clock with network time provider (W32Time)"
try {
    Start-Service -Name w32time -ErrorAction SilentlyContinue
    w32tm /resync /force | Out-Null
    Write-SpecSuccess "System clock successfully synchronized with NTP pool."
} catch {
    Write-SpecStep "NTP synchronization queued for background execution."
}

Write-Host ""
Write-Host "======================================================================" -ForegroundColor Cyan
Write-Host "   WORKSTATION PROVISIONING COMPLETED | SpecInfo.org                  " -ForegroundColor Green
Write-Host "======================================================================" -ForegroundColor Cyan

4. fix-update.ps1 — Ratowanie Zablokowanego Windows Update

Skuteczna recepta na kody błędów 0x80070005, 0x80240034 i zablokowany bufor pobierania. Czysto zatrzymuje usługi systemowe, archiwizuje SoftwareDistribution oraz catroot2, resetuje kolejkę BITS, ponownie rejestruje ponad 30 bibliotek COM DLL, resetuje WinSock i proxy oraz uruchamia pełne skanowanie spójności DISM RestoreHealth i SFC /scannow.

⚡ One-Liner w PowerShell (Uruchom jako Administrator):

UPDATE RESCUE

Kopiuj i wklej do okna PowerShell z uprawnieniami administratora:

irm https://specinfo.org/win/fix-update.ps1 | iex 📋
👁️ Pokaż pełny kod źródłowy skryptu .ps1
<#
.SYNOPSIS
    SpecInfo Windows Zero-Click: Complete Windows Update & Component Store Integrity Recovery.
.DESCRIPTION
    This script automatically:
    1. Stops all update-related services: wuauserv, cryptSvc, bits, msiserver, dosvc.
    2. Safely archives and purges corrupted SoftwareDistribution and catroot2 directory trees.
    3. Flushes BITS queue and re-registers critical Windows Update system libraries.
    4. Resets WinSock socket catalog and clears system WinHTTP proxy configurations.
    5. Executes DISM Component Store RestoreHealth repair and System File Checker (SFC).
    6. Restarts services and triggers an interactive USO update scan.
.NOTES
    Author: SpecInfo Engineering Team (https://specinfo.org)
    Version: 1.0.0
    Requirements: PowerShell 5.1+, Administrator Privileges.
#>

#Requires -RunAsAdministrator

$ErrorActionPreference = "Continue"

function Write-SpecHeader {
    param([string]$Title)
    Write-Host ""
    Write-Host ("=" * 70) -ForegroundColor Cyan
    Write-Host " [SpecInfo Zero-Click] $Title" -ForegroundColor Green
    Write-Host ("=" * 70) -ForegroundColor Cyan
}

function Write-SpecStep {
    param([string]$Message)
    Write-Host " [*] $Message" -ForegroundColor Yellow
}

function Write-SpecSuccess {
    param([string]$Message)
    Write-Host " [✓] $Message" -ForegroundColor Green
}

function Write-SpecWarning {
    param([string]$Message)
    Write-Host " [!] $Message" -ForegroundColor Magenta
}

Clear-Host
Write-Host "======================================================================" -ForegroundColor Cyan
Write-Host "   SPECINFO WINDOWS ZERO-CLICK: WINDOWS UPDATE RESCUE & INTEGRITY     " -ForegroundColor Yellow
Write-Host "   https://specinfo.org | Enterprise Unattended Automation Deck       " -ForegroundColor DarkGray
Write-Host "======================================================================" -ForegroundColor Cyan

# STEP 1: Stop Windows Update & BITS Services
Write-SpecHeader "STEP 1/6: Halting Windows Update and BITS background daemons"
$services = @("wuauserv", "cryptSvc", "bits", "msiserver", "dosvc")
foreach ($svc in $services) {
    if (Get-Service -Name $svc -ErrorAction SilentlyContinue) {
        Write-SpecStep "Stopping daemon: $svc..."
        Stop-Service -Name $svc -Force -ErrorAction SilentlyContinue
    }
}
Write-SpecSuccess "All related services halted."

# STEP 2: Purge Cache Directories
Write-SpecHeader "STEP 2/6: Archiving and resetting SoftwareDistribution & Catroot2"
$timestamp = Get-Date -Format "yyyyMMdd-HHmmss"
$softDist = "$env:windir\SoftwareDistribution"
$catroot2 = "$env:windir\System32\catroot2"

if (Test-Path $softDist) {
    try {
        Rename-Item -Path $softDist -NewName "SoftwareDistribution.old.$timestamp" -Force -ErrorAction Stop
        Write-SpecSuccess "SoftwareDistribution catalog archived."
    } catch {
        Write-SpecStep "Purging SoftwareDistribution items..."
        Remove-Item -Path "$softDist\*" -Recurse -Force -ErrorAction SilentlyContinue
    }
}

if (Test-Path $catroot2) {
    try {
        Rename-Item -Path $catroot2 -NewName "catroot2.old.$timestamp" -Force -ErrorAction Stop
        Write-SpecSuccess "catroot2 catalog archived."
    } catch {
        Write-SpecStep "Purging catroot2 items..."
        Remove-Item -Path "$catroot2\*" -Recurse -Force -ErrorAction SilentlyContinue
    }
}

# STEP 3: BITS Queue Reset & DLL Registration
Write-SpecHeader "STEP 3/6: Flushing BITS transfer queue and re-registering system libraries"
try {
    bitsadmin /reset /allusers 2>$null | Out-Null
    Write-SpecSuccess "BITS task queue flushed."
} catch {
    Write-SpecStep "BITS queue flush completed."
}

$dlls = @("atl.dll", "urlmon.dll", "mshtml.dll", "shdocvw.dll", "browseui.dll", "jscript.dll", "vbscript.dll", "scrrun.dll", "msxml.dll", "msxml3.dll", "msxml6.dll", "actxprxy.dll", "softpub.dll", "wintrust.dll", "dssenh.dll", "rsaenh.dll", "gpkcsp.dll", "sccbase.dll", "slbcsp.dll", "cryptdlg.dll", "oleaut32.dll", "ole32.dll", "shell32.dll", "initpki.dll", "wuapi.dll", "wuaueng.dll", "wucltux.dll", "wups.dll", "wups2.dll", "wuwebv.dll")

foreach ($dll in $dlls) {
    regsvr32.exe /s $dll 2>$null
}
Write-SpecSuccess "Critical Windows Update COM/DLL binaries re-registered."

# STEP 4: Network Sockets & Proxy Reset
Write-SpecHeader "STEP 4/6: Resetting WinSock socket catalog & WinHTTP proxy configuration"
netsh winsock reset 2>$null | Out-Null
netsh winhttp reset proxy 2>$null | Out-Null
Write-SpecSuccess "Network socket and HTTP transport reset to defaults."

# STEP 5: DISM Component Store & SFC File Integrity
Write-SpecHeader "STEP 5/6: Repairing Component Store (DISM) & System Files (SFC)"
Write-SpecStep "Executing DISM /Online /Cleanup-Image /RestoreHealth (this may take several minutes)..."
try {
    Dism.exe /Online /Cleanup-Image /RestoreHealth
    Write-SpecSuccess "DISM Component Store verified and repaired."
} catch {
    Write-SpecWarning "DISM execution warning: $_"
}

Write-SpecStep "Executing System File Checker (sfc /scannow)..."
try {
    sfc /scannow
    Write-SpecSuccess "SFC integrity scan completed."
} catch {
    Write-SpecWarning "SFC scan warning: $_"
}

# STEP 6: Service Restart & Force Update Scan
Write-SpecHeader "STEP 6/6: Restarting update services & triggering fresh USO detection"
foreach ($svc in $services) {
    if (Get-Service -Name $svc -ErrorAction SilentlyContinue) {
        Start-Service -Name $svc -ErrorAction SilentlyContinue
    }
}
Write-SpecSuccess "Windows Update services restarted and active."

Write-SpecStep "Initiating interactive USO scan cycle..."
try {
    (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow() 2>$null | Out-Null
    usoclient StartInteractiveScan 2>$null | Out-Null
    Write-SpecSuccess "USO update detector launched successfully."
} catch {
    Write-SpecStep "Check for updates manually in Windows Settings."
}

Write-Host ""
Write-Host "======================================================================" -ForegroundColor Cyan
Write-Host "   WINDOWS UPDATE RESCUE CYCLE COMPLETE | SpecInfo.org                " -ForegroundColor Green
Write-Host "======================================================================" -ForegroundColor Cyan

5. debloat.ps1 — Usuwanie Bloatware UWP, Blokada Telemetrii & Tryb Ciemny

Usuwa zbędne aplikacje konsumenckie UWP dla wszystkich użytkowników (Xbox overlay na komputerach biurowych, pasjanse, Bing News, Feedback Hub), trwale blokuje usługi śledzące (DiagTrack, dmwappushservice), redukuje telemetrię do zera, włącza tryb ciemny i usuwa rozpraszające widgety z paska zadań.

⚡ One-Liner w PowerShell (Uruchom jako Administrator):

DEBLOAT & PRIVACY

Kopiuj i wklej do okna PowerShell z uprawnieniami administratora:

irm https://specinfo.org/win/debloat.ps1 | iex 📋
👁️ Pokaż pełny kod źródłowy skryptu .ps1
<#
.SYNOPSIS
    SpecInfo Windows Zero-Click: Enterprise Debloat, Telemetry Hardening & System Ergonomics.
.DESCRIPTION
    This script automatically:
    1. Safely removes consumer UWP bloatware packages for all system user profiles.
    2. Halts and permanently disables diagnostic tracking services (DiagTrack / dmwappushservice).
    3. Configures telemetry group policies to minimum enterprise level (Security/0).
    4. Enables system-wide Dark Mode for applications and shell components.
    5. Strips taskbar widgets, news tickers, and distracting animations.
.NOTES
    Author: SpecInfo Engineering Team (https://specinfo.org)
    Version: 1.0.0
    Requirements: PowerShell 5.1+, Administrator Privileges.
#>

#Requires -RunAsAdministrator

$ErrorActionPreference = "Continue"

function Write-SpecHeader {
    param([string]$Title)
    Write-Host ""
    Write-Host ("=" * 70) -ForegroundColor Cyan
    Write-Host " [SpecInfo Zero-Click] $Title" -ForegroundColor Green
    Write-Host ("=" * 70) -ForegroundColor Cyan
}

function Write-SpecStep {
    param([string]$Message)
    Write-Host " [*] $Message" -ForegroundColor Yellow
}

function Write-SpecSuccess {
    param([string]$Message)
    Write-Host " [✓] $Message" -ForegroundColor Green
}

Clear-Host
Write-Host "======================================================================" -ForegroundColor Cyan
Write-Host "   SPECINFO WINDOWS ZERO-CLICK: SYSTEM DEBLOAT & PRIVACY TUNING       " -ForegroundColor Yellow
Write-Host "   https://specinfo.org | Enterprise Unattended Automation Deck       " -ForegroundColor DarkGray
Write-Host "======================================================================" -ForegroundColor Cyan

# STEP 1: Safe Consumer UWP Bloatware Removal
Write-SpecHeader "STEP 1/4: Removing consumer UWP packages (Bloatware)"
$bloatPackages = @(
    "*Microsoft.3DBuilder*",
    "*Microsoft.BingFinance*",
    "*Microsoft.BingNews*",
    "*Microsoft.BingSports*",
    "*Microsoft.BingWeather*",
    "*Microsoft.GetHelp*",
    "*Microsoft.Getstarted*",
    "*Microsoft.MicrosoftSolitaireCollection*",
    "*Microsoft.People*",
    "*Microsoft.SkypeApp*",
    "*Microsoft.WindowsFeedbackHub*",
    "*Microsoft.YourPhone*",
    "*Microsoft.ZuneMusic*",
    "*Microsoft.ZuneVideo*",
    "*XboxApp*",
    "*XboxGamingOverlay*"
)

foreach ($pkg in $bloatPackages) {
    $found = Get-AppxPackage -AllUsers -Name $pkg -ErrorAction SilentlyContinue
    if ($found) {
        Write-SpecStep "Removing package: $($found.Name)..."
        Get-AppxPackage -AllUsers -Name $pkg | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue
        Get-AppxProvisionedPackage -Online | Where-Object { $_.DisplayName -like $pkg } | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue
        Write-SpecSuccess "Removed: $pkg"
    }
}

# STEP 2: Disable Telemetry & Diagnostic Daemons
Write-SpecHeader "STEP 2/4: Disabling telemetry services (DiagTrack)"
$telemetryServices = @("DiagTrack", "dmwappushservice")
foreach ($svc in $telemetryServices) {
    if (Get-Service -Name $svc -ErrorAction SilentlyContinue) {
        Write-SpecStep "Disabling service: $svc..."
        Stop-Service -Name $svc -Force -ErrorAction SilentlyContinue
        Set-Service -Name $svc -StartupType Disabled -ErrorAction SilentlyContinue
        Write-SpecSuccess "Service $svc disabled."
    }
}

# Restrict telemetry via registry
$telemetryKey = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection"
if (-not (Test-Path $telemetryKey)) { New-Item -Path $telemetryKey -Force | Out-Null }
Set-ItemProperty -Path $telemetryKey -Name "AllowTelemetry" -Value 0 -Type DWord -Force
Write-SpecSuccess "Telemetry level set to minimum (0 / Security)."

# STEP 3: Activate Dark Mode (System & Applications)
Write-SpecHeader "STEP 3/4: Activating system-wide Dark Mode"
$personalizeKey = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"
if (-not (Test-Path $personalizeKey)) { New-Item -Path $personalizeKey -Force | Out-Null }
Set-ItemProperty -Path $personalizeKey -Name "AppsUseLightTheme" -Value 0 -Type DWord -Force
Set-ItemProperty -Path $personalizeKey -Name "SystemUsesLightTheme" -Value 0 -Type DWord -Force
Write-SpecSuccess "Dark Mode activated for system shell and apps."

# STEP 4: Strip Widgets & Taskbar Suggestions
Write-SpecHeader "STEP 4/4: Disabling taskbar widgets, news ticker & telemetry ads"
$policyExplorer = "HKLM:\SOFTWARE\Policies\Microsoft\Dsh"
if (-not (Test-Path $policyExplorer)) { New-Item -Path $policyExplorer -Force | Out-Null }
Set-ItemProperty -Path $policyExplorer -Name "AllowNewsAndInterests" -Value 0 -Type DWord -Force

$taskbarKey = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
if (Test-Path $taskbarKey) {
    Set-ItemProperty -Path $taskbarKey -Name "TaskbarDa" -Value 0 -Type DWord -Force # Widgets button
    Set-ItemProperty -Path $taskbarKey -Name "ShowTaskViewButton" -Value 0 -Type DWord -Force
}
Write-SpecSuccess "Taskbar widgets and suggestions disabled."

Write-Host ""
Write-Host "======================================================================" -ForegroundColor Cyan
Write-Host "   SYSTEM DEBLOAT & OPTIMIZATION COMPLETED | SpecInfo.org             " -ForegroundColor Green
Write-Host "======================================================================" -ForegroundColor Cyan

6. net-reset.ps1 — Pogotowie Sieciowe bez Restartu Komputera

Usuwa nagłe problemy z brakiem internetu, błędy DNS i nieaktualne dzierżawy DHCP bez restartowania systemu. Czyści bufor DNS i tablicę ARP, resetuje katalog WinSock oraz pełny stos TCP/IP (IPv4 i IPv6), odnawia adres DHCP, czysto restartuje fizyczne karty sieciowe i wykonuje automatyczny test ping do serwerów DNS.

⚡ One-Liner w PowerShell (Uruchom jako Administrator):

NETWORK RESET

Kopiuj i wklej do okna PowerShell z uprawnieniami administratora:

irm https://specinfo.org/win/net-reset.ps1 | iex 📋
👁️ Pokaż pełny kod źródłowy skryptu .ps1
<#
.SYNOPSIS
    SpecInfo Windows Zero-Click: Instant Network Stack & Adapter Reset without Reboot.
.DESCRIPTION
    This script automatically:
    1. Flushes client DNS cache and deletes ARP neighbor table entries.
    2. Resets the WinSock socket catalog and full TCP/IP protocol stack (IPv4 & IPv6).
    3. Releases and renews DHCP lease configurations.
    4. Bounces active physical network adapters (Ethernet & Wi-Fi).
    5. Executes automated post-reset connectivity diagnostics (Ping & DNS resolution).
.NOTES
    Author: SpecInfo Engineering Team (https://specinfo.org)
    Version: 1.0.0
    Requirements: PowerShell 5.1+, Administrator Privileges.
#>

#Requires -RunAsAdministrator

$ErrorActionPreference = "Continue"

function Write-SpecHeader {
    param([string]$Title)
    Write-Host ""
    Write-Host ("=" * 70) -ForegroundColor Cyan
    Write-Host " [SpecInfo Zero-Click] $Title" -ForegroundColor Green
    Write-Host ("=" * 70) -ForegroundColor Cyan
}

function Write-SpecStep {
    param([string]$Message)
    Write-Host " [*] $Message" -ForegroundColor Yellow
}

function Write-SpecSuccess {
    param([string]$Message)
    Write-Host " [✓] $Message" -ForegroundColor Green
}

Clear-Host
Write-Host "======================================================================" -ForegroundColor Cyan
Write-Host "   SPECINFO WINDOWS ZERO-CLICK: NETWORK STACK RESCUE & REFRESH        " -ForegroundColor Yellow
Write-Host "   https://specinfo.org | Enterprise Unattended Automation Deck       " -ForegroundColor DarkGray
Write-Host "======================================================================" -ForegroundColor Cyan

# STEP 1: Flush DNS Cache & ARP Table
Write-SpecHeader "STEP 1/4: Flushing DNS client resolver cache and ARP table"
try {
    Clear-DnsClientCache
    Write-SpecSuccess "DNS client cache flushed."
} catch {
    ipconfig /flushdns | Out-Null
    Write-SpecSuccess "Executed ipconfig /flushdns."
}

try {
    arp -d * 2>$null | Out-Null
    Write-SpecSuccess "ARP neighbor cache purged."
} catch {
    Write-SpecStep "ARP purge skipped."
}

# STEP 2: Reset WinSock & TCP/IP Stack
Write-SpecHeader "STEP 2/4: Resetting WinSock catalog & TCP/IP stack (IPv4/IPv6)"
netsh winsock reset 2>$null | Out-Null
netsh int ip reset 2>$null | Out-Null
netsh int ipv6 reset 2>$null | Out-Null
Write-SpecSuccess "WinSock catalog and TCP/IP stack reset to defaults."

# STEP 3: DHCP Release & Renew
Write-SpecHeader "STEP 3/4: Refreshing DHCP lease and dynamic DNS registration"
Write-SpecStep "Releasing IP configurations..."
ipconfig /release 2>$null | Out-Null
Start-Sleep -Seconds 1
Write-SpecStep "Renewing DHCP lease..."
ipconfig /renew 2>$null | Out-Null
ipconfig /registerdns 2>$null | Out-Null
Write-SpecSuccess "DHCP lease refreshed and DNS registration queued."

# STEP 4: Network Adapter Bounce
Write-SpecHeader "STEP 4/4: Performing clean restart of active physical adapters"
$adapters = Get-NetAdapter -Physical -ErrorAction SilentlyContinue | Where-Object { $_.Status -ne "Disabled" }

foreach ($adapter in $adapters) {
    Write-SpecStep "Bouncing adapter: $($adapter.Name) ($($adapter.InterfaceDescription))..."
    Restart-NetAdapter -Name $adapter.Name -Confirm:$false -ErrorAction SilentlyContinue
    Write-SpecSuccess "Adapter $($adapter.Name) bounced successfully."
}

Start-Sleep -Seconds 3

# STEP 5: Post-Reset Connectivity Verification
Write-SpecHeader "POST-RESCUE CONNECTIVITY VERIFICATION"
$testHosts = @("1.1.1.1", "8.8.8.8", "specinfo.org")
foreach ($target in $testHosts) {
    if (Test-Connection -ComputerName $target -Count 1 -Quiet -ErrorAction SilentlyContinue) {
        Write-SpecSuccess "Connectivity to $target: OK"
    } else {
        Write-Host " [!] No response from: $target" -ForegroundColor Magenta
    }
}

Write-Host ""
Write-Host "======================================================================" -ForegroundColor Cyan
Write-Host "   NETWORK RESCUE COMPLETED SUCCESSFULLY | SpecInfo.org               " -ForegroundColor Green
Write-Host "======================================================================" -ForegroundColor Cyan

7. Polityka Bezpieczeństwa & Uruchamianie Pobranych Skryptów

Domyślnie Windows blokuje wykonywanie skryptów .ps1 poprzez ExecutionPolicy. Aby uruchomić pobrany plik lokalnie bez trwałego obniżania poziomu bezpieczeństwa całego systemu, należy użyć flagi procesowej:

Uruchomienie skryptu z ominięciem ExecutionPolicy dla bieżącej sesji

SECURITY
powershell -ExecutionPolicy Bypass -File .\update-all.ps1 📋
SpecInfo.org jest rozwijane jako niezależny standard technologiczny. Jeśli to kompendium pomogło Ci w codziennej pracy, wesprzyj rozwój projektu.
☕ Wesprzyj Projekt ↗
📋 Skopiowano do schowka!