cmd - Send input to a open windows with powershell -
In my script I ask the user for a variable named Asset I'm trying to use my powerscript to send a specific line of text to a window. I always use the name" I'm not sure that this was possible but I was going to try and Can I do this? It may be from Poochele. "property tag" $ tag = "\\" + $ asset + ": CMD" [zero] [System.Reflection.Assembly] :: LoadWithPartialName ( 'Microsoft.VisualBasic') [Microsoft.VisualBasic.Interaction] :: AppActivate ("$ Tag") Start-sleep-m 300 [Zero] [System.Reflection.Assembly] :: LoadWithPartialName ('System.Windows.Forms') [System.Windows.Forms.SendKeys] :: SendWait ("Does this work?") $ asset = Read-Host "Please property Enter tag "
\\ " lt; asset & gt;: cmd "
Comments
Post a Comment