I’m trying to register(regsvr32) a library(OraOLEDB10.dll) on a remote computer running Windows 10 using PowerShell.
Invoke-Command -ComputerName $computer_name -ScriptBlock {regsvr32 /s c:\oracle\product\10.2.0\client_1\BIN\OraOLEDB10.dll}After execution, the command does not return anything, but the library is not registered either.
The library files are present on the remote computer.
asked Sep 12, 2023 at 6:52

If I use the – Credential, the result is the same.
Sep 12, 2023 at 8:32
Sep 12, 2023 at 8:55
Sep 12, 2023 at 9:02
Sep 12, 2023 at 10:03
Load 7 more related questions
Show fewer related questions
Обычно процесс отладки и дебага ошибок в работе службы обновлений выполняется с помощью анализа данных в логе %windir%\WindowsUpdate.log (в Windows 10 получить файл WindowsUpdate.log можно таким способом, а список кодов ошибок, можно посмотреть здесь). Количество возможных ошибок, с которыми может столкнуться администратор при анализе этого файла исчисляется десятками и процесс их разрешения в основном нетривиальный. Чтобы избежать лишних телодвижений и не терять время, гораздо проще сначала произвести полный сброс настроек агента и службы Windows Update и начать с чистого листа.
Средство устранения неполадок Центра обновления Windows
Перед тем как приступить к сбросу конфигурации центра обновления Windows, настоятельно рекомендуем вам попробовать встроенное средство для автоматического исправления проблем в службе обновления Windows – инструмент устранения неполадок Центра обновления Windows (Windows Update Troubleshooter). Это может значительно повысить эффективность процесса и помочь вам избежать необходимости сбрасывать конфигурацию.
- Windows 11 — Параметры -> Система -> Устранение неполадок -> Другие средства устранения неполадок -> Центр обновления Windows;
- Windows 10 – скачите wu10.diagcab по ссылке https://aka.ms/wudiag , либо запустите локальную версию инструмента: Пуск -> Параметры -> Обновления и безопасность -> Устранение неполадок -> Центр обновлений Windows -> Дополнительные средства устранения неполадок
Для быстрого доступа к средствам исправления неполадок Windows можно использовать команду (Win+R ms-settings: ms-settings:troubleshoot)
Сброс настроек Windows Update с помощью PowerShell
Вы можете использовать PowerShell модуль PSWindowsUpdate для сброса настроек агента и службы Windows Update.
Установите модуль на свой компьютер из галереи скриптов PSGallery:
Install-Module -Name PSWindowsUpdate
Разрешите запуск PowerShell скриптов:
Set-ExecutionPolicy –ExecutionPolicy RemoteSigned -force
Если при выполнении команд будут возникать ошибки, то стоит ознакомиться:
Команда Reset-WUComponents выполняет действия, по остановке служб, перерегистрации dll и очистке каталога C:\Windows\SoftwareDistribution/
Запустите поиск обновлений из панели управления или выполните поиск доступных обновлений с помощью команды PowerShell:
Get-WUList или Get-WindowsUpdate
Утилита Reset Windows Update Tool
Для загрузки предлагается скомпилированный exe файл (C++) или обычный скрипт.
- Скачайте Portable.zip и распакуйте на диск;
- Запустите файл wureset.exe с правами администратора;
- Скрипт определит вашу версию ОС (в моем примере это Windows 10) и предложит 18 различных опций. Некоторые из них напрямую не относятся к сбросу настроек агента WU, но могут быть полезны для исправления различных неисправностей в Windows (проверка диска chkdsk, исправление ошибок в образе Windows с помощью DISM, сброс Winsock, очистка временных файлов и т.д.);
- Для сброса настроек Windows Update достаточно использовать опцию 2 — Resets the Windows Update Components (Сбросить компоненты службы обновления Windows). Нажмите 2 и Enter;
- Скрипт автоматически выполнит все действия, которые мы описали выше при выполнении ручного сброса агента обновлений Windows из командной строки.
- После окончания работы скрипта Reset Windows Update Agent перезагрузите компьютер и проверьте работу службы обновлений.
Программа универсальна и подходит не только для Windows 10/11, но и для более старых версий (до WindowsXP включительно).
Восстановление исходных настроек Windows Update из командной строки
С помощью данного скрипта можно полностью сбросить конфигурацию службы Центра обновлений Windows, и очистить локальный кэш обновлений. Скрипт является универсальный и будет работать как в Windows 11/10/8.1/7, так и в Windows Server 2022/2019/2016/2012 R2/2008 R2. Скрипт помогает устранить большинство типовых ошибок в работе службы Windows Update, когда центр обновлений перестает загружать новые обновления или пишет, что при установке обновления возникают ошибки.
Убедитесь, что настройки Windows Update на вашем компьютере на задаются с помощью доменных или локальных политик
Итак, по порядку о том, что нужно сделать (готовый скрипт находится в первом посте темы):
- Остановить службы Windows Update (Центр обновлений Windows), BITS и службы криптографии:
net stop bits net stop wuauserv net stop appidsvc net stop cryptsvc taskkill /im wuauclt.exe /f - Удалить служебных файлы qmgr*.dat в каталоге %ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\:
Del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat" - Переименовать служебные каталоги, в которых хранятся конфигурационные файлы и кэш обновлений (в случае необходимости их можно будет использовать как резервные копии). После перезапуска службы обновления, эти каталоги автоматически пересоздадутся:
Ren %systemroot%\SoftwareDistribution SoftwareDistribution.bak Ren %systemroot%\system32\catroot2 catroot2.bak - Удаление старого журнала windowsupdate.log
del /f /s /q %windir%\windowsupdate.log - Сброс разрешений на службы BITS и Windows Update (в случае, если права на службы были изменены)
sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY) (A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA) (A;;CCLCSWLOCRRC;;;AU) (A;;CCLCSWRPWPDTLOCRRC;;;PU) sc.exe sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY) (A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA) (A;;CCLCSWLOCRRC;;;AU) (A;;CCLCSWRPWPDTLOCRRC;;;PU) sc.exe sdset cryptsvc D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD) sc.exe sdset trustedinstaller D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD) - Перерегистрация файлов системных динамических библиотек (dll), связанных со службами BITS и Windows Update:
cd /d %windir%\system32 regsvr32.exe /s atl.dll regsvr32.exe /s urlmon.dll regsvr32.exe /s mshtml.dll regsvr32.exe /s shdocvw.dll regsvr32.exe /s browseui.dll regsvr32.exe /s jscript.dll regsvr32.exe /s vbscript.dll regsvr32.exe /s scrrun.dll regsvr32.exe /s msxml.dll regsvr32.exe /s msxml3.dll regsvr32.exe /s msxml6.dll regsvr32.exe /s actxprxy.dll regsvr32.exe /s softpub.dll regsvr32.exe /s wintrust.dll regsvr32.exe /s dssenh.dll regsvr32.exe /s rsaenh.dll regsvr32.exe /s gpkcsp.dll regsvr32.exe /s sccbase.dll regsvr32.exe /s slbcsp.dll regsvr32.exe /s cryptdlg.dll regsvr32.exe /s oleaut32.dll regsvr32.exe /s ole32.dll regsvr32.exe /s shell32.dll regsvr32.exe /s initpki.dll regsvr32.exe /s wuapi.dll regsvr32.exe /s wuaueng.dll regsvr32.exe /s wuaueng1.dll regsvr32.exe /s wucltui.dll regsvr32.exe /s wups.dll regsvr32.exe /s wups2.dll regsvr32.exe /s wuweb.dll regsvr32.exe /s qmgr.dll regsvr32.exe /s qmgrprxy.dll regsvr32.exe /s wucltux.dll regsvr32.exe /s muweb.dll regsvr32.exe /s wuwebv.dll - Сброс параметров Winsock
- Сброс параметров системного прокси
netsh winhttp reset proxy - Опционально. При использовании локального сервера WSUS, возможно дополнительно сбросить текущую привязку клиента к серверу WSUS путем удаления следующих параметров в ветке реестра
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate: REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v AccountDomainSid /f REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v PingID /f REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientId /f REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v TargetGroup /f REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v WUServer /f REG DELETE "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v WUStatusServer /f - Запуск остановленных служб:
sc.exe config wuauserv start= auto sc.exe config bits start= delayed-auto sc.exe config cryptsvc start= auto sc.exe config TrustedInstaller start= demand sc.exe config DcomLaunch start= auto net start bits net start wuauserv net start appidsvc net start cryptsvc - Опционально. Для Windows 7 и 8.1 можно установить/переустановить последнюю версию агента Windows Update Agent (WUA). Скачать актуальную версию агента можно со страницы Update Windows Update Agent to latest version – Windows Client. Нужно скачать файл для вашей версии Windows
Актуальная версия агента WUA для Windows 7 SP1 x64 — 7.6. Принудительная переустановка агента WindowsUpdate выполняется следующими командами:для Windows 7 x86: WindowsUpdateAgent-7.6-x86.exe /quiet /norestart /wuforce
для Windows 7 x64: WindowsUpdateAgent-7.6-x64.exe /quiet /norestart /wuforceСовет. Текущую версию агента Windows Update Agent (WUA) в Windows 7 можно узнать в свойствах файла %windir%\system32\Wuaueng.dll. В нашем примере это 7.6.7600.256.

Осталось перезагрузить компьютер и запустить синхронизацию с сервером Windows Update /WSUS.
wuauclt /resetauthorization /detectnow
Затем зайдите в Центр обновления и проверьте, пропали ли проблемы при поиске, скачивании и установке обновлений.
@echo off
REM Script to Reset Windows Updates agent
REM Stop Services
net stop bits
net stop wuauserv
net stop appidsvc
net stop cryptsvc
taskkill /im wuauclt.exe /f
REM Delete the qmgr*.dat files
Del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat"
REM Rename folders
Ren %systemroot%\SoftwareDistribution SoftwareDistribution.bak
Ren %systemroot%\system32\catroot2 catroot2.bak
REM Reset services permissions
sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
sc.exe sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)
sc.exe sdset cryptsvc D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD)
sc.exe sdset trustedinstaller D:(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCDCLCSWRPWPDTLCRSDRCWDWO;;;SO)(A;;CCLCSWRPWPDTLOCRRC;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;WD)
REM ReRegister services
cd /d %windir%\system32
regsvr32.exe /U /s vbscript.dll
regsvr32.exe /U /s mshtml.dll
regsvr32.exe /U /s msjava.dll
regsvr32.exe /U /s msxml.dll
regsvr32.exe /U /s actxprxy.dll
regsvr32.exe /U /s shdocvw.dll
regsvr32.exe /U /s Mssip32.dll
regsvr32.exe /U /s wintrust.dll
regsvr32.exe /U /s initpki.dll
regsvr32.exe /U /s dssenh.dll
regsvr32.exe /U /s rsaenh.dll
regsvr32.exe /U /s gpkcsp.dll
regsvr32.exe /U /s sccbase.dll
regsvr32.exe /U /s slbcsp.dll
regsvr32.exe /U /s cryptdlg.dll
regsvr32.exe /U /s Urlmon.dll
regsvr32.exe /U /s Oleaut32.dll
regsvr32.exe /U /s msxml2.dll
regsvr32.exe /U /s Browseui.dll
regsvr32.exe /U /s shell32.dll
regsvr32.exe /U /s atl.dll
regsvr32.exe /U /s jscript.dll
regsvr32.exe /U /s msxml3.dll
regsvr32.exe /U /s softpub.dll
regsvr32.exe /U /s wuapi.dll
regsvr32.exe /U /s wuaueng.dll
regsvr32.exe /U /s wuaueng1.dll
regsvr32.exe /U /s wucltui.dll
regsvr32.exe /U /s wups.dll
regsvr32.exe /U /s wups2.dll
regsvr32.exe /U /s wuweb.dll
regsvr32.exe /U /s scrrun.dll
regsvr32.exe /U /s msxml6.dll
regsvr32.exe /U /s ole32.dll
regsvr32.exe /U /s qmgr.dll
regsvr32.exe /U /s qmgrprxy.dll
regsvr32.exe /U /s wucltux.dll
regsvr32.exe /U /s muweb.dll
regsvr32.exe /U /s wuwebv.dll
regsvr32.exe /s vbscript.dll
regsvr32.exe /s mshtml.dll
regsvr32.exe /s msjava.dll
regsvr32.exe /s msxml.dll
regsvr32.exe /s actxprxy.dll
regsvr32.exe /s shdocvw.dll
regsvr32.exe /s Mssip32.dll
regsvr32.exe /s wintrust.dll
regsvr32.exe /s initpki.dll
regsvr32.exe /s dssenh.dll
regsvr32.exe /s rsaenh.dll
regsvr32.exe /s gpkcsp.dll
regsvr32.exe /s sccbase.dll
regsvr32.exe /s slbcsp.dll
regsvr32.exe /s cryptdlg.dll
regsvr32.exe /s Urlmon.dll
regsvr32.exe /s Oleaut32.dll
regsvr32.exe /s msxml2.dll
regsvr32.exe /s Browseui.dll
regsvr32.exe /s shell32.dll
regsvr32.exe /s Mssip32.dll
regsvr32.exe /s atl.dll
regsvr32.exe /s jscript.dll
regsvr32.exe /s msxml3.dll
regsvr32.exe /s softpub.dll
regsvr32.exe /s wuapi.dll
regsvr32.exe /s wuaueng.dll
regsvr32.exe /s wuaueng1.dll
regsvr32.exe /s wucltui.dll
regsvr32.exe /s wups.dll
regsvr32.exe /s wups2.dll
regsvr32.exe /s wuweb.dll
regsvr32.exe /s scrrun.dll
regsvr32.exe /s msxml6.dll
regsvr32.exe /s ole32.dll
regsvr32.exe /s qmgr.dll
regsvr32.exe /s qmgrprxy.dll
regsvr32.exe /s wucltux.dll
regsvr32.exe /s muweb.dll
regsvr32.exe /s wuwebv.dll
REM reset winsock
netsh winsock reset
REM reset proxy
netsh winhttp reset proxy
REM restart services
sc.exe config wuauserv start= auto
sc.exe config bits start= delayed-auto
sc.exe config cryptsvc start= auto
sc.exe config TrustedInstaller start= demand
sc.exe config DcomLaunch start= auto
net start bits
net start wuauserv
net start appidsvc
net start cryptsvc
REM Install the latest Windows Update Agent.
start http://support.microsoft.com/kb/949104Источники Заметки IT профессионала, Microsoft Support
-
1 KB
· Просмотры: 4
SYNOPSIS
Register or unregister a DLL file.
SYNTAX
DESCRIPTION
Register or unregister a DLL file using regsvr32.exe.
Function can be invoked using alias: ‘Register-DLL’ or ‘Unregister-DLL’.
EXAMPLES
EXAMPLE 1
Register DLL file using the “Register-DLL” alias for this function
EXAMPLE 2
Unregister DLL file using the “Unregister-DLL” alias for this function
EXAMPLE 3
Register DLL file using the actual name of this function
PARAMETERS
-FilePath
Path to the DLL file.
Accept pipeline input
Accept wildcard characters
-DLLAction
Specify whether to register or unregister the DLL.
Optional if function is invoked using ‘Register-DLL’ or ‘Unregister-DLL’ alias.
Accept pipeline input
Accept wildcard characters
-ContinueOnError
Continue if an error is encountered.
Default is: $true.
Accept pipeline input
Accept wildcard characters
CommonParameters
INPUTS
None
You cannot pipe objects to this function.
OUTPUTS
None
This function does not return objects.
NOTES
However, to make sure the data transfer between applications work , these OLE controls must be registered on the system. How can we do that? That’s what we will show you in this article.
How to Register DLL/OCX with VBscript?
Option Explicit
On Error Resume Next
Dim strCmd,WshShell,strInstalldir
Set WshShell = CreateObject("WScript.Shell")
strSysRoot = WshShell.ExpandEnvironmentStrings( "%SYSTEMROOT%" )
strInstalldir = strSysRoot & "\DLL"
strCmd = "regsvr32.exe " & chr(34) & strInstalldir & "\libifcoremd.dll" & chr(34)& “ /s”
WshShell.Run strCmd- Option Explicit: This statement enforces variable declaration in the script, ensuring that all variables are explicitly declared before they are used.
- On Error Resume Next: This statement allows the script to continue running even if an error occurs, bypassing the error and continuing with the next line of code.
- Dim strCmd, WshShell, strInstalldir: Declares three variables: strCmd to hold the command to be executed, WshShell to access the Windows Script Host Shell object, and strInstalldir to store the path to the DLL file.
- Set WshShell = CreateObject(“WScript.Shell”): Creates an instance of the Windows Script Host Shell object, which allows the script to run shell commands and interact with the Windows environment.
- strSysRoot = WshShell.ExpandEnvironmentStrings(“%SYSTEMROOT%”): Retrieves the value of the %SYSTEMROOT% environment variable using the ExpandEnvironmentStrings method of the WshShell object. The %SYSTEMROOT% variable represents the path to the Windows installation directory.
- strInstalldir = strSysRoot & “\DLL”: Constructs the path to the DLL file by appending the “\DLL” folder to the strSysRoot variable. This assumes that the DLL file is located in the “DLL” folder within the Windows installation directory.
- strCmd = “regsvr32.exe ” & chr(34) & strInstalldir & “\libifcoremd.dll” & chr(34) & ” /s”: Constructs the command to be executed. It uses the regsvr32.exe utility to register a DLL file (libifcoremd.dll). The path to the DLL file is obtained by combining strInstalldir with the relative path \libifcoremd.dll. The chr(34) is used to insert double quotes into the command string, and /s is a parameter to silently register the DLL without displaying any user interface.
- WshShell.Run strCmd: Executes the command stored in the strCmd variable using the Run method of the WshShell object. This runs the command in a separate process.
Option Explicit
On Error Resume Next
Dim strCmd,WshShell,strInstalldir
Set WshShell = CreateObject("WScript.Shell")
strSysRoot = WshShell.ExpandEnvironmentStrings( "%SYSTEMROOT%" )
strInstalldir = strSysRoot & "\DLL"
strCmd = "regsvr32.exe /U " & chr(34) & strInstalldir & "\libifcoremd.dll" & chr(34)& “ /s”
WshShell.Run strCmd- Now that the scripts are created, we need to open Advanced Installer and navigate to the Custom Actions page.
- There, search for the Launch attached file predefined custom action and add it into the sequence.
- Select your previously created registration script and configure the custom action as follows:

We also want to unregister the DLL during uninstallation, so let’s create another custom action the same way as we did previously. Except this time, select the unregister script and configure the Custom Action as seen below:

And that is it, all you need to do is Build the MSI and install it. The DLL will be registered.
How to Register DLL/OCX with PowerShell?
$Arguments = "C:\Windows\DLL\libifcoremd.dll", "/s" Start-Process -FilePath 'regsvr32.exe' -Args $Arguments -Wait -NoNewWindow -PassThru
- $Arguments: Declares a variable to hold the arguments for the regsvr32.exe command and assigns the arguments to be passed to the regsvr32.exe command. The first argument is the path to the DLL file (C:\Windows\DLL\libifcoremd.dll), and the second argument (/s) is a parameter to silently register the DLL without displaying any user interface.
- Start-Process -FilePath ‘regsvr32.exe’ -Args $Arguments -Wait -NoNewWindow -PassThru: Executes the regsvr32.exe command using the Start-Process cmdlet. The -FilePath parameter specifies the path to the executable (regsvr32.exe). The -Args parameter specifies the arguments to be passed to the executable, which are stored in the $Arguments variable. The -Wait parameter ensures that the script waits for the command to complete before continuing. The -NoNewWindow parameter prevents the command from opening a new window. The -PassThru parameter returns an object representing the newly created process, allowing for further interaction if needed.
$Arguments = “/u”,"C:\Windows\DLL\libifcoremd.dll", "/s" Start-Process -FilePath 'regsvr32.exe' -Args $Arguments -Wait -NoNewWindow -PassThru
- When the scripts are created, we navigate to the Custom Actions page.
- Search for the Run PowerShell script file predefined Custom Action and add it in the sequence.
- Once we select the registration PowerShell script, we can proceed to configure the Custom Actions as follows:


And you’re done, now you can Build the MSI and install it. The DLL will be registered.
How to Register DLL/OCX with Advanced Installer?
Advanced Installer makes it much easier to handle OLE control registration by providing a Registration Tab GUI.
Accessing the GUI is quite easy with these steps:
- First navigate to the Files and Folders page
- Add the DLL/OCX files.
- Once the files are added, right-click on the DLL/OCX and select Properties.
- Then, navigate to the Registration Tab.

As you may notice, there are three methods for registering files, two for native libraries and one for .NET assemblies.
– Self-register native library
This file is marked for self-registration, however, the self-registration method for registering components has many drawbacks (like not being able to roll back the changes if something fails later in the install) and it is against Microsoft guidelines.
– Extract registration info from the native library
All the necessary registry entries and keys are installed separately. You can see them in the Registry and COM pages. This is the preferred way to register a file.
– Register .NET assembly for COM interoperability
It creates the required registry entries so that your assembly is operable through COM. You can see those registry entries in the Registry page.
Description
Detects various anomalies in relation to regsvr32.exe. This rule is adapted from https://github.com/SigmaHQ/sigma/blob/master/rules/windows/process_creation/proc_creation_win_regsvr32_anomalies.yml
MITRE ATT&CK® Techniques
Signed Binary Proxy Execution: Regsvr32
Data Source
Windows Sysmon via FortiSIEM Agent
Remediation Guidance
No remediation guidance specified
Time Window
300 secondsTrigger Conditions
FilterSubPattern Definitions
SubPattern Name: Filter
This is the named definition of the event query, this is important if multiple subpatterns are defined to distinguish them.
SubPattern Query
This is the query logic that matches incoming events
eventType="Win-Sysmon-1-Create-Process" AND ((procName REGEXP "\\regsvr32\.exe$" AND command REGEXP ".*\\Temp\\.*") OR (procName REGEXP "\\regsvr32\.exe$" AND parentProcName REGEXP "\\powershell\.exe$|\\powershell_ise\.exe$|\\pwsh\.exe$") OR (procName REGEXP "\\regsvr32\.exe$" AND parentProcName REGEXP "\\cmd\.exe$") OR (procName REGEXP "\\regsvr32\.exe$" AND command REGEXP ".*/i:.*" AND command REGEXP ".*http.*" AND command REGEXP "scrobj\.dll$") OR (procName REGEXP "\\regsvr32\.exe$" AND command REGEXP ".*/i:.*" AND command REGEXP ".*ftp.*" AND command REGEXP "scrobj\.dll$") OR (procName REGEXP "\\cscript\.exe$|\\wscript\.exe$" AND parentProcName REGEXP "\\regsvr32\.exe$") OR (procName REGEXP "\\EXCEL\.EXE$" AND command REGEXP ".*\.\.\\\.\.\\\.\.\\Windows\\System32\\regsvr32\.exe .*") OR (parentProcName REGEXP "\\mshta\.exe$" AND procName REGEXP "\\regsvr32\.exe$") OR (procName REGEXP "\\regsvr32\.exe$" AND command REGEXP ".*C:\\Users\\Public.*|.*\\AppData\\Local.*") OR (procName REGEXP "\\regsvr32\.exe$" AND command REGEXP "\.bin$|\.gif$|\.jpeg$|\.jpg$|\.png$|\.temp$|\.tmp$|\.txt$")) AND ((command NOT REGEXP ".*\\AppData\\Local\\Microsoft\\Teams.*|.*\\AppData\\Local\\WebEx\\WebEx64\\Meetings\\atucfobj\.dll.*") AND (parentProcName!="C:\\Program Files\\Box\\Box\\FS\\streem.exe" OR command NOT REGEXP ".*\\Program Files\\Box\\Box\\Temp\\.*") AND (command NOT REGEXP "/s C:\\Windows\\System32\\RpcProxy\\RpcProxy\.dll$"))Group by Attributes
This defines how matching events are aggregated, only events with the same matching attribute values are grouped into one unique incident ID
command,hostName,parentProcName,procNameAggregate Constraint
This is most typically a numerical constraint that defines when the rule should trigger an incident
COUNT(*) >= 1Incident Attribute Mapping
This section defines which fields in matching raw events should be mapped to the incident attributes in the resulting incident.
The available raw event attributes to map are limited to the group by attributes and the aggregate event constraint fields for each subpattern
command = Filter.command,
hostName = Filter.hostName,
parentProcName = Filter.parentProcName,
procName = Filter.procName



