agentsclimarketplace

Rds profile triage

Skill whobat/AI-Agent-skills/skills/windows-ops/rds-profile-triage

a collection of AI Agent skills

Install
npx -y skills add whobat/AI-Agent-skills --skill rds-profile-triage

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Read-only triage of Remote Desktop Services (RDS) session-host profile & WinRM-host health across one or many servers. The bundled script collects (over WinRM, with a CIM-over-DCOM fallback for hosts whose WinRM host process won't even launch) profile-hive leaks, temp-profile sprawl, ProfileList corruption, the roaming-profile path read RAW, drain state, and User-Profiles-Service failures grouped BY THE ACTUAL USER, then renders a uniform deterministic report the agent relays (JSON optional). Use when a user reports RDS/terminal-server problems like "user gets logged out immediately / logged off right after sign-in", "everyone's getting temporary profiles", "settings don't save on the RDS farm", "the session host won't accept logins", or "can't PowerShell-remote into the RDS server (could not launch a host process)". Do NOT use for generic event-log sweeps (use win-eventlog-triage) or SQL Server issues (sqlserver-perf-triage). Requires PowerShell 7+ and a tier-admin credential (prompted).

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

7.5 KB, ~1.7k tokens by cl100k_base, as published. Nobody here has run it

RDS Profile & WinRM-Host Triage

Targets Windows RDS session hosts over WinRM (with a CIM-over-DCOM fallback). The bundled scripts/Invoke-RdsProfileTriage.ps1 collects read-only health data, computes deterministic severity-ranked findings, and renders a uniform triage report itself — so the output is identical every run and the agent just relays it (and decides remediation). The script never calls an LLM and changes nothing.

SCRIPT = this skill's scripts/Invoke-RdsProfileTriage.ps1. It requires PowerShell 7+ (pwsh).

Why this skill exists (the gotchas it encodes)

RDS profile triage is a minefield of measurement traps that produce confident-but-wrong root causes. This skill bakes the corrections in — read the caveats array in the output before concluding anything, and see REFERENCE.md for the full list. The big four:

  1. REG_EXPAND_SZ expansion. Reading the roaming-profile path with Get-ItemProperty expands %USERNAME% in the calling account's context. Read as admin, a perfectly correct \\FS01\profiles$\%USERNAME%\... looks hardcoded to the admin — a classic false "the GPO is broken" call. The script reads it raw; trust roaming_profile.machine_profile_path_raw.
  2. Double-hop. From a non-domain-joined / workgroup operator box, WinRM uses NTLM and the host can't delegate to the file server → roaming load fails with "Access is denied"for your connecting account only. Those Event 1521s are your artifact, not a user outage. The script tags them user_class=self_or_admin.
  3. One noisy account ≠ the whole farm. A single backup/batch service account can mint thousands of temp profiles. The script groups profile-failure events by the real user so you don't generalize one service account's churn into a farm-wide outage.
  4. The "Element not found" chain. Corrupt ProfileList entries (empty ProfileImagePath, .bak pointing at deleted temp dirs) → the user profile can't be built → wsmprovhost never registers its COM class → WinRM "could not launch a host process" (Event 86) + DCOM 10000 "error 0". So a broken WinRM endpoint can be a profile problem. The script detects the corruption and the host-launch events together.

How to run

Always run with pwsh. The script prompts for the tier-admin credential (reused for all hosts, never stored). Parse the JSON on stdout.

WantPass
One host-ComputerName RDS01
A farm-ComputerName RDS01,RDS02 or -ServerListFile C:\ops\rds.txt
Time window for events-Hours 24 (default) · -Since '2026-06-15T00:00' · -From <dt> -To <dt>
WinRM host won't launch on a box-Protocol Dcom (reduced CIM/DCOM collection: uptime, drain, roaming-raw, ProfileList corruption)
Output shape-Format text (default — uniform human report) · -Format json · -Format both
Save full JSON-OutFile C:\ops\rds.json (full detail to file; stdout still follows -Format)
Auth/transport-Authentication Negotiate|Kerberos|CredSSP (default Default)
Tuning-TempSampleSize 10 · -MaxCorruptListed 20 · -MaxMessageLength 400
# Single host, last 24h
pwsh -File SCRIPT -ComputerName RDS01

# Two-host farm, 48h window, full detail to a file
pwsh -File SCRIPT -ComputerName RDS01,RDS02 -Hours 48 -OutFile C:\ops\rds.json

# The host's own WinRM is dead ("could not launch a host process") — go in over DCOM
pwsh -File SCRIPT -ComputerName RDS01 -Protocol Dcom

Output contract

The script does the formatting so every run looks the same — the agent does not re-summarize.

  • -Format text (default) → a deterministic, uniform plain-text report on stdout, with fixed sections: header, == FINDINGS (ranked) ==, == PER-HOST ==, == COVERAGE GAPS ==, == CAVEATS ==. This is the output you relay.
  • -Format json → full JSON (or, with -OutFile, a compact summary on stdout + full detail in the file).
  • -Format both → the text report, then --- JSON ---, then the JSON.
  • -OutFile always writes the full-detail JSON to the file, whatever -Format is.

JSON key fields (for -Format json/digging): summary.findings, summary.failures (each with a hint), per host roaming_profile.machine_profile_path_raw, hive_leak, temp_profiles, profilelist, profile_events (grouped by user + user_class), winrm_host_launch, and the top-level caveats. Full schema in REFERENCE.md.

What you (the agent) do with the result

Keep it minimal — the report is already uniform and complete:

  1. Run the script (default -Format text) and relay the report as-is. Do not reformat, re-rank, or re-summarize it — that's the script's job and the whole point of consistent output. At most add a one-line lead.
  2. Act on the one piece of judgement the script can't: if a host shows FAILED - ... could not launch a host process, re-run that host with -Protocol Dcom (the report's hint says so) and relay the second report.
  3. Honor the == CAVEATS == section when the user asks "so what's the cause" — they are the guardrails (self_or_admin = your double-hop, service_account churn ≠ farm outage, RAW roaming path, the Element-not-found chain). Don't contradict them.
  4. Propose remediation only on request (reboot to clear leaked hives, back-up-then-remove corrupt ProfileList entries, clean temp sprawl, exclude service accounts from roaming) — and confirm before changing anything. This skill itself changes nothing.

Errors

  • Get-Credential cancelled → re-run and supply the tier-admin credential.
  • "could not launch a host process" on a host → its WinRM endpoint is down (often ProfileList corruption). Re-run that host with -Protocol Dcom; check profilelist in the result.
  • Workgroup / cross-domain (TrustedHosts message or 0x80090311) → run from a domain-joined admin host, or add the FQDNs to WinRM TrustedHosts (scope to specific hosts, not *), or use -Protocol Dcom. See REFERENCE.md.
  • pwsh not found → install PowerShell 7 (winget install Microsoft.PowerShell); the repo installer auto-installs it.

What ships with it: 4 files

55.4 KB alongside SKILL.md, 2 of them executable

Gives 0 of the 12 instructions most debug triage skills give in ~1.7k tokens

Counted across 839 of the 1,149 authors here whose files we hold, read 2026-08-07

  • Investigate root cause before proposing any fixin 102 of 839, across 67 files
  • Read error messages completelyin 89 of 839, across 49 files
  • Create a failing test case before fixingin 84 of 839, across 46 files
  • Reproduce the issue consistentlyin 82 of 839, across 41 files
  • Change one variable at a timein 82 of 839, across 42 files
  • Check recent changesin 74 of 839, across 36 files
  • Write the regression test before fixingin 74 of 839, across 40 files
  • Fix the root cause not the symptomin 60 of 839, across 45 files
  • Implement a single fix at a timein 59 of 839, across 20 files
  • Trace data flow backward to the sourcein 50 of 839, across 20 files
  • Remove all debug instrumentationin 49 of 839, across 13 files
  • Form a single hypothesisin 48 of 839, across 18 files

Said here and by no other author read

  • relay the report as-is
  • do not reformat or re-summarize the report
  • rerun failed hosts with dcom protocol
  • read the caveats before concluding causes
  • do not contradict the caveats section
  • propose remediation only on request

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 327,069. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.