I have a PowerShell script which needs to access a folder and to make stuff inside it (like deleting or renaming a subfolder). I think it crashes because my on-premises TFS agent is denied to access this folder in this remote machine. The error message is:
2017-10-12T12:49:06.6816226Z ##[error]Remove-Item : Cannot remove item \[path_to_the_folder_I_want_my_script_to_access]\old.1: Access to the path
2017-10-12T12:49:06.6835446Z ##[error]is denied.
I googled the problem and found a probable solution: giving the read/write permissions to the folder accessed by the script to the Build Service Account of my TFS (Svc_tfsbuild account). But it doesn't work.
So if someone has another solution, it would be awesome. :D
Thank you so much in advance.
Have a great day!