请问 Powershell 怎么直接拼接参数执行命令?
資深大佬 : youla 3
powershell [System.Windows.Forms.SendKeys]::SendWait("{Enter}")
不熟悉 Powershell 的语法,暂时需要做一个这样的功能。
伸个爪,求教。
大佬有話說 (3)
powershell [System.Windows.Forms.SendKeys]::SendWait("{Enter}")
不熟悉 Powershell 的语法,暂时需要做一个这样的功能。
伸个爪,求教。
powershell -Command ‘[void] [System.Reflection.Assembly]::LoadWithPartialName(“System.Windows.Forms”);[System.Windows.Forms.SendKeys]::SendWait(“你似不似懒”)’
“`
PowerShell 本身就是直接执行的,要么写脚本传递参数,要么在控制台上敲,要么集成到一个 GUI 里去并在 GUI 中监听和响应事件(按钮、按键等)。