Operating system error 5(Access is denied.).

When creating backup need to set the permissions of the folder. Set the security permissions to allow ‘Authenticated Users’ to have read write permissions to the folder. Then run backup scripts again.