3 Replies Latest reply: Jun 14, 2013 10:03 AM by markweber RSS

Get-NaQuotaReport returning QuotaUsers: {DataONTAP.Types.Quota.QuotaUser}

MARTINLEGGATT
Currently Being Moderated

Hi,

 

I'm attempting to create a PS script to email Admins when users are over their soft quota. The command I am using in the script is:

 

$list = Get-NaQuotaReport | where {$_.QuotaType -like "user" -and $_.Qtree -like "unixhome" -and $_.DiskUsed -ne 0} |  select *

 

This returns what I need but it also returns entries with  "QuotaUsers    : {DataONTAP.Types.Quota.QuotaUser}":

 

DiskLimit     : -

DiskUsed      : 2380992512

FileLimit     : -

FilesUsed     : 7246

Qtree         : home

QuotaTarget   :

QuotaType     : user

QuotaUsers    : {DataONTAP.Types.Quota.QuotaUser}

SoftDiskLimit : 5242880000

SoftFileLimit : -

Threshold     : -

Vfiler        : vFiler1

Volume        : vol1

I tried amending the command to filter null entries as I read Get-NaQuotaReport doesn't always return a value:

 

Get-NaQuotaReport | where {$_.QuotaType -like "user" -and $_.Qtree -like "unixhome" -and $_.DiskUsed -ne 0 -and $_.QuotaUsers -ne $null } |  select *

 

but it still returns these entries.

 

I'm fairly new to Powershell so have probably missed something simple.

 

Thanks

Martin

More Like This

  • Retrieving data ...