Scripts and commands for faster troubleshooting
Explained, copy-ready commands organized by risk level. Always test commands that change a system in an appropriate environment before production.
Test access to a TCP port with PowerShell
Checks whether a server responds on a specific TCP port and displays useful network information.
Generate a quick inventory of a Windows PC
Shows the computer model, serial number, Windows version, processor, memory, and disks.
Check available disk space on Windows
Lists local volumes and calculates their utilization rate to quickly identify a full disk.
Export the list of installed software
Lists 32-bit and 64-bit applications registered in Windows and exports the result to CSV.
List local administrators on a workstation
Shows local and domain accounts that are members of the workstation's local Administrators group.
Show the last boot time and Windows uptime
Calculates how long Windows has been running since the last full restart.
Show recently installed Windows updates
Lists the most recent Windows hotfixes with their KB identifier and installation date.
Find critical errors from the last 24 hours
Extracts error and critical events from the System and Application logs for the last 24 hours.
Test DNS resolution for a domain
Queries the configured DNS resolver and then a public DNS server to compare the answers.
Clear the Windows DNS cache
Removes locally cached DNS responses so Windows performs fresh lookups.
Reset Winsock and the TCP/IP stack
Resets several Windows networking components when connectivity remains broken after basic checks.
Check and repair Windows system integrity
Checks the Windows image with DISM and then verifies protected system files with SFC.
Check BitLocker status on volumes
Shows encryption status, encryption method, and the presence of BitLocker protectors.
Create a Windows network diagnostic report
Collects IP configuration, routes, DNS information, and several connectivity tests in a text report.
List listening ports and Windows connections
Shows TCP connections and maps each PID to the corresponding process.
Generate a report of applied Group Policies
Creates an HTML report showing the GPOs applied to the user and computer.
Scan a Windows volume without restarting
Runs an online filesystem scan of drive C without immediately scheduling an offline repair.
Export System and Application event logs
Creates two EVTX files that can be opened in Event Viewer or sent to technical support.
Show disk space and filesystems on Linux
Shows mounted filesystems with total size, used space, available space, and utilization percentage.
List listening ports on Linux
Shows listening TCP and UDP sockets together with the associated processes.
Find large directories on Linux
Ranks top-level directories by size to help locate the source of disk saturation.
List failed systemd services
Shows systemd units that are currently in the failed state.
Show general FortiGate system status
Shows the model, FortiOS version, serial number, HA mode, and uptime.
Show the FortiGate routing table
Lists active routes and their origin to help diagnose routing problems.
Check IPsec tunnels on a FortiGate
Shows detailed IPsec tunnel status, selectors, and traffic counters.
Capture packets with the FortiGate sniffer
Observes specific traffic crossing the firewall using a host-and-port filter.
Trace a traffic flow on FortiGate
Temporarily enables debug flow to identify the firewall policy, route, or reason for blocked traffic.