Click here to Skip to main content
15,888,069 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear all,

ist there a way to run a run a powershell or .batch file from a real machine on a virtual Machine.

I simply want to restart the Virtual machine through a script which i execute on the real machine.

Thanks a lot.

What I have tried:

i just can start the virtual machine but i dont know how to reboot it.
Posted
Updated 1-Nov-17 3:45am
v2

1 solution

 
Share this answer
 
Comments
Member 12341536 1-Nov-17 10:41am    
Hallo Peter, thank you for your reply.

I checked out your Link and i think this is the string i need-->
PS C:\> Restart-Computer -ComputerName "Server01" -Impersonation Anonymous -Authentication PacketIntegrity

My Question what kind of adress is it which i have to put for "Server01" I only have a shortcut Remotecomputer.rdp how can i find out the adress?

Thank you very much
Kornfeld Eliyahu Peter 1-Nov-17 10:43am    
Run it - it should display you a pre-connection confirmation page with the computer name/address...
Member 12341536 1-Nov-17 10:53am    
No it shows me nothing. I am working in a company and the RemoteComputer is installed on a VMWare server everything is already set up. I dont have to log in or anything.

I Want to restart the remotecomputer via script from my lokal machine.


What kind of adress should it be ? An IP Adress? Thanks in advance
Kornfeld Eliyahu Peter 1-Nov-17 11:00am    
IP address or machine name are both perfect...
You should ask the system admin or check the VM from the inside (ipconfig can help)...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900