How to create NLBCluster from code (C#)

Hi,
I am trying to create and configure NLB Cluster (Network Load Balancing Cluster) and add node from C# app. At this moment I'm trying to use WMI class MicrosoftNLB, but there are only administrative methods.
If i try to use this for instance
ManagementScope NLBScope = new ManagementScope("\\\\localhost\\root\\MSCluster");
ManagementPath mgmtPath = new ManagementPath("MSCluster_Cluster");
ObjectGetOptions objGetOptions = new ObjectGetOptions();
ManagementClass mgmtClass = new ManagementClass(NLBScope, mgmtPath, objGetOptions);
ManagementBaseObject inParams = mgmtClass.GetMethodParameters("CreateCluster");
but there is an exception "Invalid namespace" - and looks like smth is wront with that ManagmentPath.
I appreciate any help here.
Regards

There's no direct way to load x64 powershell into a C# process.  You could execute your code through x64 powershell from a x86 process with some rerouting of pipelines like is done in the sample code for the blog post I wrote about
routing powershell commands through other users' sessions in remote desktop services, but that's far more complicated than is necessary to accomplish what you're trying to do.
Your simpler options off the top of my head:
1.  Compile your app 64-bit or MSIL without 32-bit preferred checked if you have no 32-bit dependencies
2.  Use the WMI/CIM queries directly.
3.  Load the NetworkLoadBalancingCluster module manually in your powershell session by giving it the full path to the 32-bit version when loading it (if it exists - depending on your version of Powershell it has different searching capabilities if you
don't give it the full path)
WinSDK Support Team Blog: http://blogs.msdn.com/b/winsdk/

Similar Messages

  • How to create database from .sql file

    how to create database from .sql file..?? i put the sintax query in a sql file.. and i want to call it in java code..
    ho to do it..??

    why do you want to do this from java?
    i just don't see the point.
    find your dba and have him/her run it for you

  • How to create data_block from procedure ?

    hi all
    can anyone to help me :
    how to create data_block from procedure ?
    i want to join 2 or 3 table and use order by
    then show some field in my form
    i can not use view because order by can not use in view
    please send sample code for this procedure
    thanks.

    1) >i can not use view because order by can not use in view
    SQL>create or replace view V_test as
      2  select * from (
      3  select 1 id from dual union
      4  select 2 id from dual union
      5  select 3 id from dual union
      6  select 4 id from dual union
      7  select 5 id from dual union
      8  select 6 id from dual ) t
      9  order by t.id
    10  /
    View created.
    SQL>select * from v_test;
            ID
             1
             2
             3
             4
             5
             6
    6 rows selected.2). >how to create data_block from procedure?
    You must create procedure and use ref cursor.

  • How to create report from report painter??

    Hi,
    how to create report from report painter?? from transaction code GRR1

    Select the library that you want report to create.  GRR1
    You select what to list in coulumns and what to lisr in rows. You could select characteristics or key figures.
    You can use variable both in defininig row and coulmn or in general selection.
    You can also use sets as variable or as constant. These sets can be your master data groups or sets in GS02.
    You can use formulas.

  • How to create new tax codes

    how to create new tax codes
    Service Tax 4% on 33% VAT 4% on 90% Non Deductible
    Service Tax 12.24% on 33% VAT 4% on 90% Non Deductible
    regards
    anil

    Hi Anil,
    This is an example from Italy:
    Local purchases 20% 40% recoverable
    Base Amount                                                     100    0         BASB
    Round.Up Output Tax             MWS                    110    100       MWAI
    Input Tax Round.up                VST        8.000      120    100       MWVI
    N.d.input tax                         NAV                      140    100       MWNI
    Non-ded.InputTax -RU            NVV       12.000     150    100       MWZI
    Acqu.Tax Outgoing-RU          ESA                       200    100       NLAI
    Acqu.Tax Inc.- Ro.up             ESE                       210    100       NLVI
    VST is the deductible tax and NVV the Non Deductible tax.
    I hope that you can use this and that you don't have to change your calculation procedure.
    Paul

  • How to create an address code for PO delivery address?

    Hi Guys,
    How to create an address code for the delivery address in the purchase order? Please explain me with details.....
    Thanks
    Raja

    delivery adress records can be created with transaction MEAN.
    the number is purely internal.
    In ME21N you can then search by name (you will certainly not know the number)

  • How to create a transaction code for a function group with screen 100 as st

    Hello ,
    I have requirement where I need to create a function group and create screen 100, 200, 300 and include the function in the screens.
    Customer asked me to create a transaction with the screen 100 as the starting screen.
    Can you please let me know how to create a transaction code for a function group with screen 100 as starting screen.
    [ It is not a module pool program ].
    Thanks
    Prashanth.
    Moderator message - Please ask a specific question and do not ask the forum to do your work for you - post locked
    Edited by: Rob Burbank on Jun 2, 2009 11:49 AM

    Go to transaction SE93, enter a transaction code that you want and click on "create". Enter a text and select the "Transaction with Parameters" button. In the Default Values section, enter START_REPORT in the transaction field. Check the "skip initial screen" box. In the Name of Screen field section enter the following lines:
    Name of screen field:                               Value
    D_SREPOVARI-REPORTTYPE                RW
    D_SREPOVARI-REPORT                        ZPCA
    Save and transport accordingly.

  • How to create a Transaction code for a Report Painter Report

    Hi All,
    Can any one let me know the procedure as to how to create a t-code for a user defined PCA report. I have created a PCA report (copied the existing report (8a26-001) and named it as zpca and assigned the same in a new Report Group ZPCA (the group is created by copying 8a26 group) and assigned it under the library 8a2. We have added few fields required by the user to the Z report.
    Now i need to create a transaction code for that zpca report. can anyone suggest how to go about it.
    Useful answers will be appropirately rewarded.
    regards,
    radhika

    Go to transaction SE93, enter a transaction code that you want and click on "create". Enter a text and select the "Transaction with Parameters" button. In the Default Values section, enter START_REPORT in the transaction field. Check the "skip initial screen" box. In the Name of Screen field section enter the following lines:
    Name of screen field:                               Value
    D_SREPOVARI-REPORTTYPE                RW
    D_SREPOVARI-REPORT                        ZPCA
    Save and transport accordingly.

  • How to create UDO by code?

    Hi,
    the UDO is very useful,but how to create udo by code ?
    who has the samples ? can you send It to me by email or  can you paste it in here ? thanks .
    pls ,someone have said It can find in the path "C:\Program Files\SAP Manage\SAP Business One SDK\Samples  " ,but I can't find it . there are only 'COMUI' and 'Utility Projects' files .and I also have installed the DI API .
    so please email it to [email protected]
    Thanks again.

    Hi Adele,
    Thanks ,I have got the email.
    and my version is 'SAP Business One 2004.2 B (7.30.224)  SP: 00  PL: 30'
    this is my code that have writed before.
    Public Sub AddUDO()
        Dim oUserObjectMD As SAPbobsCOM.UserObjectsMD
        Set oUserObjectMD = SBO_Company_DI.GetBusinessObject(oUserObjectsMD)
        oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES
        oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES
        oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tYES
        oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
        oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
        oUserObjectMD.CanLog = tNO
        oUserObjectMD.CanYearTransfer = tYES
        oUserObjectMD.ManageSeries = tYES
        oUserObjectMD.ChildTables.TableName = "APS1"
        oUserObjectMD.Code = "OAPS"
        oUserObjectMD.ManageSeries = tYES
        oUserObjectMD.Name = "OAPS"
        oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_Document
        oUserObjectMD.TableName = "OAPS"
        oUserObjectMD.FormColumns.FormColumnAlias = "Code"
        oUserObjectMD.FormColumns.FormColumnDescription = "Code"
        '子UDO
        lRetCode = oUserObjectMD.Add()
            '// check for errors in the process
        If lRetCode <> 0 Then
                SBO_Company_DI.GetLastError lRetCode, sErrMsg
                SBO_Application.StatusBar.SetText sErrMsg, bmt_Short, smt_Error
        Else
                SBO_Application.StatusBar.SetText "success", bmt_Short, smt_Success
        End If
        Set oUserObjectMD = Nothing
    End Sub
    and the error message is 'N' ,It's very stange.
    but why I can't find it in Tools -> User-defined-object -> default form ?
    anyway ,thanks a lot !
    Message was edited by: wei wang

  • Why we extend JFrame in java swings? how is it different from code not ...?

    how is it different from code nt extending JFrame?
    please explain the role of contentpane in both cases?
    thanx

    Search the net for examples and/or explanations of "inheritance vs composition.
    For the role of a contentPane, read the API for interface RootPaneContainer and class JRootPane. The second named API also has a link to the Swing tutorial on How to Use Root Panes.
    db

  • How to create "valuation group code" in ECC system

    Hi,
    How to create" valuation group code" in ecc system and what is the path to create valuation grp code
    Thanks&regards
    kishore kumar

    Use the following IMG path.
    MM -> Valuation and Account Assignment -> Account Determination -> Account Determination without wizard -> Group together valuation areas (T Code OMWD).  The Val.Grpg Code in this customizing is a freely definable 4-character code.  You can then use this as valuation modifier in MM-FI account determination (OBYC).
    Assign pts. if this answers your question!

  • How to Create PDF from Illustrator CS3 by using applescript?

    Hi Guys,
    Do some one knows how to create PDF from Illustrator CS3 by using apple script. If know, please give me the scripting.
    HARI

    Have you tried File>Scripts>SaveDocsAsPDF? There should be a folder of sample scripts installed in your AICS3 folder and a folder of documentation which contains an Illustrator AppleScript Reference which has examples.

  • How to create "convert from PDF to Word?"

    How to create "convert from PDF to Word?"

    Good day,
    To use the ExportPDF service, simply visit http://exportpdf.acrobat.com and click 'Sign in' at the top right corner.  Enter your Adobe ID (email address) credentials to log into the service.  As ExportPDF is web-based, you simply utilize the tool through your web browser.  After you're logged in, you should see the ExportPDF interface, with a button saying 'Select PDF file..' to get the process started.
    Please let us know if you have any questions.
    Kind regards,
    David

  • How to create an Undefined Code Combination from API? (Urgent)

    Hi All,
    I used the following API to create the code combinations in a Inventory custom form.
    SELECT CHART_OF_ACCOUNTS_ID INTO :PARAMETER.CHART_OF_ACCOUNTS_ID
    FROM ORG_ORGANIZATION_DEFINITIONS
    WHERE ORGANIZATION_ID = :PARAMETER.ORG_ID;
    FND_KEY_FLEX.DEFINE(
    BLOCK => 'XX_MRN_TRX_HEADERS',
    FIELD => 'TO_ACCOUNT',
    CODE => 'GL#',
    APPL_SHORT_NAME =>'SQLGL',
    NUM => ':PARAMETER.CHART_OF_ACCOUNTS_ID',
    ID => 'TO_ACCOUNT_ID',
    VRULE => '\\nSUMMARY_FLAG\\nI\\nAPPL=SQLGL;NAME=GL_NO_PARENT_SEGMENT_ALLOWED\\nN\\0GL_GLOBAL\\nDETAIL_POSTING_ALLOWED\\nE\\nAPPL=INV;NAME=INV_VRULE_POSTING
    nN',
    REQUIRED => 'N',
    DINSERT => 'Y',
    VALIDATE => 'FULL',
    USEDBFLDS => 'N');
    This creates the correct ccid if the combination is already available in GL (gl_code_combinations_kfv), But when its a new combination it returns '-1'.
    How can I create an Undefined Code Combination from API in custom forms?
    If any one one can help me on this it'll be a great help.
    Thanks

    Solved by Using FND_FLEX_EXT.GET_COMBINATION_ID.
    Thanks

  • How to create New TaX Code

    Dear Expert,
    I am new in SAP so can U plz tell me each steps how to create a new tax code, i have gone through sdn forum but this is not sufficient
    my co. requirement is
    BED 10%, Cess 2%, HS E Cess 1%, VAT_D 3% (Input).
    Kindly tell me every step I will gv U full points.
    Thanks in Advance

    Hi Expert,
    As mentioned above, Go to T-Code: OBYZ,
    Firstly select the Conditions, here should define the condition types for the Tax Procedure.
    Secondly we have a Access Sequence, were we use pre-defined.
    Thirdly we have to create a Tax Procedure, here we need to assign the created condition types and Account Type.
    Where Account Types are used to trigger the GL Accounts, we assign GL Accounts in T-Code: OB40 with respect to Account Types.
    In T-Code: FTXP, We create a Tax Code and this Tax Code in used in T-Code: FV11, Her we maintain the percentage with respect to the Combination and Tax Code, this combination are pre-defined(i.e., Access Sequence)
    and Configure complete CIN Settings from the below link:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/207dd2ad-bf92-2b10-a88b-e3a4a01ca7fc?QuickLink=index&overridelayout=true
    Maintain CIN Master Data in T-Code: J1ID and for India Localization Menu in T-Code: J1ILN
    Regards,
    GK
    SAP

Maybe you are looking for