dataGrid strange console output on exit
Closed this issue · 2 comments
when the script finishes, there is a console output every time.
Name Value
Close False
grid_select
this is what I use:
`$anybox = New-Object AnyBox.AnyBox
$anybox.Title = 'Inactive Accounts'
$anybox.ContentAlignment = 'Center'
$anybox.MaxHeight = 1000
$anybox.GridData = @($90daysAgo = (Get-Date).AddDays(-90)
Get-ADUser -Property Name,lastLogonDate -Filter {lastLogonDate -lt $90daysAgo} -SearchBase 'OU=group,DC=contoso,DC=com' |
Where-Object { $_.DistinguishedName -notlike 'OU=Service Accounts,' }| Select Name,lastLogonDate, Enabled, DistinguishedName | Sort-Object -Property Name)
$anybox.Buttons = @(
New-AnyBoxButton -Text 'Close'
)
$anybox | Show-AnyBox`
I am a beginner with this sorry for such questions.
This has probably already been fixed but if you want to remove the output just use this:
$anybox | Show-AnyBox | Out-Null
Glad you figured it out.