Hyper-v powershell sendkeys [英] Hyper-v powershell sendkeys

查看:125
本文介绍了Hyper-v powershell sendkeys的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在尝试自动化构建部署过程。我可以用powershell创建新的VM机器,并使用自定义的linux iso映像启动它。我需要输入"内部"信息。 (进入hyper-v机器窗口)。通常,hyper-v支持"sendkeys"。
函数,对于hyper-v不起作用。我已经尝试过模块WASP并且还清理了powershell命令。这里没有运气。你能告诉我,怎么做?


我要做的就是输入"内部"一词。并输入


例如


选择窗口 - 标题"DVB-BRN-ABED上的ADAM #text - 虚拟机连接" |发送密钥" {Enter}"



谢谢

解决方案

SendKeys非常不可靠,会给你带来麻烦。


这就是说,只需添加你需要的按键。您目前只发送一个Enter。


http:// ss64的.com / VB / sendkeys.html


Hi,

I'm trying to automate build deploy proccess. I'm able to create new VM machine with powershell and boot it with customized linux iso image. I need to type in "internal" (into the hyper-v machine window). In general hyper-v supports "sendkeys" function which doesn't work for hyper-v. I've tried module WASP and also clean powershell commands. No luck here. Can you guys tell me, how to do it?

All I have to do is, to type in the word "internal" and press enter

for example

Select-Window -Title "ADAM #text on DVB-BRN-ABED - Virtual Machine Connection" | Send-Keys "{Enter}"

Thanks

解决方案

SendKeys is extremely unreliable and will cause you problems.

That said, just add the keypresses you need. You're currently only sending an Enter.

http://ss64.com/vb/sendkeys.html


这篇关于Hyper-v powershell sendkeys的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆