{"id":4176,"date":"2011-02-07T15:57:55","date_gmt":"2011-02-07T11:57:55","guid":{"rendered":"http:\/\/msbro.ru\/?p=4176"},"modified":"2013-10-11T13:39:50","modified_gmt":"2013-10-11T09:39:50","slug":"inventarizaciya-v-seti","status":"publish","type":"post","link":"https:\/\/msbro.ru\/index.php\/archives\/4176","title":{"rendered":"\u0418\u043d\u0432\u0435\u043d\u0442\u0430\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u0441\u0435\u0442\u0438"},"content":{"rendered":"<p>\u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0438 \u043d\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<p><!--more--><br \/>\n\u044d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<pre>\r\nFilter Where-Online\r\n{\r\n    $ping = new-object System.Net.NetworkInformation.Ping\r\n    trap {Write-Verbose \"\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0438\u043d\u0433\u0430\"; Continue}\r\n    if ($ping.send($_).Status -eq \"Success\" ) { $_ }\r\n}\r\n\r\nFunction Get-ComputerSoftware ($Name = \"*\")\r\n{\r\nforeach ($comp in (Get-QADComputer $Name | foreach {$_.dnsname} | Where-Online))\r\n{\r\nWrite-Host \"Enumerating software for $comp...`t\" -NoNewline\r\nGet-WmiObject win32_product -ComputerName $comp | select name, vendor, version, @{name=\"Computer\"; expression={$Comp}}\r\nWrite-Host \"Done\"\r\n}\r\n}<\/pre>\n<p>\u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u0430\u043a:<\/p>\n<pre>Get-ComputerSoftware -Name \"Scenic*\" | Export-Csv -Encoding \"Unicode\" -Path \"c:\\Report.csv\"\r\n<\/pre>\n<p>\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 <a href=\"http:\/\/www.quest.com\/powershell\/activeroles-server.aspx\" target=\"_blank\">\u044d\u0442\u0438\u043c\u0438<\/a> \u043a\u043e\u043c\u0430\u043d\u0434\u043b\u0435\u0442\u0430\u043c\u0438<\/p>\n<p><a href=\"http:\/\/xaegr.wordpress.com\/2008\/09\/16\/test-host_where-online\/\" target=\"_blank\">\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439 \u0438 \u043d\u0435 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0441\u043a\u0440\u0438\u043f\u0442:<\/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":[17,1119,1210],"class_list":["post-4176","post","type-post","status-publish","format-standard","hentry","category-scripts","tag-powershell","tag-ps","tag-inventarizaciya"],"_links":{"self":[{"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/posts\/4176"}],"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=4176"}],"version-history":[{"count":0,"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/posts\/4176\/revisions"}],"wp:attachment":[{"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/media?parent=4176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/categories?post=4176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/tags?post=4176"}],"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. -->