Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Get-Details {
- param (
- $subject
- )
- New-UDEndpoint -Id "Get-Details" -Endpoint {
- $TableData = @(
- [PSCustomObject]@{Name = "Username"; Value = $subject.UserPrincipalName; Sort = "1"}
- [PSCustomObject]@{Name = "Name"; Value = $subject.Name; Sort = "2"}
- [PSCustomObject]@{Name = "House"; Value = $subject.St; Sort = "3"}
- [PSCustomObject]@{Name = "Enabled?"; Value = ($subject.Enabled).tostring() ; Sort = "4"}
- [PSCustomObject]@{Name = "Locked?"; Value = $(if ($subject.LockedOut -eq $false) {"Nope"} else {"Yep"}); Sort = "5"}
- ).GetEnumerator()
- Show-UDModal -Header {
- New-UDHeading -Size 4 -Text "Here's what we have on $($subject.Name)"
- } -Content {
- New-UDCard -Title "Account Details" -Content {
- New-UDTable -Headers @("Attribute", "Value") -Endpoint {
- $TableData | Sort-Object Sort | Out-UDTableData -Property @("Name", "Value")
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement