News

Posey's Tips & Tricks. How To Validate Input in PowerShell Functions, Part 1. If your automated script takes action based on a value, it's critical to make sure the value is correct.
Do these practices to make PowerShell even more efficient. When creating functions, follow a consistent naming pattern, such as starting with a verb (e.g., Get, Set, Start) and using nouns to ...
PowerShell can save you a lot of time on Windows admin tasks, but to use it effectively you need to understand how it works. Here's a crash course in Windows PowerShell scripting basics to get you ...
If you need multiple functions to accomplish your goal, then add those into a module. Proper Naming of a Function Take a look at all of the core PowerShell cmdlets and you will noticed something right ...
The PowerShell Blacksmith Part 4: Fine-Tuning Functions. Part 4 takes the function created last time and adds a validation attribute. By Jeffery Hicks; 10/15/2013; In the last article we finished ...
Use PowerShell to change Registry values in Windows 11/10 In this article, we’ll see how to modify the registry using two well-known PowerShell cmdlets . The first cmdlet is New-Item while the ...
The PowerShell Get-WindowsFeature command—or, more properly, cmdlet—can retrieve a list of Windows features, including server roles, that are installed on a server or workstation running ...
That's pretty much the right way. Though I'd recommend you function it and put the function in your start script. Here's a working example: ...
ForEach-Object has two aliases — ForEach and % — and supports shorthand syntax beginning in PowerShell 3.0. The following three examples are identical in function even though the name of the loop ...
In Part 1 of this series, I showed you an example of PowerShell's native validation capabilities. In that installment, I wrote a function that accepted a text string as input.