(self, runspace_pool)
Represents a PowerShell command or script to execute against a
        RunspacePool.

        This is meant to be a near representation of the
        System.Management.Automation.PowerShell .NET class

        :param runspace_pool: The RunspacePool that the PowerShell instance
            will run over
Represents a PowerShell command or script to execute against a
        RunspacePool.
Represents a PowerShell command or script to execute against a RunspacePool .
def __init__(self, runspace_pool):
        """
        Represents a PowerShell command or script to execute against a
        RunspacePool.

        This is meant to be a near representation of the
        System.Management.Automation.PowerShell .NET class

        :param runspace_pool: The RunspacePool that the PowerShell instance
            will run over
        """
        log.info("Initialising PowerShell in remote Runspace Pool")
        self.runspace_pool = runspace_pool
        self.state = PSInvocationState.NOT_STARTED

        self.commands = []
        self._current_command = None
        self.had_errors = False
        self.history_string = None
        self.id = str(uuid.uuid4()).upper()
        self.is_nested = False
        self.streams = PSDataStreams()
        self.output = []
        self._from_disconnect = False

        # this is not necessarily the same ID as id, this relates to the WSMan
        # CommandID that is created and we need to reference in the WSMan msgs
        self._command_id = None

        runspace_pool.pipelines[self.id] = self
def __init__ ( self , runspace_pool ) : log . info ( "Initialising PowerShell in remote Runspace Pool" ) self . runspace_pool = runspace_pool self . state = PSInvocationState . NOT_STARTED self . commands = [ ] self . _current_command = None self . had_errors = False self . history_string = None self . id = str ( uuid . uuid4 ( ) ) . upper ( ) self . is_nested = False self . streams = PSDataStreams ( ) self . output = [ ] self . _from_disconnect = False # this is not necessarily the same ID as id, this relates to the WSMan # CommandID that is created and we need to reference in the WSMan msgs self . _command_id = None runspace_pool . pipelines [ self . id ] = self