{"id":1264,"date":"2010-11-22T18:23:21","date_gmt":"2010-11-22T09:23:21","guid":{"rendered":"http:\/\/livedevil.net\/?p=1264"},"modified":"2010-11-22T18:23:21","modified_gmt":"2010-11-22T09:23:21","slug":"powershell-resize-powershell-window-size","status":"publish","type":"post","link":"https:\/\/talsu.net\/?p=1264","title":{"rendered":"Powershell &#8211; Resize Powershell Window size"},"content":{"rendered":"<p>Powershell \ucc3d\uc744 \uc0ac\uc6a9 \ud560 \ub54c \uac00\ub054 \ud3ed\uc774 \ub108\ubb34 \uc791\uc544 \ubd88\ud3b8 \ud560 \ub54c\uac00 \uc788\ub2e4. Height\ub294 \ucc3d\uc744 \ub298\ub9ac\uba74 \ub298\uc5b4 \ub098\uc9c0\ub9cc Width\ub294 \ud2b9\uc815 \ud06c\uae30 \uc774\uc0c1 \ucd5c\ub300\ud654\ub97c \ud574\ub3c4 \ub298\uc5b4 \ub098\uc9c0 \uc54a\ub294\ub2e4. Property\uac00 \ub9ce\uc740 \uac1c\uccb4\ub97c \uc5f4\uc5b4 \ubcf4\uac70\ub098 \uae34 text line\uc744 \ubd10\uc57c \ud558\ub294 \uacbd\uc6b0 \uac11\uac11 \ud558\uae30\ub3c4 \ud558\ub2e4.<\/p>\n<p>\uc774\ub54c\ub294 $Host.UI.RawUI.WindowSize \uac12\uc744 \uc870\uc808 \ud574 \uc90c\uc73c\ub85c\uc368 \ub113\uc740 \ud654\uba74\uc744 \uc0ac\uc6a9 \ud560 \uc218 \uc788\ub2e4.<\/p>\n<p>\ub2e8 \ubcc0\uacbd\ud560\ub54c $Host.UI.RawUI.BufferSize \ub3c4 \ud568\uaed8 \uc870\uc808 \ud574\uc57c \uc2e4\uc81c \ucc3d\uc5d0 \ub9de\uac8c text \uac00 \ud45c\uc2dc \ub428\uc744 \uba85\uc2ec\ud558\uace0 \ud2b9\ud788 &#8216;Buffer Width\ub294 Window Width \ubcf4\ub2e4 \uac19\uac70\ub098 \ucee4\uc57c \ud55c\ub2e4&#8217; \ub77c\ub294 \uaddc\uce59\ub9cc \uc8fc\uc758 \ud558\uc5ec \uc870\uc808 \ud558\uc790.<\/p>\n<p>\uc544\ub798 \uc2a4\ud06c\ub9bd\ud2b8\ub294 -WidthPersent Parameter\ub85c \uc9c0\uc815\ub41c \ud3ed\uc73c\ub85c \ucc3d\uc73c\ub85c \ud655\uc7a5 \ud558\uac70\ub098. \uac12\uc744 \uc785\ub825\ud558\uc9c0 \uc54a\uc744 \ub54c \ucc3d \ud06c\uae30\ub97c \ucd5c\ub300\ud654 \ud55c\ub2e4.<\/p>\n<h2>Set-WindowSize<\/h2>\n<pre class=\"lang:ps decode:true\">\nfunction Set-WindowSize\n{\n\tparam ($WidthPercent)\n\n\tif ($WidthPercent -gt 100)\n\t{\n\t\t$WidthPercent = 100\n\t}\n\n\t$WindowSize = $Host.UI.RawUI.WindowSize\n\t$BufferSize = $Host.UI.RawUI.BufferSize\n\n\t$CurrentWindowWidth = $WindowSize.Width\n\t$Width = $Host.UI.RawUI.MaxPhysicalWindowSize.Width\n\n\tif ($WidthPercent -ne $null)\n\t{\n\t\t$Width = $Width * $WidthPercent \/ 100\n\t}\n\telse\n\t{\n\t\t$WindowSize.Height = $Host.UI.RawUI.MaxPhysicalWindowSize.Height\n\t}\n\n\t$WindowSize.Width = $Width\n\t$BufferSize.Width = $Width\n\n\tif ($CurrentWindowWidth -gt $WindowSize.Width)\n\t{\n\t\t$Host.UI.RawUI.WindowSize = $WindowSize\n\t\t$Host.UI.RawUI.BufferSize = $BufferSize\n\t}\n\telse\n\t{\n\t\t$Host.UI.RawUI.BufferSize = $BufferSize\n\t\t$Host.UI.RawUI.WindowSize = $WindowSize\n\t}\n}\n<\/pre>\n<p>$Host.UI.RawUI.MaxPhysicalWindowSize \ub610\ub294 $Host.UI.RawUI.MaxWindowSize \uac12\uc73c\ub85c \ud604\uc7ac \uc704\uce58\uc5d0\uc11c\uc758 \ucd5c\ub300 \ucc3d \ud06c\uae30\ub97c \ud30c\uc545 \ud560 \uc218 \uc788\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Powershell \ucc3d\uc744 \uc0ac\uc6a9 \ud560 \ub54c \uac00\ub054 \ud3ed\uc774 \ub108\ubb34 \uc791\uc544 \ubd88\ud3b8 \ud560 \ub54c\uac00 \uc788\ub2e4. Height\ub294 \ucc3d\uc744 \ub298\ub9ac\uba74 \ub298\uc5b4 \ub098\uc9c0\ub9cc Width\ub294 \ud2b9\uc815 \ud06c\uae30 \uc774\uc0c1 \ucd5c\ub300\ud654\ub97c \ud574\ub3c4 \ub298\uc5b4 \ub098\uc9c0 \uc54a\ub294\ub2e4. Property\uac00 \ub9ce\uc740 \uac1c\uccb4\ub97c \uc5f4\uc5b4 \ubcf4\uac70\ub098 \uae34 text line\uc744 \ubd10\uc57c \ud558\ub294 \uacbd\uc6b0 \uac11\uac11 \ud558\uae30\ub3c4 \ud558\ub2e4. \uc774\ub54c\ub294 $Host.UI.RawUI.WindowSize \uac12\uc744 \uc870\uc808 \ud574 \uc90c\uc73c\ub85c\uc368 \ub113\uc740 \ud654\uba74\uc744 \uc0ac\uc6a9 \ud560 \uc218 \uc788\ub2e4. \ub2e8 \ubcc0\uacbd\ud560\ub54c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[26],"tags":[29,31,481,217,226,287],"class_list":["post-1264","post","type-post","status-publish","format-standard","hentry","category-powershell-tips","tag-host","tag-host-ui-rawui","tag-powershell","tag-resize-window","tag-set-windowsize","tag-window-size"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pXV5a-ko","_links":{"self":[{"href":"https:\/\/talsu.net\/index.php?rest_route=\/wp\/v2\/posts\/1264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/talsu.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/talsu.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/talsu.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/talsu.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1264"}],"version-history":[{"count":0,"href":"https:\/\/talsu.net\/index.php?rest_route=\/wp\/v2\/posts\/1264\/revisions"}],"wp:attachment":[{"href":"https:\/\/talsu.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/talsu.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/talsu.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}