Active Directory Initial Setup
if your environment requires WMI port configuration or a custom Windows share, complete the following steps before connecting the Active Directory Certificate Service (AD CS) or Active Directory Federation Service (AD FS) adapters.
Setting Up a Fixed Port for WMI
The AD CS and AD FS adapters use WMI. WMI runs as part of a shared service host with ports assigned through DCOM by default. However, you can set up the WMI service to run as the only process in a separate host and specify a fixed port. For more details, see Microsoft Documentation - Setting Up a Fixed Port for WMI.
To set up a fixed port for WMI:
- At the command prompt, type:
winmgmt -standalonehost
- Stop the WMI service by typing:
net stop "Windows Management Instrumentation"
or:
net stop winmgmt
- Restart the WMI service again in a new service host by typing:
net start "Windows Management Instrumentation"
or:
net start winmgmt
- Establish a new port number for the WMI service by typing (e.g. the following example will establish port TCP 24158):
netsh advfirewall firewall add portopening TCP 24158 WMIFixedPort
Note
If you are running an old Windows Server version, it might need to run the deprecated command version (
netsh firewall).
To undo any changes you make to WMI, type:
winmgmt /sharedhost
Then stop and start the winmgmt service again.
Creating a Custom Share
You can create a custom share and directory instead of ADMIN$ \ axonius. A custom share that is properly configured enables you to not require full local admin permissions to fetch data.
To create a custom share:
-
Create a local user, such as 'axonius-usr'.
-
Add the user to the following groups:
- Distributed COM Users
- Remote Management Users
-
Create a directory for Axonius to use to store temporary files and to serve as a working directory, for example: C:\axonius.
The name of this directory may be used later in the adapter configuration in Axonius. -
Grant the following permissions to the local user:
- Read
- Write
- Modify
- Execute (or full control) permissions on the custom directory, subdirectories, and files
-
Share the directory that you created by using Sharing or Advanced Sharing. Verify that the local user has full permissions for this share. Specify a descriptive name for the shared directory, preferably a name which ends with a dollar-sign, such as: AxoniusShare$
The name of this share will be used later in the adapter configuration in Axonius. -
Open WMI Management (wmimgmt.msc). Under Security, select Root (minimal: root/cimv2) namespace.
-
Click Security. Add the local user.
-
Click Advanced.
-
From the Applies to dropdown, select This namespace and subnamespaces.
-
Under the Allow column for the local user, select the Execute Methods, Enable Account, and Remote Enable options, and then click OK.
-
In Axonius, verify that the Custom Share Name and Custom Files Directory parameters are configured. The adapter will attempt to create the specified directory under the share.
-
If the above step fails, it means some sharing options are not enabled on the server. In such a case, add the full path to the share under Custom Working Directory.
Note
When using Custom Working Directory, this directory must be identical to all adapter connections, and must be specified in all adapter connections, even if using a local admin. Only use this option as a last resort.
Updated 18 days ago
