{"id":5588,"date":"2017-04-14T15:48:39","date_gmt":"2017-04-14T12:48:39","guid":{"rendered":"http:\/\/msbro.ru\/?p=5588"},"modified":"2017-04-14T15:50:16","modified_gmt":"2017-04-14T12:50:16","slug":"poisk-fajjlov-na-powershell","status":"publish","type":"post","link":"https:\/\/msbro.ru\/index.php\/archives\/5588","title":{"rendered":"\u041f\u043e\u0438\u0441\u043a \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 PowerShell"},"content":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u2014 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u0447\u0435\u0442 \u043f\u043e \u0444\u0430\u0439\u043b\u0430\u043c \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0449\u0443\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u044b \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435. \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432 \u0434\u043e\u043c\u0435\u043d\u0435.<\/p>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 PowerShell \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0449\u0435\u0442 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0444\u0430\u0439\u043b\u044b \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435. \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0444\u0430\u0439\u043b\u044b \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u0447\u0435\u0442 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043f\u043e \u0432\u0441\u0435\u043c \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u0430\u043c. \u041f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 PowerShell \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0430\u043f\u043a\u0438 \u0438\u0437 \u043f\u043e\u0438\u0441\u043a\u0430.<br \/>\n<!--more--><\/p>\n<pre>cls\r\ncls\r\ntimeout \/t 900\r\n$comp = $env:computername\r\n$user = $env:username\r\n$file = 'C:\\MSBRO\\'+$comp+'_'+$user+'_'+'.txt'\r\n$my_dir = get-wmiobject Win32_LogicalDisk | ? {$_.drivetype -eq 3} | % {get-psdrive $_.deviceid[0]} |\u00a0\r\n       %{\u00a0$my_in = $_.Root\r\n           get-childitem $my_in -force -recurse | \r\n           where { $_.FullName -notlike \"*\\Program Files\\*\" -and $_.FullName -notlike \"*\\Program Files (x86)\\*\" -and  $_.FullName -notlike \"*\\Windows\\*\" -and $_.extension -match \"doc|xls|docx|xlsx|pdf|pst|zip|rar|7z|iso\" }\r\n}\r\n$my_dir | out-file -filepath $file -Encoding utf8\r\n<\/pre>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u043e\u0442\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0441 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u043e\u0439 900 \u0441\u0435\u043a\u0443\u043d\u0434 \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0441\u043c\u043e\u0433 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0441\u043b\u0443\u0436\u0431\u044b \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0430\u043b\u0438.<br \/>\n\u0412\u043e\u043e\u0431\u0449\u0435 \u043f\u043e \u043e\u043f\u044b\u0442\u0443 \u043c\u043e\u0433\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435: \u044d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430.<br \/>\n\u042f \u043d\u0435 \u0441\u043c\u043e\u0433 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u0432\u0441\u0435\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u0445 \u0432 \u0434\u043e\u043c\u0435\u043d\u0435 (\u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u043d\u0430 \u0432\u0441\u0435\u0445).<\/p>\n<p>PowerShell \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u0438 \u0442\u044f\u0436\u0435\u043b\u043e. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043e\u043d \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u043b\u043e\u0445\u043e \u043f\u043e\u0434\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0447\u0435\u0440\u0435\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 Where {}.<br \/>\n\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u0447\u0435\u0442\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b &#8211; \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u044d\u0442\u043e\u0439\u00a0<a href=\"http:\/\/msbro.ru\/index.php\/archives\/5556\">http:\/\/msbro.ru\/index.php\/archives\/5556<\/a> \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0438 \u0443 \u0432\u0430\u0441 \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u0445\u043e\u0440\u043e\u0448\u043e.<\/p>\n<p>\u0423\u0434\u0430\u0447\u0438!<\/p>\n<p>&nbsp;<\/p>\n<p>\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 \u043c\u043e\u0436\u0435\u0442\u0435 \u0442\u0443\u0442:\u00a0<a href=\"http:\/\/msbro.ru\/wp-content\/uploads\/2017\/04\/MSBRO_Find_Files_v2.zip\">MSBRO_Find_Files_v2<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0417\u0430\u0434\u0430\u0447\u0430 \u2014 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u0447\u0435\u0442 \u043f\u043e \u0444\u0430\u0439\u043b\u0430\u043c \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0438\u0449\u0443\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u044b \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435. \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432 \u0434\u043e\u043c\u0435\u043d\u0435. \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0430 PowerShell \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0449\u0435\u0442 \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 \u0444\u0430\u0439\u043b\u044b \u043f\u043e \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0439 \u043c\u0430\u0441\u043a\u0435. \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0444\u0430\u0439\u043b\u044b \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u0447\u0435\u0442 \u0432 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043f\u043e \u0432\u0441\u0435\u043c \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u043c \u0444\u0430\u0439\u043b\u0430\u043c. \u041f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 &#8230;<\/p>\n<p><a href=\"https:\/\/msbro.ru\/index.php\/archives\/5588\" class=\"more-link\">Continue reading &lsquo;\u041f\u043e\u0438\u0441\u043a \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0430 PowerShell&rsquo; &raquo;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[1840,1841,1839,17],"class_list":["post-5588","post","type-post","status-publish","format-standard","hentry","category-scripts","tag-find-files","tag-find-files-on-computer","tag-findfiles","tag-powershell"],"_links":{"self":[{"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/posts\/5588"}],"collection":[{"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/comments?post=5588"}],"version-history":[{"count":2,"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/posts\/5588\/revisions"}],"predecessor-version":[{"id":5591,"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/posts\/5588\/revisions\/5591"}],"wp:attachment":[{"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/media?parent=5588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/categories?post=5588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/tags?post=5588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->