Get-PWDatasourceStatistics does not return data as a scheduled task

I have written a script to call Get-PWDatasourceStatistics and format the output to Excel.  This works beautifully when run interactively in PowerShell, returning 71 statistic records which I loop through and insert into my Excel spreadsheet.  However, when I run this same exact script as a scheduled task, this cmdlet returns 0 records.  Everything else in the script runs fine except for this one cmdlet.  Any ideas?