Select Page
Optimizing your $Profile

Optimizing your $Profile

Optimizing your $Profile Your PowerShell Profile allows you to customize your PowerShell session and runs at startup. Complex profiles can cause a significant delay in the startup of PowerShell as it is a script that needs to be executed before ... continue reading

Testing the connection to computers in the Active Directory

Q: As an administrator, I often have to do a lot of reporting on the servers in my domain. Is there a simple way to test the connection to every server in my domain or every server or client host ... continue reading

Can I Enable the Caps Lock Key?

Q: I have a script where users enter some information. This information needs to be entered in all capital letters, so my instructions say, “Please make sure the Caps Lock key is on before entering the information.” They don’t always ... continue reading

A Reusable File System Event Watcher for PowerShell

Some time ago I wanted to sync files from a source directory to a destination directory immediately after they had changed in the source directory. As a C# developer I’m aware of a .NET Framework class named FileSystemWatcher which suits ... continue reading

Determine if a folder exists

Q: Is there any way to determine whether or not a specific folder exists on a computer? A: There are loads of ways you can do this. The Test-Path Cmdlet The easiest way to do this is to use the ... continue reading

Updating help for the PSReadLine module in Windows PowerShell 5.1

Back in November of 2020 I posted instructions about how to work around the problem of updating the help for the PSReadLine module. The version of the PSReadline module that shipped in Windows PowerShell 5.1 used a lowercase letter in ... continue reading

Reading a text file bottom up

Q: I have a log file in which new data is appended to the end of the file. That means the most recent entries are at the end of the file. I’d like to be able to read the file ... continue reading

Lightning Fast and Easy Provisioning of Git with SSH Key Authentication on Windows

Maybe you have a team of Windows developers that are onboarding for your new Git server installation or maybe you’ve decided to drop http password authentication to your existing Git server (due to it’s many problems). Your next steps may ... continue reading

Leveraging XML with New Employee PowerShell Scripts

I’m going to show how you can leverage XML files for referencing information, to help bolster up your Active Directory user accounts. This will ensure things such as Outlook contact cards are correct but also allows you to use this ... continue reading

Getting Yesterday’s Date

Q: How can I get yesterday’s date? A: You can use a combination of the Get-Date cmdlet and .NET Time/Date methods. First, let’s look at dates in PowerShell and .NET Then we can look at how to calculate yesterday and ... continue reading