Enable and configure PowerShell script in Active Directory

Configure the Okta Active Directory agent to securely run a custom PowerShell script in your on-premises environment. Use this feature to execute custom lifecycle management (LCM) functionalities through PowerShell.

Before you begin

  • You've installed Okta AD agent version 3.23.0 or later.
  • A PowerShell script (.ps1) resides at an absolute file path on the AD server.
  • The script is signed on the device using a private key.
  • You have the corresponding public key or certificate. Okta accepts PEM-encoded RSA public keys, PEM-encoded public keys, and X.509 certificates (.crt or .cer).

Procedure

  1. In the Admin Console, go to Directory > Directory Integrations.
  2. Select your Active Directory instance.
  3. Click the Provisioning tab, and then select PowerShell script in the Settings list.
  4. Select Enable PowerShell script execution.
  5. In PowerSchell script file path, enter the absolute path of the script.
  6. Optional. Enter a Description for the script.
  7. In Public key, click Add files to upload the public key or certificate.
  8. Click Save.
  9. Complete the authentication to verify your identity and save the configuration.

The script is configured and ready for invocation through Okta Workflows using the Okta public API.