Created WatchDog class in PCMonitor to more easily track computer status

This commit is contained in:
Zachary Gorman 2024-06-25 10:14:41 -07:00
parent a6ce35375c
commit 4c7146890a

View file

@ -93,6 +93,7 @@ Function Get-PC {
[switch]$InstallNet35,
[switch]$Jobsprinters,
[Switch]$LogOffUser,
[Switch]$Monitor,
[Switch]$NextPrinterName,
[switch]$Orion,
[Switch]$PatchNotes,
@ -529,7 +530,7 @@ Function Get-PC {
Get-InstallNet35 $comp
continue
}
#Checks if there is a WinRM service error
#TODO Re-evaluate where we want the WSNetwork test
#$WSNetworkTest = Test-WSMan -ComputerName $comp
@ -580,6 +581,12 @@ Function Get-PC {
}
}
# Monitor list of PCs for change in online status or
if ($Monitor) {
Invoke-PCMonitor $getPCComputers
return
}
#This is the get-pc of get-pc. It collects all the data from the computers and puts it in an array to be outputed
$outPutArray += Get-PCBatchInvoke($getPCComputers)