Created WatchDog class in PCMonitor to more easily track computer status
This commit is contained in:
parent
a6ce35375c
commit
4c7146890a
|
|
@ -93,6 +93,7 @@ Function Get-PC {
|
||||||
[switch]$InstallNet35,
|
[switch]$InstallNet35,
|
||||||
[switch]$Jobsprinters,
|
[switch]$Jobsprinters,
|
||||||
[Switch]$LogOffUser,
|
[Switch]$LogOffUser,
|
||||||
|
[Switch]$Monitor,
|
||||||
[Switch]$NextPrinterName,
|
[Switch]$NextPrinterName,
|
||||||
[switch]$Orion,
|
[switch]$Orion,
|
||||||
[Switch]$PatchNotes,
|
[Switch]$PatchNotes,
|
||||||
|
|
@ -529,7 +530,7 @@ Function Get-PC {
|
||||||
Get-InstallNet35 $comp
|
Get-InstallNet35 $comp
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
#Checks if there is a WinRM service error
|
#Checks if there is a WinRM service error
|
||||||
#TODO Re-evaluate where we want the WSNetwork test
|
#TODO Re-evaluate where we want the WSNetwork test
|
||||||
#$WSNetworkTest = Test-WSMan -ComputerName $comp
|
#$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
|
#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)
|
$outPutArray += Get-PCBatchInvoke($getPCComputers)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue