====== cmd / powershell ====== Starting a Remote Session Enter-PSSession -ComputerName COMPUTER -Credential Administrator Прибить все процессы пользователя SRV\Administrator taskkill /s SRV /u SRV\Administrator /p pass /F /FI "USERNAME eq SRV\Administrator" /IM * Текущая дата $d = Get-Date -format yyyyMMdd Листинг файлов в каталоге по маске: Get-Childitem -Path C:\test -Recurse -Include "*$($d)000.BAK" Удаление логов старше года: Forfiles -p C:\logs -s -m *.* -d -365 -c "cmd /c del /q @path" ====== TS ====== Displays information about sessions on a terminal server query session [{SessionName|UserName|SessionID}] [/server:ServerName] [/mode] [/flow] [/connect] [/counter] https://technet.microsoft.com/en-us/library/cc754340(v=ws.11).aspx {{tag> windows powershell }}