Skip to content

Instantly share code, notes, and snippets.

Created June 14, 2017 09:50
Show Gist options
  • Save anonymous/4f09954c41e85460787237e69fb7cc7e to your computer and use it in GitHub Desktop.
Save anonymous/4f09954c41e85460787237e69fb7cc7e to your computer and use it in GitHub Desktop.
Function Start {
param($computername =$env:COMPUTERNAME)
Get-WMIObject -ComputerName $computername | Select-Object @{Name='ComputerName';Ex={$computername}},`
@{Name=‘AD‘;Expression={$computername}},`
@{Name=‘GLPI’;Expression={$computername}},`
@{Name=‘ESET’;Expression={$computername}},`
@{Name=‘WSUS’;Expression={$computername}}
}
$WPFbutton.Add_Click({
start-sleep -Milliseconds 840
[string[]]$b = import-csv '.\test2.csv' | select -expand ComputerName
[string[]]$c = import-csv '.\test3.csv' | select -expand ComputerName
[string[]]$d = import-csv '.\test4.csv' | select -expand ComputerName
$b |? {$a -notcontains $_}
$c |? {$a -notcontains $_}
$d |? {$a -notcontains $_}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment