fix(windows): capture localized admin rdp activity

This commit is contained in:
igor04091968
2026-05-15 04:50:33 +03:00
parent 45f990e838
commit ab0ee7d49d
4 changed files with 6 additions and 45 deletions
+2 -2
View File
@@ -233,7 +233,7 @@ function Normalize-ActivityWatchUsers {
$resolved = Resolve-Path -LiteralPath $UserListPath -ErrorAction Stop
$extension = [IO.Path]::GetExtension($resolved.Path)
if ($extension -ieq '.csv') {
$rows = Import-Csv -LiteralPath $resolved.Path
$rows = Import-Csv -LiteralPath $resolved.Path -Encoding UTF8
foreach ($row in $rows) {
foreach ($column in 'User', 'Username', 'SamAccountName', 'Login') {
if ($row.PSObject.Properties.Name -contains $column) {
@@ -247,7 +247,7 @@ function Normalize-ActivityWatchUsers {
}
}
else {
Get-Content -LiteralPath $resolved.Path | ForEach-Object {
Get-Content -LiteralPath $resolved.Path -Encoding UTF8 | ForEach-Object {
$line = $_.Trim()
if ($line -and -not $line.StartsWith('#')) {
$collected.Add($line)