<# .SYNOPSIS This script will Retrieve NFS exports and output path, and clients off Isilon using RestfulAPI. .DESCRIPTION This script will Retrieve NFS exports and output path, and clients off Isilon using RestfulAPI. .NOTES File Name : getisilonexports.ps1 Author : Me Version : 1.0 (June 14, 2018 ) .OUTPUTS Screen Output. can be modified to save to csv .EXAMPLE C:\PS> .\getisilonexports.ps1 > add-type @" using System.Net; using System.Security.Cryptography.X509Certificates; public class TrustAllCertsPolicy : ICertificatePolicy { public bool CheckValidationResult( ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem) { return true; } } "@ [System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy $username = 'root' $password = 'passw0rd' $EncodedAuthorization = [System.Text.Encoding]::UTF8.GetBytes($username + ':' + $password) $EncodedPassword = [System.Convert]::ToBase64String($EncodedAuthorization) $headers = @{"Authorization"="Basic $($EncodedPassword)"} # create Uri # Change IP address to that of the target Isilon. $baseurl = 'https://xxx.xx.xxx.xxx:8080' $resourceurl = "/platform/1/protocols/nfs/exports/" $uri = $baseurl + $resourceurl # get export and print $ISIObject = Invoke-RestMethod -Uri $uri -Method Get -Headers $headers # Uncomment below and comment out bottom line to export to csv # $ISIObject.quotas | select-object -Property path,@{Name="Advisory Threshold GB";E={($_.thresholds.advisory/1GB)}},@{Name="Hard Threshold GB";E={($_.thresholds.hard/1GB)}},@{Name="Usage GB";E={"{0:N}" -f ($_.usage.logical/1GB) -as [float]}} | Export-Csv -Path c:\temp\quotas.csv $ISIObject.quotas | select-object -Property path,@{Name="Advisory Threshold GB";E={($_.thresholds.advisory/1GB)}},@{Name="Hard Threshold GB";E={($_.thresholds.hard/1GB)}},@{Name="Usage GB";E={"{0:N}" -f ($_.usage.logical/1GB) -as [float]}}