I have a PowerShell script that uses du.exe (Disk Usage originally from Sysinternals) to calculate the size of directories.
If I run du c:\Backup
in the console, it works as expected, but the same line of code run in ISE or PowerGui gives the expected result plus the error + du <<<< c:\backup
+ CategoryInfo : NotSpecified: (:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Why is that? How do I avoid this error? I tried invoke-expression, using "&", but no go.
Thanks for the help.