

The script to perform tests for these three policy requirements might look like this The tests are implemented inside of "It" blocks. First, I will create a PowerShell script named "1." The Pester test script will contain "Description" and "Context" blocks, which will contain groups of tests. I can write a set of Pester tests to validate these settings on a system. The HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa:RestrictAnonymous key should be set to a value of 1. Anonymous enumeration of accounts and shared will be disabled.The HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\NoLMHash key should be set to a value of 1.
#POWERSHELL XML TOOLS PASSWORD#
The older LMHash format will not be used for local password hashes.The HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\LimitBlankPasswordUse registry key should be set to a value of 1. Pester describes itself as "the ubiquitous test and mock framework for PowerShell." Like the unit-testing frameworks your developers use, this module allows you to write suites of tests to run against a system.Ĭonsider a simple example: The enterprise has decided to require certain local account settings on all Windows servers and workstations: In this series, I'll explore some of the PowerShell tools which have made me much more efficient in my audit and compliance work. NET Core framework (which is different, and slightly less mature than the Windows.

It's currently in version 7.1 and available for Windows, MacOS and many Linuxes. PowerShell Core is the cross-platform version of the language. It's more cross-platform than ever before, and it is designed for handling structured data formats like CSV, XML and JSON.

Whenever I can, I use PowerShell for my measurement scripts. Today, I use scripting and automation wherever I can, just so I can keep up with the developers and administrators (or site reliability engineers). Then came virtualization, the cloud, agile, lean, Dev-Ops, site reliability engineering.
#POWERSHELL XML TOOLS SOFTWARE#
If I asked "where are your Exchange servers?" they would take me to the data center and point out the physical machines.Back then, I could take the time to manually review the settings on each server, or I could take a week to perform a software audit without interfering with the development schedule. Administrators would manually configure each server and rack it up in the on-premise data center. When I started performing IT audits in the early 2000s, it was a much simpler time! Physical servers were the norm. These blog posts supplement the material presented in the free webcast series "PowerShell for Audit, Compliance, and Security Automation and Visualization". This is the first of a three-part series on using PowerShell for audit and compliance measurements.
