I try to launch directory-treesize.ps1 (https://github.com/jagilber/powershellScripts/blob/master/directory-treesize.ps1) as SYSTEM user.
I get this error :
+ [dotNet]::Start($directory, $minSizeGB, $depth, [bool]$showFiles, ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ArgumentOutOfRangeException
As other user, it works.
Here is full command line i use :
C:WindowsSystem32WindowsPowerShellv1.0powershell.exe -file "C:scriptsdirectory-treesize.ps1" -depth 5 -directory "D:"
-minSizeGB 30 -notree -noColor -logFile "c:scriptsdetails.txt"
Can you help me or explain why i can’t launch this script as SYSTEM?
Thanks.