Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Deployment package using Powershell to run in multiple servers

$
0
0

Hi .

I am using a command line prompt, to install my application on multiple server, after logging into each server.

what the existing script does is  -  Navigate to a specific path using command prompt , execute two commands to install the application. This same step I need to perform in multiple servers, by first logging into the server, opening command prompt, using cd to navigate to the directory and run those commands.   

I have created a configuration XML file, which contains all the information to be executed . Is there a way to achieve this in powershell without logging into the server and executing the command ? My config file is as below:

<?xml version="1.0"?><Config>   <Action Name="Deploy"><CommandPath>path to navigate</CommandPath><PackagePath>path of Application package</PackagePath><ModelName>Name of model to be deployed</ModelName><ServiceName>Name of Service</ServiceName><DeploymentServer><Server Name = 'Server1'></Server><Server Name = 'Server2'></Server></DeploymentServer></Action><Action Name="Update"><CommandPath>path to navigate</CommandPath><PackagePath>path of Application package</PackagePath><ModelName>Name of model to be updated</ModelName><ServiceName>Name of Service</ServiceName><DeploymentServer><Server Name = 'Server1'></Server><Server Name = 'Server2'></Server></DeploymentServer></Action>     </Config>

I want to get the type of installation -  deploy or update from user and then update the commands.

I am aware of reading the data from user , but need the help to run the other commands by reading from the config xml and exceuting in the servers defined in the DeploymentServer tag.

How to achieve this deployment in multiple servers using Powershell ?

Thanks



Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>