Retrieving information from a table of embedded hash

I know it should be more simple, but I don't know the syntax to retrieve specific keys and entries of the subkey.  My hope is to display the information in to a table or any other required format hash tables.

Here's the current code snippet.

$Disk = @{}

ForEach ($vSCSIController in ($vmView.Config.Hardware.Device | Where {$_.DeviceInfo.Label -match "SCSI Controller"})){
    #'Unit Number: ' + $vSCSIController | %{$_.UnitNumber} 
    ForEach ($vDiskDevice  in ($vmView.Config.Hardware.Device | Where {$_.ControllerKey -eq $vSCSIController.Key}))
        {
        $Label = $vDiskDevice.DeviceInfo | %{$_.Label}
        [string]$BusNum = $vSCSIController | %{$_.BusNumber}
        [string]$DiskDev = $vDiskDevice | %{$_.UnitNumber}
        [string]$SCSIid = $BusNum + ":" + $DiskDev
        $HD = Get-VM $VM | get-harddisk | where {$_.Name -eq $Label}
        $ID = @{    
            "Label" = $Label
            "CapGB" = [System.Math]::Round($HD.CapacityKB / 1MB, 2)
            "Filename" = $HD.Filename
            "StorageFormat" = $HD.StorageFormat
            "ScsiID" = $SCSIID
            }
        $Disk.Add([string]($HD.Name),$ID)
        }
    }
#
#"Disk Name" + "`t" + "SCSI Bus" + "`t" + "Capacity in GB" + "`t" + "Filename" + "`t" + "StorageFormat"
#'==============================================================================================================='



$Disk.keys

The $Disk.Keys is where I need help.  How I would display all values if the label is "Hard Disk 10"? and in the order listed near the end of the excerpt?

Try something like this

$hd = $disk.GetEnumerator() | where {$_.Value.Label -eq "Hard disk 10"} | Select -ExpandProperty Value

Via $hd you can now access the properties.

$hd. Label / $hd. CapGB /...

Tags: VMware

Similar Questions

  • Hi to all of that I doubt to retrieve information from two tables to help join

    SQL > select ename, empno, lease_car_id employee_car_list;

    EMPNO, ENAME LEASE_CAR_ID

    ---------- ----------      ----------

    7369 SMITH 1

    7499 2 ALLEN

    7521 WARD 3

    7566 JONES 4

    7654 MARTIN 5

    SQL > select lease_car_id, lease_car_make, lease_car lease_car_model;

    LEASE_CAR_ID LEASE_CAR_MAKE LEASE_CAR_MODEL

    ----------        -------------     ----------------------

    1 TOYOTA CAMRY

    2 FORD TAURUS

    3 GM BUICK

    4 GM CHEV

    5 GM BUICK

    I want to know the empno, ename that uses lease_car_make and lease_car_model of GM, BUICK?

    I wrote a join condition, but it displays every thing please change my query

    Select employee_car_list.empno, employee_car_list.ename in the outer join left employee_car_list

    lease_car on employee_car_list.lease_car_id = lease_car.lease_car_id

    You can use it. Left outer join will be used when you want all rows from the left table and the matching rows from the right table

    SELECT EmpNo, ename FROM

    EMPLOYEE_CAR_LIST T1,

    LEASE_CAR T2

    WHERE T1. LEASE_CAR_ID = T2. LEASE_CAR_ID

    AND LEASE_CAR_MAKE = 'GM' AND LEASE_CAR_MODEL = 'BUICK ';

    output:

    7521 WARD
    7654 MARTIN

    Post edited by: Partha Sarathy S

  • Media Player play error "unable to retrieve information from server, UPnP media."

    I have a Denon AVR 1912 receiver and a PC running Windows 7 w/WMP12.  When I try to use the ' play to ' I can select the receiver but get an error "Unable to retrieve media information from media server."

    I tried to re - install WMP 12 and tried to disable my firewall without success.  AirPlay works very well, but I prefer WMP I-Tunes.

    The content is on the same computer.  Streaming is enabled and that the receiver is "allowed".

    I don't know if it's fixed or not... but I found the solution last night after I spent the most frustrating 5 hours of my life! It is probably a windows problem. I recently replaced my HP laptop with a Dell Vostro 3450 and all of a sudden, I found that this "Play To" feature did not work with my Samsung LED TV UA55C8000. To confirm that this was not a firewall or format related issue I even used the Samsung PC Share software on my PC to act as a DLNA server... With PC share the WMP12 server found no problem 'Contacting the media server' as... but with its own library, it's just stuck there, with a possible failure message. [Point to note is that, even when he could not contact the media server, I could control the TV volume using the same window!]

    This is what did the trick for me:

    1 closed WMP12.

    2. go into [Control Panel-> system] Services and safety-> administration-> Services tools

    3. Locate the service named "Windows Media Player Network Sharing Service"

    4. stop the Service manually.

    5 locate the "UpnP device host" service Stop the service and restart it.

    6. start 'Windows Media Player Network Sharing Service' now.

    7. close the control panel and all the windows. Open Windows Media Player... make a right click on a playlist and see if the Play option lists the TV. Try to play now... He started playing for me at this point!

  • editing a start date of information from another table

    Hello all;

    I have the sample data below
    create table t1
    (
           id varchar2(200),
           begin_date date,
           ending_date date
    );
    create table t2
    (
       id varchar2(200),
       period_number number(30),
       period varchar2(200) 
    );
    insert into t1
      (id, begin_date, ending_date)
    values
      ('A', sysdate, to_date('01/02/2020', 'MM/DD/YYYY'));
    insert into t1
      (id, begin_date, ending_date)
    values
      ('B', sysdate, to_date('03/31/2011', 'MM/DD/YYYY') );
    insert into t1
      (id, begin_date, ending_date)
    values
      ('C', sysdate, to_date('01/20/2011', 'MM/DD/YYYY')); 
    
    insert into t2
      (id, period_number, period)
    values
      ('A', 2, 'Years');
    insert into t2
      (id, period_number, period)
    values
      ('B', 3, 'Months');
    insert into t2
      (id, period_number, period)
    values
      ('C', 4, 'Days');
    So what I'm trying to do is basically update the start date in t1, using the information from table t2
    for example, A
    start date should be start date = 01/02/2020-2 years = 01/02/2018
    for C
    start date should be start date = 20/01/2011 - 4 = 01/16/2011

    Thanks for the sample data, it makes life easier.

    Something like this:

    SQL> UPDATE t1
      2  SET begin_date = (SELECT CASE WHEN t2.period = 'Years' THEN ADD_MONTHS(t1.ending_date, t2.period_number * -12)
      3                                WHEN t2.period = 'Months' THEN ADD_MONTHS(t1.ending_date, t2.period_number * -1)
      4                                ELSE t1.ending_date - t2.period_number END
      5                    FROM t2
      6                    WHERE t1.id = t2.id)
      7  WHERE EXISTS (SELECT 1 FROM t2
      8                WHERE t1.id = t2.id);
    
    3 rows updated.
    
    SQL> SELECT * FROM t1;
    
    ID         BEGIN_DATE  ENDING_DATE
    ---------- ----------- -----------
    A          02-JAN-2018 02-JAN-2020
    B          31-DEC-2010 31-MAR-2011
    C          16-JAN-2011 20-JAN-2011
    

    If t2 is unique, you could also do it as an editable join view using a structure of similar cases.

    John

  • Retrieving information from a CD may be damaged

    I have a CD with a WMV file that I've not used for years I thought I had lost.  I just found it (it is not in the best conditions) and my computer does not read it.  The drive sounds like it is reading and then nothing happens.  I understand that this is probably because the drive is old and not been greatly neat but is it possible to get me the information about it?  I also tried to go into 'My computer' and try to open it manually but it tells me that there is no disc and promplty opens the drive for me to insert a disk.

    Hello

    Is the CD/DVD drive read other CD?

    I suggest you to try the CD on another computer and check if it helps.

    If you encounter a problem with only this old disc, then the disc may be damaged and there is no way to retrieve the data from disk. You will need to get a third party using your favorite search engine software.

    Warning: using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    Hope the information is useful.

  • How to retrieve information from the account of a user of Windows Messaging live

    Hello

    For Windows live mail under Windows8 can retrieve us account information, emails and contacts from a backup of the user if it has not exported before information.

    Try asking in the Forum Windows Live Mail:
    http://answers.Microsoft.com/en-us/windowslive/Forum/LIVEmail?tab=threads

  • Need to retrieve information from the user who blocked the account

    Hi all

    As we had forced her, we changed the password of our schema.

    The same pattern has been locked up in the next day morning.

    We have required to generate the information to senior management who has blocked the account by giving the wrong password.

    Kindly guide / help me to retrieve the USER information.

    Thanks in advance.
    Orahar

    Hello

    SQL> show parameter audit
    ORA-00942: table or view does not exist
    

    you're trying the foregoing to the privileged user not DBA.

    Try your user SYS or SYSTEM.

    Kind regards
    Delphine K

  • How to retrieve information from the appellant in BPEL

    I have a SOA - BPEL process that is consumed by the different systems. Purposes of registration, I need to retrieve the host name of the appellant for each request.

    Consumers are not cross any additional headers or special settings of WS-addressing.

    Since the BPEL process knows how to call back in an asynchronous call, I believe firmly that the caller information should be stored somewhere on the server.

    So please let me know if anyone has any idea on this.

    Thank you

    Helene.

    Hi Helen,

    you could try this - get the value of the header property transport.http.remoteAddress and assign it to a variable. To do this, in your activity. More details on how get/set header values can be found here - https://docs.oracle.com/middleware/1213/soasuite/develop-soa/GUID-33A38C1A-38A6-473B-9FEA-D3164AD7A118.htm#SOASE20757. Double click on your activity and go to the 'Properties' tab add the transport.http.remoteAddress and assign it to the existing variable.

    HTH,

    A.

  • Cannot retrieve information from haerware

    Hello community,

    We have a big problem with the conversion of a restored 2008 32-bit machine in VSphere.

    VMware converter stand-alone witch following versions: 4.1. 4.3, 5.0.1 we always get "unable to retrieve Hardware information.

    In the .vmx file, we have the following information:

    guestOSAltName = "Microsoft Windows Server 2008 (32-bit)"

    guestOS = "longhorn."

    scsi0:1.present = 'true '.

    scsi0:1.filename = "SXenApp00DE_1 - 000001.vmdk".

    scsi0:1.DeviceType = "scsi-disk" hard

    scsi0:0. Present = 'true '.

    scsi0:0. FileName = 'SXenApp00DE - 000001.vmdk ".

    scsi0:0. DeviceType = "scsi-disk" hard

    After restoration two planetary drives are divided into 2 GB files with instant single files, which makes editing impossible.

    scsi0-0-0-SXenApp00DE - s002.vmdk

    scsi0-0-0-SXenApp00DE - s003.vmdk

    scsi0-0-0-SXenApp00DE - s004.vmdk

    scsi0-0-0-SXenApp00DE - s005.vmdk

    scsi0-0-0-SXenApp00DE - s006.vmdk

    scsi0-0-0-SXenApp00DE - s007.vmdk

    scsi0-0-0-SXenApp00DE - s008.vmdk

    scsi0-0-0-SXenApp00DE - s009.vmdk

    scsi0-0-0-SXenApp00DE - s010.vmdk

    scsi0-0-0-SXenApp00DE - s011.vmdk

    scsi0-0-0-SXenApp00DE - s012.vmdk

    scsi0-0-0-SXenApp00DE - s013.vmdk

    scsi0-0-0-SXenApp00DE - s014.vmdk

    scsi0-0-0-SXenApp00DE - s015.vmdk

    scsi0-0-0-SXenApp00DE - s016.vmdk

    scsi0-0-0 - SXenApp00DE.vmdk

    scsi0-1-0-SXenApp00DE_1 - s001.vmdk

    scsi0-1-0-SXenApp00DE_1 - s002.vmdk

    scsi0-1-0-SXenApp00DE_1 - s003.vmdk

    scsi0-1-0-SXenApp00DE_1 - s004.vmdk

    scsi0-1-0-SXenApp00DE_1 - s005.vmdk

    scsi0-1-0-SXenApp00DE_1 - s006.vmdk

    scsi0-1-0-SXenApp00DE_1 - s007.vmdk

    scsi0-1-0-SXenApp00DE_1 - s008.vmdk

    scsi0-1-0 - SXenApp00DE_1.vmdk

    Is that what someone has an idea that could help me with the problem of conversion?

    As attachments, you can find newspapers and CONF.

    AM

    Your error is:

    2013 03-19 T 11: 50:30.940 + 01:00 [03144 error "Default"] Sysimgbase_DiskLib_OpenWithPassPhrase doesn't have the the disk file "E:\mnt\SXenApp00DE.haering.com-fullVM\scsi0-0-0-SXenApp00DE.vmdk" with "the system cannot find the specified file" (error code: 25)
    2013 03-19 T 11: 50:30.976 + 01:00 [info 03144 'Default'] [, 0] Sysimgbase_DiskLib_OpenWithPassPhrase failed with "the system cannot find the file specified" (error code: 25)
    You should check VM that all drives are present and in good shape, VDDK tools could help you. HTH

    Or of course convert as direct machine

  • Saving information from several tables in a txt file

    To all,

    I work in a defined test bed in which I test different devices via series. For each one, I have a table of newspaper. Is there a way I could connect all these tables in a text file of monkey?

    Thank you

    Cosmica

    Of course it is a. have you looked through the functions in the range of the file IO? For example, writing to the spreadsheet file or as file write, according to the format of your data.

  • Im trying to retrieve information from a hard disk.

    Recently, at work, we had a computer that displayed the dreaded death blue screen.  It wasn't a problem we have other computers to use, but my boss would like to try to recover some of the files on the hard drive.

    So the question is...

    1. is there a way to replace missing files that are causing the blue screen.  My windows recovery CD does not work.

    2. I put the HD in another computer and can access the files on the hard drive. But they are protected by the original users passwords and cannot be loaded by the new operating system.  Is there a way to get around this.

    Thanks for any help that can be provided

    You might have the chance to do a system restore:

    "How to start the System Restore tool by using the option of safe mode with the command prompt in Windows XP"
      <>http://support.Microsoft.com/kb/304449 >

    How were protected by Word files?  He used "Encrypting File System" of Microsoft (EFS)?  If so, the data will be permanently lost unless you can get certificates either by getting the system running again or from backups of certificate [have] created you when you first start using EFS.  Mandatory reading for EFS: see paragraph "why you should back up your certificates.

    "Best Practices for encrypting file system"
      <>http://support.Microsoft.com/kb/223316 >

    There is a program I've heard of "AEFSDR", which could also help to recover the files.  I have no experience with this program.  Try Googling it.

    HTH,
    JW

  • Retrieving information from Source-target of the OWB repository

    Hi, I am trying to find a SQL script that I can run against the OWB repository in order to give me a 2 column (Source / target) output for all mappings in a Module of Oracle. My goal is to help developers report, who are most familiar with the system tables and having a bit of trouble understanding how I standardized data.
    Someone at - it something like that I can use?

    (OWB 10.2)

    Thank you!

    Something like this:

    Select
    separate "TARGET."
    COMP.map_name,
    COMP.data_entity_name,
    COMP.operator_type
    Of
    model of the all_iv_xform_map_components,
    all_iv_xform_map_parameters param
    where
    Lower (operator_type)
    in ('table', 'view', 'dimension', 'cube')
    and param.map_component_id = comp.map_component_id
    and param.source_parameter_id is not null
    UNION
    Select
    separate "SOURCE."
    T1. C1,
    T1. C2,
    T1. C3
    Of
    (select
    COMP.map_name c1,
    COMP.data_entity_name c2,
    C3 COMP.operator_type,
    Max (param.source_parameter_id) c4
    Of
    model of the all_iv_xform_map_components,
    all_iv_xform_map_parameters param
    where
    Lower (operator_type) in
    ('table', 'view', 'dimension', "cube")
    and param.map_component_id = comp.map_component_id
    Group
    COMP.map_name, comp.data_entity_name, comp.operator_type) t1
    where t1.c4 is null
    2.1 order

  • Retrieve information from a unauthorized (i) reformat hard drive

    My new external hard drive has just automatically reformatted without my permission. Nothing has been re-written on the I: drive since the format.  Is it possible for me to restore these deleted/over-written data?

    Walter thanks! Unfortunately it did nothing for me.  I bought an Iomega storage drive.  The 2nd time that I used it, it auto-protege in writing.  Today is the 3rd time that I used it and it auto-formaté without asking permission. Nice! These two sites have also been suggested: http://free-backup.info/data-recovery-software.htm... and http://www.spotmau.com/products/package/full.htm?gclid=COD-xtKL16YCFQjrKgoddRc6JQ

    It seems that my data is lost. Ah good... to reliable DVD! Thanks again by the way Walter

    Hey jojoroon

    I'm sorry that he did not work for you

    There are many programs to try to find deleted data

    overwritten data are much more difficult to recover

    If I were you I would ask their support as to why you have these problems with their newly purchased product

    https://Iomega-AP-en.custhelp.com/app/home

    Walter, the time zone traveller

  • [JS CS3] how to extract information from scriptsList table

    Hi all,

    just a silly question: How can I extract scriptList property filePath and fileName and display it in an alert box?

    Ah, that should have been

    for (i = 0; i< f.length;="">

    f instead of s. You will see the path names starting with a dash of turnings (~), which is js pointing to the folder of the user. You can learn more about records and their names in the JS tool guide, see in respect of aid in the ESTK Help menu.

    app.scriptPreferences.scriptsList returns the scripts in the folder of the user and the application folder. app.scriptPreferences.scriptFolder returns only the scripts in the user folder. Mmm - I think that this is the case, anyway. Try before you buy.

    Peter

  • retrieve the information of partition table with lack of offline data file

    I just restored a backup of a database. When I unzipped data files, I discovered that a single data file was so damaged in the starting order of the database, I had to put the offline data file. The tablespace which reports the data file holds the information of partition of a table. Since I have no archives from when the data file has been created, I know it is not possible to recover the data file, I have to recover as many lines as possible other files in the tablespace data but when export or create the table as what to choose in the affected partition get ORA-00376 : cannot read file 1624 at the moment.

    is there a way to tell oracle to ignore the data offline file and export the remaining data file information?

    Just to clarify my situation a little more;
    iI have a table called PPGA_ACTABOPRE that is partitioned by HASH and has 20 partitions, each partition in a different tablespace and tablespace each have about 8 files of data. A data file in the partition 9 is missing and I want is to get the information from the files of the remaining data, but whenever I issue a select statement or an exp or anything I get ORA-00376.

    I try to set the flag to ignore blocks corrupt with run DBMS_REPAIR. SKIP_CORRUPT_BLOCKS ('PPGA', 'PPGA_ACTABOPRE'); and then select the info but it did not work.

    Any suggestion would be appreciated;
    Thanks in advance

    For the actabopre_p08 partition, some files are available, and we're not. You can access data at the segment level, because some extensions are missing.

    You would need to access the data by rowid. You could loop through dba_extents and use dbms_rowid.create to generate a list of ROWID that may exist in the available data files.

    This may help: -.

    http://kerryosborne.Oracle-guy.com/2009/02/saving-rows-from-corrupt-blocks/
    http://kerryosborne.Oracle-guy.com/scripts/save_u.SQL

    Published by: Robert Geier on March 12, 2010 15:33

Maybe you are looking for