Adam Bertram` avatar

Where-Object Vs. The Where Method: Array Filtering In Powershell

15 hours ago | Adam Bertram`

PowerShell, like all other scripting languages, has ways to bring different pieces of data together into a collection. These “collections” refer to different types of variables that hold more than one value. For example, two popular types of collections in PowerShell are arrays and hashtables. The scenario and type of collection you’re filtering will determine the best way to filter [.

David Christian avatar

DSC Classes - Using Helper Methods

yesterday | David Christian

This is going to be part two on DSC Classes. Today we are going to cover a resource with more than the standard Get,Set and Test methods. Helper methods are a great way to organize your resource. By making use of class properties and methods, we can create a clean resource with no code duplication. The Good Stuff: Use helper functions to organize your Class-Based resources. Overview I came across the use case for this resource at work.

Andreas Bittner avatar

Powershell Snippets in Sapien PowerShell Studio erstellen

2 days ago | Andreas Bittner

Seit einiger Zeit versuche ich alle meine Funktionen auch mit einem Pester Testskript zu versehen. Dabei werden immer wieder die Funktion – allerdings nur mit anderen Parametern – aufgerufen, so auch in meiner jüngsten Funktion, zu welcher bald ein Blog kommen … Weiterlesen →

Kevin Marquette avatar

Powershell: Building a Module, one microstep at a time

3 days ago | Kevin Marquette

I am really quick to build a module out of my scripts and functions. I like how it allows me to organize my functions and use them in other scripts. I also see that many PowerShell scripters are slow to take that step of building a module. We often learn...

Jaap Brasser avatar

Wrap up of Tuga IT Conference in Lisbon

3 days ago | Jaap Brasser

Last week I attended and delivered two presentations at Tuga IT in the Microsoft HQ in Lisbon. It was a great experience and a first visit to Lisbon to me, which gave me the change to interact with the local IT communities there. Tuga IT is a conference put together by nine separate user groups […]

Chris Hunt avatar

So You Want To Build A Golang App

4 days ago | Chris Hunt

Well, maybe you don’t and you want to know why the hell I would. I’ve been building PowerShell tools for about 10 years and I’m pretty good at it. PowerShell is even available on Linux now. So, why Go? It’s freaking everywhere. Here are some of the FOSS tools I’ve been working with that are built on Go. GitLab CI Runner Telegraf Packer Terraform Kubernetes A lot of these tools have a lot of open issues around the Windows build and I can’t contribute if I don’t understand Go and the community is huge.

Prateek Singh avatar

Encode\Decode URL with Powershell

4 days ago | Prateek Singh

Changing a URL candidate to valid ASCII format is called URL Encoding and can be done like in the below image using System.Web.HttpUtility class in .Net framework. You can also perform its reverse which is call URL Decoding.… Read More Encode\Decode URL with Powershell

Adam Bertram` avatar

Building HTML Reports In Powershell With Convertto-Html

4 days ago | Adam Bertram`

Let’s say you’ve developed this excellent script that pulls all kinds of information from various sources that save you and your team tons of time. This script pulls information from Active Directory, some HR database, your VMware/Hyper-V nodes and so on. How it correlates all of that information is really a huge time-saver for you. You present it to a [...] The post Building HTML Reports In Powershell With Convertto-Html appeared first on Adam, the Automator.

Mike Robbins avatar

PowerShell Function to Determine the Installed VSS Providers

4 days ago | Mike Robbins

I’ve been migrating one of my customers from some older EqualLogic storage area networks to a Nimble SAN. It has all been good with the exception of some problems with VSS (Volume Shadow Copy Service). They use Altaro for backups and from what I’ve found, Nimble and Altaro don’t play well together when it comes to VSS. Nimble’s software was installed on the Hyper-V hosts and all three vendors (Nimble, EqualLogic, and Altaro) VSS providers seemed to play well together until volumes were actually moved to the Nimble SAN.

Adam Bertram` avatar

File Cannot Be Accessed Fix With Handle.exe

5 days ago | Adam Bertram`

Handle.exe is a 3rd party tool that can help track down a process that is locking down a file you are trying access. Here is how. Nothing is more annoying when you’re trying to remove a file or folder on your Windows machine and get this error message: This example gave us some helpful information like the name but there are [...] The post File Cannot Be Accessed Fix With Handle.exe appeared first on Adam, the Automator.

Custom PSScriptAnalyzerRule – Function Capitalization

5 days ago | Thomas Rayner

I’ve got a number of custom PSScriptAnalyzer rules that I sometimes run. A little while ago I uploaded them to GitHub to share with others. Today I’m going to walk you through the AvoidImproperlyCapitalizedFunctionNames rule IRead More...

Enable PowerShell Remoting to an Azure Virtual Machine, without Domain Membership

5 days ago | David Hall

I recently started an Azure subscription in order to move all the servers I use to test PowerShell code to the cloud. Right now I have only a couple Virtual Machines, one running Windows Server 2016, that’s my Domain Controller. I also have a Windows Server 2012 R2 Virtual Machine

David Christian avatar

Creating A DSC Class-Based Resource

6 days ago | David Christian

Now that we know what a PowerShell class is, it’s time we start putting them to use. Classes are new with version 5 and one of the best places for them is DSC. While the syntax maybe different, all the DSC concepts are the same. If you need a refresher on the basics of a PowerShell class, please see my previous post, Intro to PowerShell Classes. The Good Stuff: How to create a DSC Class-Based Resource.

Sven van Rijen avatar

Automating WSUS installation through MDT

6 days ago | Sven van Rijen

Lately, I’ve been working with Johan Arwidmark’s Hydration Kit For Windows Server 2016 and ConfigMgr Current / Technical Preview Branch. A great tool to enroll a full blown SCCM and/or MDT deployment. Automating WSUS installation through MDT One of the servers you can deploy with this tool is a WSUS server. What struck me was that despite the task sequence to perform the base installation of the server is available within MDT, WSUS itself isn’t installed or configured.

Adam Bertram` avatar

Powershell Streams: Write-Host, Write-Output, Write-Verbose, Write-Error

6 days ago | Adam Bertram`

Whenever you see some text come up in a PowerShell console, that text may not necessarily be the same “type.” Whether the text is white, red, green, or whatever, that text may come from one of five different streams. Streams are essentially like roads the output you see in the console takes to get there. The code that’s responsible for [...] The post Powershell Streams: Write-Host, Write-Output, Write-Verbose, Write-Error appeared first on Adam, the Automator.

Stephen Owen avatar


6 days ago | Stephen Owen

We’re all adventurers.  That’s why we wake up in the morning and do what we do in our fields, for that feeling of mastery and uncovering something new.  Some of us chart new maps, cross the great outdoors, or climb mountains.… Continue reading →

Adam Bertram` avatar

Setting Up Visual Studio Code Tasks

7 days ago | Adam Bertram`

Coders need an IDE that can be a text editor and integrate various tools, and Visual Studio Code could be that for you. When working with code, we typically don’t just write code. There are lots of other tasks that go in with the act of writing the code. There are lots of other tools that we use on a [...] The post Setting Up Visual Studio Code Tasks appeared first on Adam, the Automator.

Sergey Vasin avatar

Установка PowerShell в качестве языка по-умолчанию в Visual Studio Code

7 days ago | Sergey Vasin

Когда в Visual Studio Code вы создаете новый файл, например, сочетанием клавиш Ctrl+N, среда разработки еще не знает, на каком языке вы собираетесь писать код, и в качестве варианта по-умолчанию предлагает «Plain Text». Если же большинство ваших скриптов написано на каком-либо определенном языке, например, PowerShell, возможно, вы захотите указать по-умолчанию его. Сделать это можно, зай

Sven van Rijen avatar

Presenting at TechMentor Orlando!

8 days ago | Sven van Rijen

Last week, I received the confirmation that I will host a session at TechMentor Orlando in November! The conference is being held from 12 to 17 November 2017 in Orlando, FL, USA. Presenting at TechMentor Orlando! The title of the session will be: Keep up with NOW! Automate (re-)building your homelab – on steroids! Interested in joining the conference? Please register at

Adam Bertram` avatar

Managing Dynamic DNS Remotely With Powershell

11 days ago | Adam Bertram`

For those of us with Active Directory domains, we also have Microsoft DNS servers. And most likely, we also have dynamic DNS. DDNS is a technology that eases a lot of the burden of keeping DNS records current. By default, all Windows computers are set to create a DNS A record for themselves automatically and keep it up to date [...] The post Managing Dynamic DNS Remotely With Powershell appeared first on Adam, the Automator.

Mike Robbins avatar

Use PowerShell to Determine if Specific Windows Updates are Installed on Remote Servers

11 days ago | Mike Robbins

It has been a crazy week to say the least. If you’re like me, you wanted to make sure that the specific Windows updates that patch the WannaCry ransomware vulnerability have been installed on all of your servers. I’ve seen a lot of functions and scripts this week to accomplish that task, but most of them seem too complicated in my opinion. While it’s personal preference, I also always think about whether I should use a PowerShell one-liner, script, or function.

Kevin Marquette avatar

Powershell: Writing an alternate TypeExtension DSL, DSLs part 5

12 days ago | Kevin Marquette

In my last post on DSLs, I broke down a proposed DSL that someone else had described. It was drafted specifically as an example DSL for a RFC. Today, I am going to propose an alternate DSL syntax and I am going to break down the implementation just like I...

Matt McNabb avatar

A Simple Release Pipeline for PowerShell Modules | \PowerShell Escape

12 days ago | Matt McNabb

If you’re building PowerShell modules and want to get your feet wet with development concepts like unit testing and release pipelines, check out my PlasterTemplates module on Github. This template will scaffold a new module project that supports a basic release pipeline model with the following features: Editing in Visual Studio Code Unit testing with Pester Markdown documentation with PlatyPS Source control in Github Continuous integration in Appveyor Module versioning Plaster Plaster is an open source project from the PowerShell Team that helps you create new PowerShell projects from templates.

Basic and Advanced Filtering of PowerShell Objects using Where-Object

12 days ago | David Hall

This is a very minimal introduction into filtering pipeline objects using Where-Object and comparison operators. This video will give you the syntax and a simple example. To unleash the full capabilities of comparison operators take a look at the help file. [crayon-592d26c9ba458032889489/]  

Adam Bertram` avatar

How To Save File Permissions For Transfer

12 days ago | Adam Bertram`

One of the biggest pains when performing an entire file server migration or simply moving a few file shares around is permissions. File permissions have always been a black box to most IT admins. What seems like an easy task when setting basic permissions can soon turn into a nightmare when attempting to transfer them to another location. Visions of [...] The post How To Save File Permissions For Transfer appeared first on Adam, the Automator.

Demo Scrips for Idera Live Session

12 days ago | Aaron Nelson

As promised, here are the scripts I used in my Idera Live session today. (also available via this direct link )

Adam Bertram` avatar

How To Force A User Logoff Remotely With Powershell

13 days ago | Adam Bertram`

To force a logoff on a remote computer, admins have a few options at their disposal. In this article, we’ll go over three ways to make this happen with PowerShell. There are a number of reasons to do this, including employee termination, as a troubleshooting measure or simply to free up some sessions on a remote desktop server. Knowing how [...] The post How To Force A User Logoff Remotely With Powershell appeared first on Adam, the Automator.

Jan Egil Ring avatar

Using PowerShell to disable or remove SMB1

13 days ago | Jan Egil Ring

Background Following the previous article about Using PowerShell to test whether hotfixes is installed, another challenge these days is to lower the attack surface as much as possible. There are many ways to do this, such as restricting what firewall ports is open, having a good systems in place for patch management, and so on. One mitigation related to the WannaCrypt attacks , which is a relevant topic these days, is to disable the SMB 1 protocol on as many systems as possible.

David Christian avatar

Introduction To PowerShell Classes

14 days ago | David Christian

This is going to be the first in a series of posts regarding classes. I want to talk more about DSC and especially some of the cool things you can do with class based resources. Before we get to the advanced use cases, we need to cover the basics. The Good Stuff: An introduction to PowerShell classes. Why Classes Class Basics What Is A Class? Classes And Objects Creating A Class Describing The Class Properties Property Validation Hidden Properties Default Properties Static Properties Methods Return $This Method Overload Method Signature Method Property Validation - Built In Method Property Validation - Being Clever Static Methods Constructors Inheritance Creating Child Classes Overriding Methods Using The Base Keyword Base Constructors Calling Base Methods Wrapping Up Why Classes For me there are two big reasons to use PowerShell classes.

Adam Bertram` avatar

How To Build A Dynamic Inventory With Red Hat’s Ansible

14 days ago | Adam Bertram`

With Ansible, admins can build a configuration and deliver that configuration to one, 100, or 1,000 servers with a single command, thanks to its running inventory. Server environments are always changing, with new ones getting added and removed regularly. As a result, it’s important to keep tooling designed to manage these servers dynamically. Static lists will, over time, become cumbersome [.

Jeff Hicks avatar

Your First Day with PowerShell

14 days ago | Jeff Hicks

I’m happy to let everyone know that my latest Pluralsight course is now available. “Your First Day with PowerShell” is a short course targeted at the absolute PowerShell beginner. I wanted to be there as it were as you started your very first day learning and using PowerShell. My goal was to be with you […]

Josh King avatar

Crouton #4 – Getting Your Head Around Headers

14 days ago | Josh King

Headers are a new option for toast notifications introduced in the Creators Update for Windows 10. They are used for the organization of toasts, and are supported from version 0.6.0 of the BurntToast PowerShell module and beyond. Creating a Header Unlike the clickable toasts that we discussed in the last crouton post, you can use the “basic” New-BurntToastNotification function for toasts with headers, however you will need to use the New-BtHeader function to create the header object (which you can then re-use for multiple toasts.

Jan Egil Ring avatar

Using PowerShell to test whether hotfixes is installed

14 days ago | Jan Egil Ring

Challenge In certain situations, there is a need to quickly determine whether a hotfix is deployed to a set of computers. A good example of this is the WannaCrypt attacks which occured in May 2017. Microsoft published a Customer Guidance for WannaCrypt attacks with references to which hotfixes is applicable for protecting against that specific vulnerability. Given that there are updates for many different versions of Windows, there is a lot of hotfixes to look for and this might be a cumbersome task if there isn’t any good inventory system available for giving a quick overview of the current state.

Jan Egil Ring avatar

Slides, demos and videos from PowerShell Conference Europe 2017

15 days ago | Jan Egil Ring

PowerShell Conference EU 2017 was arranged in Hannover, Germany on Wednesday 3rd to Friday 5th of May 2017. After the opening ceremony, Jeffrey Snover held the keynote for the conference: Among the things he talked about is transformational changes, which the path going from traditional IT to DevOps is a great example of: On the topic of DevOps, I would recommend Kenneth Hansen`s session “DevOps and the Harmonious Whole” where he talks about the upcoming transformation a lot of companies will be going in the coming years.

Kevin Marquette avatar

Powershell: GetPlastered, a Plaster template to create a Plaster template

16 days ago | Kevin Marquette

I recently started working with Plaster and I really like this module. I covered my first template in my Adventures in Plaster blog post last week. I have been pulling together ideas for more Plaster templates and I thought up a fun one to work on. I am going to...

Adam Bertram` avatar

Add A Computer To An Active Directory Domain With Powershell

16 days ago | Adam Bertram`

This box is the infamous domain-join box that comes up whenever adding a computer to a domain. If you’re still adding computers via this method though, you’re doing it the hard way. This process requires logging onto a machine, performing about a dozen mouse clicks, rebooting, and waiting. Why not just do this? Active Directory domain join This PowerShell snippet [...] The post Add A Computer To An Active Directory Domain With Powershell appeared first on Adam, the Automator.

Kevin Marquette avatar

Powershell: Adventures in Plaster

18 days ago | Kevin Marquette

David Christian recently wrote an article about how to use Plaster on If you are new to Plaster, I pulled this from the Plaster readme. “Plaster is a template-based file and project generator written in PowerShell. Its purpose is to streamline the creation of PowerShell module projects, Pester tests,...

Jaap Brasser avatar

Speaking at TUGA IT

18 days ago | Jaap Brasser

With the PowerShell Conference Europe fresh in my mind, it is already time to look ahead. Next week, 18-20 of May, I am speaking at TUGA IT in Lisbon Portugal. To quote TUGA from their website: TUGA IT’s mission is to deliver a premium multi-discipline conference for IT Professionals and Companies. TUGA IT is positioned […]

Mike Robbins avatar

Retrieve Information about your Favorite Podcast with PowerShell

18 days ago | Mike Robbins

This past weekend, I attended the 2017 Atlanta MVP Community Connection. While there, I met fellow Microsoft MVP Allen Underwood who is one of the co-host of the {CodingBlocks}.NET podcast. I listened to their podcast on my trip back home from Atlanta and later discovered that their podcast has an RSS feed for episodes. A simple PowerShell one-liner can be used to retrieve information about each episode of their podcast: Keep in mind that a PowerShell one-liner is one continuous pipeline and not necessarily a command that’s on one physical line.

Jaap Brasser avatar

Summary of PowerShell Conference Europe 2017

20 days ago | Jaap Brasser

Last week I was lucky enough to attend and speak at the largest European PowerShell conference, PowerShell Conference Europe in Hannover.  At the conference I was surrounded by some of the best and brightest in the my field, an overwhelming and educational experience. I think it is fair to say this has been one of […]

PowerShell Server Inventory, Part 3: Viewing the Inventory using a UI

20 days ago | Boe Prox

This post is part 3 in a 3 part series on building your own server inventory system using PowerShell. Staging the SQL database and tables (Part 1) Collecting server data and pushing to the SQL database (Part 2) Pulling the … Continue reading →

Prateek Singh avatar

Query Port Information using Powershell

20 days ago | Prateek Singh

Have you ever googled a port number to figure out what service uses it? I think every system administrator must have done this. But what if there are a lot of port to search? So I thought giving it try with PowerShell if we can use the shell to pro-grammatical get port information of lots of port numbers.… Read More Query Port Information using Powershell

PowerShell Quicktip #2: Filter-Left

21 days ago | David Hall

A practical example of why you should filter as far left in your scripts as possible. It might matter. [crayon-592d26c9bacd3359268486/]  

Jonathan Medd avatar

PowerShell – where, .where or Where?

21 days ago | Jonathan Medd

There are a number of different ways to filter data in PowerShell and the options have expanded since the original release of v1.0. I thought it worth summarising them here, particularly from my experiences of attempting to convey the different choices during PowerShell training I have delivered. Typically these revolve around a dataset and the word … Continue reading PowerShell – where, .

GitHub 101

21 days ago

This blog series started as a lightning talk at the 2017 PowerShell/DevOps Summit titled “Being an Upstanding Gitizen.” (you are here) GitHub Lingo GitHub Issues GitHub Pull Requests If you’re a PowerShell user, chances are you’ve heard of GitHub by now. In addition to the many community-driven projects, even Microsoft’s own PowerShell team are doing a ton of their work in open source land.

Kevin Marquette avatar

Powershell: PSGraph the Get-Help related links

22 days ago | Kevin Marquette

I saw this tweet by Glenn Sarti where he was building a graph database of the PowerShell help system as a way to demonstrate Neo4j. @MSFTzachal As promised I wrote my PowerShell Help graph presentation (PS Summit) as a blog post instead— Glenn Sarti (@GlennSarti) May 7, 2017 I...

Josh King avatar

Crouton #3 - Sometimes You Just Want to Click Your Toast

22 days ago | Josh King

Buttons, as we have discussed previously, are all well and good. However, if you’re only adding one to your toast, they can look a little… out of place if not outright ugly. Surely you can just set an action on the toast itself, making it clickable? Before we jump in, I’m aware that I’ve been terrible about mentioning the PowerShell module these posts rely on, and linking to other relevant info. Going forward these posts should be laden with link, including the relevant module: BurntToast.

Andreas Bittner avatar

PSConf2017 | Show-ThirdDay

24 days ago | Andreas Bittner

Freitag früh, man merkt, es werden auch heute weniger Leute. Was man auch versteht, denn nach zwei so tollen Tagen braucht man etwas Entspannung und einige kommen sicherlich noch. Nun worum ging es bei mir Heute? Conatiner Windows / Linux … Weiterlesen →

Jeff Hicks avatar

Friday Fun: Listing WMI Namespaces

24 days ago | Jeff Hicks

Welcome once again to the end of the week.  Hopefully you spent some time in PowerShell. If not, perhaps this tidbit will be intriguing enough to give it a try. I always try to put the “fun” in function and today I have one that will enumerate all the WMI namespaces, but using Get-CimInstance, or […]

Andreas Bittner avatar

PSConf 2017 | Show-SecondDay

25 days ago | Andreas Bittner

Das nicht alle nach dem gestrigen Abend heute früh erschienen, war schon fast zu erwarten. Aber dies kann man auch keinem verübeln, bei dem tollen Programm gestern und dem Ambiente. Mein Tag startet heute mit James O’Neill. Good Shared PowerShell … Weiterlesen →