Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dataGrid strange console output on exit #18

Closed
gferen opened this issue Nov 17, 2021 · 2 comments
Closed

dataGrid strange console output on exit #18

gferen opened this issue Nov 17, 2021 · 2 comments

Comments

@gferen
Copy link

gferen commented Nov 17, 2021

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.

@KillrOfLife
Copy link

This has probably already been fixed but if you want to remove the output just use this:
$anybox | Show-AnyBox | Out-Null

@fresh2dev
Copy link
Owner

Glad you figured it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants