Microsoft Virtualization Discussions

Re: Luns under volumes

Justin,

Give onCommand Report a shot..

I just went into our environment and created the report with data in it in 5 minutes. 

I'm decent in powershell, but I can't compete with that.

Re: Luns under volumes

Are you talking about Ops Manager?

Re: Luns under volumes

Installing OnCommand Report now... waiting for a eval license from my sales guy....

Re: Luns under volumes

How did you make out?

Re: Luns under volumes

Hello Justin,

Can you try this out, it might point you to the correct direction..

Just copy and paste the below scriptlet to your powershell window.

function LunName

{

    [CmdletBinding()]

    Param

    (

        # Param1 help description

        [Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true,Position=0)]

        $vol       

    )

$luninfo = Get-NaLun | ?{$_.path -match "/vol/$vol/" } | ForEach-Object {$_.Path.replace("/vol/$vol/","")}

return $luninfo

}

Get-NaVol | select @{l='VolumeName';e={$_.name}},@{l='ContainedLunNames';e={([string]::Join(",",(LunName -vol $_.name)))}}

You can also export to csv as below

Get-NaVol | select @{l='VolumeName';e={$_.name}},@{l='ContainedLunNames';e={([string]::Join(",",(LunName -vol $_.name)))}} | Export-Csv "c:\volluninfo.csv"

Re: Luns under volumes

Hi Vinith,

That is pretty neat, but it takes very longtime (50min) to generate output. I have like 34 volumes with 7 luns each,

Thanks

Ravi

Re: Luns under volumes

Ravi - Which script, mine or his?

Re: Luns under volumes

JGP,

Yours ran like a horse (2minutes), but Vivin's gives a different kind of output than yours. Vivin's is more for what Justin is looking for I guess.

Thanks

Ravi

Forums