Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 228891

Re: マルチパスの場合、優先パスのランタイム名をPowerCLIで取得する方法

$
0
0

私も同じ問題で悩んでます。

PowerCLI5.0ではGet-EsxCliを使用してvSphereCLI経由でRuntimeNameをとるしか無いような気がしてます。

Ver毎に制御が必要なのが残念ですが。。

※私もGet-scsilunpathにRuntimeNameが入るのが綺麗だと思います。

 

適当ですが下記の様な感じでどうでしょうか?

$PATH内にRuntimeNameが格納されると思います。

 

$LUNPATHS=@()

$VMHOSTS=Get-VMhost| Where-Object{$_.StorageInfo -ne $null}

foreach($VMHOST in $VMHOSTS){

     $ESXCLI=$VMHOST | Get-EsxCli

     if($VMHOST.version -match "^4.[0-1].[0-9]$"){
          $LUNPATHS+=$ESXCLI.nmp.path.list()
     }
     elseif($VMHOST.version -match "^5.[0-1].[0-9]$"){
          $LUNPATHS+=$ESXCLI.storage.core.path.list()
     }

}

 

$PATH | Select-Object RuntimeName

 



Viewing all articles
Browse latest Browse all 228891

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>