System administrators have at their disposal an interesting tool that is not always well used: Windows PowerShell. Thanks to it, it is possible to automate numerous tasks or at least execute them in a more orderly and controlled manner.
The idea was born in 2003 under the name of MONAD and three years later it was launched to the public under its current name for the presentation of Windows Vista. Subsequently, it has also been included in the Windows 7, Windows 8 and Windows 10 versions. In addition, it is also possible to install Powershell on Linux and MacOS systems.
In a very short time it was known that the idea of launching Windows Powershell had been a success. From Microsoft it was ensured that mastering this tool was going to be the most important skill a manager will need in the future. For that alone it is worth paying attention to.
Table of Contents
Windows Powershell: a powerful tool
Windows PowerShell is an instrument that was conceived with the laudable idea of making life easier for programmers. In computing, it is given the name of shell to a command line interface whose main functions are to collect information and execute programs. In fact, Windows PowerShell is a modern command shell that has been created by taking the best of the salient features of other shells.
This powerful shell from Microsoft uses script language, making these tasks even easier to perform. On the other hand, it uses a programming language developed in Microsoft's .NET Framework, one of the most widely used in the world.
There are currently about 130 command line tools in PowerShell. Thanks to them, greater agility is achieved when carrying out the most diverse tasks, both in a local and remote system.
What is Windows PowerShell for?
There is no doubt that this is one of the best solutions designed by Microsoft in recent times. PowerShell can be of great help to users looking to achieve a certain degree of automation of their tasks, from searches to exporting information on networked computers.
All actions are executed through the command combination (command lets o cmdlets) and through the scripting. These are some of its utilities:
Access to information
PowerShell allows us to access the computer's file system, even reaching the most inaccessible data and information, such as the Windows registry. This "pathway" remains open through the use of the base .NET Framework. Also, all the information is available to the user single command line. Total control and visibility.
Automation capability
Perhaps the most interesting aspect of PowerShell, which incorporates several cmdlets basic, simple function commands built into the shell. Others can be added to these cmdlets own. Each of these commands can be used individually or in combination to execute more complex tasks., reaching a remarkable degree of automation.
Related to this is the ability to Scalability offered by Windows Powershell. Through a single cmdlet script, a routine type task (such as updating the operating system) can be implemented to be executed on a network of computers every certain time.
Remote connection
Also noteworthy is the ability of PowerShell to connect remotely to another system. An example might be an administrator who wanted to connect to a server located in a different physical location where he could execute commands in the same way as if he were working directly.
Some handy PowerShell commands
To start working with the PowerShell tool, you must access the Run function included in Windows by following these steps:
- Simultaneously press the keys Windows + R.
- In the Run box that opens next, we type "PowerShell" and click on "To accept".
Here's a list of handy cmdlets that can be used in PowerShell, though they're just a small sampling of them all:
Get Help
One of the first things to learn to handle PowerShell well, since this command will provide us with all the documentation we need to know about functions, cmdlets, commands and scripts. For example, to find out more about the Get-Service cmdlet, type "Get-Help Get-Service".
Copy Item
Using this command you can copy folders or files. It also allows you to copy and rename them.
Get Service
Used to know what services are installed on the systema, both those that are running and those that are already stopped.
Invoke-Command
It is used to execute a script or a PowerShell command on one or more computers. It is used by writing Invoke-Command next to the script with its exact location.
remove-item
The command to delete any item like folders, files and functions. It allows selective deletions based on a series of specific parameters.
Get-Process
Using PowerShell you can also find out which processes are running (its operation is similar to that of the Get-Service command).
Conclusion
Taken one by one, all of these commands may not seem very useful. Its true potential is revealed when the command is combined with other parameters. This is where they discover their full potential.
Finally, if we want to know all the available PowerShell cmdlets, all we have to do is execute the command "Show-Command", which will open a window displaying a long list of all commands.
2 comments, leave yours
Much verb and very difficult to digest. I don't know what it's for
How do I update it?