22 lines
402 B
PowerShell
22 lines
402 B
PowerShell
<#
|
|
.SYNOPSIS Script to compare GLPI Inventory to AD Computers.
|
|
#>
|
|
|
|
|
|
$InputFile = "C:\Users\eeckert\Downloads\glpi (2).csv"
|
|
|
|
$ADComputers = Get-ADComputer -Filter *
|
|
$InventoryData = Import-Csv $InputFile
|
|
|
|
|
|
$MachinesInAD = @()
|
|
$MachinesNotInAD = @()
|
|
$MachinesInGLPI = @()
|
|
$MachinesNotInGLPI = @()
|
|
|
|
|
|
foreach ($ADComputer in $ADComputers)
|
|
{
|
|
$MachineMatch = $ADComputer.Name -in $InventoryData.Name
|
|
|
|
} |