PowerShell的任务调度程序;上次运行成功,但没有复制项目

发布于 2025-02-08 14:29:44 字数 1349 浏览 0 评论 0原文

我需要帮助理解为什么计划任务不起作用,即使最后一个成功的运行时间说,

操作成功完成。

结果是它没有复制到目标文件夹,但是如果我手动运行.ps1脚本,它将成功完成。


1

2

”在此处输入图像描述“

图3

“在此处输入图像说明” ** **

add-executionpolicy bypass C:\ auto_p \ applied.ps1

4

5

”在此处输入图像描述“

6

”在此处输入图像描述”

I need help understanding why the scheduled task is not working, even though the last successful Run Time says,

The operation completed successfully.

The result is that it's not copied to the destination folder, but if I run the .ps1 script manually, it completes successfully.


1

enter image description here

2

enter image description here

FIG 3

enter image description here**

Add-ExecutionPolicy Bypass C:\auto_p\applied.ps1

4

enter image description here

5

enter image description here

6

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

套路撩心 2025-02-15 14:29:44

对我来说,我只是在下面写
程序/脚本:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Argumente :
"Powershell -ExecutionPolicy Bypass -File "E:\Skript\example.ps1"

一个小技巧
您还需要确保您的脚本不包括网络中的一些文件夹快捷方式。
如果来自网络的源 /目标文件夹,请编写网络的完整部分,而不是快捷驱动器字母。

For me, I just write as below
Program/Script:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Argumente :
"Powershell -ExecutionPolicy Bypass -File "E:\Skript\example.ps1"

A small tip:
You also need to make sure your script does not include some folder shortcut from network.
If there is a source / destination folder from network, please write the complete part of the network instead of your shortcut drive alphabet.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文