Script to reconnect the hosts using "Read-Host - AsSecureString".

I'm trying to get a script that will reconnect all ESX host, when you use a server different vCenter (same database well). I found the bases of what I need here:

PowerCLI blog

But the only problem with that one is that the script has the password in clear text. I prefer to ask the password, as with the Read-Host - AsSecureString option. My script below works fine without the option - AsSecureString... when the Read-Host is not hidden. Can someone tell me how to make it work with the AsSecureString?

$password = Read-Host - assecurestring "Please enter the root password"

Get-VMHost | % {$view = get-view $_.id}

$arg = New-Object vmware.vim.hostconnectspec

$arg.userName = 'root '.

$arg.password = $password

$arg.force = $true

$view. ReconnectHost ($arg)

Thank you!

Kyle

The property of password in HostConnectSpec object requires a plaintext password.

This means that you must use the method Robert provided in this post.

I've attached a file (since the SW forum do not like the brackets) with your script suitable for this method.

____________

Blog: LucD notes

Twitter: lucd22

Tags: VMware

Similar Questions

  • Need a script to get the hosts where observed IP address range

    For a client, I need to filter the guests (and VM) have a link with to the DMZ VLAN.

    It's physical and virtual network VLAN over multiple vCenter are not compatible. So there may be physical VLAN 24 is presented in the virtual network VLAN 24 in a cluster and VLAN356 in another.

    My idea is to create a script that will search IP ranges observed (such as 192.168.128.xxx) and display the name of VLAN, VLANID and VMHost.

    I would get a CSV with this information, to be able to sort the results.

    I'm really not if/how this can be done, and so I ask to guru

    Thanks in advance!

    Arjan

    Have you tried it like that?

    $report = foreach($esx in Get-VMHost){
        $vms = Get-VM -Location $esx    foreach($pg in (Get-VirtualPortGroup -VMHost $esx)){
            $vms | where {$_.Guest.Nics | where {$_.NetworkName -eq $pg.Name}} |
            Select @{N="Host";E={$esx.Name}},
                @{N="PG";E={$pg.Name}},
                @{N="VLANid";E={$pg.VlanId}},
                @{N="IP";E={[string]::Join(',',($_.Guest.Nics | where {$_.NetworkName -eq $pg.Name} | %{$_.IPAddress | %{$_}}))}},
                @{N="VM";E={$_.Name}}
        }
    }
    $report | Export-Csv "C:\report.csv" -NoTypeInformation -UseCulture
    
  • Need to powershell script to gather the host ESX Info network

    Hello

    I need two scripts powershell to collect two types of information about the ESX host network.

    1. information vNIC -& gt; information on the vmnic (physical ESX host network adapter) connected to vSwitches.

    vNIC | VSwitch model | | Trade | Speed | Status | | PCI slot Active/stand-by/not assigned

    (Example) output expected:

    vmnic0 | intel corporation 82XXXX gigabit ethernet controller | vSwitch0 | service console, vMotion | 1000mbps Full | up 01:01.00 | | Assets

    2. Portgroup information

    PortGroup | vNIC (s) with active / standby |  PCI slot of vNIC (s) with active / standby | Physical switch with port number

    Expected results (example):

    Service console | vmnic0 (a) : (s) | 01 vmnic1: 00. 00 (a) : 02:00. 00 (s) | abcd-123 [GigabitEthernet10/10] : xyzf-7890 [Gigabitethernet11/11]

    Please note if CDP is not active, then in the field of physical switch values can contain "CDP is not enabled"

    Thanks in advance!

    Noticed that the two threads under became a little mixed in the script.

    This is the script with the devIds with the indication of the active / standby.

    foreach($esxImpl in (Get-VMHost)){
         $esx = $esxImpl | Get-View
         $netSys = Get-View $esx.ConfigManager.NetworkSystem
         foreach($pg in $esx.Config.Network.Portgroup){
              $pNICStr = @()
              $pciStr = @()
              $cdpStr = @()
              foreach($a in $pg.ComputedPolicy.NicTeaming.NicOrder.ActiveNic){
                   if($a){
                        $pNICStr += ($a + "(a)")
                        $pciStr += ($esx.Config.Network.Pnic | where {$_.Device -eq $a} | %{$_.Pci + "(a)"})
                        $cdpInfo = $netSys.QueryNetworkHint($a)
                        $cdpStr += &{if($cdpInfo[0].connectedSwitchPort){$cdpInfo[0].connectedSwitchPort.devId + "(a)"}else{"CDP not configured(a)"}}
                   }
              }
              foreach($s in $pg.ComputedPolicy.NicTeaming.NicOrder.StandbyNic){
                   if($s){
                        $pNICStr += ($s + "(s)")
                        $pciStr += ($esx.Config.Network.Pnic | where {$_.Device -eq $s} | %{$_.Pci + "(s)"})
                        $cdpInfo = $netSys.QueryNetworkHint($s)
                        $cdpStr += &{if($cdpInfo[0].connectedSwitchPort){$cdpInfo[0].connectedSwitchPort.devId + "(s)"}else{"CDP not configured(s)"}}
                   }
              }
    
              $pg | Select @{N="ESXname";E={$esxImpl.Name}},
              @{N="Portgroup";E={$pg.Spec.Name}},
              @{N="VLANid";E={$pg.Spec.VlanId}},
              @{N="pNIC";E={$pNICStr}},
              @{N="PCI location";E={$pciStr}},
              @{N="Physical switch";E={$cdpStr}}
         }
    }
    

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • Adobe Java Script to change the field of reading to write based on radio button selection

    I created a form the question asked is "Do we have a credit limit?" the user can select a Yes or not by using a radio button.  If the user selects Yes we do not have a credit limit that I want the text field "CreditLimitAmount" to change the read only entry.

    Here is my code, but it does not work, someone would be able to see what I'm doing wrong?

    GetField ("CLYes"). Value
    If {(event.target.value==="Off)"}
    f.ReadOnly = false;
    f.fillColor = color.white;

    } else {}

    f.ReadOnly = true;
    f.FillColor = Color.Gray;
    }

    You have it backwards. Use this code as your radio buttons script two MouseUp and remove the code that you have applied to the text field:

    var f = this.getField("CreditLimitAmount");
    if (event.target.value=="CLYes") {
        f.readonly = false;
        f.fillColor = color.white;
    } else {
        f.readonly = true;
        f.fillColor = color.gray;
    }
    
  • Script to change the element using screen orientation does not not on Dev Alpha in Portrait mode

    OK, so I wanted to update my application WebWorks Testing (https://github.com/SCrid2000/WebWorks-Testing) to make it easier to test webworks apps for the difference in screen resolution between the Alpha of Dev and the 10 next of BlackBerry.

    Basically, instead of opening your html, js and css files directly in the test application, the update would be to open your files in an iframe in the app. The iframe will resize itself based on the orientation of the device.

    The javascript function looks like this:

    function displayCurrentOrientation() {
    
        if (window.orientation === 0) {
            document.getElementById("currentOrientation").width = '1280px';
            document.getElementById("currentOrientation").height = '720px';
            return false;
        }
        if (window.orientation === 90) {
            document.getElementById("currentOrientation").width = '720px';
            document.getElementById("currentOrientation").height = '1280px';
            return false;
        }
        if (window.orientation === 180) {
            document.getElementById("currentOrientation").width = '1280px';
            document.getElementById("currentOrientation").height = '720px';
            return false;
        }
        if (window.orientation === -90) {
            document.getElementById("currentOrientation").width = '720px';
            document.getElementById("currentOrientation").height = '1280px';
            return false;
        }
    }
    

    Now it works just perfect on the PlayBook (but of course, this isn't much help for the screening of the BB10)

    However, on the Dev Alpha it ONLY works in the LANDSCAPE; in other words, if the application is launched in the landscape, the iframe rezises and everything is just perfect. If the test application is started in portrait mode, the iframe is still resized to the size of portrait.

    Anyone have any suggestions for what I'm doing wrong? I am quite at a loss here (and since this is a free application and open source, I'm not too motivated to spend another couple hours trying to fix lol).

    Thank you.

    Shane

    Nevermind, turns out it only is not yet supported by BB10.

  • Extract the host name vCenter using PowerCLI

    Hi all

    I was asked to create a script that displays the host ESX, the version of the product name (I use "Get-View $_USER.USER"). «» ""Config.Product.FullName"), and what I thought, that's easy, vCenter host name." I'm having a hard time trying to figure out how to extract the host name real vCenter. I can get the vDC and the cluster, but I can't find what combination of cmdlets or vim commands can extract this nugget. Is something that is accessible via a standard cmdlet such as get-viproperty, get-view or another?

    TIA,

    g

    Does what you're looking for?

    Get-VMHost | Select Name,@{N="vCenter";E={$_.Uid.Split(':')[0].Split('@')[1]}}
    
  • vCenter Server displays the error message: unable to connect to the host

    vCenter Server displays the error message: unable to connect to the host

    Symptoms

    • vCenter Server cannot connect to a host when you perform operations such as:

    o Storage vMotion

    o cold migration

    o cloning a virtual machine

    o the model deployment

    • Newspapers vpxd that contains an entry similar to:

    [2009-06-04 19:27:16.326 error "App" 4444] [VpxdInvtHost] IP address change for 10.223.122.143 to 10.223.127.197 unhandled, verification of the SSL certificate is not enabled.

    • You see errors similar to:

    Unable to connect to the host o

    o [2009-06-04 19:27:09.952 'Libs' 3902384 WARNING] [NFC ERROR] NfcNewAuthdConnectionEx: unable to connect to peer (numRetries = 2). Error: Unable to connect to the host 10.223.122.143: connection timed out

    • vCenter Server shows the VMS as being disconnected then connected.

    Hello

    Resolution

    Cause

    This problem can occur if an ESX host's IP address is changed while being managed by vCenter Server.

    Check the cause

    To check the cause of the problem:

    1. Log in as root to the ESX host using a SSH client.
    1. In the file etc/opt/vmware/vpxa/vpxa.cfg, find the IP address of the host. The entry looks like:


      10.21.48.121

      Note: for more information about editing the files, see installation in VMware ESX configuration files (1017022).

    Troubleshooting

    If the IP address is incorrect, perform the following steps in order. If the operation does not resolve the problem, continue to the next step. Don't skip a step.

    1. Disconnect and then reconnect the host:
    1. Right click on the ESX host in vCenter Server and click Disconnect.
    1. Reconnect the ESX host in vCenter Server.
    1. Restart the VirtualCenter agent on the ESX host:
    1. Stop the service of vpxa with the command:

      # service vmware-vpxa stop

    1. Open the /etc/opt/vmware/vpxa/vpxa.cfg file in a text editor and correct the IP address of the ESX host.
    1. Start the service of vpxa with the command:

      # service vmware-vpxa start

      Note: for VMware ESXi, you may have to restart all the management agents. For more information, see restart the agents on an ESX or ESXi Server (1003490) management .

    1. Rebuild the VirtualCenter agent on the ESX host configuration file:

      Attention: this step removes all the Statistics counters historical host and the virtual machine. If VMware ESX host is running in virtual machines that starts in a permitted CVS environment, you maybe won't be able to add the host without stopping the virtual machines first.

    1. Right click on the ESX host in vCenter Server and click Disconnect.
    1. Remove the ESX host disconnected from vCenter Server.
    1. Backup the file vpxa.cfg with the command:

      # mv /etc/opt/vmware/vpxa/vpxa.cfg /etc/opt/vmware/vpxa/vpxa.oldcfg

    1. Add the ESX host disconnected to the server vCenter inventory.
    1. Run the following command to view the contents of /etc/opt/vmware/vpxa/vpxa.cfg and confirm that the host IP address is correct:

      # cat /etc/opt/vmware/vpxa/vpxa.cfg

  • See the profile of the host Application

    I just want to check that vCenter 5.1 (b) Auto deploy does not apply the profile of the host, he attaches it only. I understand that IP address entry/configuration is necessary when the profile of the host application, but I was wondering if it was possible to automate even that. I can't think how that would be accomplished but thought that I would check to see if anyone had discovered some creative automation.

    As long as the profiles of the host requires any input it will not apply and ESXi will remain in maintenance mode.

    Here's what you need: http://blogs.vmware.com/vsphere/2011/09/sample-scripts-for-automating-auto-deploy.html. I use the ad - update.ps1 a script pre fill the host profiles answer file and it really works.

    MAC addresses will be automatically generated if it is not specified.

    -ep4p

  • The IP of the host ESX and ESXi console information

    Hi guys,.

    I have a little problem here, we have a script that collects the host Console IP, host name, field info... etc.

    My problem is with the period of INVESTIGATION, because we have a mixed environment of esx3.5, esx4.0, esx4.1 and ESXi4 get the IP of the Console is a bit of a problem.

    If I use the

    $NicInfo = get-VMHostNetwork - VMHost $esxhost. Name
    $newesxhost. VmHostName = $NicInfo.HostName
    $newesxhost. Domain = $NicInfo.DomainName
    {foreach ($cs in $NicInfo.ConsoleNic)}
    $newesxhost. IPAddress = [string] $cs. INTELLECTUAL PROPERTY
    }

    I covers the ESX Console hosts IP info, but all the info of ESXi IP gets missed.

    If I add to the:

    $NicInfo = get-VMHostNetwork - VMHost $esxhost. Name
    $newesxhost. VmHostName = $NicInfo.HostName
    $newesxhost. Domain = $NicInfo.DomainName
    foreach ($cs in $NicInfo. ) VirtualNic | where {$_.name - eq "vmk0"}){}
    $newesxhost. IPAddress = [string] $cs. INTELLECTUAL PROPERTY
    }

    I get the ESXi IP Management IP network, but the ESX hosts to report the vmk0 which is the IP address of vmotion.

    So if anyone can help I'd be very happy.

    Include the HOST party so that you can see what I mean:

    #[int] $Loopctr = 0
    $newesxhost = (@($xml.) (ESXInventory.HOST) [0])
    $newVMPortGroup = (@($xml.) (ESXInventory.VMPortGroup) [0])

    Get-VMHost-location (Get-Cluster-name $cluster. Name) | Sort-Object-unique | % {
    $esxhost = get-view $_.ID
    Write-Host $esxhost. Name
    #if ($Loopctr - gt 0) {$newesxhost = $newesxhost.clone ()}
    $newesxhost = $newesxhost.clone)
    $newesxhost. MemberOfCluster = $cluster. Name
    $newesxhost. Name of the vendor = $esxhost. Summary.Hardware.Vendor
    $newesxhost. Model = $esxhost. Summary.Hardware.Model
    $newesxhost.os_version = [string] $esxhost. Config.Product.Version
    $newesxhost.os_build = [string] $esxhost. Config.Product.Build
    $newesxhost.os_caption = [string] $esxhost. Config.Product.FullName
    $newesxhost. MemorySize = [string] $esxhost. Summary.Hardware.MemorySize
    $newesxhost. CpuModel = $esxhost. Summary.Hardware.CpuModel
    $newesxhost. CpuMhz = [string] $esxhost. Summary.Hardware.CpuMhz
    $newesxhost. NumCpuPkgs = [string] $esxhost. Summary.Hardware.NumCpuPkgs
    $newesxhost. NumCpuCores = [string] $esxhost. Summary.Hardware.NumCpuCores
    $newesxhost. NumCpuThreads = [string] $esxhost. Summary.Hardware.NumCpuThreads
    $newesxhost. NumNics = [string] $esxhost. Summary.Hardware.NumNics

    $newesxhost. NumHBAs = [string] $esxhost. Summary.Hardware.NumHBAs

    $NicInfo = get-VMHostNetwork - VMHost $esxhost. Name
    $newesxhost. VmHostName = $NicInfo.HostName
    $newesxhost. Domain = $NicInfo.DomainName
    foreach ($cs in $NicInfo.VirtualNic | where {$_.name - eq "vmk0"}) {}
    $newesxhost. IPAddress = [string] $cs. INTELLECTUAL PROPERTY
    }

    $VMPortGroup = get-VirtualPortGroup - VMHost $esxhost. Name

    {foreach ($vpg to $VMPortGroup)
    Write-Host $vpg. Name
    $newVMPortGroup = $newVMPortGroup.clone)
    $newVMPortGroup.Name = $vpg. Name
    $xml. ESXInventory.AppendChild ($newVMPortGroup) > $null
    }

    $xml. ESXInventory.AppendChild ($newesxhost) > $null
    #$Loopctr += 1

    /regards

    Why you do not include a test that check if the host's ESX or ESXi?

    Something like that

    $esx = Get-VMHost MyESX
    
    $NicInfo = Get-VMHostNetwork -VMHost $esx 
    
    $newesxhost.VmHostName = $NicInfo.HostName$newesxhost.Domain = $NicInfo.DomainName
    
    if($esx.Extensiondata.Config.Product.ProductLineId -eq "esx"){    foreach ($cs in $NicInfo.ConsoleNic ){        $newesxhost.IPAddress = [string] $cs.IP    }}else{    foreach ($cs in $NicInfo.VirtualNic |where {$_.name -eq "vmk0"} ){        $newesxhost.IPAddress = [string] $cs.IP    }}
    
    $newesxhost
    
  • Where the SQL Scripts running after the installation of the ODAC for Oracle Client?

    I just installed ODAC for Oracle Client on a windows server that runs a database of sql server, allowing developers to connect to a web application to an Oracle/Unix database. The installation States to run SQL scripts, located in the $ORACLE_HOME\ASP.NET\SQL directory after installation. I don't know where to run them? On the ORACLE DB on the Unix server? If someone could let me know, I'd appreciate it. Thank you.

    You must run on the Oracle database server, but they are necessary only if you use Oracle for ASP.NET providers.

    If you just install the software, so you can use OLEDB with SQL Server linked server, for example, you don't need them. What do you need to run although if this is the case is the oramtsadmin.sql script that creates the objects used by the Oracle MTS Recovery Service (if you do not have these objects created on the database) that SQL Server uses a distributed transaction for Oracle connections I think.

    It will be useful,
    Greg

  • Impossible to cancel the order using OE_ORDER_PUB. Process_order. Help, please!

    Hi all

    I use OE_ORDER_PUB. Process_order API to cancel the order (order). The API return status is the success, but the order is not affected. I tried with several levels and with different values but failed to get the required results. Here is the code

    declare
    l_step varchar2 (250);
    l_err_msg varchar2 (1000);
    v varchar2 (1000);
    l_LINE_TBL oe_order_pub. Line_Tbl_Type;
    l_header_rec oe_order_pub. Header_Rec_Type;
    lx_return_status VARCHAR2 (10000);
    lx_msg_count NUMBER;
    lx_msg_data VARCHAR2 (10000);
    lx_header_rec oe_order_pub. Header_Rec_Type;
    lx_header_val_rec oe_order_pub. Header_Val_Rec_Type;
    lx_header_adj_tbl oe_order_pub. Header_Adj_Tbl_Type;
    lx_header_adj_val_tbl oe_order_pub. Header_Adj_Val_Tbl_Type;
    lx_header_price_att_tbl oe_order_pub. Header_Price_Att_Tbl_Type;
    lx_header_adj_att_tbl oe_order_pub. Header_Adj_Att_Tbl_Type;
    lx_header_adj_assoc_tbl oe_order_pub. Header_Adj_Assoc_Tbl_Type;
    lx_header_scredit_tbl oe_order_pub. Header_Scredit_Tbl_Type;
    lx_header_scredit_val_tbl oe_order_pub. Header_Scredit_Val_Tbl_Type;
    lx_Header_Payment_tbl oe_order_pub. Header_Payment_Tbl_Type;
    lx_Header_Payment_val_tbl oe_order_pub. Header_Payment_Val_Tbl_Type;
    lx_line_tbl oe_order_pub. Line_Tbl_Type;
    lx_line_val_tbl oe_order_pub. Line_Val_Tbl_Type;
    lx_Line_Adj_tbl oe_order_pub. Line_Adj_Tbl_Type;
    lx_Line_Adj_val_tbl oe_order_pub. Line_Adj_Val_Tbl_Type;
    lx_Line_price_Att_tbl oe_order_pub. Line_Price_Att_Tbl_Type;
    lx_Line_Adj_Att_tbl oe_order_pub. Line_Adj_Att_Tbl_Type;
    lx_Line_Adj_Assoc_tbl oe_order_pub. Line_Adj_Assoc_Tbl_Type;
    lx_Line_Scredit_tbl oe_order_pub. Line_Scredit_Tbl_Type;
    lx_Line_Scredit_val_tbl oe_order_pub. Line_Scredit_Val_Tbl_Type;
    lx_Line_Payment_tbl oe_order_pub. Line_Payment_Tbl_Type;
    lx_Line_Payment_val_tbl oe_order_pub. Line_Payment_Val_Tbl_Type;
    lx_Lot_Serial_tbl oe_order_pub. Lot_Serial_Tbl_Type;
    lx_Lot_Serial_val_tbl oe_order_pub. Lot_Serial_Val_Tbl_Type;
    lx_action_request_tbl oe_order_pub. Request_Tbl_Type;
    i the number: = 1;

    Cursor ord_det_cur (l_ord_num number) is
    Select * from oe_order_lines_all
    where header_id = (select header_id in the oe_order_headers_all where order_number = l_ord_num);

    BEGIN
    fnd_client_info.set_org_context (101);
    for ord_det_rec loop ord_det_cur (1000809635)
    If I = 1 then
    l_header_rec: = OE_ORDER_PUB. G_MISS_HEADER_REC;
    l_header_rec.flow_status_code: = "CANCELLED";
    l_header_rec.cancelled_flag: = 'Y ';
    l_header_rec.change_reason: = 1;
    l_header_rec.header_id: = ord_det_rec.header_id;
    end if;
    l_line_tbl (i): = OE_ORDER_PUB. G_MISS_LINE_REC;
    l_line_tbl (i) .ordered_quantity: = 0;
    l_line_tbl (i) .header_id: =. ord_det_rec HEADER_ID;
    l_line_tbl (i) .line_id: =. ord_det_rec LINE_ID;
    l_line_tbl (i) .cancelled_quantity: = ord_det_rec.cancelled_quantity;
    l_line_tbl (i) .flow_status_code: = "CANCELLED";
    l_line_tbl (i) .cancelled_flag: = 'Y ';
    l_line_tbl (i) .change_reason: = 1; -"Test"; -"No reason given";
    l_line_tbl (i) .operation: = OE_GLOBALS. G_OPR_UPDATE;

    i: = i + 1;
    end loop;
    dbms_output.put_line ("'start API");
    Apps.oe_order_pub. Process_Order (p_api_version_number = > 1.0
    , p_init_msg_list = > FND_API. G_TRUE
    , p_return_values = > FND_API. G_TRUE
    , p_action_commit = > FND_API. G_TRUE
    , x_return_status = > lx_return_status
    , x_msg_count = > lx_msg_count
    , x_msg_data = > lx_msg_data
    , p_header_rec = > l_header_rec
    , p_line_tbl = > l_line_tbl
    , x_header_rec = > lx_header_rec
    , x_header_val_rec = > lx_header_val_rec
    , x_Header_Adj_tbl = > lx_Header_Adj_tbl
    , x_Header_Adj_val_tbl = > lx_Header_Adj_val_tbl
    , x_Header_price_Att_tbl = > lx_Header_price_Att_tbl
    , x_Header_Adj_Att_tbl = > lx_Header_Adj_Att_tbl
    , x_Header_Adj_Assoc_tbl = > lx_Header_Adj_Assoc_tbl
    , x_Header_Scredit_tbl = > lx_Header_Scredit_tbl
    , x_Header_Scredit_val_tbl = > lx_Header_Scredit_val_tbl
    , x_Header_Payment_tbl = > lx_Header_Payment_tbl
    , x_Header_Payment_val_tbl = > lx_Header_Payment_val_tbl
    , x_line_tbl = > lx_line_tbl
    , x_line_val_tbl = > lx_line_val_tbl
    , x_Line_Adj_tbl = > lx_Line_Adj_tbl
    , x_Line_Adj_val_tbl = > lx_Line_Adj_val_tbl
    , x_Line_price_Att_tbl = > lx_Line_price_Att_tbl
    , x_Line_Adj_Att_tbl = > lx_Line_Adj_Att_tbl
    , x_Line_Adj_Assoc_tbl = > lx_Line_Adj_Assoc_tbl
    , x_Line_Scredit_tbl = > lx_Line_Scredit_tbl
    , x_Line_Scredit_val_tbl = > lx_Line_Scredit_val_tbl
    , x_Line_Payment_tbl = > lx_Line_Payment_tbl
    , x_Line_Payment_val_tbl = > lx_Line_Payment_val_tbl
    , x_Lot_Serial_tbl = > lx_Lot_Serial_tbl
    , x_Lot_Serial_val_tbl = > lx_Lot_Serial_val_tbl
    , x_action_request_tbl = > lx_action_request_tbl
    );
    dbms_output.put_line ('lx_return_status -' | lx_return_status);
    IF lx_msg_count > 0
    THEN
    dbms_output.put_line ('Listing mistakes.. .to order number')-;

    FOR l_index in 1... lx_msg_count
    LOOP
    v: = apps.oe_msg_pub.get (p_msg_index = > l_index p_encoded = > apps.fnd_api.g_false);
    dbms_output.put_line ('Listing mistakes.. .to order number-' | v);
    END LOOP;
    END IF;
    end;
    /

    Please help because it's very urgent.

    Another question: can cancel us orders in the State entry? I tried to frontend, it makes the order quantity = 0 but the order status remains in State of the input.

    Thanks in advance
    Himanshu

    Himanshu salvation,

    Instead of using l_line_tbl (i) .change_reason: = 1, in the script, please use l_line_tbl (i) .change_reason: = 'PLANT REQUEST' & test the issue again. Please check metalink Note 746797.1 for the script to cancel the order using this API.

    If the order is in a State of entry, instead of the cancellation of the order, you can remove the command using the same API.
    Please check metalink Note 746809.1 for the script delete using this API sales slip.

    Kind regards
    Jyoti

  • the cutting of the domain component of the host name for the use of script

    Hello

    I'm trying to rename my < host name > local-local data warehouses.

    Pretty easy in theory as much as it is the only store of data on my host right now.

    I do this

    $vmhosts = get-vmhost-location < data center of choice >

    for each $vmhost in {$vmhosts}

    Get-vmhost $vmhost | get the data store | store game data-name '$vmhost - local.

    }

    Only they named

    myhost.mydomain.com - local instead of

    myhost-local

    I am fairly new to scripting and I do not know how to cut the $vmhost down to remove the. mydomain.com beyond the end.

    I noticed in powershell they mention that you can use .string to shorten the chains just doesn't seem to work.

    Any help would be great.

    Thank you

    You can use the Split method to do this.

    Something like that

    $shortName = $vmhost. Name.Split('.') [0]

    That what is to separate the host name in all places where there is a point.

    The result is returned as an array of strings, and we want the first string

  • the host performance, no update values not returned to the orchestrator script...

    Hope someone can tell what I'm doing wrong.

    I'm still on 5.5 and trying to get the load data for ESXi hosts (via connected to the orchestrator Server vcenter) to decide on which host is the best target for vmotion-action.

    As I could not find any workflow builtin or efforts to get data to load, I tried to dig myself via a script.

    • find all hosts
    • for each reading of the host.summary.quickStats.overallCpuUsage host

    I have values, but they are static and do not get updated.

    If I use perl-sdk and perform the same actions to vcenter I get updated for each esxi host values.

    Browse objects via the web on the server vcenter watch also updated these values.

    If only my orchestrator workflow seems to be wrong.

    I do not suspect that the workflow in orchestrator performs a query only the inventory and not the living objects. It is much faster than doing the same thing with perl-sdk.

    My little script (which could be run in a single Scriptable task with no impression one journal entry/exit). Problem can be seen by newspaper printing. Total used MHz does not change in my environment.

    --------------------------------CUT

    var host = System.getModule("com.vmware.library.vc.host").getAllHostSystems ();

    var tothz = 0;

    for {(i in hosts)

    var cpu_used =. summary.quickStats.overallCpuUsage of hosts [i];

    tothz = tothz + cpu_used;

    }


    System.log ("tothz:"+ tothz ");

    --------------------------------CUT

    Q1: I am doing something stupid in my script?

    Q2: I have to do some extra steps to get the updated values?

    Q3: Is there a better way to find/load-performance data for ESXi hosts?

    Stupid enough to write the sollution myself

    It is possible to force an update of the inventory values for objects that are important to your script/workflow.

    It can be done by the following function in a script.

    VcPlugin.refreshObjects (object-to-update - in - stock)

    So for my specific problem, I could solve it with a single additional line.

    --------------------------------CUT

    var host = System.getModule("com.vmware.library.vc.host").getAllHostSystems ();

    var tothz = 0;

    for {(i in hosts)

    VcPlugin.refreshObjects (the hosts [i]) / *.< my="" new="" line="">

    var cpu_used =. summary.quickStats.overallCpuUsage of hosts [i];

    tothz = tothz + cpu_used;

    }

    System.log ("tothz:"+ tothz ");

    --------------------------------CUT

    This seems to force an update of the inventory values before I use them.

    It will certainly slow down my script a little, but it's part of the game.

  • PowerShell script to browse the root of an ESXI host?

    I am currently working on a project to automate the task to bring our standard up to STIG vmware environment.


    I was able to make the largest part of the task using PowerCLI and vSphereCLI scripts. Some patches require that you check the data to files like/etc/ssh/ssh_config... I tried to use the vifs.pl, but that does not allow you to browse directories host root. Also trying to research how to execute SSH via Powershell commands, but there is no free utlity. Is there another way to do this?

    Here is an example: under text difficulty: I need to be able to read the content of/etc/ssh/ssh_config to check if there is the "LOCAL so."

    Under rule: the SSH client must not send any environment variables on the server or send only those relating to the regional settings.

    STIG ID: GEN005529-ESXI5-708 rule ID: SV - 51085r1_rule Vuln ID: V-39269

    Severity: CAT II class: Unclass

    Discussion:
    Environment variables can be used to change the behavior of remote sessions and should be limited. Local environment variables specify the language, character set and other features change the operation of the software according to the preferences of the user.

    Documentable: No.

    Check the content:
    Deactivate the lock mode.
    Select the shell ESXi.
    < file > = / etc/ssh/ssh_config
    < Required_keyword > = AcceptEnv
    < Required_keyword_setpoint > = LOCAL
    Run the following commands:
    # grep AcceptEnv/etc/ssh/ssh_config

    If 'AcceptEnv' is not set to 'LOCAL' a finding.

    Reactivate the lock mode.

    Difficulty of text:
    Deactivate the lock mode.
    Select the shell ESXi.
    < file > = / etc/ssh/ssh_config
    < Required_keyword > = AcceptEnv
    < Required_keyword_setpoint > = LOCAL
    Run the following commands:
    # vi < file >

    Add/Modify the < required_keyword > or < required_keyword_setpoint > where/as necessary for 'LOCAL '.

    Reactivate the lock mode.

    IAB: IAB-000366
    SP NIST 800 - 53A: CM - 6.1 (iv)
    NIST 800-53 SP: CM - 6B

    There is the free PuTTY Suite, with the included plink.exe you can do a SSH session on the ESXi server.

    There are several examples on how to use plink.exe in this community.

  • Using Script to check the version of Adobe Reader software

    Hello. I am now currently using LiveCycle Designer to create a form that allows users to attach attachments. We found that if a user uses Adobe Reader 7.0 or below, there is a problem on fixing attachments. Accordingly, we would like to add a script to check the version of the Adobe Reader client in a ready state of the form. If a user uses Adobe 7.0 or below, the message box opens and suggests the user to download a more recent version of the Adobe Reader software. I would like to know is possible to do so. Thank you very much

    Hello

    the script might look like:

    If (typeof (app.viewerVersion)! = "undefined")

    If (app.viewerVersion<>

    {

    xfa.host.messageBox ("your Version of Adobe Reader is old...");

    }

    }

    You can use it in the docReady:Event of your form to inform users.

Maybe you are looking for

  • Installed Enigmail. Some "writing". The toolbar (fonts, change color, margins etc is missing? How to get the toolbar?

    Before installing Enigmail, there was the bar containing the fonts (increase or decrease) change of color, margins (left, Center, right) tool etc..In the menu by selecting "special characters", etc. was present. Now, nothing! No way to select menus t

  • Satellite C660-10 d - get my old printer and scanner to work

    I would like to ask advice on how to get my HP 1020 Laserprinter and HP G2710 Scanner to work with my Toshiba Satellite C660 Windows 7 (Home Premium) 64-bit respectively? The software of the printer (pilot) is not installed correctly while the Scanne

  • Saudi flag

    Hello I just wonder why Skype changed the Saudi flag from previous version to this new? Why do you get a thick white line not blocking the "no God but allah" at the Saudi Arabia Pavilion?

  • Photo Album-Photo Stream

    If I had to restore a device to power or adding a new of an old installation that between Photo Album & Photo Stream would bring most of the photos of cloud storage?  I have 3 I have devices that a it shows 3 option restore from.  Normally, I keep ju

  • Installation clean P580 Win 7 Ultimate 64 bit - cannot install Intel USB 3.0 driver

    Downloaded and run 0zus06ww.exe, which produces a folder structure in C:\Drivers. Inside, I found Setup.exe. When running with administrator privileges, clicking Next, I get an alert box containing only a red circle with an "X" inside. The solution w