Differences between running a script and running through Syncro Live

I found something very odd if I try to use the following script:

Get-ChildItem C:\Users | Where-Object PSIsContainer | ForEach-Object { [PSCustomObject]@{ Name=$_.Name; Size = (Get-ChildItem $_ -Recurse -Force -ErrorAction SilentlyContinue | Where-Object PSIsContainer -eq $false | Measure-Object -Property Length -Sum).Sum / 1MB } }

If I run the script through Backgrounding Tools in a PowerShell session, it works fine, but when I run the same script as a PowerShell script set to run as System service, I get nothing in the Size column of the output. Anyone notice similar and know of why the script wouldn’t be able to collect the size of each user folder?

Something might be going on with the security and permission of the various user and system accounts. I wonder if the PC you’re running your test on is somehow non-standard.

Here’s what I get running it three different ways:

Notice using the background tools I flat out get an access denied error.