Trying to build a table to display MS Graph User Mail rules. Currently having issues displaying Actions (and likely conditions) as they are nested data within each rule.
Below is Get-Member of single rule.actions data. Only looking to display a few fields (delete/moveToFolder/…)
Stuck on how to write this in the New-UDTableColumn.
Things have tried:
CustomObject
New-UDTableColumn -Property Actions -Title Actions -Sort $True -Render {
$Actions = [pscustomobject] @{
Delete = $EventData.Actions.Delete
ForwardTo = $EventData.Actions.ForwardTo
MoveToFolder = $EventData.Actions.MoveToFolder
PermanentDelete = $EventData.Actions.PermanentDelete
RedirectTo = $EventData.Actions.RedirectTo
}
$Actions
}
ForEach
New-UDTableColumn -Property Actions -Title Actions -Sort $True -Render {
ForEach ($ActionProperty in $ActionProperties) {
"$ActionProperty : $EventData.Actions.$ActionProperty"
}
}
Product: PowerShell Universal
Version: 2.28.2