Skip to main content

3 posts tagged with "Pester v5"

View All Tags

· 3 min read
Naw Awn

In today's dynamic technology landscape, maintaining a robust and reliable infrastructure is crucial for businesses to ensure smooth operations. From time to time you will need to install Windows udpates, security patches, required software updates and etc., on your servers and reboot them as necessary.

In this blog post, let's explore the infrastructure test using pester. This is a simple test you can run to ensure the servers are running with required business applicaiton processes and services after the reboot. I happened to write more comprehensive tests script like this when I had to run the test on more than 50 servers in one go.

· 3 min read
Naw Awn

It took me awhile to get around this logic. The Pester v5 script no longer runs in top down fashion. Unlike Pester v4 or older version, Pester v5 runs in two different phases.

In Descovery phase, it gathers all the infomation about the test script and get it ready for the Run phase. Technically speaking, Discovery phase only executes BeforeDiscovery, Describe, Context and anything else outside the It blocks.

· 3 min read
Naw Awn

This has been one on my list to do for a while. What you want to do is test your machine build after the deployment from SCCM, MDT or Intune Windows AutoPilot. The script will check

  • if the machine has the list of software you exptect
  • if the specific file or folder eixsts
  • if the registry key and value pairs are correct
  • if the services are running or stopped

Then send the result (Passed or Failed) to your Microsoft Teams channel via the incoming webhook so that you can monitor the result.