Install PowerShell on AWS Linux and Tools

awlogo.pngAWS Linux is based on CentOS when considering how to install Windows PowerShell.  This installation is done from the AWS Command Line using SSH into the Public-DNS key for your AWS Linux instance.  The instructions from Microsoft and Amazon are not that easy to follow for AWS Linux instances.  This post summarizes the research and testing done to implement PowerShell on a AWS Linux instance.

You will need to use ‘wget’ to download the most current version of the Powershell installable. Type the following at the AWS Linux command prompt.


The response will look something like

Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 40391065 (39M) [application/octet-stream]
Saving to: ‘powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm’

powershell-6.0.0_al 100%[===================>] 38.52M 26.6MB/s in 1.4s

2017-01-11 19:21:31 (26.6 MB/s) - ‘powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm’ saved [40391065/40391065]

Next step is to install this RPM package, type the following at the AWS Linux command prompt.

sudo yum install powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm

You will be asked if it is OK to proceed, followed by a lengthy response ending with something that looks like.

Is this ok [y/d/N]: y
Downloading packages:
libunwind-1.1-10.8.amzn1.x86_64.rpm | 72 kB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libunwind-1.1-10.8.amzn1.x86_64 1/2
Installing : powershell-6.0.0_alpha.9-1.x86_64 2/2
Verifying : powershell-6.0.0_alpha.9-1.x86_64 1/2
Verifying : libunwind-1.1-10.8.amzn1.x86_64 2/2

powershell.x86_64 0:6.0.0_alpha.9-1

Dependency Installed:
libunwind.x86_64 0:1.1-10.8.amzn1


Now to test if it worked, enter the following at the command prompt.


If the install worked you will see the standard PowerShell prompt.

Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS /home/ec2-user>


Now to see what got installed run the following command at the PS prompt

Get-Module -ListAvailable

The response will be a list of the modules installed, you may need more, but this is a good start.

ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest Microsoft.PowerShell.Archive {Compress-Archive, Expand-Archive}
Manifest Microsoft.PowerShell.Host {Start-Transcript, Stop-Transcript}
Manifest Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-ItemProp...
Manifest Microsoft.PowerShell.Security {Get-Credential, Get-ExecutionPolicy, Set-E...
Manifest Microsoft.PowerShell.Utility {Format-List, Format-Custom, Format-Table, ...
Binary PackageManagement {Find-Package, Get-Package, Get-PackageProv...
Script 3.3.9 Pester {Describe, Context, It, Should...}
Script PowerShellGet {Install-Module, Find-Module, Save-Module, ...
Script 0.0 PSDesiredStateConfiguration {IsHiddenResource, StrongConnect, Write-Met...
Script 1.2 PSReadLine {Get-PSReadlineKeyHandler, Set-PSReadlineKe...

Remember with AWS Linux it’s YUM not APT-GET.

Powershell Tools for AWS

There is a reference for installation of AWS Tools for Powershell at

There is a set of Powershell tools that should be installed.  Enter the following at the PS prompt.

Install-Package -Name AWSPowerShell.NetCore -Source -ProviderName NuGet -ExcludeVersion -Destination ~/.local/share/powershell/Modules

The will result in something that looks like

Name                           Version          Source                           Summary                 
----                           -------          ------                           -------                 
AWSPowerShell.NetCore         https://www.powershellgallery... The AWS Tools for Po...

With this set of Cmdlet’s you can now perform almost all of the AWS services management using PowerShell commands.  You will need to import the module by entering the following at the PS prompt.

import-module AWSPowerShell.NetCore

Then verify that the module actually got loaded


Which should result in something looking like, notice the new binary at the top of the list which is the PowerShell library for AWS

ModuleType Version  Name                            ExportedCommands
---------- -------  ----                            ----------------
Binary AWSPowerShell.NetCore           {Add-AASScalableTarget, Add-ACMCertificateT...
Manifest  Microsoft.PowerShell.Management {Add-Content, Clear-Content, Clear-Item, Cl...
Manifest  Microsoft.PowerShell.Security   {ConvertFrom-SecureString, ConvertTo-Secure...
Manifest  Microsoft.PowerShell.Utility    {Add-Member, Add-Type, Clear-Variable, Comp...
Binary  PackageManagement               {Find-Package, Find-PackageProvider, Get-Pa...
Script     1.2      PSReadLine                      {Get-PSReadlineKeyHandler, Get-PSReadlineOp...

Now check what the version of the AWS Tools for Powershell is by typing the following at the PS prompt.


Which should result in something that looks like the following.

AWS Tools for PowerShell Core
Copyright 2012-2017, Inc. or its affiliates. All Rights Reserved.

Amazon Web Services SDK for .NET
Core Runtime Version
Copyright 2009-2015, Inc. or its affiliates. All Rights Reserved.

Release notes:

This software includes third party software subject to the following copyrights:
- Logging from log4net, Apache License

Congratulations, now you can AWS your heart out using PowerShell scripting commands.







AngularJS vs ReactJS, both.. because it “Depends”

AngularJS-vs-ReactJS-detailed.jpgAngularJS is managed by Google and ReactJS is owned by Facebook. Both of them are unique and resourceful in their own ways. These frameworks are quite easy to use with high-end potential to build cutting-edge mobile and web applications. However, they have their differences too. Which brings the topic ‘AngularJS vs ReactJS: which is better?’Before…

via AngularJS vs ReactJS — DZone Web Dev Zone

Powershell Learning tool

  • Learn PowerShell quickly from the interactive learning center
  • Execute PowerShell fast and accurately using the powerful IDE
  • Access hundreds of pre-loaded scripts from the QuickClick Library
  • Use the script editor to code & debug PowerShell faster
  • Visit the IDERA PowerShell Community for the latest tips and scripts

Interactive Learning Center

Experience PowerShell by example. Short tutorials guide you through basic concepts at your own pace. The comprehensive learning center also includes dynamically created help topics from currently installed PowerShell CmdLets, Snap-Ins, Modules, Providers and WMI objects.

Powerful IDE

The Console allows you to work interactively with PowerShell from a feature rich Windows UI. The Start page offers easy access to tasks, recent files and Getting Started topics. Plus, many productivity tools including System Explorer, Variables Monitor, Code Snippets, Command History, Remoting and many others.

Pre-loaded Scripts

Access hundreds of pre-loaded scripts for SQL Server, SharePoint, Active Directory and Exchange from the QuickClick™ Library. The tree structure organization lets you easily execute scripts in the Interactive Console, edit in the Code Editor and publish as self-contained XML documents that can be shared with colleagues and friends. PowerShell Plus includes all the scripts from the IDERA PowerShell Scripts for SQL Server free download.

Advanced Script Editor

The advanced debugger and script editor lets you build and test complex PowerShell scripts, try one line PowerShell commands from an embedded console, and sign your script with a security certificate all from a single workspace. Editor and encoding features include: code folding, bookmarks, breakpoints, formatting, find and replace, and much more.

Download Community Scripts

Search and download thousands of community scripts from PoshCode and Tech Net script center libraries – directly from the PowerShell Plus console and editor. Plus, publish and share scripts you have created to any network share.

Powershell 5.0 on Windows 10

power01.jpgPowerShell version 5 is installed by default on Windows 10 systems.  However, if you had a previous version, say version 1.0 installed, the new version 5.0 gets installed beside it.  Having both PowerShell version installed can be a problem.  The key is know where each version installed and how to verify which version you are actually running.  Now that PowerShell is available “Everywhere” it may become more of a candidate for managing all systems across Windows, Linux and Mac.

Determine Version

To determine the PowerShell version you must open PowerShell and run the following command


If you are running Version 5.0 of PowerShell you should see something along the lines of the screen below, anything else is probably not Version 5.0.



Where is Version 5.0

Version 5.0 is now located in this directory


Since most of the stuff you do with PowerShell is admin work you may want to set the shortcut to run in admin mode automatically.

This is what the non-admin version of PowerShell looks like


So go to wherever your shortcut is located and right-click and get to the “Properties”.


Click on Advanced button to get to the super-admin stuff.


The check the Run as administrator, with great power comes great responsibility.



Now when you click on the PowerShell you will be prompted with a Windows pop-up asking you to confirm your new power.  After you accept the responsibility PowerShell will look like.


You may want to consider giving the PowerShell ISE some of that Spidy Admin love as well.  I do most of my work in the ISE so it makes sense to give it the “power” too.


Damn it! Now you tell me, SSMS2016 & PowerShell don’t mix

PS_BreaksI’ve been told by friends to stop being the early adopter for technology thingies.  I’m on step 4 of the 12 step Technology Anonymous (TA) program but, I still help trying out the latest database thing, in this case, SQL Server Management Studio 2016.  Yea… should have waited, most of my existing PowerSell scripts that backup and sync stuff across my development and staged areas just kinda stopped.  I’d like to thank Drew for his post about this! Helped me get my SQLFoo back in the groove again.  I promise I will not miss another TA meeting.