VMware Cloud Community
avlieshout
VMware Employee
VMware Employee

Ways to start PowerCLI remotely NOT using PowerShell

Is there any way to start a PowerCLI script on a server remotely from another windows box where PowerShell is not installed?

Arnim van Lieshout Blogging: http://www.van-lieshout.com Twitter: http://www.twitter.com/avlieshout If you find this information useful, please award points for "correct" or "helpful".
0 Kudos
5 Replies
AureusStone
Expert
Expert

You could use PsExec

http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

PSExec \\Server01 -i -u USERNAME -p PASSWORD PowerShell C:\helloWorld.ps1

Smiley Happy

avlieshout
VMware Employee
VMware Employee

Thanks. Will give that a try.

Sent from my iPad

Arnim van Lieshout Blogging: http://www.van-lieshout.com Twitter: http://www.twitter.com/avlieshout If you find this information useful, please award points for "correct" or "helpful".
0 Kudos
bulletprooffool
Champion
Champion

PSExec can / will work, but you will need to ensure execution policies etc are all set remotely and that none of your AV etc detetcs these tools as 'Trojans'

Microsofts official line is as follows:

http://technet.microsoft.com/en-us/magazine/ff700227.aspx

One day I will virtualise myself . . .
0 Kudos
avlieshout
VMware Employee
VMware Employee

Execution policies and remote PowerShell are not my concern.

PowerShell is installed on my management server. All other servers don't have PowerShell installed (with the exception of the Windows 2008 R2 servers of course)

What I want to achieve is to start a powerCLI script on my management server from another server to change settings within vCenter for the server that triggered the PowerCLI script.

for example:

You want to add another CPU and your system doesn't support CPU hotadd. You need to do this outside business hours and don't want to interfere with backups and other jobs running on that system. So if I could trigger a remote PowerCLI script, I can for instance change the post backup script and add an extra line to start this task as soon as the backup is finished.

The PowerCLI script will shutdown the server, add the CPU and start the Server again. After the reboot regular jobs start running again and the CPU is added without interfering with business processes. And I don't need to work night shifts 🙂

AV software and firewalls are of course valid things that can prevent psExec.

Arnim van Lieshout Blogging: http://www.van-lieshout.com Twitter: http://www.twitter.com/avlieshout If you find this information useful, please award points for "correct" or "helpful".
0 Kudos
NavalgundRaj
Enthusiast
Enthusiast

Hi,

Above mentioned PSEXEC by our friends is more than sufficient to shoot a command which executes ps on remote server,

1. download the psexec from Internet and execute it.

Regards

Raj

banavalg@yahoo.com

Note: If you found this correct or answer useful please consider the use of the Correct buttons to award points. Regards Basavaraj.R Navalgund
0 Kudos