Using Formatting Files with PowerShell 7


Any terminal output in PowerShell is controlled by formatting files. Oftentimes, it is very useful to display more information about a given object than the default views offer. Since the early days of PowerShell, there has been an option to modify this display by using Format.ps1xml files. The biggest change to formatting, in recent years, […]

The post Using Formatting Files with PowerShell 7 appeared first on Petri.

Continue reading Using Formatting Files with PowerShell 7

Working with Linux Permissions in PowerShell 7


With the introduction of PowerShell Core and now PowerShell 7, the cross-platform capabilities of PowerShell have also brought new challenges. System administrators used to working on Windows systems that now operate cross-platform need to be able to handle permissions in similar ways.

The post Working with Linux Permissions in PowerShell 7 appeared first on Petri.

Continue reading Working with Linux Permissions in PowerShell 7

Comparing ThreadJob to PSJobs in PowerShell 7 on Linux


There have always been a few options for running background asynchronous tasks within PowerShell. Traditionally, PowerShell (PS) Jobs was the go to method as a job could be started and then control returned to the console. PS Jobs were always heavy, in regards to resource usage, and depending on what needed to be run, this […]

The post Comparing ThreadJob to PSJobs in PowerShell 7 on Linux appeared first on Petri.

Continue reading Comparing ThreadJob to PSJobs in PowerShell 7 on Linux

Understanding $PSDefaultParameterValues in PowerShell 7


Do you have that one PowerShell command you use constantly? If that command has parameters, you have to manually specify the parameter values every time. If you find yourself passing the same parameter values to a command frequently, this post is for you.

The post Understanding $PSDefaultParameterValues in PowerShell 7 appeared first on Petri.

Continue reading Understanding $PSDefaultParameterValues in PowerShell 7

Understanding the PowerShell 7 Error Variable


As with any programming language, code will have errors and troubleshooting those problems can be difficult. Thankfully, PowerShell has a rich error object and several powerful tools to help debug your code. With PowerShell 7, these tools become even more useful and error handling even easier. As the language evolves and becomes used in more […]

The post Understanding the PowerShell 7 Error Variable appeared first on Petri.

Continue reading Understanding the PowerShell 7 Error Variable

How to Send an Email via MailGun API using PowerShell 7


Mailgun is an email sending service that provides logging and an API to send emails. PowerShell is particularly strong in its ability to use REST API’s. There are many use cases for needing to send emails, but one of the most common is that of sending emails when scripts are completed. This may be for status updates or failures.

The post How to Send an Email via MailGun API using PowerShell 7 appeared first on Petri.

Continue reading How to Send an Email via MailGun API using PowerShell 7

How to Create a Services List in PowerShell 7 on Linux


Just like Windows, Linux has many running services that need proper management. With the advent of PowerShell 7 and it’s cross-platform ability, the idea of using PowerShell to manage Linux systems becomes more attractive.

The post How to Create a Services List in PowerShell 7 on Linux appeared first on Petri.

Continue reading How to Create a Services List in PowerShell 7 on Linux

How to Manage GIT with PowerShell 7 and Posh-GIT


If you haven’t heard of Posh-GIT, it is a great module for assisting in managing your GIT repositories from within PowerShell. There is so much functionality in GIT that it can be hard, especially in a PowerShell oriented way, to use that functionality effectively. Using Posh-GIT, you are able to interact easily with GIT using […]

The post How to Manage GIT with PowerShell 7 and Posh-GIT appeared first on Petri.

Continue reading How to Manage GIT with PowerShell 7 and Posh-GIT