Deleting Large Home Directories Using External Powershell Script

I am trying to delete the home directory with powershell script, I am getting error while deleting large home directory but since we have other background task running it throws error like connection reset. Any suggestion

Hi @Himanshu_singh03,

take a look on this topic.

Thank you for your response.

The script is running standalone but when trying through rule it is not getting triggered.