Quantcast
Channel: VMware Communities : Blog List - All Communities
Viewing all articles
Browse latest Browse all 3135

Get Name and naa ID using PowerShell

$
0
0

$DSList = Get-Datastore |where {$_.Type -eq 'VMFS'}

$output= ""|Select Name, NaaID

foreach($ds in $DSList)

{

 

    $output.Name =$ds.Name

    $output.NaaID=$ds.extensiondata.info.vmfs.extent.diskname

    $output

    $output|Export-csv DSList.csv -Append -NoTypeInformation

}

 

$DSList = Get-Datastore |where {$_.Type -eq 'VMFS'}$output= ""|Select Name, NaaIDforeach($ds in $DSList){
    $output.Name =$ds.Name    $output.NaaID=$ds.extensiondata.info.vmfs.extent.diskname    $output     $output|Export-csv DSList.csv -Append -NoTypeInformation}

$DSList = Get-Datastore |where {$_.Type -eq 'VMFS'}

$output= ""|Select Name, NaaID

foreach($ds in $DSList)

{

 

    $output.Name =$ds.Name

    $output.NaaID=$ds.extensiondata.info.vmfs.extent.diskname

    $output

    $output|Export-csv DSList.csv -Append -NoTypeInformation

}

$DSList = Get-Datastore |where {$_.Type -eq 'VMFS'}

$output= ""|Select Name, NaaID

foreach($ds in $DSList)

{

 

    $output.Name =$ds.Name

    $output.NaaID=$ds.extensiondata.info.vmfs.extent.diskname

    $output

    $output|Export-csv DSList.csv -Append -NoTypeInformation

}

$DSList = Get-Datastore |where {$_.Type -eq 'VMFS'}

$output= ""|Select Name, NaaID

foreach($ds in $DSList)

{

 

    $output.Name =$ds.Name

    $output.NaaID=$ds.extensiondata.info.vmfs.extent.diskname

    $output

    $output|Export-csv DSList.csv -Append -NoTypeInformation

}

$DSList = Get-Datastore |where {$_.Type -eq 'VMFS'}

$output= ""|Select Name, NaaID

foreach($ds in $DSList)

{

 

    $output.Name =$ds.Name

    $output.NaaID=$ds.extensiondata.info.vmfs.extent.diskname

    $output

    $output|Export-csv DSList.csv -Append -NoTypeInformation

}


Viewing all articles
Browse latest Browse all 3135

Trending Articles