Create AWS DynamoDB Tables with PowerShell

You can use the AWS PowerShell module to create DynamoDB tables. If you need help setting up the AWS PowerShell module, start by watching this video. There’s a helper function called New-DDBSchema, which creates a .NET TableSchema object. Start by assigning the output from this command to a variable; you can name the variable whatever … Read moreCreate AWS DynamoDB Tables with PowerShell

Finding Windows and Amazon Linux AMIs with PowerShell

Amazon Web Services (AWS) provides some built-in parameters in the AWS Systems Manager Parameter Store service, which expose pointers to the latest version of Amazon Machine Images (AMI) for Windows Server and Amazon Linux. These special parameters are called “public parameters” in the Parameter Store services; for more information, check out the official documentation. In … Read moreFinding Windows and Amazon Linux AMIs with PowerShell

[Video] Improving Randomness in the Get-Random PowerShell Command

Although it may seem like the Get-Random command in PowerShell provides random data, it actually returns data that is more predictable than you think. If you’re looking to generate some truly “interesting” data for your project, then you’ll want a better approach. In this video, we’ll explore the limited randomness of the Get-Random command, using … Read more[Video] Improving Randomness in the Get-Random PowerShell Command

Build Docker Container for PowerShell on Raspberry Pi

If you want to run PowerShell applications on your Raspberry Pi, you can run them inside a Docker container. Keep in mind that you can’t use Docker images that were built for the Intel x86 platform, because the Raspberry Pi uses an ARM processor. You can build your own Docker container, with PowerShell Core edition … Read moreBuild Docker Container for PowerShell on Raspberry Pi

Set up a PowerShell and .NET Development Environment with AWS Cloud9 and Amazon EC2

Background Amazon Web Services (AWS) Cloud9 provides a cloud-based Integrated Development Environment (IDE) where you can author, test, and deploy your .NET Core and PowerShell-based applications. You can connect to your Cloud9 IDE using a web browser. One of my favorite features offered by Cloud9, that enables developers to comfortably use it, is the support … Read moreSet up a PowerShell and .NET Development Environment with AWS Cloud9 and Amazon EC2

Initialize a Byte Array in PowerShell

Sometimes you’ll need to initialize a new buffer as an array of bytes. For example, if you want to generate random data using the NextBytes() method on the System.Random class,  you need to pass in a byte array buffer for the method to write to. Creating a byte array in PowerShell may not be immediately … Read moreInitialize a Byte Array in PowerShell

Keep AWS PowerShell Module Updated on Mac OS

Are you on Mac OS and need to keep your AWS PowerShell module up-to-date? As you’ve probably noticed, there are frequently new versions of the AWS PowerShell module being released, to keep pace with new services and service features being added to Amazon Web Services (AWS) cloud. Updating PowerShell modules manually can take up extra … Read moreKeep AWS PowerShell Module Updated on Mac OS

PowerShell Intellisense: ScriptBlock Handler Parameters

I keep forgetting the names of the parameters that are passed into the ScriptBlock handlers for PowerShell Intellisense (aka. tab-completion / auto-completion). Hence, I’m posting the list of parameters here, along with a simple example. $commandName – the name of the PowerShell command that Intellisense was invoked for. $parameterName – the name of the parameter … Read morePowerShell Intellisense: ScriptBlock Handler Parameters

CloudFormation YAML: EC2 Instance with PowerShell UserData

Someone recently was asking for an AWS CloudFormation template, in YAML format as opposed to JSON, that would deploy an EC2 instance running Windows Server, and supported a PowerShell-based UserData script. In response to this, I created the YAML snippet below. Note that the Amazon Machine Image (AMI) ID is unique to the us-west-2 (Oregon) … Read moreCloudFormation YAML: EC2 Instance with PowerShell UserData

Restore Default PowerShell Gallery Repository

If you’ve accidentally deleted the PowerShell Gallery (PSGallery) repository from your system, you can restore it using the following command. Register-PSRepository -Default In fact, if you try to re-register the PowerShell Gallery using the same method that you’d register a custom repository (see below) … $Repository = @{ Name = ‘PSGallery’ SourceLocation = ‘https://www.powershellgallery.com/api/v2/’ PublishLocation … Read moreRestore Default PowerShell Gallery Repository