I'm trying to pass the user input computer name to the psexec command. I've tried about everything. I know the command works because if I run the file by manually entering the computer name is successful. I need to get the strComputer variable into the \strComputer psexec command. Thanks in advance.
Set objShell = CreateObject("Wscript.shell")
Dim strComputer
strComputer=InputBox("Run app on remote computer",,"Type name here & click OK")
objShell.run("powershell psexec.exe -i -s \\strComputer \\domain.com\folder\app.exe domain.com")
MsgBox("Scan complete")