From 8aca2b8607509481631b8ea2c352b2ad96547b47 Mon Sep 17 00:00:00 2001 From: Erik Date: Mon, 23 Dec 2024 09:05:49 -0700 Subject: [PATCH] attempt 1 --- GLPI-vs-AD.ps1 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 GLPI-vs-AD.ps1 diff --git a/GLPI-vs-AD.ps1 b/GLPI-vs-AD.ps1 new file mode 100644 index 0000000..1eac3cc --- /dev/null +++ b/GLPI-vs-AD.ps1 @@ -0,0 +1,22 @@ +<# +.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 + +} \ No newline at end of file