G
gnja.io
HomeBlogProjectsGalleryVideosAbout
System operational
© 2026 gnja.io•About•GitHub•YouTube•RSS
Blog

Blog

8 posts tagged quick

PowerShell: Calculating Folder Sizes
PowerShell

PowerShell: Calculating Folder Sizes

Sometimes all you want to know, or need to know, is how big a folder is in PowerShell. To do that, we'll need to use Get-ChildItem and Measure-Object specifically.The quick and dirtyThe first command...

Sep 17, 20202 min read
Using $PSBoundParameters in PowerShell
PowerShell

Using $PSBoundParameters in PowerShell

NavigationWhat is $PSBoundParameters?Taking a look at $PSBoundParametersUsing a switch statementSplatting with $PSBoundParametersWrapping things upYou can view all of the example code on GitHub:...

Jan 19, 20203 min read
PowerShell Quick Tip: Using ValidateSet
PowerShell

PowerShell Quick Tip: Using ValidateSet

PowerShell Quick Tip: Using ValidateSetWhy Use ValidateSet?ValidateSet is part of advanced parameters. It allows you to constrain the input of the parameter to a set of values. It also will...

Jan 21, 20172 min read
PowerShell Quick Tip: Basic use of the -f format operator
PowerShell

PowerShell Quick Tip: Basic use of the -f format operator

What the -f?There are many ways to manipulate/build strings in PowerShell. One of my favorite ways is to use the -f format operator. When you use the operator, it evaluates everything to...

Apr 5, 20162 min read
PowerShell: List out your PuTTY sessions
PowerShell

PowerShell: List out your PuTTY sessions

I wanted a way to export my PuTTY sessions as I was about to reformat my machine. You could export the registry keys and keep them, but I wanted something more visual as well. So I turned to my...

Mar 15, 20161 min read
PowerShell Quick Tip: Use a text file to omit values in an array
PowerShell

PowerShell Quick Tip: Use a text file to omit values in an array

After making the Lun Check Script I had an issue come up when somebody decommissioned a server. The LUNs that were mapped needed to be set offline for a week, then deleted. Since the script...

Mar 1, 20161 min read
PowerShell Quick Tip: Simple logging with time stamps
PowerShell

PowerShell Quick Tip: Simple logging with time stamps

Today I was writing a script at work to check sysvol replication. We have a DC that will sometimes not share the love outbound, yet inbound works just fine. That means to test it I needed to create a...

Feb 13, 20161 min read
PowerShell Quick Tip: Basic use of the Switch statement
PowerShell

PowerShell Quick Tip: Basic use of the Switch statement

Why use Switch?In PowerShell you can use an if statement to compare things and determine actions based upon the result. You also can use elseif to keep comparing values until you reach a desired...

Feb 3, 20161 min read