windows-server-2008 – 权限问题? Putty Plink Pageant Powers
背景
我有以下组件: > Windows Server 2008 R2框 目标 最终,要使计划任务作为服务帐户运行,该服务帐户将powershell称为服务帐户,该帐户运行该进程并执行ssh命令. 问题 >当我从powershell命令提示符下运行此脚本作为我的用户帐户时,它会运行. 问题 >任何人都有一个更优雅的整体解决方案,但使用相同或类似的工具? 剧本 如果有帮助: #Starts the vcenter2 server. #if the server is already started,it will tell you so. #Stop an error from occurring when a transcript is already stopped $ErrorActionPreference="SilentlyContinue" Stop-Transcript | out-null #Reset the error level before starting the transcript $ErrorActionPreference="Continue" Start-Transcript -path C:ScriptslogsStartTheVCenter2Server.log -append #Run plink and reference the commands file to start up the server Start-Process "C:Program Files (x86)PuTTYplink.exe" -Argumentlist "-agent -m C:Scriptsidrac_powerup_commands.txt root@[servernameredacted]" -wait -RedirectStandardOutput "C:Scriptslogsplinklog.log" #Clean-up Stop-Transcript 思考?我可能会使用Invoke-Command来查看我是否可以将输出重定向到我的日志中至少. 谢谢!
我看到的plink.exe“挂起”的一般原因是提示将主机密钥添加到注册表.不过,我认为主机密钥已经存在于您的注册表中.我将-batch参数添加到plink,看看你是否出现了一个out-right failure而不是hang.至少应该让你走上正确的道路.
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- windows和ubuntu双系统修改默认启动项
- windows – 什么是纤维饼干?
- windows-installer – MSI – 卸载提供“Unidentified Publ
- 将Microsoft SQL Server数据库转储到SQL脚本
- 在Windows下Emacs糟糕的字体渲染
- windows-server-2003 – Windows事件日志 – 服务器崩溃
- 如何指示Windows报告我的java应用程序的名称而不是java.exe
- windows-server-2008 – TeamCity在Windows机器上使用子域
- windows-server-2008-r2 – wbinfo -u不显示AD用户(为空)
- 无法加载DLL’xmogrt’:来自Tridion元数据查询
- Windows server 2016 部署AD(Windows 域)
- Windows – 远程站点中的工作站不了解新的AD领域
- windows – 拖放’n’drop对我的sublime text 2安
- Fix: Windows Script Host access is disabled o
- windows-server-2008-r2 – Windows Server 2008
- 窗口 – 如何在窗口上绘制图像?
- windows – 我可以脱机恢复bitlocker加密驱动器吗
- 如何从Windows更新DMG文件
- windows – 我可以安全地卸载“Citrix Tools for
- Windows-8 – 使用InstallShield 2010在Windows