{"id":4831,"date":"2019-03-12T14:06:41","date_gmt":"2019-03-12T05:06:41","guid":{"rendered":"https:\/\/www.syuheiuda.com\/?p=4831"},"modified":"2019-03-13T23:20:21","modified_gmt":"2019-03-13T14:20:21","slug":"%e4%bb%ae%e6%83%b3%e3%83%9e%e3%82%b7%e3%83%b3%e3%81%ae%e3%83%87%e3%82%a3%e3%82%b9%e3%82%af-%e3%82%b5%e3%82%a4%e3%82%ba%e3%82%92-azure-powershell-%e3%81%8b%e3%82%89%e6%8b%a1%e5%bc%b5%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.syuheiuda.com\/?p=4831","title":{"rendered":"\u4eee\u60f3\u30de\u30b7\u30f3\u306e\u30c7\u30a3\u30b9\u30af \u30b5\u30a4\u30ba\u3092 Azure PowerShell \u304b\u3089\u62e1\u5f35\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>### \u6ce8\u91c8\u3053\u3053\u304b\u3089 ###<\/p>\n<p><span style=\"color: #ff0000;\"><strong>\u672c\u6295\u7a3f\u306f\u3001Microsoft \u306e TechNet Blog \u306e\u30ea\u30bf\u30a4\u30a2\u306b\u4f34\u3063\u3066\u3001\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u76ee\u7684\u3067\u500b\u4eba\u30d6\u30ed\u30b0\u306b\u518d\u6295\u7a3f\u3057\u305f\u3082\u306e\u3067\u3059\u3002<br \/>\n<\/strong><strong>\u30ea\u30f3\u30af\u5207\u308c\u3084\u5185\u5bb9\u306b\u3082\u591a\u5c11\u306e\u4fee\u6b63\u3092\u52a0\u3048\u3066\u3044\u307e\u3059\u304c\u3001\u60c5\u5831\u304c\u53e4\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/strong><\/span><br \/>\n(\u5143\u8a18\u4e8b)<br \/>\n<a href=\"https:\/\/blogs.technet.microsoft.com\/jpaztech\/2016\/04\/18\/azure-vm-disk-resize\/\">https:\/\/blogs.technet.microsoft.com\/jpaztech\/2016\/04\/18\/azure-vm-disk-resize\/<\/a><br \/>\n(\u516c\u5f0f\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u4e00\u89a7)<br \/>\n<a href=\"https:\/\/social.msdn.microsoft.com\/Forums\/ja-JP\/963ed40b-78fb-4a39-bfd0-925eb9ef95d3\/japan-azure-iaas-support-team-blog-1239812496124831246312490125311249612540?forum=Jpaztech\">Japan Azure IaaS Support Team Blog \u306e\u30d0\u30c3\u30af\u30ca\u30f3\u30d0\u30fc #1<\/a><br \/>\n<a href=\"https:\/\/social.msdn.microsoft.com\/Forums\/ja-JP\/00d499d5-b6d2-4c41-ad31-3aad4d294b21\/japan-azure-iaas-support-team-blog-1239812496124831246312490125311249612540?forum=Jpaztech\">Japan Azure IaaS Support Team Blog \u306e\u30d0\u30c3\u30af\u30ca\u30f3\u30d0\u30fc #2<\/a><\/p>\n<p>### \u6ce8\u91c8\u3053\u3053\u307e\u3067 ###<\/p>\n<hr \/>\n<p>\u3053\u3093\u306b\u3061\u306f\u3002Azure \u30b5\u30dd\u30fc\u30c8\u306e\u5b87\u7530\u3067\u3059\u3002<br \/>\n\u4eca\u56de\u306f Azure \u4eee\u60f3\u30de\u30b7\u30f3\u306e\u30c7\u30a3\u30b9\u30af \u30b5\u30a4\u30ba\u3092\u5909\u66f4\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<!--more--><\/p>\n<h3><span style=\"color: #ff6600;\">\u30af\u30e9\u30b7\u30c3\u30af (ASM) \u74b0\u5883\u306e\u5834\u5408<\/span><\/h3>\n<hr \/>\n<p>\u30af\u30e9\u30b7\u30c3\u30af\u74b0\u5883\u306e\u5834\u5408\u306b\u306f\u3001\u4eee\u60f3\u30de\u30b7\u30f3\u3092\u505c\u6b62\u3057\u305f\u3046\u3048\u3067 Azure PowerShell \u304b\u3089\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre># \u4eee\u60f3\u30de\u30b7\u30f3\u60c5\u5831\u3092\u53d6\u5f97\u3057\u307e\u3059\n$VmConfig = Get-AzureVM -ServiceName \"&lt;\u30af\u30e9\u30a6\u30c9 \u30b5\u30fc\u30d3\u30b9\u540d&gt;\" -Name \"&lt;\u4eee\u60f3\u30de\u30b7\u30f3\u540d&gt;\" \n\n# OS \u30c7\u30a3\u30b9\u30af\u30921023 GB \u3078\u62e1\u5f35\u3057\u307e\u3059\nUpdate-AzureDisk -DiskName $VmConfig.VM.OSVirtualHardDisk.DiskName -ResizedSizeInGB 1023 -Label \"&lt;\u30c7\u30a3\u30b9\u30af \u30e9\u30d9\u30eb&gt;\"\n\n# 1 \u3064\u76ee\u306e\u30c7\u30fc\u30bf \u30c7\u30a3\u30b9\u30af\u30921023 GB \u3078\u62e1\u5f35\u3057\u307e\u3059\nUpdate-AzureDisk -DiskName $VmConfig.VM.DataVirtualHardDisks[0].DiskName -ResizedSizeInGB 1023 -Label \"&lt;\u30c7\u30a3\u30b9\u30af \u30e9\u30d9\u30eb&gt;\"\n\n# 2 \u3064\u76ee\u306e\u30c7\u30fc\u30bf \u30c7\u30a3\u30b9\u30af\u30921023 GB \u3078\u62e1\u5f35\u3057\u307e\u3059\nUpdate-AzureDisk -DiskName $VmConfig.VM.DataVirtualHardDisks[1].DiskName -ResizedSizeInGB 1023 -Label \"&lt;\u30c7\u30a3\u30b9\u30af \u30e9\u30d9\u30eb&gt;\"<\/pre>\n<h3><span style=\"color: #ff6600;\">\u30ea\u30bd\u30fc\u30b9 \u30de\u30cd\u30fc\u30b8\u30e3\u30fc (ARM) \u74b0\u5883\u3067\u975e\u7ba1\u7406\u30c7\u30a3\u30b9\u30af\u306e\u5834\u5408<\/span><\/h3>\n<hr \/>\n<p>\u30ea\u30bd\u30fc\u30b9 \u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u74b0\u5883\u304b\u3064\u975e\u7ba1\u7406\u30c7\u30a3\u30b9\u30af\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u7ba1\u7406\u30dd\u30fc\u30bf\u30eb\u3082\u3057\u304f\u306f Azure PowerShell \u304b\u3089\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre># \u4eee\u60f3\u30de\u30b7\u30f3\u60c5\u5831\u3092\u53d6\u5f97\u3057\u307e\u3059\n$VmConfig = Get-AzureRmVM -Name \"&lt;\u4eee\u60f3\u30de\u30b7\u30f3\u540d&gt;\" -ResourceGroupName \"&lt;\u30ea\u30bd\u30fc\u30b9 \u30b0\u30eb\u30fc\u30d7\u540d&gt;\"\n\n# OS \u30c7\u30a3\u30b9\u30af\u30921023 GB \u3078\u62e1\u5f35\u3057\u307e\u3059\n$VmConfig.StorageProfile.OSDisk.DiskSizeGB = 1023\n\n# 1 \u3064\u76ee\u306e\u30c7\u30fc\u30bf \u30c7\u30a3\u30b9\u30af\u30921023 GB \u3078\u62e1\u5f35\u3057\u307e\u3059\n$VmConfig.StorageProfile.DataDisks[0].DiskSizeGB = 1023\n\n# 2 \u3064\u76ee\u306e\u30c7\u30fc\u30bf \u30c7\u30a3\u30b9\u30af\u30921023 GB \u3078\u62e1\u5f35\u3057\u307e\u3059\n$VmConfig.StorageProfile.DataDisks[1].DiskSizeGB = 1023\n\n# \u6700\u5f8c\u306b\u5909\u66f4\u3092\u9069\u7528\u3057\u307e\u3059\nUpdate-AzureRmVM -ResourceGroupName \"&lt;\u30ea\u30bd\u30fc\u30b9 \u30b0\u30eb\u30fc\u30d7\u540d&gt;\" -VM $VmConfig<\/pre>\n<h3><span style=\"color: #ff6600;\">\u30ea\u30bd\u30fc\u30b9 \u30de\u30cd\u30fc\u30b8\u30e3\u30fc (ARM) \u74b0\u5883\u3067\u3001\u7ba1\u7406\u30c7\u30a3\u30b9\u30af\u306e\u5834\u5408<\/span><\/h3>\n<hr \/>\n<p>\u30ea\u30bd\u30fc\u30b9 \u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u74b0\u5883\u304b\u3064\u7ba1\u7406\u30c7\u30a3\u30b9\u30af\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u7ba1\u7406\u30dd\u30fc\u30bf\u30eb\u3082\u3057\u304f\u306f Azure PowerShell \u304b\u3089\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre># \u7ba1\u7406\u30c7\u30a3\u30b9\u30af\u30921023 GB \u3078\u62e1\u5f35\u3057\u307e\u3059\n New-AzureRmDiskUpdateConfig -DiskSizeGB 1023 | Update-AzureRmDisk -ResourceGroupName \"&lt;\u30ea\u30bd\u30fc\u30b9 \u30b0\u30eb\u30fc\u30d7\u540d&gt;\" -DiskName \"&lt;\u30c7\u30a3\u30b9\u30af\u540d&gt;\"<\/pre>\n<h3><span style=\"color: #ff6600;\">\u30b5\u30a4\u30ba\u5909\u66f4\u6642\u306e\u7559\u610f\u70b9<\/span><\/h3>\n<hr \/>\n<p>\u4e0a\u8a18\u306e\u3088\u3046\u306a\u65b9\u6cd5\u3067\u30b5\u30a4\u30ba\u5909\u66f4\u3092\u9802\u304f\u306b\u3042\u305f\u308a\u3001<span style=\"font-family: Courier New;\">\u4ee5\u4e0b\u306e\u69d8\u306a\u70b9\u306b\u3054\u7559\u610f\u3092\u9802\u3051\u308c\u3070\u3068\u601d\u3044\u307e\u3059\u3002<\/span><\/p>\n<ul>\n<li>\u4e8b\u524d\u306b\u4eee\u60f3\u30de\u30b7\u30f3\u3092\u505c\u6b62\u3057\u305f\u3046\u3048\u3067\u30b5\u30a4\u30ba\u5909\u66f4\u3092\u3054\u5b9f\u65bd\u304f\u3060\u3055\u3044<br \/>\n(\u505c\u6b62\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u305d\u306e\u65e8\u306e\u30a8\u30e9\u30fc\u304c\u8868\u793a\u3055\u308c\u307e\u3059)<\/li>\n<li>\u4e0a\u8a18\u3067\u306f\u3042\u304f\u307e\u3067\u3082 Azure \u304b\u3089\u307f\u305f\u30c7\u30a3\u30b9\u30af \u30b5\u30a4\u30ba\u3092\u62e1\u5f35\u3057\u3066\u3044\u307e\u3059<br \/>\nOS \u5185\u3067\u8a8d\u8b58\u3055\u308c\u308b\u30b5\u30a4\u30ba\u306b\u3064\u3044\u3066\u306f\u3001\u5225\u9014\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u62e1\u5f35\u3092\u304a\u9858\u3044\u3044\u305f\u3057\u307e\u3059<\/li>\n<li>\u62e1\u5f35\u3057\u305f\u30c7\u30a3\u30b9\u30af\u3092\u518d\u62e1\u5f35\u3059\u308b\u3053\u3068\u306f\u53ef\u80fd\u3067\u3059\u304c\u3001\u7e2e\u5c0f\u3092\u884c\u3046\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093<br \/>\n(\u3069\u3046\u3057\u3066\u3082\u7e2e\u5c0f\u304c\u5fc5\u8981\u306a\u5834\u5408\u306f\u3001\u5225\u306e\u5c0f\u3055\u306a\u30c7\u30a3\u30b9\u30af\u3078\u30b3\u30d4\u30fc\u3092\u304a\u9858\u3044\u3057\u307e\u3059)<\/li>\n<\/ul>\n<p>\u672c\u60c5\u5831\u306e\u5185\u5bb9\uff08\u6dfb\u4ed8\u6587\u66f8\u3001\u30ea\u30f3\u30af\u5148\u306a\u3069\u3092\u542b\u3080\uff09\u306f\u3001\u4f5c\u6210\u65e5\u6642\u70b9\u3067\u306e\u3082\u306e\u3067\u3042\u308a\u3001\u4e88\u544a\u306a\u304f\u5909\u66f4\u3055\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><strong><span style=\"color: #ff0000;\">2017\/11\/14 \u66f4\u65b0 <\/span><\/strong>\u7ba1\u7406\u30c7\u30a3\u30b9\u30af\u306e\u5834\u5408\u306b\u3064\u3044\u3066\u3001\u624b\u9806\u3092\u8ffd\u8a18\u3057\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>### \u6ce8\u91c8\u3053\u3053\u304b\u3089 ### \u672c\u6295\u7a3f\u306f\u3001Microsoft \u306e TechNet &hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/www.syuheiuda.com\/?p=4831\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_locale":"","_original_post":""},"categories":[46,31],"tags":[],"views":3134,"_links":{"self":[{"href":"https:\/\/www.syuheiuda.com\/index.php?rest_route=\/wp\/v2\/posts\/4831"}],"collection":[{"href":"https:\/\/www.syuheiuda.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.syuheiuda.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.syuheiuda.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.syuheiuda.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4831"}],"version-history":[{"count":2,"href":"https:\/\/www.syuheiuda.com\/index.php?rest_route=\/wp\/v2\/posts\/4831\/revisions"}],"predecessor-version":[{"id":4952,"href":"https:\/\/www.syuheiuda.com\/index.php?rest_route=\/wp\/v2\/posts\/4831\/revisions\/4952"}],"wp:attachment":[{"href":"https:\/\/www.syuheiuda.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.syuheiuda.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.syuheiuda.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}