wsmagent.dll Error in Windows 10 and 11: Windows Remote Management agent

An approved Windows Remote Management session fails on a specific endpoint with a diagnostic identifying wsmagent.dll.
The Windows file inventory identifies wsmagent.dll as WinRM Agent. Capture the actual error, file path and Windows build before making changes.
Check where the error occurs
Confirm the client is targeting the authorized host and the approved service is available. Record the first transport or authorization error and compare an existing trusted endpoint.
Repair the affected feature
Ask the endpoint owner to restore the managed WinRM configuration and current Windows servicing. Preserve the approved listener and authentication policy.
If Windows reports corruption of a protected system file, use Microsoft’s system file repair procedure. Obtain software and drivers through Windows Update or the applicable publisher.
Verify the repair
Run a permitted read-only management command against the intended endpoint and verify the expected host identity and response.
See the publisher’s guidance, the exact Windows file record, and the related PC Repair Atlas guide.