Private/Get-eiSCSIFavoriteTarget.ps1
1 2 3 4 5 6 7 8 9 10 11 12 |
function Get-eiSCSIFavoriteTarget { param( [Parameter(ValueFromPipelineByPropertyName, Mandatory)] [string] $SessionIdentifier ) process { $wmiResponse = Get-WmiObject -Class MSFT_iSCSISession -Namespace ROOT/Microsoft/Windows/Storage | Where-Object {$_.SessionIdentifier -eq $SessionIdentifier} return $wmiResponse } } |