Press "Enter" to skip to content

Category: Powershell

Using the OpenLibrary ISBN API with Powershell

Robert Cain has been working on a neat project:

In this post we’ll begin with an overview of what an ISBN is. We’ll then talk about the website that will be the source for our data. It has two different web APIs (Application Programming Interface) that we can use. We’ll discuss one here, then in the next blog post cover the advanced version.

First though, if you haven’t read the introductory post in this series, The ArcaneBooks Project – An Introduction, I’d highly recommend doing so as it lays the foundation for why and how this project to get ISBN data originated.

Robert is building this up over a series of posts, so stay tuned.

Leave a Comment

Unmasking Dynamic Data Masking via Powershell

Jana Sattainathan needs to see all the details:

Today, I had to unmask all the columns I had helped mask using Dynamic Data Masking. This simple post assumes that you are a privileged user with the ability to drop “Column Masking”!

In other words, this isn’t exploiting the mechanics of Dynamic Data Masking to view data you shouldn’t be able to; it’s about removing Dynamic Data Masking from columns with it enabled.

Leave a Comment

Investigating Powershell Object Members

Jeffrey Hicks wants to know what he can do:

A few weeks ago, I was working on content for a new PowerShell course for Pluralsight. The subject was objects. We all know the importance of working with objects in PowerShell. Hopefully, you also know that the output you get on your screen from running a PowerShell command is not the whole story. Formatted presentation is separate from the underlying objects in the pipeline. That’s why it is important to know how to use Get-Member to discover how an object is defined.

But, as Jeffrey points out, this doesn’t work for static members. Read on to learn what does.

Leave a Comment

Scaling Multiple Azure SQL DBs on a Single Server

Laith Ayesh has a script for us:

In a few scenarios, you might need to scale multiple databases on a logical server (not part of elastic pool) at once, the azure portal only allows you to scale each database individually. This can be achieved using the following PowerShell script:

just modify the parameters like SubID, the resource group and server name and then pick the service tier you want and run the script:

Click through for the Powershell script and an important note.

Leave a Comment

Working with IP Addresses in Powershell

Bill Kindle takes us through several Powershell cmdlets:

A common SysAdmin task involves managing a PowerShell IP configuration. Typically, one performs this task using the GUI, which is OK. But PowerShell can do the same job and more, which you can put into scripting.

In this tutorial, you will learn how to use a few network management cmdlets in PowerShell to help manage a Windows host’s IP address, gateway, and DNS settings.

Understanding how to do this becomes even more important if you’re running Windows Server Core, where you don’t have too many choices other than rolling with Powershell.

Leave a Comment

Enabling Powershell’s Strict Mode

Patrick Gruenauer grabs the ruler:

PowerShell is very forgiving of errors. For example, if you call something that does not exist, then no error message is displayed. In this short article I want to show you how to make PowerShell a bit more strict with the strict mode.

Consider you are calling a variable that doesn’t exist. PowerShell will display no errors.

Granted, that laxity isn’t On Error Resume Next level bad, but Patrick shows us a way to toughen up the interpreter’s responses.

Leave a Comment

Combining CSV Files via Powershell

Chad Callihan smooshes files together:

I recently had a handful of CVS files that needed reviewed. Each CSV file was the same format, and while I could have opened them each individually to sort and review, I thought it would be much easier to combine them into one file. It was time to turn to PowerShell. Let’s look at a few examples of how PowerShell can be used to combine multiple CSV files into a single file.

A core assumption here is that the structure of each file—particularly the number of columns but also the semantic meaning of each column—is the same.

Leave a Comment

Deciding on When to Automate

Jeffrey Hicks shares some hard-earned wisdom:

I’ve been scripting and automating things since the days of DOS 3.3, beginning with batch files. It always felt like magic. I could cast a charm simply by typing a few characters on a keyboard. Naturally, my magic skills went from batch files to VBScript to PowerShell. Throughout it all, I’ve also had an internal decision tree regarding automation. Over the years, I’ve seen IT pros new to scripting and automation needlessly struggle. Often it is due to a deficiency in their decision tree. Today, I thought I’d help you nurture yours.

There’s a lot of good advice here about where the automation inflection point is, choosing the right tool, and performing research first before trying to jump into a project.

Comments closed