Windows
Articles in the Windows category (79).
Articles in the Windows category (79).
- Cancel a pending reboot scheduled by Windows Update — Detect and delete the scheduled reboot task created by Windows Update, using a batch script that only acts with the /apply switch.
- Change desktop icon spacing in Windows — Adjust horizontal and vertical desktop icon spacing in Windows through the registry.
- Check and convert a disk between MBR and GPT on Windows — Check a disk partitioning style and convert it between MBR and GPT with diskpart or PowerShell.
- Check whether Windows is pending a reboot — Registry keys and a PowerShell example to detect a pending reboot after an update.
- Cleaning up the Windows Server component store with DISM — Analyse and clean up the Windows Server component store with DISM and the maintenance scheduled task.
- Common Windows Installer (MSI) error codes — Condensed table of the most common Windows Installer return codes and their meaning.
- Create a symbolic link with mklink on Windows — mklink and mklink /D examples to point a short path to a OneDrive folder or an external drive.
- Creating a group Managed Service Account (gMSA) on Windows — Create, authorize, install and use an Active Directory group Managed Service Account for a Windows service.
- CredSSP encryption oracle remediation for RDP — Temporarily relax the Encryption Oracle Remediation policy on an RDP client after the CredSSP update.
- Disable fair sharing on a Remote Desktop server — PowerShell commands to disable CPU, disk and network fair sharing on a Windows Server Remote Desktop session host.
- Disable Hyper-V with PowerShell and bcdedit — Disable and re-enable the Hyper-V role and hypervisor launch on Windows with PowerShell, DISM and bcdedit.
- Disable IPv6 on network adapters with PowerShell — List and disable the IPv6 binding on Windows network adapters with the NetAdapter PowerShell cmdlets.
- Enable 8.3 short names on Windows and use them for R Services — Check and enable 8.3 short names with fsutil, create a short name for a folder, and apply the method to an R Services installation on drive D:.
- Enable Kerberos logging in Active Directory — Create the LogLevel registry value to enable Kerberos logging, in the Registry Editor or with reg.exe.
- Enable WMI activity tracing and grant remote WMI access — Enable the WMI-Activity trace log, read ExecQuery entries and let a non-administrator account query WMI remotely.
- Extend a volume with diskpart — Extend a Windows volume with diskpart and fix the error 'The volume you have selected may not be extended'.
- Find the process that locks a file — List open files and find the process locking a Windows file with psfile and handle.
- Find the product GUID of an installed MSI package — Find the product GUID of an installed MSI package with PowerShell or in the uninstall registry keys.
- Fix error 0x800f0954 when installing RSAT on Windows 10 — Disable the WSUS redirection to install the Remote Server Administration Tools (RSAT) on Windows 10.
- Fix the MS DTC RPC port range for firewalls — Restrict the RPC ports used by Microsoft Distributed Transaction Coordinator (MS DTC) to a fixed range so that firewall rules can be written for it.
- Get the Windows last boot time with PowerShell — Show the last Windows boot time with WMI or CIM, and search the System event log with PowerShell.
- Kerberos 0x80090322: duplicate or misplaced SPN — Diagnose and fix a Kerberos KRB_AP_ERR_MODIFIED error caused by an HTTP SPN registered on the wrong account.
- Kerberos on Windows: SPNs, logging and Apache SSO with Active Directory — Check SQL Server Kerberos authentication, manage SPNs and set up Apache Kerberos SSO on Linux.
- Kerberos: ticket flow, double hop, SPNs and firewall ports — How Kerberos works, the double-hop scenario with delegation to SQL Server, SPN registration and the ports to open.
- List Active Directory domain controllers with PowerShell — Check the ActiveDirectory module and list, display, export or count domain controllers with PowerShell.
- List and reset Windows Remote Desktop sessions — List the Remote Desktop sessions on a Windows server and close one with query session and reset session.
- List and switch the Active Directory domain controller — nltest commands to list domain controllers, find the one a Windows computer uses and switch to another one.
- List non-Microsoft Windows scheduled tasks — PowerShell script to list scheduled tasks outside the Microsoft folder with their state and last run results.
- List Windows Server features, roles and hotfixes with PowerShell — PowerShell commands to list Windows Server roles and features and the installed hotfixes.
- List Windows, IIS and Hyper-V identities in PowerShell — PowerShell commands to list the accounts, Windows services, IIS application pools and Hyper-V virtual machines on a server.
- Managing RDP sessions remotely on Windows — Commands to list and reset Remote Desktop sessions on a server and to enable RDP remotely with PowerShell.
- Office 365: fix installation error 30182-1011 by manual removal — Manually remove leftover Office Click-to-Run files, tasks and registry keys, then reinstall.
- Office Click-to-Run: registry keys for updates — Registry keys to unblock Microsoft 365 Apps updates and change the update channel or source.
- OneDrive won't start: DisableFileSyncNGSC policy key — Check the registry policy key that can prevent OneDrive from starting on Windows.
- Opening Windows Terminal as administrator from a shortcut — Create a Windows Terminal shortcut that always runs with administrator rights.
- PowerShell: change the default gateway — Remove-NetRoute then New-NetRoute to move the default route to another interface.
- PowerShell: find an Active Directory user by phone number — PowerShell commands to list the recursive members of an AD group and find an Active Directory user from a mobile, office or home phone number.
- PowerShell: free and used space on logical disks — PowerShell commands to display the free and used space of Windows logical drives with Get-CimInstance, and to monitor these values.
- Preparing a server for SQL Server: AD accounts, local rights and SPNs — Create AD service accounts from a template, grant Lock pages in memory and volume maintenance rights, and register SQL Server SPNs.
- Recover the OEM key and reactivate Windows with slmgr — Read the firmware OEM key with PowerShell and use slmgr to display the license and enter a product key.
- Reduce the Windows menu display delay — Change the MenuShowDelay registry value to reduce the delay before Windows menus open.
- Robocopy: copy only missing files — Robocopy /XO /XN /XC options to copy only files missing from the destination, with a bacpac move example.
- Slow Windows logon: identify and change the domain controller — Identify the domain controller in use, list DCs and force the Active Directory site of a Windows machine.
- User rights for SQL Server service accounts (Group Policy) — Windows user rights to grant to SQL Server service accounts through Group Policy, with the accounts to add for each right.
- Windows 10: disable password expiration — Disable password expiration for a local account (lusrmgr) or machine-wide (password policy).
- Windows 10: mouse pointer moves but clicks do not work (main.cpl) — Open the mouse properties with main.cpl to diagnose missing clicks on Windows 10.
- Windows 11: install without TPM 2.0 — Bypass the Windows 11 setup TPM check using the LabConfig registry key.
- Windows and Active Directory: useful commands for administrators — Command-line memo for administering an Active Directory domain: sessions, accounts, groups, domain controllers, inventory.
- Windows ODBC DSN and driver locations in the registry — Where ODBC DSNs and drivers are stored in the Windows registry, and how to export their configuration.
- Windows restart and shutdown history with event IDs — System log event IDs to reconstruct Windows startups, shutdowns and restarts.
- Windows Run commands for management consoles — List of .msc and .cpl commands to type in the Run dialog or a command prompt to open Windows management tools.
- Windows Update: clear the download cache after error 0xc1900401 — Clear SoftwareDistribution\Download to retry a failed or corrupted Windows update.
- Windows/Office: error 80090016 (TPM) workaround via WAM registry keys — Work around Office error 80090016 by disabling WAM with two registry values.
- Windows: administrator command-line cheat sheet (users, AD, network, inventory) — Handy cmd one-liners to administer Windows machines and Active Directory: sessions, accounts, groups, domain, inventory, firewall, IP.
- Windows: change a network adapter MAC address — Resources to change a network adapter MAC address on Windows, including the TMAC tool.
- Windows: change the default gateway with PowerShell — Replace the default route of a Windows machine with Remove-NetRoute and New-NetRoute.
- Windows: check GPT/MBR and volume block size — diskpart and PowerShell commands to find the partition style and allocation unit size of volumes.
- Windows: clear the ARP cache — Clear the ARP table with netsh.
- Windows: disable IPv6 through the registry (DisabledComponents) — The DisabledComponents registry value used to disable IPv6 on Windows Server, with the required restart.
- Windows: disable SmartScreen (UI, registry, GPO) — Three ways to disable Windows Defender SmartScreen: settings UI, the EnableSmartScreen registry value and Group Policy.
- Windows: disable the firewall remotely with PsExec and netsh — Temporarily disable Windows Firewall on a remote machine with psexec and netsh.
- Windows: disable the Print Spooler service — Stop and disable the Print Spooler with PowerShell to reduce the attack surface.
- Windows: disable UAC with the registry or group policy — Turn off User Account Control (UAC) with reg.exe, the registry editor or a local policy.
- Windows: fix mstsc DPI scaling and clean up mapped drives — Fix Remote Desktop Connection DPI scaling and clean up leftover mapped drives and credentials on Windows.
- Windows: force GPO update and reset local policy — gpupdate/gpresult commands and a procedure to remove local policy settings and related registry keys.
- Windows: force-close a program with taskkill — Forcibly terminate a Windows process by executable name with taskkill /F /im.
- Windows: generate a system diagnostics report with perfmon /report — Run perfmon /report to get a performance diagnostics report.
- Windows: re-enable Defender and Windows Update blocked by policy — Registry keys and commands to re-enable Windows Defender, update its signatures and bypass WSUS.
- Windows: remote sessions, reboot and adding a local admin — PsExec, PowerShell and cmd commands to log off a session, restart and add a local administrator remotely.
- Windows: remove "managed by your organization" policies from the registry — Clean policy registry keys and local policy folders, including for another user through HKEY_USERS.
- Windows: remove a local user profile — Two ways to remove a local user profile: the GUI or manual deletion of the folder and registry key.
- Windows: remove a startup application (registry) — List of Run/RunOnce registry keys to check to remove a program that launches at startup.
- Windows: restart the Bluetooth service — Restart bthserv with PowerShell.
- Windows: show network adapter speed with wmic — wmic command to list the name and speed of active network adapters.
- Windows: TCP/IP registry settings for a busy SQL Server host — Registry values TcpTimedWaitDelay, MaxUserPort, TcpNumConnections and TcpMaxDataRetransmissions and what they mean.
- Windows: the "Impersonate a client after authentication" right (SeImpersonatePrivilege) — What the SeImpersonatePrivilege right does, its default assignment and where to configure it.
- Windows: uninstall the Configuration Manager (CCM) client — Uninstall the SCCM/MECM client with ccmsetup.exe /uninstall.
- Windows: VSS shadow copies and vssadmin — vssadmin, diskshadow and WMI commands to inspect VSS writers, manage shadow copies and read locked files.
- WSL: install and manage Linux distributions — Basic commands to list, install, set as default and remove a Linux distribution under WSL.