There are some pitfalls in PowerShell for the unwary. Many people who are learning PowerShell come across quirks that can cause frustration. Michael Sorens continues his series, warning abut the most common PowerShell pitfalls and explains how to avoid them.… Read more
If you are aiming to optimise the use of your time by doing as much as possible via scripting, you will soon want to run scripts in parallel to save time. PowerShell does not demand that you run jobs one after the other; It has the means to launch actions whenever you wish and to obtain the results when you want them.… Read more
PowerShell has some very valuable features, but it is a mistake to believe that all those skills that you've derived from more conventional programming languages will transfer over to PowerShell. There are some pitfalls for the unwary. Michael Sorens warns abut the most common PowerShell pitfalls and explains how to avoid them.… Read more
Pester offers a relatively small number of commands to Unit-test PowerShell scripts, but these commands have tremendous capabilities. Pester even gives you the means to validate data and test program flow. It uses 'mocks' to provide hooks to validate program flow, so you can be more confident that a function is doing things they way you intended.… Read more
Pester allows you to automate the testing of PowerShell scripts. It can test the output of a function as you develop it by validating simple data (scalars) and arrays, Pester allows you to focus on the one function you want to test by using 'mocking' to fake all the other functions and Cmdlets, It also uses Parameterized tests save you from writing essentially the same test over and over with just a different input valu… Read more
By the time you're using PowerShell to automate an increasing amount of the system administration, database maintenance, or application-lifecycle work, you'll probably need to automate the unit-testing of the PowerShell scripts themselves. Michael Sorens introduces you to Pester, the leading test framework for PowerShell, and shows how it can make it easier to produce reliable scripts… Read more
You can execute PowerShell code that creates the data of an object, but there is no cmdlet to generate the 'object notation' code from an existing PowerShell object; until now, that is. Phil Factor also produces a ConvertTo-YAML function and explains how they both work, with illustrative cod… Read more
In the grand finale to Michael Sorens' series of PowerShell one-liners, we come to the handling of data, reading it in and writing it out, whether by files; input/output streams or a database. It shows how it can be done in a variety of formats including CSV, JSON, and XML.… Read more
The way to learn PowerShell is to browse and nibble, rather than to sit down to a formal five-course meal. In his continuing series on Powershell one-liners, Michael Sorens provides Fast Food for busy professionals who want results quickly and aren't too faddy. Part 3 has, as its tasty confections, collections, hashtables, arrays and strings.… Read more
PowerShell isn't a conventional language, though it draws inspiration widely. Many people learn it, and use it, best by collecting snippets, or one-liners, and adapting them for use. Michael Sorens provides the second in a series of collections of general-purpose one-liners to cover most of what you'll need to get useful scripting done.… Read more
PowerShell is designed to be used by busy IT professionals who want to get things done, and don't necessarily enjoy programming. PowerShell tackles this paradox by providing its own help and command-line intellisense. We aim to make it a bit easier still by providing a series of collections of general-purpose one-liners to cover most of what you'll need to get useful scripting done.… Read more
To master PowerShell, you must know how to use XML. XML is an essential data interchange format because it remains the most reliable way of ensuring that an object's data is preserved. Fortunately, PowerShell makes it all easy, as Michael Sorens demonstrates.… Read more
One of the frustrations of anyone beginning with PowerShell is the simple task of getting data in and out. To help out with this, Michael Sorens begins a series that shows you how to import data from most of the common file formats and sources. He also shows how to export data in a range of formats.… Read more
For the busy administrator of a windows domain, any regular task or housekeeping process should be automated, and the Cmdlets that are now provided with Active Directory have improved to the point that there is no serious contender to PowerShell for the task. Joseph Moody shows how to do it, with examples.… Read more
PowerShell provides comment-based help for functions and scripts with Get-Help, but when you want to document modules or generate a complete indexed API in HTML format, just as you can with Sandcastle for .NET or javadoc for Java, then stronger magic is required. Michael Sorens shows you how it is done, with source code.… Read more
Active Directory has more uses than it is usually credited with. The 'Active Directory Users and Computers' console can even be extended with whatever PowerShell tasks you need to make routine administrative tasks easier. … Read more
A combination of PowerShell and HTML can provide the basis of an easily-scanned report on the basic state of a whole group of servers. Sean combined a range of routine health-checks to provide himself a useful range of information about his servers to his in-box.
… Read more
Sean Duffy recently had an unwelcome encounter with Exchange Server Back Pressure, which cut off his message flow due to a lack of space on the server. To make sure it didn't happen again, he found a way to automatically monitor all his servers from afar, with a little PowerShell magic.… Read more
For PowerShell to provide specialised scripting, especially for administering server technologies, it can have the range of Cmdlets available to it extended by means of Snapins. With version 2 there is an easier and better method of extending PowerShell: the Module. These can be distributed with the application to be administered, and a wide range of Cmdlets are now available to the PowerShell user. PowerShell has grown up.… Read more
Running Profiler traces against multiple servers becomes a painful process when it's time to collate and filter all that data. It would be time-consuming, frustrating and messy if Laerte hadn't written this handy PowerShell script (complete with examples) to help you out.… Read more