# Register Scheduled job with access to remote server

**URL:** <https://forums.powershell.org/t/register-scheduled-job-with-access-to-remote-server/9820>\
**Category:** PowerShell Help\
**Created:** [December 7, 2017, 8:20am UTC](https://forums.powershell.org/t/register-scheduled-job-with-access-to-remote-server/9820 "2017-12-07T08:20:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![emiltanev](https://avatars.discourse-cdn.com/v4/letter/e/5e9695/32.png) [@emiltanev](https://forums.powershell.org/u/emiltanev)\
**Post date:** [December 7, 2017, 8:20am UTC](https://forums.powershell.org/t/register-scheduled-job-with-access-to-remote-server/9820/1 "2017-12-07T08:20:39Z")

</div>

Hello,

I have a script, where I copy a file to a remote server (virtual machine).

$destination = ‘\ServerName\C$\users\public\Documents’  
Copy-Item $file.FullName -Destination $destination -Force

I can execute the script and get the expected result (copying the file) manually. When I register the script execution as a scheduled job however, it fails to copy the file. Am I missing credentials or something?  
Thanks

---

<div class="post-metadata">

**Author:** ![postanote](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@postanote](https://forums.powershell.org/u/postanote)\
**Post date:** [December 7, 2017, 12:34pm UTC](https://forums.powershell.org/t/register-scheduled-job-with-access-to-remote-server/9820/2 "2017-12-07T12:34:11Z")

</div>

What credentials are you specifying in the Scheduled Task?  
They must be creds that have admin creds for all hosts where the action is to happen.

---

<div class="post-metadata">

**Author:** ![emiltanev](https://avatars.discourse-cdn.com/v4/letter/e/5e9695/32.png) [@emiltanev](https://forums.powershell.org/u/emiltanev)\
**Post date:** [December 8, 2017, 12:40am UTC](https://forums.powershell.org/t/register-scheduled-job-with-access-to-remote-server/9820/3 "2017-12-08T00:40:18Z")

</div>

Will give it a try, thanks.

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:37pm UTC](https://forums.powershell.org/t/register-scheduled-job-with-access-to-remote-server/9820/4 "2024-05-16T20:37:02Z")

</div>


