Hi,
I am new to pulseway. Have written the following PowerShell script which works fine on my test machine.
Clear-RecycleBin -Force
However when run from pulse way it reports the script has run successfully but nothing is deleted from the recycle bin.
The following error is shown in execution details:
Clear-RecycleBin : The system cannot find the path specified
At C:\Program Files\Pulseway\automation_b6682084_076f_4d67_80a0_0200e70e0897.ps1:1 char:1
+ Clear-RecycleBin -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (RecycleBin:String) [Clear-RecycleBin], Win32Exception
+ FullyQualifiedErrorId : FailedToClearRecycleBin,Microsoft.PowerShell.Commands.ClearRecycleBinCommand
I have tried:
cd \
Clear-RecycleBin -Force
But same results.
Is this a permission issue, that does not allow the script to run ?