Commit 7a43e6f
committed
(GH-188) Filter current environment variables
When Protected Event Logging and PowerShell Script Block logging are
enabled together the SystemRoot environment variable is a requirement.
If it is removed as part of the environment purge it causes the
PowerShell process to crash, therefore breaking the pipe between Ruby
and the remote PowerShell session.
This commit fixes the issue by creating a filtered list of environment
variables which does not include the SystemRoot environment variable.
This list can then be purged safely.1 parent 4ce17ae commit 7a43e6f
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
38 | 47 | | |
39 | | - | |
| 48 | + | |
40 | 49 | | |
41 | 50 | | |
42 | 51 | | |
| |||
0 commit comments