Created
March 28, 2022 15:32
-
-
Save pashalvov/64607dcc7f428091ee4d7acefb5aa3f1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Хотим чтобы консолько балакала по аглицки | |
[System.Console]::OutputEncoding = [System.Text.Encoding]::UTF8 | |
### Парсим | |
$DataOutput = (((quser) -replace '^>', '') -replace '\s{2,}', ',').Trim() | ForEach-Object { | |
if ($_.Split(',').Count -eq 5) { | |
Write-Output ($_ -replace '(^[^,]+)', '$1,') | |
} else { | |
Write-Output $_ | |
} | |
} | ConvertFrom-Csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment