CMD EXPERIMENTS

sporpigal

Solid State Member
Messages
16
Location
USA
Hello all so I started to experiment with good old CMD and I know how to kill process on a remote computer but I can't find how to restart it back ?
For example when I kill explorer.exe all the desktop goes blank but when I try typing run explorer.exe or start explorer.exe it does not restart the whole desktop view. I'am using PSEXEC for remote connection so If you have any ideas how can I acctually restart any processes remotly ?
 
taskkill /f task
start task

thats all you need, what does it say when it errors?

taskkill /f explorer.exe
start explorer.exe

edit - just saw you said you use psexec.

instead just type "taskkill /S <computer> /u <username> /IM <imagename>

taskkill /s server1 /u mr.username /IM explorer.exe

you dont really need psexec as most remote fucntions are built into CMD, however psexec is good to mess with people :cool:
 
Last edited:
So tried the taskkill with f switch and off course it works but then I tried start explorer.exe so it did start the process but it didn't restart the windows screen. Any other ideas how to restart the damn thing , mabey opening browser directly with specific site ?
 
strange... It is correct and shouldnt be any issues...

maybe take screenshots or a short video of what your doing, like I said, what error are you getting or does it execute ok but nothing happens?

what happens if you stop / start explorer.exe via task manager?
 
Explorer runs on a per-user basis, maybe try specifying a username/password for the logged in user account for your psexec connection with the -u and -p flags
 
Probably it's the username and password thing. I have another issue but this one is far more complex. I'am trying to set up static ip adresses on all computers in my network and I'am thinking about remote options. Mabey a script to set all computers in the network or a object in gpo ? :confused:
 
Why do you want all of them to be static? "Automatic static" sounds more like DHCP with huge a lease time.
 
Probably it's the username and password thing. I have another issue but this one is far more complex. I'am trying to set up static ip adresses on all computers in my network and I'am thinking about remote options. Mabey a script to set all computers in the network or a object in gpo ? :confused:

DHCP reservations = "automatic static IPs"
And that part you certainly can script. You can get the mac address of a PC with powershell, and you can use netsh in powershell to add a dhcp reservation.
Scripting out DHCP reservations in Windows Server 2008 with Netsh - TechRepublic
https://blogs.technet.microsoft.com.../powertip-use-powershell-to-find-mac-address/
 
Back
Top Bottom