Installation and configuration of PowerShell on Windows Server 2012 R2

Jai Raheja
5 min readDec 19, 2020

Hi Guyz… Umm… Hello Guyz… (is this really the right way to introduce ??)

Well…… nevermind … I’m Shreya, a blog writer by passion… (but hey…!! am I really passionate about writing a blog? I mean who really is about it nowadays…?) people are hardly having time to tilt their heads while operating their cellphones, let’s see whether people are having time to read this blog which I’m writing just now….!!

Ahh… I knew I’m bad at public introductions… after all there is something called being introvert, right? : ) ….

An Introvert Thinker Writing Blogs Publicly …. That’s funny isn’t it ? …

(ahh I think it was funny, at least for me …)

But HEY…!! lets not focus on what I think funny is … and come back to the main topic that’s about all the stuff why I have posted this blog :) …!!

What is PowerShell?

PowerShell is an automation-platform task automatic technology and configuration management framework, consisting of a command line shell and a writing language. Unlike many shells, which receive and retrieve text, PowerShell is built on top of .NET Common Language Runtime (CLR), and accepts and retrieves NET material. This fundamental change brings new tools and methods of automation.

Fig 1.0: Administrator: Windows PowerShell Version 4.0

Output is Object-Based

Unlike traditional command line integration, PowerShell cmdlets are designed to handle objects. The object of organized information is more than just a string of characters from the screen. Command releases always contain additional information that you can use if you need it.

Text processing tools used to process data behave differently when they are used on PowerShell. In most cases, you do not need text processing tools to extract certain information. Direct access to data segments using standard PowerShell syntax.

The command family is extensible

Methods such as cmd.exe do not provide a way for you to directly extend a set of built-in command. You can create external command line tools running in cmd.exe. However, these external tools have no services, such as mergers and acquisitions. cmd.exe does not automatically know that these external tools are valid commands.

The commands in PowerShell are known as cmdlets. You can use each cmdlet separately, but their power is evident when you combine them to perform complex tasks. Like most shells, PowerShell gives you access to a file system on a computer. PowerShell providers make it possible for you to access other data stores, such as register and certificate stores, as easily as access to the file system.

You can create your own cmdlets and working modules using integrated code or text. Modules can add suppliers and cmdlets to the shell. PowerShell also supports scripts such as UNIX shell script and cmd.exe batch files.

Support for command aliases

PowerShell supports nicknames to view commands in other words. Aliasing allows users with experience in other shells to use common command names that they already know about the same functionality in PowerShell.

Aliasing associates a new word with another command. Eg: PowerShell has a function inside it named Clear-Host that clears the output window. You can type cls or clear alias with the Prompt command. PowerShell translates these titles and operates Clear-Host.

This feature helps users to learn PowerShell. First of all, most cmd.exe and Unix users have a great record of commands that users already know by name. PowerShell similarities may not produce the same results. However, the results are close enough that users can perform the task without knowing the name of the PowerShell command. “Muscle memory” is another important source of difficulty when learning a new command shell. If you have spent cmd.exe years, you may inadvertently type command cls to clear the screen. Without the alias of Clear-Host, you get an error message and you never know what to do to clear the result.

PowerShell handles console input and display

When typing a command, PowerShell always processes direct line input. PowerShell also formats the output you see on screen. This difference is significant because it reduces the function required for each cmdlet. It makes sure that you can always do things the similar way with any cmdlet. Cmdlet developers do not need to write code to scan command line issues or output formatting.

The traditional command line tools have their own schemes for requesting and displaying Help. Some command line tools use /? to start the help display; others use -?, /H or even //. Some will show Help in the GUI window, not in the console display. If you use the wrong parameter, the tool may ignore what you typed and start working automatically. As PowerShell bypasses and processes the command line automatically, the -? parameter always means “Show me this command”.

Fig 2.0: Version 5.0 of Windows PowerShell

The first step is to download the installer. Make sure you select the appropriate installer for your operating system. Windows 7, Windows 8.1, Windows Server 2008 R2, Windows Server 2012 and Windows Server 2012 R2 x86 and x64 all have different downloads. If you try to install incorrectly, it will notify you when you install.

Once you’ve got the downloaded pieces, it’s time to upgrade.

Double-click on the installer you downloaded earlier. You will be notified that you have installed a specific KB operating system. Note that the software title is Update for Windows (KBXXXXXXX). Once installed, PowerShell will appear as being included under this heading in programs and features.

Be sure to upgrade, accept the end user license agreement and the installer will work.

When you are done, it will ask you to restart to confirm installation. When I restart, I always recommend making sure the installation is successful. To do this, open the PowerShell console again and type $PSVersionTable.PSVersion. If the installation is successful, you should see the number 5 appear under the main asset.

Reference

https://docs.microsoft.com/en-us/powershell/scripting/overview?view=powershell-7.1

https://searchwindowsserver.techtarget.com/tip/How-to-upgrade-to-PowerShell-5

Coming to the Conclusion

Thus, we have learnt about the Installation and configuration of PowerShell on Windows Server 2012 R2.

--

--