Is there any way to start a PowerCLI script on a server remotely from another windows box where PowerShell is not installed?
You could use PsExec
http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
PSExec \\Server01 -i -u USERNAME -p PASSWORD PowerShell C:\helloWorld.ps1
Thanks. Will give that a try.
Sent from my iPad
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
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.
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