{"id":1257,"date":"2015-03-24T10:12:16","date_gmt":"2015-03-24T01:12:16","guid":{"rendered":"http:\/\/nsb.homeip.net\/wp\/?p=1257"},"modified":"2015-03-30T19:57:02","modified_gmt":"2015-03-30T10:57:02","slug":"vmware-vsphere-powercli%e3%82%92%e4%bd%bf%e7%94%a8%e3%81%97%e3%81%9f%e3%82%b9%e3%82%af%e3%83%aa%e3%83%97%e3%83%88%e3%82%92%e3%83%90%e3%83%83%e3%83%81%e3%81%8b%e3%82%89%e8%b5%b7%e5%8b%95%e3%81%99","status":"publish","type":"post","link":"https:\/\/nsb.homeip.net\/wp\/?p=1257","title":{"rendered":"VMware vSphere PowerCLI\u3092\u4f7f\u7528\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30d0\u30c3\u30c1\u304b\u3089\u8d77\u52d5\u3059\u308b\u305f\u3081\u306e\u30e1\u30e2"},"content":{"rendered":"<p>VMware vSphere PowerCLI\u3092\u4f7f\u7528\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30d0\u30c3\u30c1\u304b\u3089\u8d77\u52d5\u3059\u308b\u305f\u3081\u306e\u30e1\u30e2\u3067\u3059<\/p>\n<p>VMware vSphere PowerCLI\u306f\u4fbf\u5229\u3067\u3059\u304c\u3001VMware vSphere PowerCLI\u30b3\u30f3\u30bd\u30fc\u30eb\u3092\u7acb\u3061\u4e0a\u3052\u3066\u304b\u3089\u306e\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u306a\u306e\u3067\u3001\u5c11\u3057\u3081\u3093\u3069\u304f\u3055\u3044\u3067\u3059\u3002\u306a\u306e\u3067\u5c11\u3057\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u306a\u304a\u3001VMware vSphere PowerCLI\u306f\u3001\u4ee5\u4e0b\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/my.vmware.com\/jp\/web\/vmware\/details?downloadGroup=PCLI550&amp;productId=352\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9 vSphere PowerCLI 5.5<\/a><\/p>\n<p>VMware vSphere PowerCLI\u306b\u9650\u3089\u305a\u3067\u3059\u304c\u3001<br \/>\nPowershell \u30b9\u30af\u30ea\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb(.PS1)\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u306f\u30dd\u30ea\u30b7\u30fc\u5909\u66f4\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<p>VMware vSphere PowerCLI\u3092\u521d\u56de\u8d77\u52d5\u6642\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<pre>. : \u3053\u306e\u30b7\u30b9\u30c6\u30e0\u3067\u306f\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5b9f\u884c\u304c\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u30d5\u30a1\u30a4\u30eb C:\\Program\r\n Files (x86)\\VMware\\Infrastructure\\vSphere PowerCLI\\Scripts\\Initialize-PowerCLI\r\nEnvironment.ps1 \u3092\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u8a73\u7d30\u306b\u3064\u3044\u3066\u306f\u3001\u300cabout_Execution_P\r\nolicies\u300d(http:\/\/go.microsoft.com\/fwlink\/?LinkID=135170) \u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u3002\r\n\u767a\u751f\u5834\u6240 \u884c:1 \u6587\u5b57:3\r\n+ . \"C:\\Program Files (x86)\\VMware\\Infrastructure\\vSphere PowerCLI\\Scripts\\Init\r\nial ...\r\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n~~~\r\n + CategoryInfo : \u30bb\u30ad\u30e5\u30ea\u30c6\u30a3 \u30a8\u30e9\u30fc: (: ) []\u3001PSSecurityException\r\n + FullyQualifiedErrorId : UnauthorizedAccess\r\nPS C:\\Program Files (x86)\\VMware\\Infrastructure\\vSphere PowerCLI&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>\u3053\u306e\u5834\u5408\u3001\u7ba1\u7406\u8005\u3068\u3057\u3066\u5b9f\u884c\u3057\u305fPowershell\u306b\u3066\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre style=\"padding-left: 30px;\">Set-ExecutionPolicy RemoteSigned<\/pre>\n<p>(\u4e0a\u8a18\u306e\u5834\u5408\u3001\u30ed\u30fc\u30ab\u30eb\u306e\u30ed\u30fc\u30ab\u30eb\u306b\u4fdd\u5b58\u3055\u308c\u3066\u3044\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u5b9f\u884c\u53ef\u80fd\u3002\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\uff08\u975e\u30ed\u30fc\u30ab\u30eb\u306e\u30b9\u30af\u30ea\u30d7\u30c8\uff09\u306f\u3001\u7f72\u540d\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u306e\u307f\u304c\u5b9f\u884c\u53ef\u80fd\u3002)<\/p>\n<p>\u305d\u306e\u307b\u304b\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u3057\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>Unrestricted<br \/>\n\u5168\u3066\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u5b9f\u884c\u53ef\u80fd\u3002\u305f\u3060\u3057\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u3001\u5b9f\u884c\u3059\u308b\u304b\u3069\u3046\u304b\u304c\u78ba\u8a8d\u3055\u308c\u308b\u306e\u3067\u3001\u30e6\u30fc\u30b6\u30fc\u304c\u660e\u793a\u7684\u306b\u8a31\u53ef\u3057\u305f\u5834\u5408\u306e\u307f\u5b9f\u884c\u3055\u308c\u308b<\/p>\n<p>Bypass<br \/>\n\u5168\u3066\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u5b9f\u8b66\u544a\u3084\u30e6\u30fc\u30b6\u30fc\u3078\u306e\u78ba\u8a8d\u306a\u3057\u306b\u3001\u5168\u3066\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u5b9f\u884c\u53ef\u80fd<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u3053\u308c\u3067\u3001VMware vSphere PowerCLI\u3092\u8d77\u52d5\u3057\u305f\u72b6\u614b\u3067PowerSHell\u304b\u3089\u30b9\u30af\u30ea\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb\u304c\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305f\u3081\u3057\u306b\u4ee5\u4e0b\u306eps1\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059<\/p>\n<p>Get-PowerCLIVersion.ps1<\/p>\n<pre>#vSpherePowerCLI\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u8868\u793a\r\nGet-PowerCLIVersion<\/pre>\n<p>&nbsp;<\/p>\n<p>\u3053\u308c\u3092VMware vSphere PowerCLI\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<pre>Welcome to the VMware vSphere PowerCLI!\r\n\r\nLog in to a vCenter Server or ESX host: Connect-VIServer\r\nTo find out what commands are available, type: Get-VICommand\r\nTo show searchable help for all PowerCLI commands: Get-PowerCLIHelp\r\nOnce you've connected, display all virtual machines: Get-VM\r\nIf you need more help, visit the PowerCLI community: Get-PowerCLICommunity\r\n\r\nCopyright (C) 1998-2012 VMware, Inc. All rights reserved.PowerCLI \r\nC:\\Program Files\\VMware\\Infrastructure\\vSphere PowerCLI&gt; cd C:\\tool\\Pow\r\nerShellCUSTOM\r\n\r\nPowerCLI C:\\tool\\PowerShellCUSTOM&gt; .\\PowerCLIVersion.ps1\r\n\r\nPowerCLI Version\r\n----------------\r\n VMware vSphere PowerCLI 5.1 Release 1 build 793510\r\n---------------\r\nSnapin Versions\r\n---------------\r\n VMWare AutoDeploy PowerCLI Component 5.1 build 768137\r\n VMWare ImageBuilder PowerCLI Component 5.1 build 768137\r\n VMware vCloud Director PowerCLI Component 1.5 build 793505\r\n VMware License PowerCLI Component 5.1 build 669840\r\n VMware vSphere PowerCLI Component 5.1 build 793489\r\n\r\n\u00a0PowerCLI C:\\tool\\PowerShellCUSTOM&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>\u3057\u304b\u3057\u3001\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3084\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9f\u884c\u3057\u3066\u3082\u3001\u30a8\u30e9\u30fc\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre>C:\\&gt;cd C:\\tool\\PowerShellCUSTOM\r\nC:\\tool\\PowerShellCUSTOM&gt;powershell .\\PowerCLIVersion.ps1\r\n\u7528\u8a9e 'Get-PowerCLIVersion' \u306f\u3001\u30b3\u30de\u30f3\u30c9\u30ec\u30c3\u30c8\u3001\u95a2\u6570\u3001\u30b9\u30af\u30ea\u30d7\u30c8 \u30d5\u30a1\u30a4\u30eb\u3001\u307e\u305f\r\n \u306f\u64cd\u4f5c\u53ef\u80fd\u306a\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u540d\u524d\u3068\u3057\u3066\u8a8d\u8b58\u3055\u308c\u307e\u305b\u3093\u3002\u540d\u524d\u304c\u6b63\u3057\u304f\u8a18\u8ff0\u3055\u308c\u3066\u3044\u308b\u3053\r\n \u3068\u3092\u78ba\u8a8d\u3057\u3001\u30d1\u30b9\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u5834\u5408\u306f\u305d\u306e\u30d1\u30b9\u304c\u6b63\u3057\u3044\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u304b\u3089\u3001\u518d\u8a66\u884c\r\n \u3057\u3066\u304f\u3060\u3055\u3044\u3002\r\n \u767a\u751f\u5834\u6240 C:\\tool\\PowerShellCUSTOM\\PowerCLIVersion.ps1:1 \u6587\u5b57:20\r\n + Get-PowerCLIVersion &lt;&lt;&lt;&lt;\r\n + CategoryInfo : ObjectNotFound: (Get-PowerCLIVersion:String) []\u3001\r\n CommandNotFoundException\r\n + FullyQualifiedErrorId : CommandNotFoundException<\/pre>\n<p>&nbsp;<\/p>\n<p>\u3053\u306e\u5834\u5408\u306f\u3001\u5b9f\u884c\u3059\u308bps1\u30d5\u30a1\u30a4\u30eb\u306b\u4ee5\u4e0b\u306e\u884c\u3092\u8ffd\u52a0\u3057\u307e\u3059<\/p>\n<pre><code>#PowerCLI\u30b9\u30ca\u30c3\u30d7\u30a4\u30f3\u7d44\u307f\u8fbc\u307f<\/code>\r\n<code>Add-PSSnapin VMware.VimAutomation.Core<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>\u5b9f\u969b\u306b\u3084\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n<p>Get-PowerCLIVersion.ps1\u3000\u3092\u5909\u66f4<\/p>\n<pre><code>#PowerCLI\u30b9\u30ca\u30c3\u30d7\u30a4\u30f3\u7d44\u307f\u8fbc\u307f<\/code>\r\n<code>Add-PSSnapin VMware.VimAutomation.Core\r\n<\/code>\r\n<code>#vSpherePowerCLI\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u8868\u793a<\/code>\r\n<code>Get-PowerCLIVersion<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u304b\u3089\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059<\/p>\n<pre>C:\\tool\\PowerShellCUSTOM&gt;powershell .\\PowerCLIVersion.ps1\r\n\r\nPowerCLI Version\r\n----------------\r\n VMware vSphere PowerCLI 5.1 Release 1 build 793510\r\n---------------\r\nSnapin Versions\r\n---------------\r\n VMWare AutoDeploy PowerCLI Component 5.1 build 768137\r\n VMWare ImageBuilder PowerCLI Component 5.1 build 768137\r\n VMware vCloud Director PowerCLI Component 1.5 build 793505\r\n VMware License PowerCLI Component 5.1 build 669840\r\n VMware vSphere PowerCLI Component 5.1 build 793489\r\n\r\nC:\\tool\\PowerShellCUSTOM&gt;<\/pre>\n<p>\u5b9f\u884c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3042\u3068\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u3051\u3070\u3001\u3059\u3050\u306b\u5b9f\u884c\u3067\u304d\u307e\u3059\u306d\u3002<\/p>\n<pre>@echo off\r\ncd C:\\tool\\PowerShellCUSTOM\r\npowershell .\\PowerCLIVersion.ps1<\/pre>\n<p>Views: 22<\/p>","protected":false},"excerpt":{"rendered":"<p>VMware vSphere PowerCLI\u3092\u4f7f\u7528\u3057\u305f\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u30d0\u30c3\u30c1\u304b\u3089\u8d77\u52d5\u3059\u308b\u305f\u3081\u306e\u30e1\u30e2\u3067\u3059 VMware vSphere PowerCLI\u306f\u4fbf\u5229\u3067\u3059\u304c\u3001VMware vSphere PowerCLI\u30b3\u30f3\u30bd\u30fc\u30eb\u3092 &hellip; <a href=\"https:\/\/nsb.homeip.net\/wp\/?p=1257\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[4,22],"tags":[],"class_list":["post-1257","post","type-post","status-publish","format-standard","hentry","category-esxi","category-windows"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/nsb.homeip.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nsb.homeip.net\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nsb.homeip.net\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nsb.homeip.net\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nsb.homeip.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1257"}],"version-history":[{"count":0,"href":"https:\/\/nsb.homeip.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1257\/revisions"}],"wp:attachment":[{"href":"https:\/\/nsb.homeip.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nsb.homeip.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nsb.homeip.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}