Skip to content

Commit

Permalink
Merge pull request #14 from dave-pollock/fix-nopropagateinherit
Browse files Browse the repository at this point in the history
Fix error when NoPropagateInherit set to true in cNtfsAuditRuleInformation
  • Loading branch information
SNikalaichyk authored Nov 1, 2018
2 parents 4169ddc + e502ef4 commit 50aed3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DSCResources/cNtfsAuditEntry/cNtfsAuditEntry.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ function Test-TargetResource
$AuditFlags = $Instance.CimInstanceProperties.Where({$_.Name -eq 'AuditFlags'}).ForEach({$_.Value})
$FileSystemRights = $Instance.CimInstanceProperties.Where({$_.Name -eq 'FileSystemRights'}).ForEach({$_.Value})
$Inheritance = $Instance.CimInstanceProperties.Where({$_.Name -eq 'Inheritance'}).ForEach({$_.Value})
$NoPropagateInherit = $Instance.CimInstanceProperties.Where({$_.Name -eq 'NoPropagateInherit'}).ForEach({$_.Value})
$NoPropagateInherit = [boolean]$Instance.CimInstanceProperties.Where({$_.Name -eq 'NoPropagateInherit'}).ForEach({$_.Value})

if (-not $AuditFlags)
{
Expand Down Expand Up @@ -387,7 +387,7 @@ function Set-TargetResource
$AuditFlags = $Instance.CimInstanceProperties.Where({$_.Name -eq 'AuditFlags'}).ForEach({$_.Value})
$FileSystemRights = $Instance.CimInstanceProperties.Where({$_.Name -eq 'FileSystemRights'}).ForEach({$_.Value})
$Inheritance = $Instance.CimInstanceProperties.Where({$_.Name -eq 'Inheritance'}).ForEach({$_.Value})
$NoPropagateInherit = $Instance.CimInstanceProperties.Where({$_.Name -eq 'NoPropagateInherit'}).ForEach({$_.Value})
$NoPropagateInherit = [boolean]$Instance.CimInstanceProperties.Where({$_.Name -eq 'NoPropagateInherit'}).ForEach({$_.Value})

if (-not $AuditFlags)
{
Expand Down

0 comments on commit 50aed3c

Please sign in to comment.