$result.Tables.Item($i) | Select-Object -Property * -ExcludeProperty RowError,RowState,Table,ItemArray,HasErrors | Export-Excel $DataSet.Tables[0] | Export-Csv .... Get-ExCommand >c:\temp\logGet-ChildItem C:\ | Select-Object Mode, LastWriteTime, Length, Name# 1 вариант получения адресов, в конце отфильтровываем ipv6
$ip = (gwmi Win32_NetworkAdapterConfiguration -Filter IPEnabled=$true).IPAddress -match '\d+\.\d+\.'
# 2 вариант получения адресов, отфильтровываем ipv6 и 127.0.0.1
$ip = (Get-NetIPAddress | ? {$_. AddressFamily -eq 'IPv4' -and $_.IPAddress -ne '127.0.0.1' }).IPAddress
# Формирование строки
$port = 8001
$lines = $ip | Foreach-Object {
"socks -n -a -i127.0.0.1 -e$_ -p$port"
$port++
}
# Вывод в файл
'auth none', 'log', $lines | Out-File -Encoding Ascii -FilePath 'd:\111' Get-Content C:\temp\users.csv |
Get-ADUser |
Select-Object name, samaccountname |
export-csv C:\1.csv -NoType -UseCulture -Encoding UTF8 & "C:\Program Files\7-Zip\7zG.exe" a C:\Users\Admin\full.7z -r C:\Users\Admin\test\$create = & "C:\............ get-childitem -Recurse | Sort-Object -Descending -Property length | Select -First 1 -ExpandProperty Length