{"id":681,"date":"2018-06-29T17:54:15","date_gmt":"2018-06-29T14:54:15","guid":{"rendered":"https:\/\/www.it-earth.ru\/?p=681"},"modified":"2018-06-29T18:15:36","modified_gmt":"2018-06-29T15:15:36","slug":"%d1%81%d0%be%d0%b7%d0%b4%d0%b0%d0%bd%d0%b8%d0%b5-%d0%b2%d0%b8%d1%80%d1%82%d1%83%d0%b0%d0%bb%d1%8c%d0%bd%d0%be%d0%b9-%d0%bc%d0%b0%d1%88%d0%b8%d0%bd%d1%8b-%d0%b2-azure-%d1%81-%d0%bf%d0%be%d0%bc","status":"publish","type":"post","link":"https:\/\/www.it-earth.ru\/?p=681","title":{"rendered":"\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u041c\u0430\u0448\u0438\u043d\u044b \u0432 Azure\u00a0 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell"},"content":{"rendered":"<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u041c\u0430\u0448\u0438\u043d\u044b \u0432 Azure\u00a0 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell<\/p>\n<p><code><br \/>\n# \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438 \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 AzureRm \u0434\u043b\u044f PowerShell<br \/>\nInstall-Module -Name AzureRM<\/code><\/p>\n<p># \u0418\u043c\u043f\u043e\u0440\u0442 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 AzureRm \u0434\u043b\u044f PowerShell<br \/>\nImport-Module -Name AzureRm<\/p>\n<p>#\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0410\u043a\u043a\u0430\u0443\u043d\u0442 Azure<br \/>\nAdd-AzureRmAccount<\/p>\n<p><\/code><\/p>\n<p><!--more--><\/p>\n<p><code><\/p>\n<p># \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0433\u0440\u0443\u043f\u043f\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c Azure533 \u0432 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 westus2<br \/>\nNew-AzureRmResourceGroup -Name \"Azure533\" -Location 'westus2'<\/p>\n<p>#\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 Azure533 \u0441 \u0418\u043c\u0435\u043d\u0435\u043c AzureVM533 \u0432 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 westus2,<br \/>\n#\u0433\u0440\u0443\u043f\u043f\u0430 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 sgAzure533 \u0441 \u043f\u043e\u0440\u0442\u043e\u043c 3389, \u0438\u043c\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 westus2, \u043f\u043e\u0434\u0441\u0435\u0442\u0438 subnetAzure533<br \/>\n#\u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0431\u0435\u043b\u044b\u0439 \u0410\u0434\u0440\u0435\u0441 AzureIp533. \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u0430\u044f \u043f\u043e \u0443\u043c\u0430\u043b\u0447\u0438\u0432\u0430\u043d\u0438\u044e Windows Server 2016 Datacenter<\/p>\n<p>New-AzureRmVM -ResourceGroupName \"Azure533\" -Name \"AzureVM533\" -Location 'westus2' -VirtualNetworkName \"Azure533\" -SubnetName \"subnetAzure533\" -SecurityGroupName \"sgAzure533\" -PublicIpAddressName \"AzureIp533\" -OpenPorts 3389<\/p>\n<p>#\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 ip \u0410\u0434\u0440\u0435\u0441\u0430 AzureVM533<br \/>\nGet-AzureRmPublicIpAddress -Name \"AzureIp533\" -ResourceGroupName Azure533<\/p>\n<p>#\u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c ip \u0410\u0434\u0440\u0435\u0441 \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e $AzureIp533<br \/>\n$AzureIp533 = Get-AzureRmPublicIpAddress -Name \"AzureIp533\" -ResourceGroupName Azure533<\/p>\n<p>#\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a AzureVM533<br \/>\nmstsc \/v $AzureIp533<\/p>\n<p>#\u0417\u0430\u043f\u0443\u0441\u043a \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u041c\u0430\u0448\u0438\u043d\u044b<br \/>\nStart-AzureRmVM -Name AzureVM533 -ResourceGroupName Azure533<\/p>\n<p>#\u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u041c\u0430\u0448\u0438\u043d\u044b<br \/>\nStop-AzureRmVM -Name AzureVM533 -ResourceGroupName Azure533<\/p>\n<p>#\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u041c\u0430\u0448\u0438\u043d\u044b<br \/>\nRemove-AzureRmVM -Name AzureVM533 -ResourceGroupName Azure533<\/p>\n<p>#\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 Azure533 (\u0421\u043e\u0432\u043c\u0435\u0441\u0442\u043d\u043e \u0441 \u0433\u0440\u0443\u043f\u043f\u043e\u0439 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 Azure533)<br \/>\nRemove-AzureRmResourceGroup -Name \"Azure533\"<\/p>\n<p><\/code><\/p>\n<p>\u0421\u0441\u044b\u043b\u043a\u0438 \u043f\u043e \u0442\u0435\u043c\u0435:<\/p>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/github.com\/antonitprof\/Azure\">\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043d\u0430 GitHub<\/a><\/p>\n<p><a href=\"http:\/\/azure.com\">Windows Azure<\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/azure\/overview?view=azurermps-6.3.0\">Overview of Azure PowerShell<\/a><br \/>\n<a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/module\/azurerm.compute\/new-azurermvm?view=azurermps-6.3.0\">New-AzureRmVM<\/a><\/p>\n<p>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u043e\u0432: 31<\/p>","protected":false},"excerpt":{"rendered":"<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u041c\u0430\u0448\u0438\u043d\u044b \u0432 Azure\u00a0 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PowerShell<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[171],"class_list":["post-681","post","type-post","status-publish","format-standard","hentry","category-itmemo","tag-----azure--"],"_links":{"self":[{"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=\/wp\/v2\/posts\/681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=681"}],"version-history":[{"count":5,"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=\/wp\/v2\/posts\/681\/revisions"}],"predecessor-version":[{"id":686,"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=\/wp\/v2\/posts\/681\/revisions\/686"}],"wp:attachment":[{"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.it-earth.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}