Skip to content

Instantly share code, notes, and snippets.

@Computer-Tsu
Computer-Tsu / Compress-WinSXS.bat
Last active February 28, 2024 00:39
Windows WinSxS Cleanup
@ECHO Compress the WinSxS before backup of System State. Analyze can take hours and will finish with a Reboot? Y or N (no Enter required!)
dism /Online /Cleanup-Image /AnalyzeComponentStore
dism /Online /Cleanup-Image /StartComponentCleanup
@Computer-Tsu
Computer-Tsu / UserList.ps1
Created December 7, 2023 18:06
Script list Windows user accounts, identify MSA or Local
Get-LocalUser | SelectObject Name,PrincipalSource,Enabled,LastLogon,PasswordExpires,PasswordRequired | FT

Using the mouse, confirm the problem.
Right-click Start menu, open Device Manager
Can also Event Viewer: Event 411, Kernel-PnP (Log Name: Microsoft-Windows-Kernel-PnP/Device Configuration, Source: Kernel-PnP, Event ID: 411, Level: Error, User: SYSTEM, Task Category: None)

Device status:
Windows cannot start this hardware device because its configuration information (in the registry) is incomplete or damaged. (Code 19)

Using mouse, click Start, Windows Ease of Access folder, On Screen Keyboard

@Computer-Tsu
Computer-Tsu / Unblock-File.bat
Last active July 24, 2025 23:42
Unblock a downloaded file from the Internet
REM DIR /R
echo.> "MyDownloadedFile.exe":Zone.Identifier
REM echo.>"OfficeSetup (1).exe:SmartScreen:$DATA"
@Computer-Tsu
Computer-Tsu / Get-UpdatesPendingReboot.bat
Created February 28, 2024 00:34
Pending Reboot Registry Keys
reg query "hklm\software\microsoft\windows\currentversion\windowsupdate\auto update\rebootrequired"
reg query "hklm\software\microsoft\windows\currentversion\component based servicing\rebootpending"
reg query "hklm\system\currentcontrolset\control\session manager"
REM Check this key to see what is running.
REM reg query "HKEY_LOCAL_Machine\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\InProgress"
@Computer-Tsu
Computer-Tsu / Disable-Standby-AC.cmd
Created February 28, 2024 00:36
Windows Power Config disable sleep when plugged in
REM Disable sleep, hibernate, standby when plugged in
REM disable sleep timer when plugged in
%windir%\system32\powercfg.exe /x standby-timeout-ac 0
%windir%\system32\powercfg.exe /x hibernate-timeout-ac 0
@Computer-Tsu
Computer-Tsu / Enable-RDP.cmd
Created February 28, 2024 00:42
Enable Remote Desktop Connection on Windows
REM Enable Remote Desktop Connection, requires reboot to take effect.
%windir%\system32\reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
@Computer-Tsu
Computer-Tsu / DateStamp.bat
Created February 28, 2024 02:16
set datestamp=20240229
for /F "tokens=2,3,4 delims=/ " %A in ('date /t') do set datestamp=%C%A%B
@Computer-Tsu
Computer-Tsu / Convert Error Code.md
Created February 28, 2024 02:35
HowTo Converting Windows application Installer error codes numbers return results
Error Code Dec Error Code Error String Description
0x00000000 -4294967296 Success
0x0000007B -4294967173 Error_Invalid_Name The filename, directory incorrect

calc.exe
Menu, Programmer
[Hex] 0x7B
[Dec] 123

@Computer-Tsu
Computer-Tsu / RDP Keyboard Shortcuts.md
Created September 2, 2024 17:43
Microsoft Remote Desktop Services shortcut key combinations

Remote Desktop Services Shortcut Keys

The following is a list of the Microsoft Remote Desktop Services shortcut keys.

Shortcut key Description
CTRL+ALT+END Brings up the Windows Security dialog box.
CTRL+ALT+BREAK Switches the client between full-screen mode and window mode.
ALT+HOME Displays the Start menu.
ALT+DELETE Displays the Windows menu.