Microsoft Virtualization Discussions


storage inventory

what is the best way to write a script for 7 mode and cdot  in powershell for collecting the netapp inventory details like.. version,hardware model,storage shelf model,serial number and format into a excel file ....

any help will be much appreciated... Thanks


Re: storage inventory

See if you have access to this link with your NetApp account. It's an installation for NetAppDocs which will provide you everything you are looking for (and more) in either Word or Excel format.

Re: storage inventory

You can try the below piece of script (Customize the values according to your needs)


# Get the nodes 
$nodes = (Get-NcNode).Node

# Clear the contents of CSV Files
If(Test-Path C:\node.csv) {Clear-Content C:\node.csv}
If(Test-Path C:\shelf.csv) {Clear-Content C:\shelf.csv}

# Get the Node info in a CSV file
(Get-NcNode) | Select-Object Node, NodeModel, NodeSerialNumber, NodeSystemId, ProductVersion | Export-Csv C:\node.csv

# Get the shelf info for all the nodes in a CSV file
for ($i=0; $i -lt (Get-NcNode).count; $i++)
    Get-NcShelf -NodeName $nodes[$i] | Select-Object NcController, NodeName, ShelfId, ShelfName, ShelfState, ShelfType, ShelfBayCount | Export-Csv C:\shelf.csv -Append  
Check out the KB!
Knowledge Base
All Community Forums