Summary: Use Pester to safely test script changes to Active Directory. How can I test my Active Directory script without having it make changes to my live domain? Use Pester’s mocking feature to test your code without using the actual Active Directory cmdlets.
Year: 2015
Unit Testing PowerShell Code with Pester
Summary: Guest blogger, Dave Wyatt, discusses using Pester to analyze small pieces of Windows PowerShell code. Note This is a five-part series that includes the following posts: What is Pester and Why Should I Care?Learn about a new test framework for PowerShell called Pester Getting Started with PesterLearn how to get information back from Pester…
PowerTip: Connect Pester to Automated System
Summary: Learn how to incorporate Pester into an automated system. How do I incorporate Pester into an automated system? Use one of the features in Pester that are built for this purpose: NUnit XML export, -PassThru switch, or the –EnableExit switch in conjunction with powershell.exe’s exit code, for example: $testResults = Invoke-Pester -PassThru -OutputFormat…
Getting Started with Pester
Summary: Guest blogger, Dave Wyatt explains how to get information back from Pester. Note This is a five-part series that includes the following posts: What is Pester and Why Should I Care?Learn about a new test framework for PowerShell called Pester Getting Started with PesterLearn how to get information back from Pester Unit Testing PowerShell…
PowerTip: Get Started with Pester Tests and PowerShell
Summary: Learn how to start a Pester test. How do I run Pester tests? Place your tests into a file with a name that ends with .Tests.ps1, and then run the Invoke-Pester cmdlet.
What is Pester and Why Should I Care?
Summary: Guest blogger, Dave Wyatt introduces a new test framework for PowerShell called Pester. This week we are honored to have one of the authors of Pester here with us on the Hey, Scripting Guys! Blog. It’s Dave Wyatt himself, a Cloud and Datacenter MVP. Dave, tell us all about Pester… Note This is a…
PowerTip: Find List of PowerShell About Topics
Summary: Find a list of Windows PowerShell About topics. How can I find Help topics so I can learn about various Windows PowerShell concepts? Use Get-Help and a wildcard character, for example: Get-Help about*
Weekend Scripter: Conceptual PowerShell Help
Summary: Guest blogger, Tim Warner, talks about using Windows PowerShell conceptual Help. Microsoft Scripting Guy, Ed Wilson, is here. Welcome back Timothy Warner as our guest blogger today. Tim is an author and evangelist for Pluralsight, a premier online IT pro and development training company. Tim is the author of Windows PowerShell in 24 Hours,…
PowerTip: Time How Long PowerShell Command Takes to Complete
Summary: Easily time how long a Windows PowerShell command takes to complete. How can I time how long a command takes to complete in Windows PowerShell? Use the Measure-Command cmdlet—for example, to time how long it takes to Get-Process (gps is an alias) to complete, put the command in a script block and call Measure-Command: Measure-Command…
Weekend Scripter: PowerShell ASCII Bar Charts
Summary: Microsoft PFE, Wei Hao Lim, presents a script that creates ASCII bar charts. Microsoft Scripting Guy, Ed Wilson, is here. Today we have a new guest blogger. Please welcome Wei Hao Lim. Wei is a Microsoft PFE from Australia who works primarily with enterprise customers helping to configure, deploy, maintain, and customize System Center…