Initial commit

This commit is contained in:
2026-04-24 17:41:53 +08:00
commit 7105e8b165
94 changed files with 8141 additions and 0 deletions

34
scripts/ssh/win11debloat.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/usr/bin/env bash
set -euo pipefail
HOST="${HOST:-192.168.88.108}"
USER_NAME="${USER_NAME:-Admin}"
PASS="${PASS:-P@ssw0rd!}"
HERE="$(cd "$(dirname "$0")" && pwd)"
SCRIPT="$HERE/../powershell/win11debloat.ps1"
CONFIG="$HERE/win11debloat-config.json"
LOG_DIR="$HERE/../../logs"
STAMP="$(date +%Y%m%d-%H%M%S)"
LOG="$LOG_DIR/win11debloat-${HOST}-${STAMP}.log"
mkdir -p "$LOG_DIR"
SSH_OPTS=(-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 -o ServerAliveInterval=30)
if [[ ! -f "$CONFIG" ]]; then
echo "[!] $CONFIG missing" >&2
exit 1
fi
echo "[*] Uploading win11debloat.ps1 and win11debloat-config.json"
sshpass -p "$PASS" scp "${SSH_OPTS[@]}" "$SCRIPT" "$CONFIG" \
"$USER_NAME@$HOST:C:/Users/$USER_NAME/" >/dev/null
echo "[*] Running on $HOST — this may take several minutes"
echo "[*] Log -> $LOG"
sshpass -p "$PASS" ssh "${SSH_OPTS[@]}" "$USER_NAME@$HOST" \
"powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:/Users/$USER_NAME/win11debloat.ps1" \
2>&1 | tee "$LOG"
echo "[*] Done. Saved: $LOG"