Carlos Jose Lopez
Carlos Jose Lopez

Reputation: 13

use psexec.exe in a powershell

im trying to use psexec.exe in powershell, but appear connect but do not nothing. Supposedly i call psexec in his route in my computer, with the parameters i usually use in a normal CMD.

C:\c\PsExec.exe \\Hostname.domain.CORP -u domain\admx097168 -p Password cmd -c “c:\temp\hola.vbs”

This is the response on the console.

PS C:\Users\x097168> C:\Consola\testmasiveSCCM.ps1
C:\c\PsExec.exe : 
En C:\Consola\testmasiveSCCM.ps1: 2 Carácter: 1
+ C:\c\PsExec.exe \\Hostname.domain.CORP -u domain\admx097 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com
Microsoft Windows [Versi¢n 10.0.10240]
(c) 2015 Microsoft Corporation. Todos los derechos reservados.

appear still working, but do nothing, will be necessary stopped the scripting to continue.

Anyone can help me? first of all, thank you very much for reading my query.

one last thing, i can't use invoke-command, cause is forbidden in my domain.

Upvotes: 0

Views: 566

Answers (1)

Carlos Jose Lopez
Carlos Jose Lopez

Reputation: 13

at finally i can do it with the next secuence.

C:\c\PsExec.exe \xxx.xx.xx.xxx -u prbes\admx000000 -p Pasw0rd -i -d cscript.exe c:\temp\test.vbs

Upvotes: 1

Related Questions