Przemyslaw Klys avatar

Converting Pester V4 to Pester V5 basics

18 hours ago | Przemyslaw Klys

Now that Pester V5 is out, I decided that I need to make sure that my Pester tests for all my modules keep on running correctly. Some substantial changes in Pester add new features, changing some things, but that also means all the tests that you have defined most likely will need a small push to get it up and running again on Pester V5. Starting this blog post, I wanted to mention that I am by no means an expert on Pester, but I do use it for some time now for most of my projects.

Kelvin Tegelaar avatar

Automating with PowerShell: Using the Secure Application model updates.

21 hours ago | Kelvin Tegelaar

I have a feeling I might be giving people a blogging overdose, but I’ve been playing with so much cool stuff the last couple of days. So lets get the ball rolling; I’ve finally found a method to connect to the SCC succesfully using the Secure Application model. I’ve also found that non-partners can use […] The post Automating with PowerShell: Using the Secure Application model updates.

Jeff Hicks avatar

Solving the PowerShell Counting Challenge

2 days ago | Jeff Hicks

A few weeks ago, an Iron Scripter PowerShell scripting challenge was posted. As with all of these challenges, the process is more important than the end result. How you figure out a solution is how you develop as a PowerShell professional. A few people have already shared their work. Today, I thought I’d share mine....

Josh King avatar

So *That's* What OutBuffer Is For!

2 days ago | Josh King

OutBuffer has been lurking in amongst the common parameters on most cmdlets for years, but I've never taken the time to ask what it's for.

Alexander Koehler avatar

Exchange Online PowerShell V2 Copy “Senden Als” Mail in das originale Postfach kopieren

2 days ago | Alexander Koehler

Ich habe mich entschieden diesen Artikel zu schreiben, da die „Senden Als“ Funktion immer wieder für Verwirrung und einige Mythen sorgt. Viele Firmen nutzen diese durchaus nützliche Funktion um ihre persönliche E-Mail Adresse zu verschleiern. Auch zum Senden aus einem Team Postfach bestens geeignet. Nun zum eigentlichen „Problem“ (manche bemerken gar nicht, dass ein Problem […] Der Beitrag Exchange Online PowerShell V2 Copy “Senden Als” Mail in das originale Postfach kopieren erschien zuerst auf it-koehler-blog.

Xajuan Smith avatar

Google cloud and the absence of PowerShell.

2 days ago | Xajuan Smith

I was looking into google cloud to explore some options for a client to leverage some automation elements and was very interested until I learned of the lack of PowerShell support. For the life of me I cannot understand Google’s purpose to neglect populations of individual platforms and still want professionals to take their platform… Continue reading Google cloud and the absence of PowerShell.

Kelvin Tegelaar avatar

Automating with PowerShell: Creating dynamic distribution groups in all O365 tenants

2 days ago | Kelvin Tegelaar

Someone on the /r/msp reddit, and a Slack that I frequent asked if it is possible to create an “all users” distribution group with PowerShell, and keep it up to date. I figured to spend some time on it. To achieve a list that is always up to date, we can use Dynamic Distribution groups. […] The post Automating with PowerShell: Creating dynamic distribution groups in all O365 tenants appeared first on CyberDrain.

Adam Bertram avatar

How To Get Started Using OpenSSL With PowerShell

2 days ago | Adam Bertram

If you need to generate CSRs, private keys and certificates, check out this article on how to use OpenSSL with PowerShell!

Shane O'Neill avatar

Checking Job Step Output Mid-Job using PowerShell

2 days ago | Shane O'Neill

Words: 627 Time to read: ~ 3 minutes The XY Problem Them: We have this job… Me: Right… Them: … and one of the steps in the job creates files… Me: Okay… Them: … and we need you to check if it creates the files, otherwise we don’t need to do any of the rest … Continue reading "Checking Job Step Output Mid-Job using PowerShell"

Sergey Vasin avatar

-like, -notlike, and -not operators in PowerShell

2 days ago | Sergey Vasin

The -like operator allows us to use wildcards to select required objects. For example, like this. Or else By default, this operator is not case-sensitive, so the following commands are equivalent. If we want it to consider the case of… Continue reading →

Sergey Vasin avatar

Операторы -like, -notlike и -not в PowerShell

2 days ago | Sergey Vasin

Оператор -like позволяет нам использовать символы подстановки при выборе требуемых значений. Например, так. Или же По умолчанию этот оператор не чувствителен к регистру. То есть, следующие команды будут полностью равнозначными. Если же нам нужно, чтобы оператор -like принимал во внимание… Читать далее →

Cláudio Silva avatar

Export Deadlocks to file from system_health Extended Event using PowerShell

3 days ago | Cláudio Silva

Just a quick post as may help any of you searching for this. Scenario Client wants to analyze most recent deadlocks that happened on a specific instance. They asked us to send the xdl files. How do we get the deadlocks? Depending on the version of SQL Server that you are running, there are different […]

Kelvin Tegelaar avatar

Documenting with PowerShell: creating a device audit log

3 days ago | Kelvin Tegelaar

My engineers sometimes have questions about past events on a specific machine, to which I often point them towards our RMM system. The RMM system contains a bulk of data that can be used to make analysis. The problem is just that – It’s unedited bulk data, often with different locations for different pieces of […] The post Documenting with PowerShell: creating a device audit log appeared first on CyberDrain.

Kelvin Tegelaar avatar

Documenting with PowerShell: Syncing Unifi devices to IT-Glue

4 days ago | Kelvin Tegelaar

This blog should be used in together with my previous blog about Unifi documentation. This script syncs all devices to IT-Glue and makes sure the configurations are in sync with eachother. It will overwrite any changes you’ve made to the configurations, so treat with care. And that’s it! this blog will be followed up by […] The post Documenting with PowerShell: Syncing Unifi devices to IT-Glue appeared first on CyberDrain.

Xajuan Smith avatar

Mobile PowerShell Needed?

4 days ago | Xajuan Smith

I have always wanted to get my mittens on a mobile iteration of the prized management tool. I made sure I got a mobile sized tablet that would allow for me to use this on the go. Remote Desktop, Team viewer, Screen connect, VNC just dont respond like a native client. Wouldn’t it be something… Continue reading Mobile PowerShell Needed?

Darwin Sanoy avatar

Mission Impossible Code - Compact, Idempotent, DevOps Oriented, Multi-Distro Package Installer Script for Linux and Mac

5 days ago | Darwin Sanoy

Everyone loves Linux for its ability to stick to fundamentals and common platform expectations. Except those of us who do a lot of deployment automation. Why? Two main reasons: In a world of stripped back distros (think containers), even fundamental Gnu coreutils and other basics can be missing. Which leads to the second frustration - for some reason distro families thought it would be great to not only innovate package management technology but also change up the command set and also not provide a universal command set (like an api) to hide the differences.

Matthew Dowst avatar

PowerShell Weekly – May 22, 2020

6 days ago | Matthew Dowst

Here is your weekly round up of what is happening in the world of PowerShell. Do you have a suggestion for this post? Do you know something that should be included? Let me know in the comments below, or on twitter.

Josh King avatar

Fun with Azure Key Vault Part 1: Vault Creation and Storing PSCredential Objects

6 days ago | Josh King

I'm so used to storing fully formed credentials in the local Windows Credential Manager. How do I transition that into the "secrets" centric world that is the cloud?

Dave Carroll avatar

A PowerShell Counting Challenge Walk-through

7 days ago | Dave Carroll

Introduction The latest IronScripter challenge, A PowerShell Counting Challenge, had challengers learning about loops, possibly range and modulus operators, basic parameter validation, and creation of a simple custom object. This post should serve as a walk-through, or learning guide if you will, for the Iron Scripter’s challenge. Beginner For the beginner challenge, the Chairman wanted the challenger to: Get the sum of the even numbers between 1 and 100.

Xajuan Smith avatar

VS code ready to replace PowerShell ISE?

7 days ago | Xajuan Smith

There is a push to go to Visual Studio Code, which is a plug-in rather than the PowerShell.exe having its own dedicated ISE application. It can be seen as smart, others see this as allowing for distractions. I do not like the syntax in the responses of commands, I don’t like the lack of the… Continue reading VS code ready to replace PowerShell ISE?

Kelvin Tegelaar avatar

Documenting and monitoring blogs updates

7 days ago | Kelvin Tegelaar

No new blog today, its officially a bank holiday and I’m enjoying the sun 🙂 I did make sure not to leave my readers empty handed. A bunch of my blogs got a little bit outdated, so I decided to update them. The following blogs have been updated: O365 blogs I’ve updated the Secure Application […] The post Documenting and monitoring blogs updates appeared first on CyberDrain.

Adam Bertram avatar

How to Control Access to Office 365 Services with MFA

8 days ago | Adam Bertram

If you want to learn, hands-on, how to enable MFA Office 365, check out this article. You will learn, step-by-step how to enable MFA.

Darwin Sanoy avatar

Mission Impossible LIVE Coding

8 days ago | Darwin Sanoy

I’ve been working as a Solutions Architect at GitLab for over 6 months now and I’ve met a lot of awesome people and been challenged by a lot of customer requirements. I work on a great team of solutions architects in a part of the company called “Customer Success”. All of GitLab is keenly interested in customers and their experiences, but I gotta say, I love having it right in the group name! The team I am on really has a heart for customers and works hard to make them successful.

Cláudio Silva avatar

Refresh databases that belongs to Availability Group using dbatools

8 days ago | Cláudio Silva

Few days ago I was surfing on Twitter when dbatools asked about how it’s PowerShell module changed the way people work. We're looking to highlight how dbatools has changed the way people work. What was your most exciting moment using dbatools or how did dbatools save you at work? 🤩 — dbatools (@psdbatools) May 16, […]

Jeff Hicks avatar

PowerShell Word Play

9 days ago | Jeff Hicks

A few weeks ago an Iron Scripter PowerShell challenge was issued that involved playing with words and characters. Remember, the Iron Scripter challenges aren’t intended to create meaningful, production worthy code. They are designed to help you learn PowerShell fundamentals and scripting techniques. This particular challenge was aimed at beginner and intermediate experience levels. I...

Paolo Frigo avatar

Using PowerShell to Clean Up Sophos Temp Files

9 days ago | Paolo Frigo

Recently I’ve encountered a strange issue that affected one Windows workstation with Sophos AV (Endpoint) software installed.  Sometimes this software creates some temporary files with ‘$$$’ extension and apparently it never removes them. I thought that the process of analysis and implementing a solution for this edge case was perfect for an article and it … Continue readin

Sergey Vasin avatar

PSPropertyExpression type

9 days ago | Sergey Vasin

Microsoft.PowerShell.Commands.PSPropertyExpression type (it’s type accelerator – [pspropertyexpression]) exists in PowerShell from the beginning, but in version 6.1 it was made public, what makes it accessible to us, as a script and module authors. This type is used, for example, by… Continue reading →

Sergey Vasin avatar

Тип PSPropertyExpression

9 days ago | Sergey Vasin

Тип Microsoft.PowerShell.Commands.PSPropertyExpression (его акселератор — [pspropertyexpression]) присутствует в PowerShell с самого начала, но в версии 6.1 он стал публичным (public), что делает его доступным и для нас, как авторов скриптов и модулей. Сам по себе этот тип используется, например, параметром… Читать далее →

Alex Neihaus avatar

Azure ARM template deployment scripts

10 days ago | Alex Neihaus

Use PowerShell and/or the CLI in ARM templates with deploymentScripts

Kelvin Tegelaar avatar

Documenting with PowerShell: Documenting Unifi infrastructure

10 days ago | Kelvin Tegelaar

This blog is based on an earlier blog by Eliot Munro; Syncing Unifi Sites with IT-Glue by Eliot Munro. I loved the script, but wanted a little bit of extra information, I also didn’t really like the syncing with a Sharepoint list, so I modified the script to use the site name instead. So, to […] The post Documenting with PowerShell: Documenting Unifi infrastructure appeared first on CyberDrain.


Jeff Hicks avatar

Friday Fun with PowerShell and ANSI

13 days ago | Jeff Hicks

Ever since PowerShell 7 came along, I’ve been having a lot of fun exploring what I can do with ANSI color escape sequences. And actually, even in Windows PowerShell you can use them. Although you need to use a different escape character. Run Get-PSReadlineOption to see what I’m talking about. Today I have 2 quick...

Matthew Dowst avatar

PowerShell Weekly – May 15, 2020

13 days ago | Matthew Dowst

Here is your weekly round up of what is happening in the world of PowerShell. Do you have a suggestion for this post? Do you know something that should be included? Let me know in the comments below, or on twitter.

Przemyslaw Klys avatar

Get-ADObject : The server has returned the following error: invalid enumeration context.

13 days ago | Przemyslaw Klys

In the last weeks, I'm working on a PowerShell module that the main goal is to work on gathering and fixing GPOs. I've been testing my module a lot of times on my test environment, and it worked fine till the moment I run it on production, and it started to fail pretty quickly. The difference between my environment and production is 25 GPOs vs. 5000 GPOs. The error I was getting: The post Get-ADObject : The server has returned the following error: invalid enumeration context.

Jeff Hicks avatar

Open Windows Terminal PowerShell Split Paned

14 days ago | Jeff Hicks

The other night I presented for the Mississippi PowerShell User Group on how to get started using Windows Terminal. This has been my go-to PowerShell console for quite a while. I use Windows Terminal for everything. During the talk a question came up about starting a session with split panes. This is a very cool...

Adam Bertram avatar

How To Find And Delete An Email From All Mailboxes In Office 365

14 days ago | Adam Bertram

Learn, step-by-step, how to use PowerShell to find and delete Office 365 email in lots of mailboxes at once.

Kelvin Tegelaar avatar

Monitoring with PowerShell: Preventing PowerShell based attacks (LoLBas)

14 days ago | Kelvin Tegelaar

In the last Huntress Tradecraft Tuesdays there was some discussion about using “Living of the land” techniques. Living of the land means using the tools available on the operation system to achieve access. There’s a lot of ways that bad actors are now using these system tools to deploy ransomware for example. PowerShell is one […] The post Monitoring with PowerShell: Preventing PowerShell based attacks (LoLBas) appeared first on CyberDrain.

Xajuan Smith avatar

Tab-complete Therapy

15 days ago | Xajuan Smith

There is a special place in my heart for tab-completion. Just invoking it brings peace of mind. There are a lot of people that feel like they are retired school spelling-bee champs. I tend to like the command line validation. It sounds crazy but even when I spell it out all the way it feel… Continue reading Tab-complete Therapy

Adam Bertram avatar

Getting Started with Microsoft Teams Shifts

15 days ago | Adam Bertram

Learn, hands-on, how to intelligently managing employee shifts with Microsoft Teams Shifts!

Kelvin Tegelaar avatar

Monitoring with PowerShell: Monitoring the used MFA type for O365/Azure.

15 days ago | Kelvin Tegelaar

We all know it’s key to have your security hygiene in order, a large part of that is your multi factor authentication deployment. Having all users use MFA these days is a no-brainer, but not all types of MFA are made equal. For example; MFA via text-message is generally considered unsafe. But even the entered […] The post Monitoring with PowerShell: Monitoring the used MFA type for O365/Azure.

Sergey Vasin avatar

Using delegates in PowerShell

15 days ago | Sergey Vasin

What is a delegate? This is an object type, that instantiates by associating with some method so that we can invoke this method by calling the delegate. Why is this needed? One of the cases – is that we can… Continue reading →

Sergey Vasin avatar

Использование делегатов в PowerShell

15 days ago | Sergey Vasin

Что такое делегат (delegate)? Это тип объекта, который при инициализации ассоциируется с неким методом и позволяет нам, обращаясь к делегату, вызывать этот самый метод. Для чего это нужно? Один из вариантов использования делегатов — это возможность передачи ассоциированного с делегатом… Читать далее →

Jeff Hicks avatar

A PowerShell Network Monitor

16 days ago | Jeff Hicks

I hope you’ve been trying your hand at the scripting challenges being posted on the Iron Scripter web site. The challenges are designed for individuals to do on their own to build up their PowerShell scripting skills. A few weeks ago, a challenge was posted to create a network monitoring tool using PowerShell and the...

Dave Carroll avatar

Publish a Post for a Jekyll Site on a Schedule

17 days ago | Dave Carroll

Scheduled Posts A few months ago, Jeff Hicks asked me to participate in a PSBlogWeek focused on the release of PowerShell 7. I was ecstatic and honored. The contributors were asked to publish one to two blog posts on a specific topic, at a specific time. A specific time, for my static blog, meant that I needed to push my blog post at or near that time manually. I had no mechanism to schedule a post.

Jeff Hicks avatar

PowerShell 7 Scripting with the PowerShell ISE

17 days ago | Jeff Hicks

By now, everyone should have gotten the memo that with the move to PowerShell 7, the PowerShell ISE should be considered deprecated. When it comes to PowerShell script and module development for PowerShell 7, the recommended tool is Visual Studio Code. It is free and offers so much more than the PowerShell ISE ever could....

Xajuan Smith avatar

Get-History

17 days ago | Xajuan Smith

It’s strange how often we talk about history and how many of us actually get it. Today 42 years ago my brother was born on this day as mother’s first child, she celebrated her Mother’s Day two days in a row. Although he passed away before his time. I will never forget how he affected… Continue reading Get-History

Thomas Lee avatar

Draw.IO Integration with VS Code

17 days ago | Thomas Lee

Over the weekend, I saw a tweet announcing a new extension for VS Code. The extension "Draw.IO Integration "enables you to create good looking diagrams directly inside VS Code. Insane, I thought, then I downloaded it. I think a youthful view is that this is DOPE! You install the extension directly from inside VS Code, create and open a new *.Drawio document and away you go. If you have used virtually any diagramming tool, the interface is immediately accessible.

Kelvin Tegelaar avatar

Monitoring using PowerShell: Getting mailbox rules from the audit log

17 days ago | Kelvin Tegelaar

Some time ago I spoke about monitoring mailbox rules with PowerShell and how we’ve always used the “Get-inboxrule” cmdlet as delegate administrator to retrieve the rules and alert on them. Its been brought to my attention that recently API-created rules are no longer showing up using get-inboxrule. so to resolve this, I’ve decided to rewrite […] The post Monitoring using PowerShell: Getting mailbox rules from the audit log appeared first on CyberDrain.

David Hall avatar

Remote Computer Inventory with PowerShell vNext, 2020 Edition

20 days ago | David Hall

This is the successor to the first inventory script I put together in 2016 (https://www.signalwarrant.com/remote-computer-inventory-powershell/)  This version uses the Get-CIMInstance CMDlet to get all the information from the WMI classes as opposed to the WMI CMDlets. I have also added some additional information that I thought was relevant. If you can think of anything else […]

Jeff Hicks avatar

A PowerShell Remote Function Framework

20 days ago | Jeff Hicks

The other day I shared a PowerShell function to query the registry on remote computers to find installed versions of PowerShell. The function leveraged PowerShell remoting with the flexibility of using a computer name with an optional credential or existing PSSessions. The more I thought about it, the more I realized that the structure could...