KnicKnic / KnicKnic/native-powershell

Determine how to ensure logging is enabled in remote sessions

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
52
Forks
5
PR merge metrics
No merged PRs in 30d

Description

In remote sessions we turn on logging through altering initial session state. We should enable logging for all code by default in remote powershell sessions as well. One way to accomplish this is through running a script after creating a runspace that does this.

Current code that enables logging to always come through

https://github.com/KnicKnic/native-powershell/blob/2e9125960fe7b736b809944eb700a9c58a82ad9b/host.cpp#L422-L427

Powershell script that accomplishes the same goal

```powershell
$global:DebugPreference = "Continue"
$global:VerbosePreference = "Continue"
$global:InformationPreference = "Continue"
$global:ErrorActionPreference = "Continue"
$global:WarningPreference = "Continue"
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in host.cpp at the linked logging setup around lines 422-427, then inspect where the remote runspace is created. Compare that setup with the provided PowerShell preference assignments and ensure all listed preferences are enabled for remote sessions; done means logging is enabled by default for all remote-session code.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, powershell
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.