sync: auto-sync from GURU-5070 at 2026-06-02 07:25:49

Author: Mike Swanson
Machine: GURU-5070
Timestamp: 2026-06-02 07:25:49
This commit is contained in:
2026-06-02 07:25:55 -07:00
parent 13c7ad3c82
commit f8ed03c75a
54 changed files with 1349 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
---
name: feedback-rmm-unc-path-encoding
description: RMM PowerShell UNC paths via user_session context lose one backslash when using string literals — must build with [char]92
metadata:
type: feedback
---
Never use `"\\CS-SERVER\..."` string literals in PowerShell scripts dispatched via GuruRMM `user_session` context. The backslash gets halved somewhere in the encoding pipeline, producing `\CS-SERVER\...` (a local path) instead of the UNC `\\CS-SERVER\...`.
**Why:** The `user_session` execution wrapper appears to process escape sequences in the script text differently than `system` context, stripping one backslash from `\\`.
**How to apply:** Always build UNC paths explicitly when using user_session:
```powershell
$bs = [char]92
$base = "${bs}${bs}CS-SERVER${bs}homes${bs}Username"
```
This constructs `\\CS-SERVER\homes\Username` correctly regardless of context.
The `system` context (offline hive reg query) showed correct `\\CS-SERVER` output, so the issue is specific to `user_session`.