sync: auto-sync from HOWARD-HOME at 2026-05-29 12:35:52
Author: Howard Enos Machine: HOWARD-HOME Timestamp: 2026-05-29 12:35:52
This commit is contained in:
19
.claude/memory/feedback-rmm-unc-path-encoding.md
Normal file
19
.claude/memory/feedback-rmm-unc-path-encoding.md
Normal 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`.
|
||||
Reference in New Issue
Block a user