Quantcast
Channel: Function Archives • The Lonely Administrator
Browsing all 59 articles
Browse latest View live

A Better PowerShell Get Scheduled Job Results

Yesterday I posted a quick update on my code to get the most recent scheduled job result in PowerShell. I had been using a simple script. But the more I thought about it, the more I realized I really...

View Article



More PowerShell Trace Window Fun

On my last Friday Fun, I posted an article about using Internet Explorer as a trace window. The idea was to put debug or trace messages in a separate application. I received a comment on the post that...

View Article

PowerShell Clean Up Tools

A few years ago I think I posted some PowerShell clean up tools. These were functions designed to help clear out old files, especially for folders like TEMP. Recently I decided to upgrade them to at...

View Article

Friday Fun: A Christmas Present for You

Over the years a number of people in the PowerShell community have shared Christmas and holiday related items. I’ve collected them and in some cases tweaked a little bit. This year I decided to wrap...

View Article

Friday Fun: A Random PowerShell Console

This week I thought we’d have a little fun with the PowerShell console and maybe pick up a few scripting techniques along the way. Today I have a function that changes the foreground and background...

View Article


Pimp your Prompt

If you are like me and live in PowerShell, then you spend a great deal of your day looking at your PowerShell prompt. That little indicator in the console and ISE that usually shows where you are. That...

View Article

Look at Me!

Last week I posted some ideas on how to add notifications to your scripts. Those ideas were variations on the old school “Press any key to continue” prompt that I assume many of you are familiar with....

View Article

Using Optimized Text Files in PowerShell

If you are like many IT Pros that I know, you often rely on text files in your PowerShell work. How many times have you used a text file of computernames with Get-Content and then piped to other...

View Article


Baby, It’s Cold Outside

I don’t know about your neck of the woods, but it is downright Arctic here. So I thought I’d polish up my PowerShell function to get weather data. [crayon-557b36a6918fe001845195/] This function uses...

View Article


Friday Fun: Size Me Up

Part of day job involves creating training material, often in the form of video training for Pluralsight or articles for Petri.com. Since I usually am covering PowerShell I often need to capture a...

View Article

A Better PowerShell More

In PowerShell, when I have a lot of output, I can use the legacy more.com command to page the results to the screen. [crayon-56ca04028ca16171841647/] There’s not anything inherently wrong with this...

View Article

Managing PowerShell Functions

Most of you probably know I’ve been using PowerShell since its beta days which now means I have about 10 years worth of PowerShell files. I find it hard to throw anything away. Over this time frame my...

View Article

Finding Git Repositories with PowerShell

As part of my ongoing improvement process this year I am starting to use Git much more. Yesterday I posted an article with my PowerShell script to create a new project folder which includes creating a...

View Article


Friday Fun: A Better Test-WsMan

I saw a question on Facebook about how to get Test-WsMan to return a simple Boolean result. The Test-Connection cmdlet has a -Quiet parameter that makes this possible. But Test-Wsman does not....

View Article

More Improvements to my Test-WSMan Replacement

Recently I shared a replacement function I wrote for Test-WSMan. That version addressed some of the shortcomings in the original command, at least for me. After using it for a bit I realized I wanted a...

View Article


Friday Fun: Find a Git Tip with PowerShell

Recently I published a PowerShell function that I use to display a random Git Tip of the Day. The function relies on my clone of the Git-Tips project on GitHub. I’ve been keeping tabs on this project...

View Article

Compare PowerShell Modules

One of the attractive features in PowerShell v5 is PowerShellGet. This module includes commands which makes it easy to discover and install PowerShell modules from the Internet, or even your network....

View Article


Get Antivirus Product Status with PowerShell

I expect that most of you with enterprise wide antivirus installations probably have vendor tools for managing all of your clients. If so, don’t go away just yet. Even though I’m going to demonstrate...

View Article

Creating a GitHub Repository from PowerShell

I’ve been continuing to work with the GitHub API in PowerShell. Today I have a function you can use to create a new GitHub repository. Of course you will need to have a GitHub account and another piece...

View Article

Creating Colorful HTML Disk Reports with PowerShell

I have no idea what possessed me, but the other day I came across an older script that uses PowerShell to create an HTML report showing drive utilization for a group of computers. The utilization is...

View Article
Browsing all 59 articles
Browse latest View live




Latest Images