You have to run the script with an account that has an access to the folder. Or set the permissions to the folder, so that the account you currently run the script with, has an access to it.
I am doing a backup of my IIS 7 configuration using appcmd.
The backup is done in folder C:\Windows\System32\inetsrv\backup\IIS7_backup and it works.
I cant' transfer this folder with WinSCP, I get error 3 (permission issues) whether I use WinSCP from the command line (with administrative rights) or the GUI. In the GUI, I don't even see the folder.
I need to do it in command line, as it is part of a nightly scheduled backup.
Please advise on how to get access to this folder using WinSCP.