WMI
Overview
- In this mode first the powershell script is copied from the windows agent server to the configured device machine. Powershell script is executed in a configured device with use of WMI command.
- User Account Control (UAC) affects the WMI data that is returned from a command-line tool, remote access, and how scripts must run. For more details refer to User Account Control and WMI - Win32 apps | Microsoft Learn.
- In WMI mode, AppViewX generates PowerShell scripts that are executed on the target machine. This process necessitates special access to the drive of the end machine in order to execute the scripts effectively.
- The WMI command used to execute the script itself necessitates admin privileges.
Recommended Usage
- This mode is relatively older and slower when compared with Powershell mode.
- This mode is generally chosen only when remote execution privileges (Powershell remoting permissions are disabled) are not given to the user account in the target machine.
- WMI is enabled by default on many Windows servers.
- DCOM remains integrated into the Windows OS and is used by the Windows services to communicate, such as Microsoft Management Console certificate store.
- Organizations that prefer not to use PowerShell remoting or WinRM can use DCOM (WMI) as a communication method.
- It is commonly used in older Windows servers, such as Windows Server 2012 or 2008 R2.
Standard remote WMI queries use RPC to connect and RPC in turn uses a mess of ports. Initially, the Collector connects to the remote system via TCP port 135. The remote system then selects a high port and instructs the Collector to use this new port for subsequent communications. The high port depends on the OS but the current Windows OS uses ports 49152 to 65535.
PORTS USED: 445, 135 + dynamic port: 49152-65534
To use a static DCOM port for WMI in Windows, instead of numerous high ports, please follow the instructions on the Microsoft site for allocating a static port for WMI communication. Refer to Setting Up a Fixed Port for WMI | Microsoft Learn.
Permissions and Port Requirements
| Requirement | AppViewX Windows Gateway | Target Server |
|---|---|---|
| User account type | Service account with local admin | Service account with local admin |
| Services | WMI Service certutil.exe command availability |
WMI Service certutil.exe command availability |
| Ports | 8999 (Customisable) 445 - SMB 135 RPC Port 49152-65535 - Dynamic Ports |
445 - SMB 135 RPC Port 49152-65535 - Dynamic Ports |