VirtualMachine.PowerOnVM_Task how to get the reference to the returned managed object - task

Hello

I try to use the VirtualMachine.PowerOnVM_Task that returns a reference to the managed object - task as ManagedObject reference. (The VirtualMachine is the result of the GET's view)

I use it in VB:

Var refTask As Vim.ManagedObjectReference = Vim_VirtualMachine.PowerOnVM_Task (Vim_VirtualMachine.Runtime.Host)

I can get the reftask like ManagementObjectReference, but here I don't know how to convert the managed - object task. I like to use all the properties and methods of this object.

Looking at my result of the refTask I can't find many properties...

Is it possible to retrieve an object just to get the reference to the taskobject somhow.

Concerning

Manfred

Hello

You can get Moref managed object is either using the cmdlet Get-View or in VB, using the VimClient.GetView method, that is to say:

Get-View -Id refTask

or

 Dim task As Vim.Task = Vim_VirtualMachine.Client.GetView(refTask)

Note that each MO is the customer's property which is of type VimClient.

Kind regards

Yasen

Tags: VMware

Similar Questions

  • How to get the return value from Java runtime.getRuntime.exec?

    I am running shell from a (GR 11, 2) Oracle database commands on aix.
    But, I would get a return value of a shell comand... as you get with "echo $?"

    I use a code like
    CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS
    import java.io.*;
    public class Host {
      public static int executeCommand(String command) {
        int retval=0;
        try {
            String[] finalCommand;
            finalCommand = new String[3];
            finalCommand[0] = "/bin/sh";
            finalCommand[1] = "-c";
            finalCommand[2] = command;
    
          final Process pr = Runtime.getRuntime().exec(finalCommand);
          pr.waitFor();
    }
       catch (Exception ex) {
          System.out.println(ex.getLocalizedMessage());
          retval=-1;
        }
        return retval;
    };
    /
    but I do not get a return value... because I don't know how to get the return value...

    Published by: user9158455 on 22-Sep-2010 07:33

    Hello

    Your pr.exitValue () has tried?

    I think you also need a finally block that destroys the sub-process

    Concerning
    Peter

  • How to get the return in this example

    Hi all,

    In this simple example, is there an exception caused by the business logic. However, I would like to get the return value of 'p_dt' which will be stored in a table of newspaper, but when the exception occurs that the value is eliminated. How can I solve this? Thank you for your help.
    SQL> select * from v$version where rownum = 1;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    create table test as(select 1 id, to_date('01/01/2009','dd/mm/yyyy') dt from dual)
    /
    
    Create OR Replace Package Pkg_Test Is
    
       Procedure Prc_Call_Test;
    
    End Pkg_Test;
    /
    
    CREATE OR REPLACE Package Body Pkg_Test Is
    
       Procedure Prc_Test( p_id In  Pls_Integer
                         , p_dt OUT Date ) Is
       Begin
          SELECT DT
            INTO p_dt
            FROM TEST
           WHERE ID = p_id;
    
          If p_dt < Sysdate Then
             Raise_Application_Error(-20000, 'Anything');
          End if;
       End Prc_Test;
    
    
       Procedure Prc_Call_Test
       Is
          v_dt Date;
       Begin
          Prc_Test(1, v_dt);
          Dbms_Output.put_line(v_dt); -- the return is null
       End Prc_Call_Test;
    
    End Pkg_Test;
    /
    Kind regards

    If you use NOCOPY in the parameter, then the value will be applied directly to the variable of output as it get set to so it will not be lost when the exception occurs. So, of course, to capture the exception or anything to access your dbms_output statement, but it is trivial...

    SQL> ed
    Wrote file afiedt.buf
    
      1  CREATE OR REPLACE Package Body Pkg_Test Is
      2     Procedure Prc_Test( p_id In  Pls_Integer
      3                       , p_dt OUT NOCOPY Date ) Is -- Note the use of NOCOPY on the parameter
      4     Begin
      5        SELECT DT
      6          INTO p_dt
      7          FROM TEST
      8         WHERE ID = p_id;
      9        If p_dt < Sysdate Then
     10           Raise_Application_Error(-20000, 'Anything');
     11        End if;
     12     End Prc_Test;
     13     Procedure Prc_Call_Test
     14     Is
     15        v_dt Date;
     16     Begin
     17       BEGIN
     18         Prc_Test(1, v_dt);
     19       EXCEPTION
     20         WHEN OTHERS THEN -- Capture the correct error here rather than OTHERS
     21           dbms_output.put_line('Error occurred in prc_test');
     22       END;
     23       Dbms_Output.put_line(v_dt); -- the return is null
     24     End Prc_Call_Test;
     25* End Pkg_Test;
    SQL> /
    
    Package body created.
    
    SQL> exec pkg_test.prc_call_test;
    Error occurred in prc_test
    01/01/2009 00:00:00
    
    PL/SQL procedure successfully completed.
    
    SQL>
    
  • How to get the return parameter in sequence teststand ran by labview labview

    Hello

    Executes a test sequence of labview (essentially running "\Examples\TestStand API\Executing sequences using API\LabVIEW\Execute with no Model.vi process") I need to get a parameter returned in 'Settings', after the sequence has run.

    My problem is that I get the value upon registration of the sequence and not the value after execution.

    How?

    Vagn

    Vagn,

    in order to obtain the values of the execution, you need access to execution. The following screenshot shows how to access.

    Please note that this VI is lying will be called by TestStand. DO NOT USE THIS VI IN A CUSTOM USER INTERFACE!

    Thank you

    Norbert

    EDIT: This dummy code shows how to read the string parameter 'Return '. Each parameter must be read separately with appropriate playback function.

  • [JS CS4/CS5/CS5.5] How to get the return value from Javascript using doScript

    Hi all

    I'm calling javascript from COM (c#) and it works fine. Passing parameters to javascript and playback by using the syntax of the [x] arguments also works very well.

    What I can't seem to get to work is to know how to move something from javascript to the calling COM Summoner, in this case, c#. How and where should I place the return value in javascript?

    Thanks in advance.

    Rachiud

    doScript() evaluates an expression, so just make sure that your Javascript is an expression.

    For instance "(3 + 3)" 6 "

  • How to get the return value of the method by calling the stored procedure in ApplModuleImpl

    Hello

    I use Jdev 10.1.3.4
    JSF, and ADF business components
    I created a service method in the implementing class of module request to execute the strored procedure in the database.
    This breeding returns a string value.
    now, I slipped the method of service of data control palette on my JSF page and chose ADF parameter form when I droped.
    It works very well.
    now, I want to display the string returned by the method of service after the execution on the JSF page as global messages.
    How can I achieve this.
    Help, please

    Thanks in advance

    Kind regards
    Ajit Agarwal

    Hello

    You must run programmatically run the method binding. If I'm not wrong then the following code will allow you to access the return value

    OperationBinding oper = bindings.get("MyPLSQLAccessMethodBinding") (OperationBinding);
    String returnValue = oper.execute ((String));

    Once you have the string in a managed bean you can add it to the stack of messages JSF exposed by the FacesContext

    Frank

  • How to get the return value of the activity of the method in the stubborn workflow

    Hi all

    I use Jdeveloper 11 g R2 (11.1.2.3) & Weblogic 10.3.5.0

    I have a stubborn workflow, default activity is a call method than calling a method in the app module
    This method returns an id

    I need this code in my project to do something else
    Is there a way I can access the return value of the method call activity?

    Concerning
    Mohsen

    Set the value of return as #{{pageFlowScope.myBean.returnValue} pageFlowScope.myBean.returnValue} in the method, call the property inspector and get the value in your managed bean.

    String returnParam = (String) JSFUtil.getFromPageFlow ("returnValue");

  • How to get the return value in sqlplus to index?

    Hello

    I am a PL/SQL Developer, and I have a problem with an existing batch.

    Here's the situation:
    I have a lot of unix, calling a first script sql with sqlplus (call script0.sql )
    script0. SQL call other scripts sql with the command @ (script1.sql, script2.sql,... = > scriptx.sql )
    My version of sqlplus is 9.2.

    ScriptX.SQL modifies the data in table with insert or update and not commit or rollback anything (it is in charge of script0.sql ).
    If there is an error produced in a clue all changes must be rollbacked.
    Unfortunately when something fails, it returns only to script0.sql without any information on his breaks down, so continuous script0.sql and when he arrivals all changes are committed because the State of script0.sql is successful when the exit is made.

    Is there an equivalent of the $? UNIX in sqlplus to obtain the return of a status @scriptx.sql?

    -----
    Here is the general syntax of the script0.sql :

    WHENEVER SQLERROR EXIT 99;
    WHENEVER OSERROR EXIT 98;

    @script1.sql
    @script2.sql

    "exit";
    -----

    Here's a simple scriptx.sql file:

    Insert into table values (x) (y);

    -----

    Published by: user10713865 on October 30, 2009 06:51

    Hello

    You can use 'Whenever SQLERROR WHAT' options to build the logic.
    Use: 'every time THAT SQLERROR EXIT DISMANTLING', if you want to there are a whole script error
    OR "WHEN SQLERROR CONTINUE ROLLBACK", if you want to restore and continue to the next.
    You might explore other options 'whenever SQLERROR WHAT' to suit your logic and add "COMMIT / ROLLBACK" to not relevant.

    See sample tests below:

    SQL> create table t1 (col1 number primary key);
    Table created.
    

    * 1. In script1 case fails, then restore and exit *.

    kallo:f632736> cat 1.sql
    WHENEVER SQLERROR EXIT ROLLBACK
    insert into t1 values(1);
    insert into t1 values(1);
    kallo:f632736> cat 2.sql
    insert into t1 values(2);
    kallo:f632736> cat main.sql
    @1
    @2
    
    SQL> @main
    
    1 row created.
    
    insert into t1 values(1)
    *
    ERROR at line 1:
    ORA-00001: unique constraint (ADMLHMGM.SYS_C0013874) violated
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> select * from t1;
    
    no rows selected
    

    * 2. When script1 fails, then restore and continue to script2 *.

    kallo:f632736> cat 1.sql
    WHENEVER SQLERROR CONTINUE ROLLBACK
    insert into t1 values(1);
    insert into t1 values(1);
    
    SQL> @main
    
    1 row created.
    
    insert into t1 values(1)
    *
    ERROR at line 1:
    ORA-00001: unique constraint (ADMLHMGM.SYS_C0013874) violated
    
    Rollback complete.
    
    1 row created.
    
    SQL> select * from t1;
    
          COL1
    ----------
             2
    
  • How to get the return value of INSERT... RETURN clause?

    Hello

    With the help of the WEST, how I'm supposed to retrieve the value returned by queries like:

    INSERT INTO... VALUES (...) RETURN xxx IN: res

    ?

    Thank you
    Kiril

    It works for me. Someone posted the code for him on this thread:
    BLOB vs BFILE

    I tested successfully an integer column and also return the rowid of INSERTION. Note that the call to registerOutParam is necessary - without that I just became a string vacuum back to rowid.

    I tested with 11.2 customer against 10.2 server.

  • How to get the return values by a button on the main program.

    Hello

    I have a main program that has an Authenticate button. Click to authenticate open for auth form that has the USERNAME and PASSWORD FIELDS.
    If the input fields are true then enable editing of jtable in main program...

    Basically something like this:
    main program
    Authenticate.addActionListener (new ActionListener()
    {
    public void actionPerformed (ActionEvent ae)
    {
    Au UpdateAuth = new UpdateAuth(); / / Opens the form that has the username and pass for authentication
    ua.setVisible (true);

    need code for activation of table here
    if(s=="mactus")
    {
    enable editing of the table
    }
    table.repaint ();
    }

    });


    form opened for auth... (class UpdateAuth)

    private String SigninMouseClicked (java.awt.event.MouseEvent evt) {}
    String aname = Aname.getText ();
    String apass = Apassword.getText ();
    If (aname. Equals("") & & apass.equals(""))
    {
    JOptionPane.showMessageDialog (null, "enter the login name or password", "Error", JOptionPane.ERROR_MESSAGE);
    }
    If (!) (Aname.Equals("")) & & apass.equals("")))
    {
    If (aname. Equals("harshil") & & apass.equals ("harshil123"))
    {
    String s = "mactus"; If the user name and password is success enable editing in table in the main program
    return s;

    }
    else if (! aname.equals ("mactus") & &! apass.equals ("mactus123"))
    {
    Aname.setText("");
    Apassword.setText("");
    }
    }
    Returns a null value.
    }

    String.Equals (String)

    String.equalsIgnoreCase (String)

  • get the return value of a method of the application module in the workflow

    Hello

    I use jdeveloper 11.1.1.7.0

    I defined a method (return type is useful java card) in the Module of the Application and add this method to the client interface.

    also I have a workflow and in this TF firstly I should execute this method and put the return value for the pageFlowScope parameter. I know that to use this method as a methodCall and set it as an activity by default, but I don't know how to get the return value before entering the jsff page and set the pageFlowScope parameter.

    Habib

    Concerning

    When you add the activity to the way to deal, there are 'Return value' property that you can set to #{pageFlowScope.yourVariable}

    Dario

  • How to get the reference or the property of a member in OOP node?

    Hello world

    Is it possible to get the referral of a member in OOP?

    After you have created a class and an insert, a member of control in the cluster, I conclude that, when a right click on it, there is no element of "creat-> reference" or "create-> property node?

    So, how to get the reference or the property of a member in OOP node?

    Hello

    There are a few reasons that you can't do what you want to do:

    1 al ' LVOOP ordinary (as opposed to the DVRS in LabVIEW 2009, or some other framework / pattern design) are items of LabVIEW by value, as a cluster and therefore you can not create a reference to a class.

    2. a control of the object (this is what you get when you drop an object on a façade) is a 'black box' because you cannot look inside. This is to support the idea that the class data private. This means that you can't get a reference to all internal control when its on a façade

    3. check the references are valid only for the controls in the Panel before and therefore any class (or other piece of data of LabVIEW) on a wire / shift register / constant / anywhere other that of the façade, will have only the data portion of the available control.

    To access the items within a class, you create the accessor screws (you can create them easily by right-clicking a class (or the folder within the class) in the project tree and selecting New-> VI to access data members.) This VI would at least have a unbundle / bundle node (depending on whether its read/write) and could, if you have many more features such as range checking. You can use this VI whenever you want to read the Member your interested.

    I hope this helps.

    Shaun

  • How to get the Subvi (the virtual path is in .exe) reference in Run Time System

    Hello world

    The problem is how to get the reference of the Sub - VI in run time system, when the Subvi is in .exe after construction.

    More details:

    Top of page vi called the Subvi dynamically, so that the Subvi is always included, and the source object is the application.exe.

    After the above configuration, the Sub - VI will be the application.exe. For example, the path of Subvi est...\application.exe\SubVI.vi

    So, how to get the reference of the Subvi in Run Time System?

    I can't do it when you use 'open reference VI' with le...\application.exe\SubVI.vi path in the run time system.

    In fact, I can create a file to include the Subvi, rather than build the Subvi in application.exe, then I can get the convenintly reference. But this isn't my favourate average.

    Thank you

    chenyin

    That is the problem. Call a Subvi dynamic means users could change, but it is also very attractive.

    The dynamic call should be used in a user control, but some parade can avoid problems.

    It depends on why you use dynamic calls...-online 2 main ways:

    -Dynamic call are used to maintain a scalable framework for the code without acting on the executable file-online a single VI distribution managed by the administrator/developer

    -Dynamic call are used to provide a collection of "external" characteristic that could be enriched by the administrator/developer. For example, you provide your customers a set of selectable custom signal filters in the executable.

    In 2 cases, you are only able to assess the skills of the users to know if there is a risk of damage, if there is a change.

    So to stay only master a parade might be to provide dynamic VI without a schema, but with the problem of maintenance, since no in-place editing and more attention to manage distribution.

    Another way is to hide the actual distribution to user-online call dynamic VI but it without name as *.vi but others (a repellent name as system of OS name ) or simply without extension in order to attract not user... but that's debatable...

    Another more difficult but more secure method is to create a consistency check before your routine (version, user, modified date,...)

  • How to get a reference to the delivery of the program (not at base of LV)?

    Hello

    I need to create a LV application which will be:

    -Run external executable and not on LV. It has a window of the UI which will open

    -Open PS (no title, menus, etc.) and position it under the user interface

    -If the user moves main UI, LV app FP follows the window

    -If the user closes the main user interface, LV app closes and ends.

    App - LV does not display in the bar of tasks

    So, basically, I need to develop an application that will add-on to an existing GUI, so that together they look and behave like a single user interface.

    The main thing I am struggling with now is how to get a reference to the execution of UI that I call using the exec.vi system

    Help, please!

    What operating system? If you are on Windows, you can try to use the Windows API. Specifically, FindWindow to get a reference to both windows and SetParent to set the parent of one of the windows. This example gives you the basic idea.

  • How to get the items on a loop at the same time during the execution of the loop for

    Hello

    I am a student. I would like to know how to get the outside loop counter values For in parallel so that the loop runs rather than obtaining the value finally outside the loop for future prospects for the answers.

    Thank you

    Frederick

    You already said yes, and you have said some of the different ways (registrants, locals, reference, queue, etc.). Since the information was provided to your request, the thread can be considered closed? If you want details about how to implement something, you must provide the details on what you are doing.

Maybe you are looking for