-
Graham Beer wrote a new post, Using AWS Lambda functions with Docker containers 3 weeks, 3 days ago
Back in 2020 at the AWS annual learning conference, re:Invent, one of the big announcements concerned AWS Lambda container image support for Docker and the Open Container Initiative (OCI). AWS Lambda, as a service, has always been popular, with its simple process of uploading code and not having to worry about provisioning servers. However, you might be a company that is invested in container technology, and it is not so easy to utilize Lambda. With the support for Lambda functions with container images, you can now enjoy this functionality.
-
Graham Beer wrote a new post, A Go AWS SDK example 6 months, 3 weeks ago
Amazon provides three ways you can access and manage Amazon Web Services: AWS Management Console, AWS Command Line Interface (AWS CLI), and software development kits (SDKs). Our focus here will be on the software development kit using the Go programming language. We will look at what the SDK actually is and how to get up and running with installation and AWS account access. As an example, we will use the Go AWS SDK to create an S3 bucket.
-
Graham Beer wrote a new post, Getting started with Jenkins 9 months, 3 weeks ago
This guide will get you started with Jenkins, an open-source automation tool written in Java. It’s a popular choice when it comes to continuous integration and continuous delivery (CI/CD ) tools. We will explore what Jenkins can be used for, its features, and the terms associated with a pipeline.
-
Graham Beer wrote a new post, Pulumi vs. Terraform 11 months ago
When speaking of Infrastructure of Code (IaC) tooling, most people think of Terraform. Terraform is a popular choice by many companies, but there is now a strong competitor called Pulumi. Founded in 2017, Pulumi is a modern, universal way to implement IaC. Pulumi allows you to build your infrastructure using familiar languages, tools, and engineering practices.
-
Graham Beer wrote a new post, Getting started with the AWS Serverless Application Model (AWS SAM) 1 year ago
-
Graham Beer wrote a new post, Writing an AWS Lambda function using Go (Golang) 1 year, 1 month ago
In my last article, titled “What is serverless computing? An introduction to AWS Lambda,” we took a detailed look at what serverless computing does. Taking the next step, we will create a working example in AWS Lambda using the Go programming language (often referred to as Golang).
-
Graham Beer wrote a new post, What is serverless computing? An introduction to AWS Lambda 1 year, 3 months ago
The term serverless computing sounds very cool, but what does it actually mean? In this post, I will introduce AWS Lambda, Amazon’s serverless computing service.
-
Graham Beer wrote a new post,
Go vs. PowerShell, Python, and JavaScript for DevOps 1 year, 3 months ago
In this article, I outline why I chose the Go programming language over PowerShell, Python, and JavaScript for my DevOps projects.
-
Graham Beer wrote a new post, Read AWS EC2 instance metadata 2 years, 3 months ago
AWS provides a way to read metadata from a running EC2 instance. The metadata available from your EC2 instance contains data such as instance ID, public address, AMI ID, user data, and much more. The data about your instance can be used to configure or manage the running instance. We will be taking a look at methods for accessing metadata, the categories of data available, and how we can use metadata.
-
Graham Beer wrote a new post, AWS Directory Services: Active Directory in Amazon's cloud 2 years, 5 months ago
AWS Directory Service is a way to extend Active Directory within AWS. AWS Directory Service is also known as AWS Managed Microsoft AD.
-
Graham Beer wrote a new post, IAM Security Token Service (STS): Temporary security credentials in AWS 2 years, 6 months ago
We will be exploring the AWS Security Token Service (STS) to work with temporary security credentials. We will look at how they are set up and used, and then go through an example to put it all together.
-
Graham Beer wrote a new post, Encrypt in AWS using the Key Management Service (KMS) 2 years, 7 months ago
The AWS Key Management Service (KMS) allows you to create and manage cryptographic keys that you can use across a wide range of services in Amazon’s cloud and your applications. We will walk through an example of encrypting your files in S3 by using KMS.
-
-
Or you can just do this:
@"
'$pass'
"@
'40'
Which will work fine 🙂
-
Hi Leos
The here-string does require double quotes to expand the variable. Try this:
$pass = 40
@'
$pass
'@
@"
$pass
"@
You'll see that the single quotes returns '$pass' while the double quotes returns "40".
-
Make sure you are using double quotes, ", to allow the variable to be expanded.
i.e.
$pass = 40
Write-Output '$pass'
$passWrite-Output "$pass"
40
-
The issue appears to be the first column needs to be called “Name”.
The part of the code processing this are lines 85 to 95:if (-not $LabelProperty) { if ($inputObject.PSObject.Properties.Count -eq 2) { $LabelProperty = $inputObject.PSObject.Properties.Name -ne $valueProperty } elseif ($inputObject.PSObject.Properties.Item('Name')) { $LabelProperty = 'Name' } else { throw 'Cannot convert Data' } }
So just call your first column “name” and it works.
@' Name, amount Client1, 11 Client2, 20 Client3, 2 '@ | ConvertFrom-Csv | select Name, amount | Out-PieChart -PieChartTitle "Top Clients and Quantity" -DisplayToScreen
Hope this helps.
-
I had to update the code a little while ago, discovered a few bugs.
Find the updated code here, https://github.com/Graham-Beer/PSCharts/blob/master/Out-PieChart.ps1
-
Graham Beer liked comment of Matthew on Convert PowerShell output into a pie chart. (So far, Matthew has 1 likes for this comment.) 3 years, 3 months ago
-
Hi Ramu
Apologies, this question is not related to the article. Feel free to reach out to me on email, Graham.Beer@outlook.com
- Load More