IAdmScriptCondition

The IAdmScriptCondition interface represents the If PowerShell script returns true condition.

Inheritance: IAdmCondition

Methods

  • Method

  • Description

  • CanRunAs()

  • Validates whether the specified user credentials can be used to run the script.

  • RunAs()

  • Sets the credentials to be used to run the script.

Properties

  • Property

  • Description

  • ScriptDescription

  • Gets or sets a short description of the script.

  • Script

  • Gets or sets the text of the PowerShell script that will be executed by the condition.

  • RunAsUsername

  • Gets the username of the account used to launch the script.

  • PowerShellInstalled

  • Gets a value indicating whether Windows PowerShell is installed on the computer where the Adaxes service is running.

Details

CanRunAs()

Validates whether the specified user credentials can be used to run the script. If the credentials cannot be used, the method throws an exception.

void CanRunAs(string username, string password)

RunAs()

Sets the credentials to be used to run the script.

void RunAs(string username, string password)

Remarks

If both parameters are set to null, the script will be executed using the credentials of the Adaxes service account.


ScriptDescription

Gets or sets a short description of the script.

  • Type:
  • string
  • Access:
  • Read/Write

Script

Gets or sets the text of the PowerShell script that will be executed by the condition. You can use value references in the script text (e.g. %username%). Before executing the script, Adaxes will replace the value references with corresponding property values of the directory object on which the script is executed.

  • Type:
  • string
  • Access:
  • Read/Write

RunAsUsername

Gets the username of the account used to launch the script.

  • Type:
  • string
  • Access:
  • Read-only

PowerShellInstalled

Gets a value indicating whether Windows PowerShell is installed on the computer where the Adaxes service is running.

  • Type:
  • bool
  • Access:
  • Read-only

Requirements

Minimum required version: 2012.1

See also