I have a PowerShell script that uses du.exe ( Using Disk 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 running in ISE or PowerGui gives the expected result plus an error
+ du <<<< c:\backup + CategoryInfo : NotSpecified: (:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError
Why? How to avoid this error? I tried calling the expression using & , but don't leave.
Thanks for the help.
powershell ide powergui du
Lucas Jan 19 2018-10-10T00: 16–01
source share