我正在尝试运行从命令提示符调用PowerShell脚本的.cmd文件,我收到以下错误:
无法加载Management_Install.ps1,因为在此系统上禁用了脚本的执行.
我跑了cmd.exe,当我Management_Install.ps1从PowerShell 运行时,我Get-ExecutionPolicy回来了.
// Powershell的输出
PS C:\ Users\Administrator> get-executionpolicy
无限制
//从DOS输出
C:\ Projects\Microsoft.Practices.ESB\Source\Samples\Management Portal\Install\Scr
ipts> powershell.\ Management_Install.ps1 1
警告:运行x86 PowerShell ...
无法加载文件C:\ Projects\Microsoft.Practices.ESB\Source\Samples\Management Portal\Install\Scripts\Management_Install.ps1,因为在此系统上禁用了脚本的执行.有关详细信息,请参阅"get-help about_signing".
在线:1个字符:25
.\ Management_Install.ps1 <<<< 1
CategoryInfo:NotSpecified:(:) [],PSSecurityException
FullyQualifiedErrorId:RuntimeException
C:\ Projects\Microsoft.Practices.ESB\Source\Samples\Management Portal\Install\Scripts> pause
按任意键继续 ...
该系统是Windows Server 2008 R2.
我究竟做错了什么?
我面临一个奇怪的问题.我已经安排了一个批处理文件的任务.当我用选项运行任务时Run only when user is logged on一切正常.但我想在后台运行此任务,因此我使用该选项运行它Run whether user is logged on or not.现在,当我运行任务时,它无法正常工作.我得到了2个错误.我不明白这个错误.请帮我解决这个问题.
Task Scheduler failed to launch action "C:\Windows\SYSTEM32\cmd.exe" in instance "{2a7cc950-fad9-4633-9701-af75a0fd220d}" of task "\stmm\Daemon". Additional Data: Error Value: 2147942667.
Task Scheduler failed to start instance "{2a7cc950-fad9-4633-9701-af75a0fd220d}" of "\stmm\Daemon" task for user "GBLADHEDANI\N011940" . Additional Data: Error Value: 2147942667.
Run Code Online (Sandbox Code Playgroud) 我试图通过Windows Server 2008 R2中的任务调度程序运行.cmd.我已从服务器计算机管理员组中的用户登录到服务器.运行计划任务时,"上次运行时间" "当状态"准备就绪时,列的值为(0x1),没有任何反应.运行时.cmd只需双击即可正常工作.这是服务器中用户的问题还是其他问题?有人知道这个问题的解决方案吗?
谢谢