Class Script
- Namespace
- ArcanaDevelopment.adTempus.Client
- Assembly
- ArcanaDevelopment.adTempus.Client.dll
public sealed class Script : ADTIndependentObject
- Inheritance
-
objectScript
Properties
CID
The Class ID for the object
[IgnoreDataMember]
public override ClassID CID { get; }
Property Value
Remarks
Obsolete. Use ClassID instead.
CaptureOutput
Indicates whether the output from the script should be saved as a CapturedFile in the job history.
public bool CaptureOutput { get; set; }
Property Value
- bool
Remarks
Output can be captured only for PowerShell scripts. This option is ignored for other scripts.
ClassKeyName
The key name for the class.
public override string ClassKeyName { get; }
Property Value
- string
Remarks
This name the name used by adTempus to identify the class and is intended for programmatic use only. Use the ClassName for a user-friendly name.
Description
public string Description { get; set; }
Property Value
- string
ExtendedDescription
public override string ExtendedDescription { get; }
Property Value
- string
IncludeLibraries
public ScriptLibraryCollection IncludeLibraries { get; }
Property Value
IncludeScripts
Additional scripts to be deployed when this script is executed.
public ScriptCollection IncludeScripts { get; }
Property Value
Remarks
IncludeScripts are used only when the script is a batch file or PowerShell script. Any scripts referenced in IncludeScripts are written out to the ADTJobTemp directory when the target script is executed.
IsDependent
[IgnoreDataMember]
public override bool IsDependent { get; }
Property Value
- bool
MaxRunTime
public int MaxRunTime { get; set; }
Property Value
- int
Name
public string Name { get; set; }
Property Value
- string
References
public string References { get; set; }
Property Value
- string
RunIsolated
Indicates whether the script should be run by in an isolated instance of the script hosting process.
public bool RunIsolated { get; set; }
Property Value
- bool
Remarks
If True, the script is hosted in its own instance of the script hosting process. If False (the default) it may share the host process with other scripts being run for the same user.
ScriptBody
public string ScriptBody { get; set; }
Property Value
- string
ScriptLanguage
public string ScriptLanguage { get; set; }
Property Value
- string
ScriptOptions
public ScriptOptions ScriptOptions { get; set; }
Property Value
Shared
public bool Shared { get; set; }
Property Value
- bool
Use32BitHost
Indicates whether this script should be run by the 32-bit script host.
public bool Use32BitHost { get; set; }
Property Value
- bool
Remarks
Setting/clearing Use32BitHost is equivalent to setting/clearing the Use32BitHost flag in ScriptOptions.
The 32-bit host is automatically used for Windows Script Host scripts (VBScript, JScript). All others use the 64-bit host unless this option is set.
Methods
FindOwningObject()
Get the owner of this object based on relationships.
protected override ADTObject FindOwningObject()
Returns
- ADTObject
The owning object, or null if the object is not owned by another object or the owner has not been set.
GetObjectDescription()
Gets a description of the object's key settings.
protected override string GetObjectDescription()
Returns
- string
Remarks
This method is called by GetDescription() to get a user-friendly description of the object (such as its key settings) for display to the user. The description should contain enough information to distinguish this object from others of the same class.
- See Also
TestScript(CredentialProfile)
Executes the script to test it.
public MessageCollection TestScript(CredentialProfile credentials)
Parameters
| Name | Type | Description |
|---|---|---|
credentials |
CredentialProfile | Optional CredentialProfile representing the identity to run the script under. If no profile is provided, the client identity is used. The caller must have Use permission for the profile. |
Returns
- MessageCollection
A collection of messages containing any messages from the execution. If execution was successful, an informational message will be included.
ValidateScript(CredentialProfile)
Validates the script by compiling it and checking for errors.
public MessageCollection ValidateScript(CredentialProfile credentials)
Parameters
| Name | Type | Description |
|---|---|---|
credentials |
CredentialProfile | Optional CredentialProfile representing the identity to validate the script under. If no profile is provided, the client identity is used. The caller must have Use permission for the profile. |
Returns
- MessageCollection
A collection of messages containing any validation warning or errors. If validation was successful, an informational message will be included.
WriteToConfigurationReport(IADTObjectConfigurationReportWriter)
public override void WriteToConfigurationReport(IADTObjectConfigurationReportWriter reportBuilder)
Parameters
| Name | Type | Description |
|---|---|---|
reportBuilder |
IADTObjectConfigurationReportWriter |
Inherited Members
- ADTIndependentObject.Refresh()
- ADTIndependentObject.Revert()
- ADTIndependentObject.Save()
- ADTIndependentObject.SaveWithAuditOrSnapshot(ChangeLogParameters)
- ADTIndependentObject.Save(out MessageCollection)
- ADTIndependentObject.SaveWithAuditOrSnapshot(ChangeLogParameters, out MessageCollection)
- ADTIndependentObject.Delete()
- ADTIndependentObject.DeleteWithAuditOrSnapshot(ChangeLogParameters)
- ADTIndependentObject.GetSecurityDescriptor()
- ADTIndependentObject.ReplaceObjectReferences(string[], bool, int, IEnumerable<OID>, ADTObject, bool, ChangeLogParameters)
- ADTIndependentObject.GetObjectReferences(string[], bool, int)
- ADTObject.LastModified
- ADTObject.CreationTimestamp
- ADTObject.FromMaster
- ADTObject.OID
- ADTObject.ClassID
- ADTObject.BindingDescription
- ADTObject.ToString()
- ADTObject.ParentObject
- ADTObject.CanPerform(SecurityPermission)
- ADTObject.Duplicate()
- ADTObject.DataContext
- ADTObject.AccessMask
- ADTObject.Validate(MessageCollection)
- ADTObject.SupportedSecurityActions
- ADTObject.SupportedSecurityInheritanceOptions
- ADTObject.GetTopLevelOwner()
- ADTObject.GetConfigurationReport()
- ADTObject.GetConfigurationReport(bool)
- ADTObject.IsReadOnly
- ObjectBase.IsDirty
- ObjectBase.IsNew
- ObjectBase.IsStub
- ObjectBase.ClassName
- ObjectBase.GetDescription()
- ObjectBase.BeginEdit()
- ObjectBase.BeginEdit(UndoLevelAction)
- ObjectBase.CommitEdit(Guid)
- ObjectBase.CommitEdit()
- ObjectBase.UndoEdit()
- ObjectBase.UndoEdit(Guid)