Tip: Test for Tables Missing from Permission Sets

In PowerShell:

$tablesInPermissionSets = @()

$permissionSets = gci . -Recurse -Filter '*.al' | ? {(gc $_.FullName).Item(0).startsWith('permissionset')}
 $permissionSets | % {
    $content = gc $_.FullName -Raw
    [Regex]::Matches($content, '(?<=tabledata ).*(?= =)') | % {
        $tablesInPermissionSets += $_.Value
    }
 }

$tablesInTables = @()

$tables = gci . -Recurse...

Continue Reading james’s Article on their blog

Tip: Test for Tables Missing from Permission Sets

In PowerShell: $tablesInPermissionSets = @() $permissionSets = gci . -Recurse -Filter ‘*.al’ | ? {(gc $_.FullName).Item(0).startsWith(‘permissionset’)} $permissionSets | % { $content = gc $_.FullName -Raw [Regex]::Matches($content, ‘(?<=tabledata ).*(?= =)') | % { $tablesInPermissionSets += $_.Value } } $tablesInTables = @() $tables = gci . -Recurse -Filter '*.al' | Where-Object {(Get-Content $_.FullName).Item(0).StartsWith('table ')} $tables | %...

Blog Syndicated with james’s Permission

Author: James Pearson

Share This Post On