1
function Get-NaLUNbyMap {
<#
.DESCRIPTION
Gets Lun Information for a particular initiatorgroup name & lunid
.EXAMPLE
Get-Inventory -computername server-r2
.EXAMPLE
Import-Module NaLUNbyMap
Get-NaLUNbyMap -igroup "IA" -lunid 1
#>
[CmdletBinding()]
param(
[Parameter(Mandatory=$True,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)]
[string[]]$igroup,
[Parameter(Mandatory=$True,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True)]
[string[]]$lunid
)
Process
{
$info = (Get-NaLun |Select @{Name="LUN";Expression={$_.path}},@{Name="Size";Expression={[math]::Round([decimal]$_.size/1gb,0)}},@{Name="OnlineStatus";Expression={$_.online}},@{Name="Group";Expression={([string]::Join(",",(Get-NaLun $_.path | get-nalunmap | select -ExpandProperty initiatorgroupname)))}},@{Name="LunID";Expression={Get-NaLun $_.path | get-nalunmap | select -ExpandProperty lunid}} | ?{$_.group -eq $igroup -and $_.lunid -eq $lunid})
return $info
}
}
嗨我無法返回此功能的輸出,可有人請幫助我!無法返回輸出功能
@JasonMArcher可以請你幫助我與http://stackoverflow.com/questions/7104316/unable-to-extract-virtualnetwork-name-using-scvmm-powershell-modules – PowerShell