Windows restart is pending, zabbix detection rule

For windows it is possible to create a batch to check the status:
Add new item at Template OS Windows
Name: RebootRequired
Type: Zabbix agent
Key:
system.run[reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" | find /C "RebootRequired"]
Type of information: Text
Create trigger:
{Template OS Windows:system.run[reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" | find /C "RebootRequired"].last(0)}#0
Warning:
EnableRemoteCommands=1 must be enabled on client side at zabbix_agentd.conf

Related:
https://docs.microsoft.com/en-us/previous-versions/office/exchange-server-analyzer/cc164360(v=exchg.80)
reg query "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired"
reg query "HKLM\SYSTEM\CurrentControlSet001\Control\Session Manager" /v PendingFileRenameOperations
reg query "HKLM\SOFTWARE\Microsoft\Updates" /v UpdateExeVolatile