{"id":2167,"date":"2016-03-20T04:21:36","date_gmt":"2016-03-19T19:21:36","guid":{"rendered":"http:\/\/1bed.allright.life\/?p=2167"},"modified":"2020-04-18T22:22:46","modified_gmt":"2020-04-18T13:22:46","slug":"post-2167","status":"publish","type":"post","link":"https:\/\/1bed.allright.life\/?p=2167","title":{"rendered":"PowerShell \u3067 IP \u30a2\u30c9\u30ec\u30b9\u306e\u56fa\u5b9a\u5316"},"content":{"rendered":"<h2>IP \u30a2\u30c9\u30ec\u30b9\u306e\u56fa\u5b9a\u5316<\/h2>\n<p>\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6d41\u3057\u307e\u3059<\/p>\n<p>\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u540d\u3067\u6307\u5b9a\u3059\u308b\u4f8b<\/p>\n<pre><code class=\"language-powershell\">New-NetIPAddress -InterfaceAlias &lt;String&gt; -IPAddress &lt;String&gt; -PrefixLength &lt;Byte&gt; -DefaultGateway &lt;String&gt;<\/code><\/pre>\n<p>\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9 ID \u3067\u6307\u5b9a\u3059\u308b\u4f8b<\/p>\n<pre><code class=\"language-powershell\">New-NetIPAddress -InterfaceIndex &lt;UInt32&gt; -IPAddress &lt;String&gt; -PrefixLength &lt;Byte&gt; -DefaultGateway &lt;String&gt;<\/code><\/pre>\n<h2>\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u540d\u3084\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9 ID \u3092\u53d6\u5f97\u3059\u308b<\/h2>\n<p>\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u540d\u3084 ID \u306e\u53d6\u5f97\u65b9\u6cd5\u306f Get-NetAdapter \u3092\u4f7f\u3044\u307e\u3059<br \/>\n\u79c1\u306e Hyper-V \u306e\u74b0\u5883\u3067\u306f\u3053\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3057\u305f<\/p>\n<pre><code class=\"language-powershell\">PS&gt; Get-NetAdapter\nName                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed\n----                      --------------------                    ------- ------       ----------             ---------\n\u30a4\u30fc\u30b5\u30cd\u30c3\u30c8              Microsoft Hyper-V \u30cd\u30c3\u30c8\u30ef\u30fc\u30af \u30a2\u30c0...       12 Up           00-15-5D-0A-63-01       702 Mbps<\/code><\/pre>\n<p>\u3053\u306e\u4f8b\u3067\u306f\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u540d\u304c\u300c\u30a4\u30fc\u30b5\u30cd\u30c3\u30c8\u300d\u3001\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9 ID \u304c 12 \u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>IP \u30a2\u30c9\u30ec\u30b9\u306e\u56fa\u5b9a\u5316\u4f8b<\/h2>\n<p>\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u540d\u3092\u6307\u5b9a\u3057\u3066\u6d41\u3059\u4f8b\u306f\u6b21\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<pre><code class=\"language-powershell\">PS&gt; New-NetIPAddress -InterfaceAlias &quot;\u30a4\u30fc\u30b5\u30cd\u30c3\u30c8&quot; -IPAddress 10.0.1.10 -PrefixLength 24 -DefaultGateway 10.0.1.1\n\nIPAddress         : 10.0.1.10\nInterfaceIndex    : 12\nInterfaceAlias    : \u30a4\u30fc\u30b5\u30cd\u30c3\u30c8\nAddressFamily     : IPv4\nType              : Unicast\nPrefixLength      : 24\nPrefixOrigin      : Manual\nSuffixOrigin      : Manual\nAddressState      : Tentative\nValidLifetime     : Infinite ([TimeSpan]::MaxValue)\nPreferredLifetime : Infinite ([TimeSpan]::MaxValue)\nSkipAsSource      : False\nPolicyStore       : ActiveStore\n\nIPAddress         : 10.0.1.10\nInterfaceIndex    : 12\nInterfaceAlias    : \u30a4\u30fc\u30b5\u30cd\u30c3\u30c8\nAddressFamily     : IPv4\nType              : Unicast\nPrefixLength      : 24\nPrefixOrigin      : Manual\nSuffixOrigin      : Manual\nAddressState      : Invalid\nValidLifetime     : Infinite ([TimeSpan]::MaxValue)\nPreferredLifetime : Infinite ([TimeSpan]::MaxValue)\nSkipAsSource      : False\nPolicyStore       : PersistentStore<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>IP \u30a2\u30c9\u30ec\u30b9\u306e\u56fa\u5b9a\u5316 \u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u6d41\u3057\u307e\u3059 \u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u540d\u3067\u6307\u5b9a\u3059\u308b\u4f8b New-NetIPAddress -InterfaceAlias &lt;String&gt; -IPAddress &lt;String&#038; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[62],"class_list":["post-2167","post","type-post","status-publish","format-standard","hentry","category-program","tag-powershell"],"_links":{"self":[{"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/posts\/2167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2167"}],"version-history":[{"count":2,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/posts\/2167\/revisions"}],"predecessor-version":[{"id":3173,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/posts\/2167\/revisions\/3173"}],"wp:attachment":[{"href":"https:\/\/1bed.allright.life\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}