Windows Server 2012 PowerShell - Windows Server 2012

What does PowerShell?

Windows PowerShell is a command-line shell and scripting language designed for system administration. It’s analogue in Linux is called as Bash Scripting. It is built on the .NET Framework, Windows PowerShell assists IT professionals to control and automate the administration of the Windows operating system and applications that run on Windows Server environment.
Windows PowerShell commands, called cmdlets, help you manage the computers from the command line. Windows PowerShell assists you to access data stores, such as the Registry and Certificate Store, as easily as you access the file system.
You can see that Windows PowerShell has a rich expression parser and a fully developed scripting language.
You can find the PowerShell Icon on the task bar and in the start menu. To open it click on the icon.
Then following screen will open to start work on it.
Type the command $PSVersionTable to check the version of PowerShell 5.0 and as shown in the following screenshot. Here we can also see that we have PSVersion 4.0
To update with the latest version where it has more Cmdlets we have to download Windows Management Framework 5.0 from the following link − and install it.

PowerShell ISE

The Windows PowerShell Integrated Scripting Environment (ISE) is a host application for Windows PowerShell. It is used to run commands and write, test, and debug scripts in a single Windows-based graphic user interface with multiline editing, tab completion, syntax coloring, selective execution, context-sensitive help, and support for right-to-left languages.
Use menu items and keyboard shortcuts to run many tasks to perform in the Windows PowerShell console. For example, when you debug a script in the Windows PowerShell ISE, to set a line breakpoint in a script, right-click the line of code, and then click Toggle Breakpoint.
Go to Start – Search and then Type – PowerShell to open it as shown in the following screenshot.
Then click on Windows PowerShell ISE. Or click on the downward Arrow as shown in the following screenshot.
It will list all the applications installed on the server and then click on Windows PowerShell ISE.
The following table will be open −
It has three sections, which include – The PowerShell Console with number 1, then Scripting File number 2 and the third is the Command Module where you can find the module.
While creating the script you can run directly and see the result like the following example −

PowerShell Basic Commands

Windows server 2012 provides several PowerShell commands. It is difficult to furnish all these commands in this tutorial. Here we are focusing on most important as well as basic commands of PowerShell.
The first step is to go to the Get-Help command which gives you an explanation about how to give a command and its parameter.
To get the list of Updates
  • Get-HotFix and to install a hot fix as follows
  • Get-HotFix -id kb2741530


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

Windows Server 2012 Topics