In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to understand the automation script PowerShell deployment plan, the editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it.
The IT industry has reached a consensus that a standard-based, cross-platform, scalable automation tool is worth investing in. But GUI from different vendors has its advantages, and PowerShell can be used for most automation requirements. Whether you hate it or like it, you need to use it and you will be actively or forced to use it for automation.
IT administrators using the Unix operating system have been using PowerShell for decades. They know that true automation means being able to interact with many objects in real time at the same time, and that automated scripting is the most flexible way. This is done through the command line shell, and the most mainstream shell is PowerShell. It has been adopted by VMware, Microsoft SCVMM and Citrix XenApp.
Here is an example. The business unit needs to deploy a new Web server that runs the Active Server Pages .NET application. The traditional solution might be like this:
Login server
Open GUI Server Manager
Select the required roles and role services
Restart the server
The PowerShell-based solution is as follows:
Login server
Open PowerShell and enter:
PS > Install-WindowsFeature Web-Server, web-Asp-Net
It doesn't make much difference for small-scale needs. If all 50 Web servers in the load balancer cluster need to run new ASP.NET applications, the work of the GUI administrator will be as follows:
Login server
Open GUI Server Manager
Select the required roles and role services
Restart the server
Next server (repeated 50 times)
This solution takes hours to weeks of work, does not produce any log documents, and can lead to human errors such as forgetting to add ASP.NET. Automation experts do this in the following ways:
Open PowerShell and enter:
PS > Invoke-Command-ComputerName Web1,Web2,Web3 {Install-WindowsFeature Web-Server, web-Asp-Net}
Yes, the computer hostname can be obtained from a text file, .csv file, or * * from the active directory, but the commands are basically the same. The point of this example is to show that by using PowerShell Remoting, you can install and configure 50 servers in a few minutes. This is a simple example, but the meaning is clear: I can do all the work in a few minutes, and I am more valuable to the business than the GUI administrator.
These scripts are necessary (or one by one) instructions sent to the computer to deploy and configure the software. PowerShell v4 provides a way of defining Puppet or Chef similar to that in Unix to manage and control system configuration.
Let's go back to my experience of my father-in-law and the T series. He knows how to start the car, but if I want to start the car, I need to find my father-in-law to start it for me, so I don't need to understand any steps myself.
PowerShell v4 has an "ideal configuration", which means that I can define a requirement such as "I need 50 new Web servers with some function", after which the resources (step-by-step instructions) will execute my plan without requiring me to understand the details. This can only be used for the deployment of applications and servers, and it can also prevent large-scale "drift" (other administrators configure some unnecessary configurations later).
PowerShell Automation provides IT administrators with a cross-platform tool to deploy and maintain their ideal state. It allows CIO to deploy 50 new Web servers in minutes. In short, if automation is used properly, the IT department can better meet business needs.
The above is how to understand the automation script PowerShell deployment solution, the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.