{"id":5499,"date":"2015-09-17T17:10:06","date_gmt":"2015-09-17T14:10:06","guid":{"rendered":"http:\/\/msbro.ru\/?p=5499"},"modified":"2015-09-17T17:32:42","modified_gmt":"2015-09-17T14:32:42","slug":"nekotorye-komandy-ps","status":"publish","type":"post","link":"https:\/\/msbro.ru\/index.php\/archives\/5499","title":{"rendered":"\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b PS"},"content":{"rendered":"<p>\u0437\u0430\u043c\u0435\u0442\u043a\u0438<\/p>\n<p><!--more--><br \/>\n\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043a\u043e\u043c\u0430\u043d\u0434:<\/p>\n<pre>\r\nGet-Command *-VM*\r\n<\/pre>\n<p>\u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e VM (\u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c) \u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443:<\/p>\n<pre>\r\nEnable-VMResourceMetering -ComputerName HyperVHostName-VMName * | Measure-VM\r\n<\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434 \u0441\u043f\u0438\u0441\u043e\u043a VM \u043d\u0430 \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0435:<\/p>\n<pre>\r\nGet-VM\r\n<\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434 \u0434\u0438\u0441\u043a\u043e\u0432 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u043a VM:<\/p>\n<pre>\r\nGet-VMHardDiskDrive -vmname ida-adc | fl\r\n\r\nDiskNumber :\r\nControllerType : IDE\r\nControllerNumber : 0\r\nControllerLocation : 0\r\nName : Hard Drive on IDE controller number 0 at location 0\r\nPoolName : Primordial\r\nPath : D:\\hyper-v\\IDA-ADC\\Virtual Hard Disks\\IDA-ADC.vhdx\r\nDisk :\r\nComputerName : FR-CORE-26\r\nId : Microsoft:88E738C8-B298-4952-980C-65DE2260F4DB\\83F8638B-8D\r\nCA-4152-9EDA-2CA8B33039B4\\0\\0\\D\r\nIsDeleted : False\r\nVMId : 88e738c8-b298-4952-980c-65de2260f4db\r\nVMName : IDA-ADC\r\nVMSnapshotId : 00000000-0000-0000-0000-000000000000\r\nVMSnapshotName :\r\n<\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u043e\u0439 SMB \u0448\u0430\u0440\u044b:<\/p>\n<pre>New-SMBShare \u2013Name Documents \u2013Path D:\\Shares<\/pre>\n<p>\u0412\u044b\u0432\u043e\u0434 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0445 \u0440\u043e\u043b\u0435\u0439 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435:<\/p>\n<pre>Get-WindowsFeature<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0440\u0437\u0438\u043d\u044b \u0432 \u0410\u0414 (Active Directory Recycle Bin):<\/p>\n<pre>\"Enable-ADOptionalFeature \u2013Identity \u2018CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=nuggetlab,DC=com\u2019 \u2013Scope ForestOrConfigurationSet \u2013Target \u2018domain.com\u2019\"<\/pre>\n<p>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435\u00a0Features on Demand (\u043f\u0430\u043f\u043a\u0430\u00a0C:\\Windows\\WinSxS ):<\/p>\n<pre>\r\nUninstall-WindowsFeature \u2013Name ******** \u2013Vhd \u201cpath\u201d \u2013Remove<\/pre>\n<p>\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f:<\/p>\n<pre>\r\nEnable-PSRemoting<\/pre>\n<p>\u0423\u0434\u0430\u043b\u0438\u0442\u044c \/ \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c GUI:<\/p>\n<pre>Uninstall-WindowsFeature Server-Gui-Mgmt-Infra, Server-Gui-Shell \u2013Restart<\/pre>\n<pre>Install-WindowsFeature Server-Gui-Mgmt-Infra, Server-Gui-Shell \u2013Restart<\/pre>\n<p>\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u043e\u0441\u043e\u0432 VM \u043d\u0430 \u00a0Hyper-V (resource metering on Hyper-V host):<\/p>\n<pre>Get-VM \u2013ComputerName | Enable-VMResourceMetering | Measure-VM<\/pre>\n<p>\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0433\u0438\u043f\u0435\u0440\u0432\u0438\u0437\u043e\u0440\u0435:<\/p>\n<pre>Get-VMHost<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u0437\u0430\u043c\u0435\u0442\u043a\u0438<\/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,719,1119],"class_list":["post-5499","post","type-post","status-publish","format-standard","hentry","category-scripts","tag-powershell","tag-powershell-komandy","tag-ps"],"_links":{"self":[{"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/posts\/5499"}],"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=5499"}],"version-history":[{"count":2,"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/posts\/5499\/revisions"}],"predecessor-version":[{"id":5504,"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/posts\/5499\/revisions\/5504"}],"wp:attachment":[{"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/media?parent=5499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/categories?post=5499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/msbro.ru\/index.php\/wp-json\/wp\/v2\/tags?post=5499"}],"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. -->