The Addon will provide PowerShell scripting possibilities.  PS files can be handled or PS scripting can be included within the IT-Tool script code. Note that not every PowerShell function is implemented,  e.g. ‘Read-Host’ is not implemented. Since IT-Tool contains enough methods to obtain input, it should in general not be an issue. 

‘Write’ is supported (although not in colour). Depending on the OutputSettings, the write commands will be returned in the result of a script run.

AddOn’s for this AddonPowershell is also not (yet) supported.



Variables and Commands


PSRESULT

Returns the output from the last Powershell run 

RW

PSSCRIPT

Returns the script as previous set via the command “RUNPS”

RW

PSOUTPUTSETTING

Returns the value as previous set via the command “PSOUTPUTSETTING”

RW

RUNPS

Runs the provide PowerShell script

W

RUNPSFILE

Runs the PowerShell script from the provided file.

W



Functions


RunPS(ByVal scriptText As String) As String

RunPSFile(ByVal Filename As String) As String

SetOutputSetting(ByVal value As Integer)


The OutputSettings is an integer, default value is 1023.  It can set if the specific type of ‘write’ is written to the result and/or to the textbox. 


bit 0,   1 'Write' to result
bit 1,   2 'Write' to textbox
bit 2,   4 'WriteError' to result
bit 3,   8 'WriteError' to textbox
bit 4,  16 'WriteDebug' to result
bit 5,  32 'WriteDebug' to textbox
bit 6,  64 'WriteWarning' to result
bit 7, 128 'WriteWarning' to textbox
bit 8, 256 'WriteVerbose' to result
bit 9, 512 'WriteVerbose' to textbox





Created with the Personal Edition of HelpNDoc: Create iPhone web-based documentation