How to retrieve VM's IP Address using WMI query

Hi,
Please let me know the WMI query to retrieve the IP of the Hyper-V VMs via Host.
Regards
Raamesh Keerthi N J

try this in powershell
$VMS = get-vm
$outputArray = @()
foreach($VM in $VMS)
      $output = new-object psobject
      $output | add-member noteproperty "VM Name" $VM.Name
      $output | add-member noteproperty "Description" $VM.Description
      $output | add-member noteproperty "RAM(MB)" $VM.Memory
      $output | add-member noteproperty "vCPU" $VM.CPUCount
      $output | add-member noteproperty "Status" $VM.Status
      $output | add-member noteproperty "State" $VM.VirtualMachineState
      $output | add-member noteproperty "IsHighlyAvailable" $VM.IsHighlyAvailable 
      $output | add-member noteproperty "Cloud" $VM.Cloud
      $output | add-member noteproperty "HostName" $VM.Hostname
      $output | add-member noteproperty "Integration Tools" $VM.VMAddition
      $output | add-member noteproperty "Operating System" $VM.OperatingSystem
      $output | add-member noteproperty "Location" $VM.Location
      $output | add-member noteproperty "VMID" $VM.VMID
      $outputArray += $output
write-output $outputarray | sort "VM Name" | format-table * -autosize | out-string -width 600 | out-file $file -append
Get-SCVirtualNetworkAdapter -all | select name, vlanid | sort "Name" | format-table * -autosize | out-string -width 600 | out-file $file -append
#load the report in notepad
notepad.exe "C:\scripts\reports\Report_$DATEStamp.txt"
exit
[email protected] visit my blog stephanco.blogspot.com

Similar Messages

  • I would like to ask how to retrieve Sever/Host IP address.

    Hello,
    I would like to ask how to retrieve Sever/Host IP address.
    sys_context('USERENV', 'IP_ADDRESS') returns client's IP address only, but what I want to acquire is Host/Server IP address
    Thank you

    This is why it is generally useful to mention the version of Oracle you are using, particularly if you are using a version 4 releases old...
    That said, you can probably still use the UTL_INADDR package
    SQL> select utl_inaddr.get_host_name( null ) from dual;
    UTL_INADDR.GET_HOST_NAME(NULL)
    DDBCJC01
    SQL> select utl_inaddr.get_host_address( null ) from dual;
    UTL_INADDR.GET_HOST_ADDRESS(NULL)
    192.168.1.107Justin
    Edited by: Justin Cave on Sep 29, 2008 10:54 PM

  • I bought 2nd hand iPhone and was linked with previous owner. I want to contact him but i didn't get any address of him. How can iget his/her email address using that iphone IMEI or you know any idea... Please reply if you know solution .....

    I bought 2nd hand iPhone and was linked with previous owner. I want to contact him but i didn't get any address of him. How can iget his/her email address using that iphone IMEI or you know any idea... Please reply if you know solution .....

    There is no solution here and you should already have known this as you replied to a thread all about this a few up from your own post and this stated the postition quite clearly and the question was answered.
    Why do you ask the same question again?  The first answer is not going to change just because you don't like it!!

  • I need to know how to change the identity (email address) used for the iTunes store as I no longer use that email

    I need to know how to change the identity (email address) used for the iTunes store as I no longer use that email.

    Settings > iTunes & App store.
    Tap AppleID, sign out then sign back in.
    The Apple ID is right everywhere else. I've synced the phone. I've reset it in Settings on the phone. I've changed it at Apple.
    When you write, "I've changed it at Apple, this means you updated yoru old AppleID or you ceated a new AppleID?

  • How to retrieve dynamic filter value submitted from control query to .....

    How to retrieve dynamic filter value submitted from control query to broadcast query.....
    I'm trying to change the hierarchy version determined by a userexit variable in the broadcast query.
    The Hierarchy Version should be dependent on the input filter delivered by the bursting query.
    But how do I catch the dynamic filter value which has been submitted by the bursting query,
    with other words:  where does the bursting query store it's out put while sequentially starting the broadcast query value by value?
    BTW: the filter value from the bursting query appears under "dynamic filter values" in the information of the broadcast query...
    Any thoughts are welcome!
    Edited by: Heinrich Krupp on Jun 24, 2009 1:25 PM

    Further information,
    Report is used via webi only, not Xcelsius or Dashboard.
    Report is consuming BI Web Services.
    Although we can pass in prompt values to BI Services, I couldn't find if we could pass a variable or dimension object into this field. Anyone knows?

  • How to retrieve the client IP address when Apache acts as a proxy for Tomca

    Hello,
    I am trying to retrieve the client IP address accessing the web
    services. Because Apache is our proxy for all requests, when I try to
    retrieve the client IP I always get the localhost IP: 127.0.0.1
    The following code returns the localhost IP:
    MessageContext msgContext = MessageContext.getCurrentContext();
    if(msgContext != null) {
    return msgContext.getProperty(Constants.MC_REMOTE_ADDR).toString();
    return "Unknown";
    From a servlet, obtaining the client IP address can be achieved using
    this code.
    String ipAddress = request.getHeader("x-forwarded-for");
    if (ipAddress == null) {
    ipAddress = request.getHeader("X_FORWARDED_FOR");
    if (ipAddress == null){
    ipAddress = request.getRemoteAddr();
    return IPaddress ;
    Any help is greatly appreciated.
    Thank you very much

    @ejp....
    thanks buddy....
    u made my world a better place to live.....

  • How to get location for an address using MKMapKit framework?

    Hi
    Can anybody help me, How can I get location/coordinate from address using MKMapKit framework?
    Thanks

    You have your answer iPhone warranty is NOT international it only covers
    the county of Purchase in your case the US
    You will have to take it back to an Apple Store in the US

  • How to retrieve the server IP address

    Hi Experts,
    In my scenario, if some problem occur, then the XSLT mapping sends a mail to some one,subject is 'PRD', if we execute this from production or quality or development server.
    But now i want to know this mail from which server, so i want to change the subject line as 'PRD' if it is only from production system otherwise 'OTH', how to achieve this ? No hard code allow at any where.
    I have one thought, if we find the server ip address then we can recognize, but how to get the server IP address ? Is it possible ?
    Thanks
    Ramesh

    Hi,
    My source is some WSDL file, this is more than 15000 characters so i am unable to send the full file.
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
         <wsdl:types>
              <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
                   <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd" />
                   <xsd:element name="Pip3A4PurchaseOrderRequest" type="Pip3A4PurchaseOrderRequest" />
                   <xsd:complexType name="Pip3A4PurchaseOrderRequest">
                        <xsd:sequence>
                             <xsd:element name="fromRole" type="fromRole" />
                             <xsd:element name="GlobalDocumentFunctionCode" type="xsd:string" />
                             <xsd:element name="PurchaseOrder" type="PurchaseOrder" />
                             <xsd:element name="thisDocumentGenerationDateTime" type="thisDocumentGenerationDateTime" />
                             <xsd:element name="thisDocumentIdentifier" type="thisDocumentIdentifier" />
                             <xsd:element name="toRole" type="toRole" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="fromRole">
                        <xsd:sequence>
                             <xsd:element name="PartnerRoleDescription" type="PartnerRoleDescription" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="PartnerRoleDescription">
                        <xsd:sequence>
                             <xsd:element name="ContactInformation" type="ContactInformation" minOccurs="0" />
                             <xsd:element name="GlobalPartnerRoleClassificationCode" type="xsd:string" />
                             <xsd:element name="PartnerDescription" type="PartnerDescription" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="ContactInformation">
                        <xsd:sequence>
                             <xsd:element name="contactName" type="contactName" minOccurs="0" />
                             <xsd:element name="EmailAddress" type="xsd:string" minOccurs="0" />
                             <xsd:element name="facsimileNumber" type="facsimileNumber" minOccurs="0" />
                             <xsd:element name="telephoneNumber" type="telephoneNumber" minOccurs="0" />
                             <xsd:element name="PhysicalAddress" type="PhysicalAddress" minOccurs="0" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="contactName">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="FreeFormText">
                        <xsd:simpleContent>
                             <xsd:extension base="xsd:string">
                                  <xsd:attribute ref="xml:lang" />
                             </xsd:extension>
                        </xsd:simpleContent>
                   </xsd:complexType>
                   <xsd:complexType name="facsimileNumber">
                        <xsd:sequence>
                             <xsd:element name="CommunicationsNumber" type="xsd:string" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="telephoneNumber">
                        <xsd:sequence>
                             <xsd:element name="CommunicationsNumber" type="xsd:string" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="PartnerDescription">
                        <xsd:sequence>
                             <xsd:element name="BusinessDescription" type="BusinessDescription" />
                             <xsd:element name="GlobalPartnerClassificationCode" type="xsd:string" minOccurs="0" />
                             <xsd:element name="PhysicalAddress" type="PhysicalAddress" minOccurs="0" />
                             <xsd:element name="ContactInformation" type="ContactInformation" minOccurs="0" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="BusinessDescription">
                        <xsd:sequence>
                             <xsd:element name="GlobalBusinessIdentifier" type="xsd:string" minOccurs="0" />
                             <xsd:element name="GlobalSupplyChainCode" type="xsd:string" minOccurs="0" />
                             <xsd:element name="businessName" type="businessName" minOccurs="0" />
                             <xsd:element name="NationalBusinessTaxIdentifier" type="NationalBusinessTaxIdentifier" minOccurs="0" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="PurchaseOrder">
                        <xsd:sequence>
                             <xsd:element name="AccountDescription" type="AccountDescription" minOccurs="0" />
                             <xsd:element name="comments" type="comments" minOccurs="0" />
                             <xsd:element name="ContractInformation" type="ContractInformation" minOccurs="0" maxOccurs="unbounded" />
                             <xsd:element name="DocumentReference" type="DocumentReference" minOccurs="0" maxOccurs="unbounded" />
                             <xsd:element name="FinancingTerms" type="FinancingTerms" minOccurs="0" maxOccurs="unbounded" />
                             <xsd:element name="generalServicesAdministrationNumber" type="generalServicesAdministrationNumber" minOccurs="0" />
                             <xsd:element name="GlobalGovernmentPriorityRatingCode" type="xsd:string" minOccurs="0" />
                             <xsd:element name="GlobalPurchaseOrderFillPriorityCode" type="xsd:string" minOccurs="0" />
                             <xsd:element name="GlobalPurchaseOrderTypeCode" type="xsd:string" maxOccurs="unbounded" />
                             <xsd:element name="governmentContractIdentifier" type="governmentContractIdentifier" minOccurs="0" />
                             <xsd:element name="installAt" type="installAt" minOccurs="0" />
                             <xsd:element name="isDropShip" type="isDropShip" />
                             <xsd:element name="OrderShippingInformation" type="OrderShippingInformation" minOccurs="0" />
                             <xsd:element name="ProductLineItem" type="ProductLineItem" maxOccurs="unbounded" />
                             <xsd:element name="proprietaryInformation" type="proprietaryInformation" minOccurs="0" />
                             <xsd:element name="requestedEvent" type="requestedEvent" minOccurs="0" />
                             <xsd:element name="requestedShipFrom" type="requestedShipFrom" minOccurs="0" maxOccurs="unbounded" />
                             <xsd:element name="SecondaryBuyer" type="SecondaryBuyer" minOccurs="0" />
                             <xsd:element name="shipTo" type="shipTo" minOccurs="0" />
                             <xsd:element name="TaxExemptStatus" type="TaxExemptStatus" minOccurs="0" />
                             <xsd:element name="totalAmount" type="totalAmount" minOccurs="0" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="AccountDescription">
                        <xsd:sequence>
                             <xsd:element name="accountName" type="accountName" />
                             <xsd:element name="AccountNumber" type="xsd:string" minOccurs="0" />
                             <xsd:element name="billTo" type="billTo" minOccurs="0" />
                             <xsd:element name="CreditCard" type="CreditCard" minOccurs="0" />
                             <xsd:element name="financedBy" type="financedBy" minOccurs="0" />
                             <xsd:element name="GlobalAccountClassificationCode" type="xsd:string" minOccurs="0" />
                             <xsd:element name="prePaymentCheckNumber" type="prePaymentCheckNumber" minOccurs="0" />
                             <xsd:element name="WireTransferIdentifier" type="xsd:string" minOccurs="0" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="accountName">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="billTo">
                        <xsd:sequence>
                             <xsd:element name="PartnerRoleDescription" type="PartnerRoleDescription" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="PhysicalAddress">
                        <xsd:sequence>
                             <xsd:element name="addressLine1" type="addressLine1" minOccurs="0" />
                             <xsd:element name="addressLine2" type="addressLine2" minOccurs="0" />
                             <xsd:element name="addressLine3" type="addressLine3" minOccurs="0" />
                             <xsd:element name="cityName" type="cityName" minOccurs="0" />
                             <xsd:element name="GlobalCountryCode" type="xsd:string" minOccurs="0" />
                             <xsd:element name="GlobalLocationIdentifier" type="xsd:string" minOccurs="0" />
                             <xsd:element name="NationalPostalCode" type="xsd:string" minOccurs="0" />
                             <xsd:element name="postOfficeBoxIdentifier" type="postOfficeBoxIdentifier" minOccurs="0" />
                             <xsd:element name="regionName" type="regionName" minOccurs="0" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="addressLine1">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="addressLine2">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="addressLine3">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="cityName">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="postOfficeBoxIdentifier">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="regionName">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="businessName">
                        <xsd:sequence>
                             <xsd:element name="FreeFormText" type="FreeFormText" />
                        </xsd:sequence>
                   </xsd:complexType>
                   <xsd:complexType name="CreditCard">
                        <xsd:sequence>
                             <xsd:element name="cardHolderName" type="cardHolderName" />
                             <xsd:element name="creditCardIdentifier" type="creditCardIdentifier" />
                             <xsd:element name="expiryDate" type="expiryDate" />
                             <xsd:element name="GlobalCreditCardClassificationCode" type="xsd:string">

  • How can I change the email address used to authorize my computer?

    I borrowed ebooks from a public library using a different email address which I should have used to authorized my computer hosting the adobe digital edition. Is there a way to modify the email address used to authorize my computer as I get an error message when I try to return the books. Thanks

    This says it was assumed answered but where is the answer?  I've gone thru the Help processes to do this but it doesn't change.  The old address is still there.  I have trouble returning books to the library and getting new books.

  • How To add postion specific email address to this query in oracle hrms

    Hi friends,
    I'm using the below query to send an email to the supervisor,employee and the HR manager
    I was able to add the first two mail address..
    for the third one,I mean HR manager... how do I get the email address
    I want to add the email address of the position --(from per_positions-->name--'HR-Manager' )
    I want to add the person's email address who is holding this position...
    can some one help me with this please
    SELECT paa.person_id, papf.full_name, papf.email_address, paa.date_end,
    paa.date_start, paaf.supervisor_id, papf2.email_address
    FROM per_absence_attendances paa,
    per_all_people_f papf,
    per_all_assignments_f paaf,
    per_all_people_f papf2
    WHERE paa.date_end = TRUNC (:p_date)
    AND paa.business_group_id = :p_buss_id
    AND papf.person_id = paa.person_id
    AND TRUNC (:p_date) BETWEEN papf.effective_start_date
    AND papf.effective_end_date
    AND TRUNC (:p_date) BETWEEN paaf.effective_start_date
    AND paaf.effective_end_date
    AND paaf.assignment_type = 'E'
    AND paaf.person_id = paa.person_id
    AND paaf.supervisor_id = papf2.person_id
    AND TRUNC (:p_date) BETWEEN papf2.effective_start_date
    AND papf2.effective_end_date

    What about this:
    SELECT det.person_id
    ,det.full_name
    ,det.email_address
    ,det.date_end
    ,det.date_start
    ,det.supervisor_id
    ,det.mgr_email_address
    ,det.hr_person_id
    ,hrper.email_address hr_person_email
    FROM (
    SELECT paa.person_id, papf.full_name, papf.email_address, paa.date_end,
    paa.date_start, paaf.supervisor_id, papf2.email_address mgr_email_address
    ,(SELECT paafhr.person_id
    FROM per_all_people_f papfhr
    ,per_all_assignments_f paafhr
    ,hr_all_positions_f pos
    WHERE papfhr.person_id = paafhr.person_id
    AND nvl(papfhr.current_employee_flag, 'N') = 'Y'
    AND paafhr.assignment_type = 'E'
    AND paafhr.primary_flag = 'Y'
    AND paafhr.position_id = pos.position_id
    AND pos.name = 'HR-Manager'
    AND trunc(:p_date) BETWEEN
    papfhr.effective_start_date and papfhr.effective_end_date
    AND trunc(:p_date) BETWEEN
    paafhr.effective_start_date and paafhr.effective_end_date
    AND trunc(:p_date) BETWEEN
    pos.effective_start_date and pos.effective_end_date) hr_person_id
    FROM per_absence_attendances paa,
    per_all_people_f papf,
    per_all_assignments_f paaf,
    per_all_people_f papf2
    WHERE paa.date_end = TRUNC (:p_date)
    AND paa.business_group_id = :p_buss_id
    AND papf.person_id = paa.person_id
    AND TRUNC (:p_date) BETWEEN papf.effective_start_date
    AND papf.effective_end_date
    AND TRUNC (:p_date) BETWEEN paaf.effective_start_date
    AND paaf.effective_end_date
    AND paaf.assignment_type = 'E'
    AND paaf.person_id = paa.person_id
    AND paaf.supervisor_id = papf2.person_id
    AND TRUNC (:p_date) BETWEEN papf2.effective_start_date
    AND papf2.effective_end_date) det
    ,per_all_people_f hrper
    WHERE hrper.person_id = hr_person_id
    AND trunc(:p_date) BETWEEN
    hrper.effective_start_date AND hrper.effective_end_date;

  • How to build and publish a webservice using Bex query?

    Hi Experts,
        Can anyone tell me how can i step by step to build and publish a webservice using Bex query,
    so another application can call this webservice.
    thanks.

    There i already a web service called query_view_data for the same available as delivered by SAP...

  • SCCM 2012 R2 Report using WMI Query

    I am trying to find out if I can generate a report to show which users installed what software using a report in SCCM 2012 R2 and a WMI Query.
    If not using the reporting within SCCM, then:
    1)  is it possible to pull such data via a wmi query
    2)  any suggestions how to do so?
    3)  Desktop OS is either Windows 7 or 8 or 8.1 Enterprise x64
    Thanks,
    Dave
    David Lakey

    You Can Create Query With the Software name but you can Know Which Computer and you can add System Resource as the Last login name
    This for Example:-
    From monitoring--> Create New Query--> Edit Query Statement --> Show Query Language
    past the following:- 
    select SMS_R_System.NetbiosName, 
    SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName from  
    SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on 
    SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceId = 
    SMS_R_System.ResourceId where 
    SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName like "%Visio%"
    After that in General you can add in Results Tap:-
    System Source and the Attribute Will be last Login name

  • HT5312 How do you change the email address used to send security answers?

    How do you change the email used to send the security answers you have forgotten? I have changed the alternative email adress in Name, ID and Email Addresses but this does not change the email address in the Password and Security section.

    Jus what do you want to accomplish? The Apple ID email address is used for variosu thing onthe iPod like:
    - For purchasing media. Srrings.iTunes and App stores. Sing out and sign into anoterh account
    - Settings>iCLoudl for iCloud account
    - Settings>FaceRome for Apple ID and where You can Be Reached At email address
    - Settings>Messages for Send And Receive email address.
    - Maybe for Game Center

  • "send link" function - how do I change the email address used

    When I use the "send link" function whilst using Safari on my iPad IOS 7.1.2, it now sends it from a secondary email address I have added in Mail.
    This is not my main email address (and the one I have set as my default), which is the one it has always used until recently.
    How do I change it back to my default please?

    The email address you want to use must be on your card in Address Book. Where there are multiple addresses on your card you can change between them in an iCal alarm by clicking the arrow to the right of the current address.
    AK

  • How to cnange the e-mail address used by iCloud ?

    iCloud syncs my Outlook through the [email protected] email address,
    But I want to change that into my standard e-mail address:
    Can somebody tell me how I could do ?
    Thanks !

    The [email protected] account creates a new folder in my Outlook, that does not sync with my other/standard e-mail address.
    I want to use my iPhone as a full sync mirror copy of my "old" standard outlook 2010 e-mail process.
    That includes that people contact me and receive replies through my "old" e-mail address.
    So my question is: how to use iPhone with my old e-mail address if iCloud communicates with [email protected] only ?

Maybe you are looking for

  • Report for Sales Order changes

    We are searching for a report which can list the changes of sales order items for a selected group of materials. Thanks for the help.

  • Problems with finder and mail. Lion no mountain lion. Sorry HELP!

    I came through here as cannot open in Lion. When down loaded up dates, had many problems in lion 10.7.5    when up loading photos and the drop down menure in finder opens, To chose file , When clicking on file another opens, When exporting same probl

  • Disk Image/CD-R Confusion

    I'm trying to figure out how to do one simple thing, or at least I hope it's more simple than what I know so far. I want to burn a copy of my Quicken data file to the same CD-R two or three times a month as backup. I've created a disk image of the fo

  • Adobe Acrobat Help

    The Adobe Acrobat Professional 8 Help menu item does nothing. What and where are the help files supposed to be located? The help resources seem to be present for InDesign, Illustrator, Dreamweaver, etc., but not for Acrobat or Flash.

  • Changing local user to network user on the sever?

    I moved a local user's home folder off a client computer to the server and made them a network user. The user can log in to the network numerous computers fine, as expected. However, the original computer where the user was a local user will not allo