{"id":168377,"date":"2013-02-08T17:04:02","date_gmt":"2013-02-08T13:04:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=168377"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=168377","title":{"rendered":"<span class=\"post_title\">\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0442\u0447\u0435\u0442\u044b \u043f\u043e \u0441\u0435\u0442\u0435\u0432\u044b\u043c \u043f\u0430\u043f\u043a\u0430\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell<\/span>"},"content":{"rendered":"<div class=\"content html_format\">       <img decoding=\"async\" align=\"right\" src=\"http:\/\/habrastorage.org\/storage2\/552\/fb0\/ecc\/552fb0ecc229f4d58aa660ef7008b1f2.png\"\/> \u0414\u0436\u0435\u0444\u0444\u0440\u0438 \u0425\u0438\u043a\u0441 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043f\u043e PowerShell, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u0443\u044e \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u043c\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438. \u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0435\u0435 \u043d\u0430 \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438: \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u043f\u043e \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u043c\u0438 \u0448\u0430\u0440\u0430\u043c\u0438. \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0442\u0447\u0435\u0442\u044b. <br \/>  \u0412 \u043f\u043e\u0441\u0442\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b:  <\/p>\n<ul>\n<li>\u041a\u0430\u043a \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043f\u0430\u043f\u043e\u043a \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 (\u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u0445)<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0442\u0447\u0435\u0442\u044b \u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u0445 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043f\u0430\u043f\u043e\u043a<\/li>\n<li>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u0432 \u0444\u0430\u0439\u043b\u043e\u0432<\/li>\n<li>\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0434\u0430\u0442\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u044b\u044f\u0432\u043b\u044f\u0435\u043c \u00ab\u0441\u0442\u0430\u0440\u044b\u0435\u00bb \u0444\u0430\u0439\u043b\u044b \u0438 \u0444\u0430\u0439\u043b\u044b, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438)<\/li>\n<\/ul>\n<p>  \u0418\u0442\u0430\u043a, \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/www.windowsitpro.com\/content1\/topic\/windows-powershell-file-server-management-143789\/catpath\/windows-powershell\/\">File Server Management with Windows PowerShell<\/a>.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0441\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043f\u0430\u043f\u043a\u0438<\/h4>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c, \u0447\u0442\u043e \u0436\u0435 \u0440\u0430\u0441\u0448\u0430\u0440\u0435\u043d\u043e. \u0417\u0430\u0434\u0430\u0447\u0430 \u043f\u0440\u043e\u0441\u0442\u0430: \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a\u043b\u0430\u0441\u0441\u0430 Win32_Share, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Windows Management Instrumentation (WMI). \u0412\u0430\u043c \u0434\u0430\u0436\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043b\u043e\u0433\u0438\u043d\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043e\u0442\u043a\u0443\u0434\u0430 \u0443\u0433\u043e\u0434\u043d\u043e.<\/p>\n<pre><code class=\"vbscript\">Get-WmiObject -class -Win32_Share -computername chi-fp01 <\/code><\/pre>\n<p>  \u0412\u043c\u0435\u0441\u0442\u043e chi-fp01 \u0443\u043a\u0430\u0436\u0435\u043c \u0438\u043c\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0435\u0433\u043e \u043d\u0430\u0441 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430<\/p>\n<p>  \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0432\u0441\u0435 \u0441\u0435\u0442\u0435\u0432\u044b\u0435 \u043f\u0430\u043f\u043a\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043f\u0440\u0438\u043d\u0442\u0435\u0440\u044b (\u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0432\u044b\u0435 \u0438\u043c\u0435\u044e\u0442\u0441\u044f). \u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0448\u0430\u0440\u0430\u0445, \u0442\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441. \u0412\u0441\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b Win32_Share \u0438\u043c\u0435\u044e\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e Type, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 1. <br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/8e2\/bc0\/881\/8e2bc0881ca66fbed899e367f4d54f17.jpg\"\/><\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u0438\u043b\u044c\u0442\u0440 \u0432 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"vbscript\">Get-WmiObject -class -Win32_Share -computername chi-fp01 \u2013filter &quot;Type=0&quot; <\/code><\/pre>\n<p>  \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043c\u044b \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0443\u0436\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/e1c\/255\/fbe\/e1c255fbef15b4b9be369d3cb0296116.jpg\"\/><\/p>\n<p>  \u041d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0449\u0438\u0442\u0435 \u0442\u0430\u043a\u0436\u0435 \u0438 \u0441\u043a\u0440\u044b\u0442\u044b\u0435 \u043f\u0430\u043f\u043a\u0438 \u2013 \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u043a\u043e\u043c \u0434\u043e\u043b\u043b\u0430\u0440\u0430 ($) \u2013 \u0444\u0438\u043b\u044c\u0442\u0440 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0433\u043a\u0430 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c:<\/p>\n<pre><code class=\"vbscript\">Get-WmiObject -Class win32_share -computername chi-fp01 \u2013filter &quot;Type=0 AND name like '%$'&quot; <\/code><\/pre>\n<p>  \u0412 WMI \u0437\u043d\u0430\u043a \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430 (%) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u0437\u043d\u0430\u043a\u0430 \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 (wildcard). \u0412\u044b\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \u043f\u0430\u043f\u043a\u0438, \u043a\u0440\u043e\u043c\u0435 \u0442\u0435\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043a\u0440\u044b\u0442\u044b \u0447\u0443\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u0435\u0435. <\/p>\n<pre><code class=\"vbscript\">Get-WmiObject -Class win32_share -computername chi-fp01\u2013filter &quot;type=0 AND name like '%[^$]'&quot; <\/code><\/pre>\n<p>  \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0432\u044b\u0432\u0435\u0434\u0435\u043d \u0432\u0441\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b <b>Win32_Share<\/b>, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <b>Type <\/b>\u0440\u0430\u0432\u043d\u043e 0 \u0438 \u0438\u043c\u044f \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 $.<\/p>\n<h4>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u043f\u0430\u043f\u043a\u0438<\/h4>\n<p>  \u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0447\u0430\u0441\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0442\u043e\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u0442\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0448\u0430\u0440\u044b. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <b>Get-ChildItem<\/b>, \u0438\u043b\u0438 \u0435\u0433\u043e \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435 <b>dir<\/b>, \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 <b>Measure-Object<\/b>:<\/p>\n<pre><code class=\"vbscript\">dir c:\\shares\\public -recurse | where {-Not $_.PSIsContainer}| Measure-Object -Property length -Sum -Minimum -Maximum <\/code><\/pre>\n<p>  \u0412 \u0438\u0442\u043e\u0433\u0435 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u043e\u0431\u0449\u0435\u043c \u0447\u0438\u0441\u043b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0440\u0430\u0437\u043c\u0435\u0440 \u0432 \u0431\u0430\u0439\u0442\u0430\u0445, \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0435 \u0438 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435, \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b \u0444\u0438\u043b\u044c\u0442\u0440. \u0412 PowerShell 3.0 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0449\u0435, \u043e\u0434\u043d\u0430\u043a\u043e \u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a v2.0, \u0442\u0430\u043a \u0438 3.0. \u0415\u0435 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e. \u041a\u043e\u0434 \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 1 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u0443\u0435\u0442 \u044d\u0442\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0441 \u043d\u0430\u0448\u0435\u0439 \u0442\u0435\u0445\u043d\u0438\u043a\u043e\u0439 WMI, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442\u0447\u0435\u0442 \u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0445 \u043f\u0430\u043f\u043e\u043a. <\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 1: \u041e\u0442\u0447\u0435\u0442 \u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u0445 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0445 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043f\u0430\u043f\u043e\u043a<\/b><\/p>\n<pre><code class=\"vbscript\">$share=Get-WmiObject -Class Win32_Share -ComputerName CHI-FP01 -filter &quot;name='Sales'&quot; $sb={ Param ($path) dir $path | where {$_.PSIscontainer} | foreach { $stats=dir $_.Fullname -recurse -errorAction &quot;SilentlyContinue&quot; | where {-NOT $_.PSIscontainer} | Measure-object -Property Length -sum New-Object -TypeName PSObject -Property @{ Computername=$env:Computername Path=$_.Name Fullname=$_.Fullname SizeKB=[math]::Round(($stats.sum\/1KB),2) NumberFiles=$stats.count } #property } #foreach } #sb $results=Invoke-Command -ScriptBlock $sb -ComputerName $share.__SERVER -ArgumentList @($share.path) -HideComputerName <\/code><\/pre>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c <b>$results<\/b> \u043a\u0430\u043a \u0432\u0430\u0448\u0435\u0439 \u0434\u0443\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0433\u043e\u0434\u043d\u043e. \u041d\u0443\u0436\u043d\u0430 \u0443\u0434\u043e\u0431\u043e\u0432\u0430\u0440\u0438\u043c\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430? \u041f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"vbscript\">$results | Format-Table Computername,Fullname,SizeKB,NumberFiles -autosize <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/a4b\/100\/905\/a4b100905fc5a858528fd8a5761b105e.jpg\"\/><\/p>\n<p>  \u0422\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u044b\u0439 \u043e\u0442\u0447\u0435\u0442 \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0432\u0441\u0435\u0445 \u043f\u0430\u043f\u043e\u043a \u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0440\u0443\u0434\u0430. \u0421\u044d\u043a\u043e\u043d\u043e\u043c\u044c\u0442\u0435 \u0432\u0440\u0435\u043c\u044f, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c 2. <\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 2: \u041e\u0442\u0447\u0435\u0442 \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0448\u0430\u0440<\/b><\/p>\n<pre><code class=\"vbscript\">$sb={ #Get the file shares locally. $shares=Get-WmiObject -Class Win32_Share -filter &quot;type=0&quot; foreach ($share in $shares) { #Suppress any access denied error messages. Write-Host &quot;Measuring $($share.path)&quot; -ForegroundColor Green $stats=dir $share.path -Recurse -ErrorAction SilentlyContinue | Where {-Not $_.PSIscontainer} | Measure-Object -Property Length -Sum $hash=@{ Computername=$env:Computername Path=$share.path Share=$share.Name SizeKB=[math]::Round(($stats.sum\/1KB),2) Files=$stats.count } #Write a custom object to the pipeline for each share. New-Object -TypeName PSObject -Property $hash } #foreach $share }#sb $results = Invoke-Command -ScriptBlock $sb -ComputerName CHI-FP01 -HideComputerName <\/code><\/pre>\n<p>  \u0418 \u0441\u043d\u043e\u0432\u0430 \u044f \u0441\u043b\u0435\u0433\u043a\u0430 \u043e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<pre><code class=\"vbscript\">$results | sort SizeKB \u2013Descending | Select Computername,Share,SizeKB,Files | ft -auto <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/2ca\/905\/cc0\/2ca905cc0cd706fb3d2b3dbfe274b538.jpg\"\/><\/p>\n<h4>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u043f\u043e \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0443<\/h4>\n<p>  \u0414\u0432\u0438\u0433\u0430\u0435\u043c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u2013 \u043d\u0430\u0439\u0434\u0435\u043c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u0432 \u0444\u0430\u0439\u043b\u043e\u0432. \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043a\u0432\u043e\u0442\u044b, \u043e\u0442\u0447\u0435\u0442\u044b \u0443\u0436\u0435 \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0432\u0441\u0435, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u2013 \u044d\u0442\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c ACL \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430, \u0438 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u041b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u0444\u0430\u0439\u043b\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430<\/p>\n<pre><code class=\"vbscript\">$data=dir | where {-not $_.PSIsContainer} | select name, @{Name=&quot;Owner&quot;;Expression={(Get-ACL $_.fullname).Owner}}, length <\/code><\/pre>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0443 \u043d\u043e\u0432\u043e\u0433\u043e \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u0438 \u0437\u0430\u0442\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442.<\/p>\n<pre><code class=\"vbscript\">$data | group owner | Select Name,Count,@{Name=&quot;Size&quot;;Expression={($_.Group | Measure-Object -Property Length -sum).Sum}} <\/code><\/pre>\n<p>  \u041f\u0430\u0440\u0430 \u0443\u0441\u0438\u043b\u0438\u0439 \u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0442\u043e\u0442 \u0436\u0435 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0448\u0430\u0440\u0435, \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043a\u043e\u0434\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 3. <\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 3: \u0413\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u0435\u043c \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0448\u0430\u0440\u044b \u043f\u043e \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0443<\/b><\/p>\n<pre><code class=\"vbscript\">$sb={ Param($path) $data=dir $path | where {-not $_.PSIsContainer} | select name, @{Name=&quot;Owner&quot;;Expression= {(Get-ACL $_.fullname).Owner}},length $data | group -property owner | Select @{Name=&quot;Computername&quot;;Expression={$env:computername}}, @{Name=&quot;Path&quot;;Expression={$path}},Name,Count,@{Name= &quot;Size&quot;;Expression={ ($_.Group | Measure-Object -Property Length -sum).Sum}} } #sb &lt;# Run the command remotely and suppress the RunspaceID since we don't really need it. #&gt; Invoke-Command -ScriptBlock $sb -ComputerName CHI-FP01 -ArgumentList @(&quot;c:\\shares\\public&quot;) -HideComputerName | Select * -ExcludeProperty RunspaceID <\/code><\/pre>\n<p>  \u042f \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b: \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438, \u0438\u043c\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u043e\u043b\u0435\u0435 260 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438\u043b\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u043f\u044b\u0442\u0430\u0435\u0442\u0435\u0441\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c Get-ACL. \u0412 PowerShell 3.0 \u044d\u0442\u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442 \u0438\u043c\u0435\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <b>-LiteralPath<\/b>, \u0447\u0442\u043e \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0440\u0435\u0448\u0438\u0442\u044c \u0432\u044b\u0448\u0435\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<p>  \u041e\u043f\u044f\u0442\u044c \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u0447\u0438\u0442\u0430\u0435\u043c\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<pre><code class=\"vbscript\">$data | Sort Size | ft -auto <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/d67\/ce8\/643\/d67ce864362abf38301b776ffd87ed59.jpg\"\/><\/p>\n<h4>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u044b \u043f\u043e \u0434\u0430\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f<\/h4>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0442\u0435\u0445\u043d\u0438\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u0447\u0435\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0445\u043e\u0447\u0443 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u2013 \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u0430 \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438\u043b\u0438 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0444\u0430\u0439\u043b\u044b, \u0438\u043b\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043e\u0442\u0447\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0443. \u0412\u0441\u0435\u0433\u0434\u0430 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b PowerShell \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<br \/>  \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u043e\u0437\u0440\u0430\u0441\u0442 \u0444\u0430\u0439\u043b \u043d\u0435 \u0442\u0430\u043a \u043f\u0440\u043e\u0441\u0442\u043e. \u0412 PowerShell \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 (\u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 \u0444\u0430\u0439\u043b) \u0438\u043c\u0435\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u043c\u0430\u043d\u0434\u0430:  <\/p>\n<pre><code class=\"vbscript\">get-item c:\\work\\wishlist.txt | Format-List Name,*time <\/code><\/pre>\n<p>  \u0434\u0430\u0435\u0442 \u0432\u044b\u0432\u043e\u0434, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u043d\u0438\u0436\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/d32\/add\/552\/d32add55253408388a9c673d3882ab3a.jpg\"\/><\/p>\n<p>  \u041b\u0438\u0447\u043d\u043e \u044f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <b>LastWriteTime<\/b>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u043a \u0444\u0430\u0439\u043b\u0443 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0440\u0430\u0437 \u043e\u0431\u0440\u0430\u0449\u0430\u043b\u0438\u0441\u044c. \u041c\u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b\u0438\u0441\u044c \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u043a\u043e\u0433\u0434\u0430 <b>LastAccessTime <\/b>\u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u043d\u0442\u0438\u0432\u0438\u0440\u0443\u0441, \u0447\u0442\u043e \u0441\u0430\u043c\u043e \u043f\u043e \u0441\u0435\u0431\u0435 \u0443\u0436\u0435 \u043d\u0435 \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0434\u044b. \u0418 <b>LastAccessTime <\/b>\u0431\u044b\u043b \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043b \u0435\u0449\u0435 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 Windows Vista, \u0445\u043e\u0442\u044f \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0435\u0433\u043e \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c. \u0412\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u044b\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0433\u0443\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u0442\u0435 \u043b\u0438 \u0432\u044b \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u043c\u0435\u0436\u0434\u0443 \u0434\u0438\u0441\u043a\u0430\u043c\u0438 (between volumes). \u041d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u043e \u0441\u0430\u043c\u0438. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u043a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c PowerShell \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430\u043c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0430\u0440 \u0444\u0430\u0439\u043b. \u0421\u043c. \u043f\u0440\u0438\u043c\u0435\u0440 4.<\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 4. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0432\u043e\u0437\u0440\u0430\u0441\u0442 \u0444\u0430\u0439\u043b\u043e\u0432<\/b>  <\/p>\n<pre><code class=\"vbscript\">PS C:\\work&gt; get-item wishlist.txt | format-list name, CreationTime,LastWriteTime, &gt;&gt; @{Name=&quot;Age&quot;;Expression={(Get-Date)-$_.LastWriteTime}}, &gt;&gt; @{Name=&quot;Days&quot;;Expression={((Get-Date) -$_.LastWriteTime).TotalDays}} &gt;&gt;  Name : wishlist.txt CreationTime : 11\/23\/2010 10:31:10 PM LastWriteTime : 2\/15\/2011 7:36:34 AM Age : 511.06:42:17.4251748 Days : 511.279372271039 <\/code><\/pre>\n<p>  \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e <b>Age <\/b>\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c <b>TimeSpan<\/b>, \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <b>Days <\/b>\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u043c <b>TotalDays <\/b>\u044d\u0442\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u044d\u0442\u043e\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u043c\u043e\u044e \u043e\u0431\u0449\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0438 \u043d\u0430\u0439\u0434\u0435\u043c \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 400 \u0434\u043d\u0435\u0439.<\/p>\n<pre><code class=\"vbscript\">dir c:\\shares\\public -recurse | Select Fullname,CreationTime,LastWriteTime, @{Name=&quot;Age&quot;;Expression={(Get-Date)-$_.LastWriteTime}}, @{Name=&quot;Days&quot;;Expression={[int]((Get-Date) -$_.LastWriteTime).TotalDays}}, @{Name=&quot;Owner&quot;;Expression={(Get-ACL $_.fullname).Owner}} | Where {$_.Days -ge 400} | Sort Days -Descending <\/code><\/pre>\n<p>  \u042f \u043f\u043e\u0439\u0434\u0443 \u0434\u0430\u043b\u044c\u0448\u0435 \u0438 \u0432\u043a\u043b\u044e\u0447\u0443 \u0435\u0449\u0435 \u0438 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430 \u0444\u0430\u0439\u043b\u0430. \u041d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435 \u043d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043e\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434 \u0432 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0435\u0441\u0441\u0438\u0438 \u043d\u0430 \u043c\u043e\u0435\u043c \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/87e\/a33\/27d\/87ea3327d602eaca4c27fe3cbd559467.jpg\"\/><\/p>\n<p>  \u042f \u043c\u043e\u0433\u0443 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u044d\u0442\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u043b\u044e\u0431\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u0422\u0430\u043a \u043a\u0430\u043a \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0435 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430, \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u0434\u0440\u0443\u0433\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, Remove-Item, \u043d\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u0442\u0440\u0443\u0434\u0430.<br \/>  \u041e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043c\u043e\u0438\u0445 \u043b\u044e\u0431\u0438\u043c\u044b\u0445 \u0442\u0435\u0445\u043d\u0438\u043a \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432 \u0431\u044b\u043b\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043e \u0437\u0430 \u0433\u043e\u0434. <\/p>\n<pre><code class=\"vbscript\">dir c:\\shares\\sales -recurse | Select Fullname,LastWriteTime, @{Name=&quot;Age&quot;;Expression={(Get-Date)-$_.LastWriteTime}}, @{Name=&quot;Year&quot;;Expression={$_.LastWriteTime.Year}} | Group-Object Year | Sort Name <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435, \u0432\u0441\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u0447\u0435\u0441\u0430\u043d\u043e. \u041d\u0443\u0436\u043d\u044b \u0434\u0435\u0442\u0430\u043b\u0438? \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <b>Group<\/b>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/ff1\/75e\/6e6\/ff175e6e6d6d756c68c440a03ad941b1.jpg\"\/><\/p>\n<p>  \u041f\u043e\u043b\u0435\u0437\u043d\u043e \u0437\u043d\u0430\u0442\u044c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c \u0437\u0430 30, 90 \u0438\u043b\u0438 180 \u0434\u043d\u0435\u0439. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <b>Group-Object <\/b> \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043d\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u00ab\u043f\u043e\u0439\u0442\u0438 \u0438\u043d\u044b\u043c \u043f\u0443\u0442\u0435\u043c\u00bb; \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u0440 5. <\/p>\n<p>  <b>\u041f\u0440\u0438\u043c\u0435\u0440 5: \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0438\u043e\u0434 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432<\/b><\/p>\n<pre><code class=\"vbscript\">$path=&quot;c:\\scripts&quot; #Get some other properties in case we want to further #break down each bucket. $files=dir $path -recurse | Select Fullname,CreationTime,LastWriteTime,Length, @{Name=&quot;Age&quot;;Expression={(Get-Date)-$_.LastWriteTime}}, @{Name=&quot;Days&quot;;Expression={[int]((Get-Date) -$_.LastWriteTime).TotalDays}} $hash=@{ Path=$path Over= ($files | Where {$_.Days -gt 365} | Measure-Object).Count '365Days'= ($files | Where {$_.Days -gt 180 -AND $_.Days -le 365} | Measure-Object).Count '180Days'= ($files | Where {$_.Days -gt 90 -AND $_.Days -le 180} | Measure-Object).Count '90Days'= ($files | Where {$_.Days -gt 30 -AND $_.Days -le 90} | Measure-Object).Count '30Days'= ($files | Where {$_.Days -gt 7 -AND $_.Days -le 30} | Measure-Object).Count '7Days'= ($files | Where {$_.Days -gt 0 -AND $_.Days -le 7} | Measure-Object).Count } New-Object -TypeName PSObject -Property $hash | Select Path,Over,365Days,180Days,90Days,30Days,7Days <\/code><\/pre>\n<p>  \u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043a\u043e\u0433\u0434\u0430 \u044f \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u0434\u043b\u044f \u043f\u0430\u043f\u043a\u0438 \u0441 \u043c\u043e\u0438\u043c\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043a\u0430\u043a \u044f \u0437\u043d\u0430\u044e, \u0438\u043c\u0435\u0435\u0442 \u043f\u043b\u043e\u0442\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0443 (decent age distribution). \u041c\u043e\u0439 \u043a\u043e\u0434 \u043d\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b, \u043d\u043e \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043c\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/777\/0db\/b81\/7770dbb812d3675362c759de0d5513d6.jpg\"\/><\/p>\n<p>  \u0417\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u043f\u043e\u0441\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u043f\u0435\u0440\u0432\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/www.windowsitpro.com\/content1\/topic\/windows-powershell-file-server-management-143789\/catpath\/windows-powershell\">File Server Management with Windows PowerShell<\/a>.<\/p>\n<p>  \u0411\u043e\u043d\u0443\u0441:<\/p>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043d\u0430\u0439\u0442\u0438 \u0444\u0430\u0439\u043b\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell \u0438 WMI \u0414\u0436\u0435\u0444\u0444\u0440\u0438 \u0425\u0438\u043a\u0441 \u043f\u0438\u0448\u0435\u0442 \u0432 \u0441\u0432\u043e\u0435\u043c \u0431\u043b\u043e\u0433\u0435 (\u0447\u0430\u0441\u0442\u044c <a href=\"http:\/\/jdhitsolutions.com\/blog\/2013\/01\/find-files-with-wmi-and-powershell\/\">1<\/a> \u0438 <a href=\"http:\/\/jdhitsolutions.com\/blog\/2013\/02\/find-files-with-wmi-and-powershell-revisited\/\">2<\/a>).        \t\t \t\t\t \t<\/p>\n<div class=\"polling\">\n<form action=\"\/json\/polling\/\" class=\"poll\" method=\"post\">\n<div class=\"poll_title\">\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0441\u0442\u0430\u0442\u044c\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0445 \u0448\u0430\u0440 \u0438 \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043d\u0438\u043c. \u0411\u044b\u043b \u0431\u044b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0435\u043d \u0435\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434?<\/div>\n<p>  \t\t<input type=\"hidden\" name=\"post_id\" value=\"168377\"\/> \t\t<input type=\"hidden\" name=\"polling_question_id\" value=\"7115\"\/>  \t\t<\/p>\n<table class=\"answer\">\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv37213\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"37213\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv37213\">\u0414\u0430<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv37215\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"37215\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv37215\">\u041d\u0435\u0442<\/label> \t\t\t\t<\/td>\n<\/tr>\n<\/table>\n<p class=\"for_users_only_msg\">\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a href=\"\/login\/\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/p>\n<p class=\"total\">\u041d\u0438\u043a\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b. \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043d\u0435\u0442.<\/p>\n<\/p><\/form>\n<\/p><\/div>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/company\/netwrix\/blog\/168377\/\"> http:\/\/habrahabr.ru\/company\/netwrix\/blog\/168377\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">       <img decoding=\"async\" align=\"right\" src=\"http:\/\/habrastorage.org\/storage2\/552\/fb0\/ecc\/552fb0ecc229f4d58aa660ef7008b1f2.png\"\/> \u0414\u0436\u0435\u0444\u0444\u0440\u0438 \u0425\u0438\u043a\u0441 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043f\u043e PowerShell, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u0443\u044e \u043d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u043c\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438. \u041c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u0435\u0435 \u043d\u0430 \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438: \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043e\u0442\u0447\u0435\u0442\u043e\u0432 \u043f\u043e \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u043c\u0438 \u0448\u0430\u0440\u0430\u043c\u0438. \u0412 \u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0442\u0447\u0435\u0442\u044b. <br \/>  \u0412 \u043f\u043e\u0441\u0442\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b:  <\/p>\n<ul>\n<li>\u041a\u0430\u043a \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043f\u0430\u043f\u043e\u043a \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435 (\u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u0445)<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0442\u0447\u0435\u0442\u044b \u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u0445 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043f\u0430\u043f\u043e\u043a<\/li>\n<li>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u0432 \u0444\u0430\u0439\u043b\u043e\u0432<\/li>\n<li>\u041d\u0430\u0445\u043e\u0434\u0438\u043c \u0434\u0430\u0442\u0443 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u044b\u044f\u0432\u043b\u044f\u0435\u043c \u00ab\u0441\u0442\u0430\u0440\u044b\u0435\u00bb \u0444\u0430\u0439\u043b\u044b \u0438 \u0444\u0430\u0439\u043b\u044b, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0437\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u043a \u0432\u0440\u0435\u043c\u0435\u043d\u0438)<\/li>\n<\/ul>\n<p>  \u0418\u0442\u0430\u043a, \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u0432\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/www.windowsitpro.com\/content1\/topic\/windows-powershell-file-server-management-143789\/catpath\/windows-powershell\/\">File Server Management with Windows PowerShell<\/a>.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-168377","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/168377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=168377"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/168377\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=168377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=168377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=168377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}