Tools

Tools
n2501r
PowerShell for Admins

Media Sync: Organize Your Photos and Videos with PowerShell

Do you have photos and videos that you have taken over the years that are scattered all over the place? Do you want to have all your photos and videos organized? Do you want all your photos and videos to have a standardized naming scheme? If you answered YES to these questions, then this is the post for you. In this post, I will provide you with the PowerShell code and examples for how to use the Media Sync script. The Media Sync script utilizes the Shell.Application COM object to gather file metadata. Only files that have a picture or video metadata type will be processed. The script uses the date taken for pictures and the media created metadata fields to organize the photos and videos. If there is no date taken or media created available for a given file, the script will use the modify date instead. The script also ensures that you won’t have any duplicate files by checking the file hashes of the two files in question. If the script detects duplicate files, it will only keep one copy of the file. There are also tools included to help you cleanup unwanted files or folders, delete empty directories and find duplicate files. The script has a simple menu driven PowerShell GUI similar to what I did in a previous post . The Media Sync PowerShell script provides the following features:

n2501r
PowerShell for Admins

NetNeighbor Watch: The PowerShell Alternative To Arpwatch

In this post, we are going to setup NetNeighbor Watch on a Raspberry Pi. NetNeighbor Watch can keep an eye on your network and send you an email when a new host is discovered. NetNeighbor Watch is done completely in PowerShell. The results are very similar to those of arpwatch. NetNeighbor Watch is for anyone that wants more visibility into the wireless or wired devices on their network. We will also setup a weekly email report with all of the known hosts on your network. In this post, I will walk you through the entire process of setting this up from scratch on a Raspberry Pi, lets get started!

n2501r
PowerShell for Admins

Simple PowerShell GUI

Over the years, I have supported and created multiple types of GUIs.  I finally decided a few years ago to create a very simple menu driven PowerShell GUI.  I wanted something that was very powerful yet very simple to maintain.  I really enjoy automating manual administrative tasks, so that is what drove this project in the first place.  Before I created the menu driven PowerShell GUI, I had directories and directories of very specific scripts to do specific tasks.  I decided to standardize and consolidate all of those scripts into one menu driven PowerShell GUI.  By doing this, I took the guess work out of determining which PowerShell script to run for a given task.  This has greatly helped my colleagues know exactly what to run and how.
Feel free to check it out for yourself at my site: SpiderZebra.com .  While you’re there, you can take a look at a few of my other related posts:

Jeffery Hicks
Announcements

A New Home for Plaster

Some of you may be familiar with the Plaster PowerShell module. This slick tool lets you build out a new module in seconds. Actually, Plaster can be used to scaffold a framework for any type of project. You can install the current version from the PowerShell Gallery. However, the project has been in limbo for a while with no updates or progress. After discussions with the PowerShell Team about the module, a decision was made to transfer ownership to the PowerShell community. We’re happy to report that the Plaster repository is now under the auspices of PowerShell.org. The GitHub repo, including pull requests and issues, can now be found at https://github.com/PowerShellOrg/Plaster.
It will take some time to get re-organized and work through the backlog of issues and pull requests. Although it is possible that we’ll simply zero out things like pull requests and start with a fresh slate. The basic functionality of the module should work just fine in its current state. Enough members of the PowerShell community recognize the value in the Plaster module which is why this transfer was made.
And frankly, this is one of PowerShell.org’s primary purposes: to serve the community. In this case, Microsoft had a languishing asset that needed more attention than what they could provide. Which is exactly where PowerShell.org fits in. We can step in providing the resources and in the end contribute back to the community. A big thank you to Steve Lee at Microsoft for making this possible.

pwshliquori
Tips and Tricks

Hear, Hear for Here-Strings

Running commands in PowerShell that require a format that will not run natively in PowerShell could be a difficult task, or can it? PowerShell provides a way to store, for example, a JSON as a string, enter here-string. A here-string is a single or double quoted string in which the quotation marks are interpreted literally. An example would be invoking a Rest API that requires a JSON body. Lets take a look at an example and see how here-strings work.

Nathaniel Webb (ArtisanByteCrafter)
PowerShell for Admins

Secure Your Powershell Session with JEA and Constrained Endpoints

Index

What is a constrained endpoint and why would I need one?

Powershell constrained endpoints are a means of interacting with powershell in a manner consistent with the principal of least privilege. In Powershell terms, this is referred to as Just-Enough-Administration, or JEA.

JEA is very well documented, so this won’t simply be repeating everything those references detail. Instead, we’ll go through a simple, real-world use-case of when and why you might need to deploy one.

Nathaniel Webb (ArtisanByteCrafter)
PowerShell for Admins

Running Universal Dashboard with Ubuntu and Nginx (With HTTPS!)

ImgurA basic UniversalDashboard running on nginx

Index

Prerequisites

For this writeup, I’m using Ubuntu 18.04. Software packages are geared toward using that version.

First, we’ll need to install our dependencies

There are several ways to install Powershell core on Ubuntu. I recommend Microsoft’s documentation for ubuntu 18.04 here

Once installed, enter Powershell and install the UniversalDashboard module. This will use the community edition.

pwsh PS> Install-Module UniversalDashboard.Community -Scope CurrentUser Confirm it is installed:

Eli Hess
PowerShell for Admins

Executing LINQ Queries in PowerShell – Part 2

And we’re back!
Ok, so in the last blog we began a conversation about delegates and using LINQ in PowerShell. In today’s post, I’m going to give an example of how it can be incredibly useful. Let’s talk about Joins.

Joins

In my line of work, I’m constantly running into the need to combine datasets from multiple sources that relate to each other and pull out some specific properties. Say you have two internal services, one which is used to track production status and another which is used to monitor whether machines are online. To demonstrate this, let’s initialize some mock data once again.

David Jones
DevOps

Colecting Certificates form an Enterprise CA for use with DSC

In a domain environment auto enrollment can be used to get create unique certificates for each node that can be used with DSC.  The problem is getting the public cert to the machine that creates the DSC MOF files. I wrote a module last year to collect them directly form the Enterprise CA. If it interests you take a look https://blog.bladefirelight.com/nuggets/collecting-ca-certificates-for-dsc-configuration/

msorens
PowerShell for Admins

Do Anything in One Line of PowerShell

PowerShell provides a tremendous boon to productivity for computer professionals of all types. But, you have to admit: it can be a bit daunting to get up to speed! Indeed, as someone who has a fair amount of experience using it, I still find myself having to look up how to do things–frequently. So I started keeping track of the recipes I was using the most. And came up with a list of 400 or so, published in 4 parts.