Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Pester testing
## Prep work
## Depends - Pester, AzureADPreview, and xAzureAD.DirectorySettings modules
## Get original values - Get-AzureADDirectorySetting -Name Group.Unified | Export-Csv <Path> -NoTypeInformation
$ExpectedSettings = Import-Csv <Path>
Describe 'Azure AD Group Creation Settings' {
$ActualSettings = Get-AzureADDirectorySetting -Name Group.Unified
ForEach ($Setting in $ExpectedSettings) {
It "has the expected setting $($Setting.Name)" {
($ActualSettings | Where-Object {$_.Name -eq $Setting.Name}).Value | Should Be ($ExpectedSettings | Where-Object {$_.Name -eq $}).Value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.