I'm just this old guy living in the English countryside. I know a bit about PowerShell and Windows. Love the Grateful Dead.
Been excited about PowerShell since the first time Jeffrey Snover spoke about it in public. I have loved it, and the community ever since. So pleased to be able to give back here.
Q: How can I change the Edge startup page?
A: You can change the start page easily using PowerShell.
Edge and It's Start Page
I am basing this article on the latest incarnation of the Edge browser, aka Edge Chromium. The settings in this article seem to work fine on the latest versions of Windows 10 and Server 2022. Other browsers can have ...
Q: Is there a simple way to rename a NIC, especially inside a Hyper-V VM?
A: You can change the name of any Windows NIC using PowerShell - whether the NIC is in a physical host or a Hyper-V VM.
NICS and NIC names
One thing that can quickly become confusing when using Hyper-V with multiple VMs and VM Switches is how fast the network adapters...
Q: Is there an easy way to save my script output to a text file rather than displaying it on screen?
A: Of course - there are multiple ways to do just that!
PowerShell and Output
One of PowerShell's great features is the way it automatically formats output. You type a command - PowerShell gives you the output it thinks you want. If the ...
Q: Is there an easy way to detect and changes to important the membership of AD Groups?
A: Easy using PowerShell 7, WMI, and the CIM Cmdlets.
Windows Management Instrumentation (WMI) is an important component of the Windows operating system. WMI is an infrastructure of both management data and management operations on Windows-based ...
Q: Some of the things we do in our logon scripts require the user to be a local administrator. How can the script tell if the user is a local administrator or not, using PowerShell 7.
A: Easy using PowerShell 7 and the LocalAccounts module
Local Users and Groups
The simple answer is of course, easily. And since you ask, with PowerShell 7! ...
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 in a specific OU?
A: Of course you can do this with PowerShell! You can use the Active Directory cmdlets and Test-Connection, although it is not as ...
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 do that, however. Is there a way to turn the Caps Lock key on and off using a script?
A: I don't know ...
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 starting with the last line and then ending with the first line, but I can’t figure out how to do that.
A: There are loads of ways you can do this. A simple way is ...
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 use that in your scripts.
Dates in PowerShell
Let's start by looking at how you can deal with dates and times. As you ...
Q: I want to change the drive letter and the drive label for a new USB drive. Is there a way with PowerShell?
A: Of course. One way is to use WMI and the CIM cmdlets.
PowerShell does not have a cmdlet to change the drive letter or the caption directly. But the good news is that you can use WMI and the CIM cmdlets to change both the drive ...