Scripts to Manage Computers
Scripts to Manage Computers 관련
add-firewall-rules.ps1
This PowerShell script adds firewall rules for the given executable. Administrator rights are required.
check-cpu.ps1
Checks the CPU temperature
check-dns.ps1
This PowerShell script measures and prints the DNS resolution speed by using 200 popular domains.
check-drive-space.ps1
This PowerShell script checks a drive for free space left (20 GB by default).
check-file-system.ps1
This PowerShell script checks the file system of a drive. It needs admin rights.
check-health.ps1
This PowerShell script queries the system health of the local computer (hardware, software, and network) and prints it.
check-ping.ps1
This PowerShell script measures the ping roundtrip times from the local computer to 10 Internet servers.
check-swap-space.ps1
This PowerShell script queries the status of the swap space and prints it.
check-windows-system-files.ps1
This PowerShell script checks the validity of the Windows system files. It requires admin rights.
enable-crash-dumps.ps1
This PowerShell script enables the writing of crash dumps.
hibernate.ps1
This PowerShell script hibernates the local computer immediately.
install-github-cli.ps1
install-chrome-browser.ps1
This PowerShell script installs the latest Google Chrome Web browser.
install-knot-resolver.ps1
This PowerShell script installs Knot Resolver. Knot Resolver is a DNS resolver daemon. It needs admin rights.
install-ssh-client.ps1
This PowerShell script installs a SSH client (needs admin rights).
install-ssh-server.ps1
This PowerShell script installs a SSH server (needs admin rights).
install-signal-cli.ps1
This PowerShell script installs signal-cli from AsamK/signal-cli.
See the Web page for the correct version number.
install-updates.ps1
This PowerShell script installs software updates for the local machine (needs admin rights). Use the script 'list-updates.powershell' to list available updates.
@tab:active Parameters
PS> ./install-updates.ps1 [<CommonParameters>]
[<CommonParameters>]
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
@tab Example
PS> ./install-updates.ps1
#
@tab Script Content
<#
.SYNOPSIS
Installs updates
.DESCRIPTION
This PowerShell script installs software updates for the local machine (needs admin rights).
Use the script 'list-updates.ps1' to list available updates.
.EXAMPLE
PS> ./install-updates.ps1
.NOTES
Author: Markus Fleschutz | License: CC0
#>
try {
$StopWatch = [system.diagnostics.stopwatch]::startNew()
if ($IsLinux) {
"⏳ (1/4) Querying updates for installed Debian packages..."
& sudo apt update
"⏳ (2/4) Upgrading installed Debian packages..."
& sudo apt upgrade --yes
"⏳ (3/4) Removing obsolete Debian packages..."
& sudo apt autoremove --yes
"⏳ (4/4) Upgrading installed Snap packages..."
& sudo snap refresh
} else {
Write-Progress "⏳ Installing updates..."
" "
& winget upgrade --all
Write-Progress -completed " "
}
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
"✅ installed the updates in $Elapsed sec"
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}
:::
install-wsl.ps1
This PowerShell script installs Windows Subsystem for Linux. It needs admin rights.
list-apps.ps1
This PowerShell script lists the installed apps (from Windows Store or snaps).
list-cli-tools.ps1
Lists installed command-line interface (CLI) tools.
list-dns-servers.ps1
Lists public DNS servers.
list-drives.ps1
This PowerShell script lists all local drives as a table.
list-network-shares.ps1
This PowerShell script lists all network shares of the local computer.
list-installed-software.ps1
This PowerShell script lists the installed software (except Windows Store apps).
list-printers.ps1
This PowerShell script lists all printers known to the local computer.
list-print-jobs.ps1
This PowerShell script lists all print jobs of all printer devices.
list-processes.ps1
This PowerShell script lists all local computer processes.
list-services.ps1
This PowerShell script lists all services installed on the local computer.
list-system-info.ps1
This PowerShell script lists system information of the local computer.
list-tasks.ps1
list-timezone.ps1
This PowerShell script lists the details of the current time zone.
list-timezones.ps1
This PowerShell script lists all available time zones.
list-user-groups.ps1
This PowerShell script lists the user groups of the local computer.
poweroff.ps1
This script halts the local computer immediately (needs admin rights).
query-smart-data.ps1
Queries the S.M.A.R.T. data of your HDD/SSD's and saves it to the current/given directory.
(use smart-data2csv.ps1 to powershell a CSV table for analysis).
Requires smartctl (smartmontools) and admin rights. For automation copy this script to /etc/cron.daily
reboot.ps1
This PowerShell script reboots the local computer immediately (needs admin rights).
remove-print-jobs.ps1
This PowerShell script removes all print jobs from all printer devices.
restart-network-adapters.ps1
This PowerShell script restarts all local network adapters (needs admin rights).
upgrade-ubuntu.ps1
This PowerShell script upgrades Ubuntu Linux to the latest (LTS) release.
wakeup.ps1
This PowerShell script sends a magic UDP packet twice to a computer to wake him up (requires Wake-On-LAN).