Skip to main content

2 posts tagged with "module"

View All Tags

· One min read
Hannes Palmquist

Some time ago I wanted to automate a process where I needed check status of a few docker containers managed with Portainer and noticed that there was no powershell module available on the gallery for portainer. A couple of minutes later I had discovered the Portainer Rest API and though that it could be a fun project to provide powershell users with the ability to manage their Portainer and Docker instances with powershell.

So here it is, an early pre-release/work in progress powershell module for Portainer, PSPortainer

If you want to contribute to the project it is publically available on GitHub here

To get started, visit the docs for the module at getps.dev or start exploring directly by installing the module from PSGallery

Install-Module PSPortainer -Scope CurrentUser

· One min read
Hannes Palmquist

Recently I developed a tool that utilizes the .NET class system.collections.queue. The function runs continously and produces workitems that should be processed in sequence and in the same order they were added. One simple way to acheive this is to use the collection queue. This class provides a simple way to add items to the queue and retreive the oldest item when needed.

For fun I wanted to create a wrapper for the queue class so that it can be used in a powershell style syntax. Additionally i missed functionality to see the rate and velocity that items were added and removed to the queue.

Queue objects created with this module contains metrics for count of added and removed items, rate of added and removed items and velocity.

Repo
Docs
PowerShell Gallery