Hey @BoSen29,
Thanks for taking the time to explain this
it’s very much appreciated.
I spent some time earlier trying to use your recommendation but couldn’t figure out exactly where to use the casting or how to format it.
I did actually find a fix which works in a Get-Service table so assume it will also work in my Get-ADPrincipalgroupmembership table. I tried in my home lab but for some reason, that is actually returning the GroupScope as strings which is very confusing… I’ll have to wait until I get back to work to test in AD (or sneak upstairs to the office when the missus isn`t looking
)
I don’t want to be “that guy” who says, “yeah its fixed now k thx bai” so here’s what I ended up with for the Get-Service table:
$GetServices = Get-Service | Select-Object Name,DisplayName,@{ Name='Status'; Expression={ $_.Status.ToString() } }
$Rowcount = $GetServices.Count
Show-UDToast -Message $Rowcount
$Columns = @(
New-UDtableColumn -Property Name -Title "Name"
New-UDtableColumn -Property DisplayName -Title "DisplayName"
New-UDtableColumn -Property Status -Title "Status"
)
New-UDTable -Data $GetServices -Columns $Columns -PageSize $Rowcount