Microsoft Virtualization Discussions
Microsoft Virtualization Discussions
Hi All,
I am looking to export exportfs and /etc/exports to excel sheet, is there a way to do this quickly using power shell
Any ideas please ?
Solved! See The Solution
Hi Billy,
Thanks for your reply,
I get different results to yours
JGPSHNTAP, I have tried below and I got the desired output
I was working on this as well in powershell.. If you need root/rw print out it becomes more difficult.
Easiest way right now is to dump nfs export report from operations manager
thanks JGPSHNTAP
Cna you please advice how to I dump /etc/exports from operations manager ?
I was only able to pull reports at aggr level, volume level, vFiler level but couldn't find a way to dump exports report
Give this a shot:
Get-NaNfsExport | select pathname,@{n="RO";e={$_.SecurityRules.ReadOnly -join ','}},@{n="RW";e={$_.SecurityRules.ReadWrite -join ','}},@{n="Root";e={$_.SecurityRules.root -join ','}} | Export-Csv -LiteralPath C:\work\nfs_shares.csv -NoTypeInformation
The CSV produces this:
Pathname | RO | RW | Root |
/vol/alpha3data | 192.168.100.15 |
Billy..
Nice work.. I have a thread going in the PS forum.
I forgot to post this as well.. I was doing similiar.. then I stopped because I wanted to build objects,
Please post it on the other thread.
Thanks
As for the above from operations manager, click file systems - nfs exports
Hi Billy,
Thanks for your reply,
I get different results to yours
JGPSHNTAP, I have tried below and I got the desired output