PowerCLI to configured alarms report

Hello

I'm looking for a way to draw a report on alarms that we have configured in vCenter. For example, it would be nice to receive the information below.

NameTriggerAction
Redundancy Uplink lost networkNetwork connectivity lostE-mail: [email protected]

Is there an easy way to get this information?

Thank you

Scott

Figured it out.

vSphere PowerCLI > Get-AlarmAction | where {$_.to - eq "[email protected]'" "} | Select alarmdefinition, actiontype, to trigger | FL

Tags: VMware

Similar Questions

  • PowerCLI Script to the report on the failed VM jobs

    I figured out how to report on the events of VM (get-vievent), but no has no stains of VM. If a snapshot of the virtual computer fails, sometimes it never connect the events of the VM, but lists an error on the display of tasks. We are trying to monitor the clichés failed since its part of our backup solution.

    I was looking for a way to report these tasks/failure of events in a daily report, or simply add to the daily report of amazing Alan Renouf that we use.

    does anyone have any suggestions? For an example, see the attached screenshots. See how, in the view tasks, you have mistakes, but in the view of events, there is no errors.

    Any help would be great. Thank you!

    Jeff

    PowerCLI Script to the report on the failed VM jobs

    I figured out how to report on the events of VM (get-vievent), but no has no stains of VM. If a snapshot of the virtual computer fails, sometimes it never connect the events of the VM, but lists an error on the display of tasks. We are trying to monitor the clichés failed since its part of our backup solution.

    I was looking for a way to report these tasks/failure of events in a daily report, or simply add to the daily report of amazing Alan Renouf that we use.

    does anyone have any suggestions? For an example, see the attached screenshots. See how, in the view tasks, you have mistakes, but in the view of events, there is no errors.

    Any help would be great. Thank you!

    Jeff

    Hi Jeff

    I had exactly the same need to identify stereotypes having failed and drilled until SDK and LucD suggestions (thank you) to encode the following lines:

    $vmlist = Get-VM |sort Name
    
    foreach ($guestname in $vmlist)
    {
        $hours = 48 # Number of hours back
          $tasknumber = 999          # Windowsize of the Task collector
    $taskMgr = Get-View TaskManager
    
    # Create hash table. Each entry is a create snapshot task
    $report = @{}
    
    $filter = New-Object VMware.Vim.TaskFilterSpec
    $filter.Time = New-Object VMware.Vim.TaskFilterSpecByTime
    $filter.Time.beginTime = (Get-Date).AddHours(-$hours)
    $filter.Time.timeType = "startedTime"
    
    $collectionImpl = Get-View ($taskMgr.CreateCollectorForTasks($filter))
    
    $dummy = $collectionImpl.RewindCollector
    $collection = $collectionImpl.ReadNextTasks($tasknumber)
    while($collection -ne $null){
    $collection | where {$_.DescriptionId -eq "VirtualMachine.createSnapshot" -and $_.EntityName -eq $guestName} | %{
    if ($_.State -eq "Error") {
            write-host $_.EntityName
            write-host $_.StartTime
            write-host $_.State
            }
        else {
        }
    }
    $collection = $collectionImpl.ReadNextTasks($tasknumber)
    }
    $collectionImpl.DestroyCollector()
    
     }  
    

    This script displays the name of the virtual machines which met with an instant failure in the last 48 hours (a variable, you can change)

    This is just the beginning, because I want to count the shots failed and identify virtual computers that have more than 2 in 2 days

    Feel free to alter it at will.

    Enjoy

    Eric

  • Web server plug in the configuration of Reporting and analysis

    Hi Hyperion gurus,

    Please suggest: -.

    at the time of Configuring Reporting and analysis (taken from Web server in the configuration of Reporting and analysis)

    What Web server I would prefer to use for planning and working space (Apache HTTP server/IIS HTTP Server) I'm having IIS installed on my environment.

    If you're suggesting IIS: HTTP Port?

    He suggested that if I select the Apache HTTP Server Port: 19000

    Somewhere I read the required planning installed IIS server that's why I'm confused.


    Thanks for the reply in advance...


    Thank you
    Kumar N

    Hello

    It is up to you what you choose, most people go with the apache plugin and would go for this one, it is much more robust and rarely there at - it problems with it. The apache option will install all necessary files.

    You've probably read that you needed IIS to use EPMA.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Report on the configured alarms

    Hi all

    I am hunting for an easy way to export all the alarms and when they stock list stocks as well.

    Does anyone have a script close to?

    Really a combination of get-alarmdefinition and get-alarmaction I guess.  My powercli skills are a little weak so looking for some advice!

    The desired output is really a report indicating the status of the alarms in vcenter environment and detect configuration errors.

    Thank you all

    You can do something like this

    Get-AlarmDefinition |Select Name,Entity,Enabled,   @{N="Action";E={[string]::Join(',',(Get-AlarmAction $_ | Select -ExpandProperty ActionType))}}
    

    Note that this can be extended, depending on what you want to see in the report.

  • DMA2200 not will impact configuration and reports a configuration error

    I used the DMA2200 successfully until recently when he lost contact with my Windows 7 PC. The PC can see the DMA2200 on the network, but after 8-digit code, I always get a configuration error and a new user (Mcx1). I use AVG 9.0.819. This does not have a firewall, so I use the built in Windows 7 firewall. This deactivation makes no difference. My PC has been upgraded to Vista successfully little after that Windows 7 is out. I used the DMA2200 since then OK but maybe never implemented since the upgrade of the operating system. I checked for DMA2200 updated firmware, but it signals that I am up to date. My connection is an administrator. I keep everything where I can.

    The Windows logs I get (see below).

    Can anyone help here please?

    Kind regards

    VIC

    Journal entries: -.

    Journal name: Media Center
    Source: Microsoft-Windows Media Center Extender
    Date: 30/05/2010 14:00:58
    Event ID: 545
    Task category: Configuration
    Level: error
    Keywords:
    User: Lojoka\Vic
    Computer: Lojoka
    Description:
    Media Center Extender Setup cannot create an account for the extender with ID: uuid:8D91C7B0 - 99FD-42 D 1-A1A5-79AE293B37ED.

    Error: Only a part of a query ReadProcessMemory or WriteProcessMemory was made.
    The event XML:
    http://schemas.Microsoft.com/win/2004/08/events/event">
     
       
        545
        0
        2
        4
        0
        0 x 8000000000000000
       
        6591
       
       
        Media Center
        Lojoka
       
     

     
        UUID:8D91C7B0 - 99FD-42 D 1-A1A5-79AE293B37ED
        -2147024597
     

    Log name: Application
    Source: Microsoft-Windows-user profiles Service
    Date: 30/05/2010 14:00:57
    Event ID: 1533
    Task category: no
    Level: error
    Keywords:
    User: Lojoka\Vic
    Computer: Lojoka
    Description:
    Windows cannot remove the profile directory C:\Users\Mcx1-LOJOKA.Lojoka.005. This error can be caused by files in this directory that is used by another program.

    DETAIL - the directory is not empty.

    The event XML:
    http://schemas.Microsoft.com/win/2004/08/events/event">
     
       
        1533
        0
        2
        0
        0
        0 x 8000000000000000
       
        79970
       
       
        Application
        Lojoka
       
     

     
        C:\Users\Mcx1-LOJOKA.Lojoka.005
        The directory is not empty.

     

    Log name: Application
    Source: Microsoft-Windows-user profiles Service
    Date: 30/05/2010 14:00:57
    Event ID: 1511
    Task category: no
    Level: error
    Keywords:
    User: S-1-5-21-2753804710-3089563717-4261566473-1045
    Computer: Lojoka
    Description:
    Windows cannot find the local profile and connects you with a temporary profile. Changes to this profile will be lost when you log out.
    The event XML:
    http://schemas.Microsoft.com/win/2004/08/events/event">
     
       
        1511
        0
        2
        0
        0
        0 x 8000000000000000
       
        79971
       
       
        Application
        Lojoka
       
     

     
     

    Solved! The problem was a software the Bank invites you to install. It's report. It has never given any other issue. I've uninstalled it during my investigations and the Extender (DMA2200) has finally set up OK. After you have reinstalled the report still seems to work OK.

    I hope this helps someone!

    VIC

  • PowerCLI VM Nics AdapterType report

    Hi all

    I'm doing a report for my virtual machines (400). I am management Vcenters 2 in bound mode and I've seen some mistakes in the process of creation of VM, e1000, Vmxnet2 maps on the server.

    I use Powershell/Powercli for two years from now, but I m facing some problems... If the servers have more than 1 NIC, my report just write 1 card...

    If you could help me, I assumed that my script is not correctly written...

    Here it is:

    # CREATE EXCEL #.
    $Excel = new-Object - Com Excel.Application
    $Excel.visible = $true
    $Excel = $Excel.Workbooks.Add (1)

    $VM = $Excel.WorkSheets.Item (1)
    $VM. Name = "Network Type".
    $VM. Cells.item(16777216) (1,1) = "name of the virtual machine.
    $VM. Cells.item(16777216) (1,2) = "name of the OS.
    $VM. Cells.item(16777216) (1,3) = 'IP address '.
    $VM. Cells.item(16777216) (1.4) = "VM HOST.
    $VM. Cells.item(16777216) (1.5) = 'VM STATUS '.
    $VM. Cells.item(16777216) (1.6) = "card Type".
    $VM. Cells.item(16777216) (1.7) = "name of the map.
    $VM. Cells.item(16777216) (1.8) = 'data center '.


    $WorkBook = $VM. UsedRange
    $WorkBook.Interior.ColorIndex = 0
    $WorkBook.Font.ColorIndex = 5
    $WorkBook.Font.Bold = $True
    $WorkBook.HorizontalAlignment =-4108
    $VmRange = $VM.range ("A1:Z500")
    $Vmrange.font.size = 8
    $intRow = 2

    # CONNECTION VCENTER #.
    SE connect-VIServer-Server $VCenter - user $User-Password $PWD - AllLinked: $true

    $VMs = get - VM | Sort-Object Name

    {Foreach ($ColVM to $VMs)
    #Gathering info on $ColVM
    $VMsItems = get-VM-name $ColVM | Select Name, VMHost, PowerState,
    @{N = "OSFullName"; E={($_ | (Get - VMGuest). OSFullName}},
    @{N = 'IP address'; E={($_ | (Get - VMGuest). Ip_address}},
    @{N = "AdapterType"; E={($_ | Get - NetworkAdapter). Type}},
    @{N = 'AdapterName'; E={($_ | Get - NetworkAdapter). Name}},
    @{N = 'Center'; E={($_ | Get - data center). Name}},
    @{N = "CardCount"; E={($_ | Get - NetworkAdapter). County}}

    #Filling Excel report
    Foreach ($Name in ($VMsItems.Name)) {}
    $VM. Cells.Item($intRow,1) = [STRING] $Name.Name
    $VM. Cells.Item($intRow,2) = [STRING] $Name.OSFullName
    $VM. Cells.Item($intRow,3) = [STRING] $Name.IPAddress
    $VM. Cells.Item($intRow,4) = [STRING] $Name.VMHost
    $VM. Cells.Item($intRow,5) = [STRING] $Name.PowerState
    If ($VMsItems.PowerState - eq "Receptor") {$VM. Cells.Item($intRow,5). Interior.ColorIndex = 4}
    Else {$VM. Cells.Item($intRow,5). Interior.ColorIndex = 3}
    $VM. Cells.Item($intRow,8) = [STRING] $Name.Datacenter
    $VM. Cells.Item($intRow,6) = [STRING] $Name.AdapterType
    If ($Name.AdapterType - eq 'Vmxnet3') {$VM. Cells.Item($intRow,6). Interior.ColorIndex = 4}
    Else {$VM. Cells.Item($intRow,6). Interior.ColorIndex = 3}
    $VM. Cells.Item($intRow,7) = [STRING] $Name.AdapterName
    {$IntRow ++}
    }
    $WorkBook.EntireColumn.AutoFit)
    $VM. Columns.Item (2). ColumnWidth = 25

    # BACKUP #.
    $Excel.SaveAs ($FILENAME)

    # DISCONNECT VCENTER & EXCEL KILL PROCESS.
    Disconnect-VIServer-Server *-confirm: $false - Force: $true
    #Stop - Process - processname excel

    Thank you

    Julien

    Also have you tried

    $VMs = get-ResourcePool-name "REC". Get - VM

    That should only give you virtual machines in this specific resourcepool.

    And you can have more than 1 name on Name - parameter

  • PowerCLI: Enable / disable alarm on the hosts Actions / clusters

    Hi all

    I did some serious research on Google and am about to accept that it is not possible through PowerCLI.

    But I wanted to make a last effort by asking you guys.

    For the ESXi host interview, I want to use a PowerCLI script that does this:

    1. -Disable alarm on Cluster actions
    2. -Disable alarm on the hosts actions

    3. -maintenance (can be anything, but will include the host reboots)

    4. -turn on the alarm of the actions on the hosts
    5. -activate the alarm actions on Cluster

    Because we have 300 + hosst ESXi, you can imagine that I want to cela scripted.

    Is it possible to toggle alarm actions via PowerCLI?

    Thank you and best regards,

    Harold

    OK, it seems we are talking about two different things.

    What you want to do can be done from a script PowerCLI.

    Something like that

    $alarmMgr = Get-View AlarmManager $cluster = Get-Cluster MyCluster # To disable alarm actions $alarmMgr.EnableAlarmActions($cluster.Extensiondata.MoRef,$false)
    
    # To enable alarm actions $alarmMgr.EnableAlarmActions($cluster.Extensiondata.MoRef,$true)
    

    The same can be done for a host ESX (i)

    $alarmMgr = Get-View AlarmManager $esx = Get-VMHost MyEsx
    
    # To disable alarm actions $alarmMgr.EnableAlarmActions($esx.Extensiondata.MoRef,$false)
    
    # To enable alarm actions $alarmMgr.EnableAlarmActions($esx.Extensiondata.MoRef,$true)
    

    Sorry for the confusion

  • PowerCLI LUN configuration problems

    Hi all

    I am trying to adjust some of our configurations and LUN LUN and storage for a specific cluster together. We have ESX4i and I used PowerCLI for this script. I am having trouble if it works properly and do not have enough PowerCLI skills to see what is wrong... I looked at everything and think I'm close. Here's what I want to do:

    Connection to all hosts in a cluster at the same time and change the selection of current path to Round Robin, define the selection of the path by default to round robin, then set it to PAHO are / s 1.

    Here is the code I use, can someone please tell me where I am to spoil... Thank you!

    to connect to the first cluster that I use:

    Se connect-VIServer -Server MyVsphereServer -user User1 -password MotDePasse1

    foreach ()$esx in Get-Cluster ProductionCluster02 | Get-VMHost ) {

    then I run the following command to set the default policy that is now in the Round Robin:

    {$("VMW_PSP_RR", "VMW_SATP_ALUA") esxcli.nmp.satp.setdefaultpsp}

    Then I run the following command to set the policy of current path on Round Robin:

    $esxcli.nmp.device.setpolicy ($null, "naa. ") 00xxxxxxxxxxxxxxx', "VMW_PSP_RR") .

    Then I run the following command to set the OPS are / s to 1 instead of 1000

    $esxcli.nmp.roundrobin.setconfig ($null, "naa.naa. ") ( 00xxxxxxxxxxxxxxx", 1,"Ops ES/s», $null)}

    When I connect to a single host and run it at a time by using the connect-viserver and put the host name, not the name of the virtual server Center in there and run one at a time it works...

    So all together, I want to change on several hosts, these three functions at the same time... Here's what it looks like all together.

    Se connect-VIServer -Server MyVsphereServer -user User1 -password MotDePasse1

    foreach ()$esx in Get-Cluster ProductionCluster02 | Get-VMHost ) {

    {$("VMW_PSP_RR", "VMW_SATP_ALUA") esxcli.nmp.satp.setdefaultpsp}

    {

    $esxcli.nmp.device.setpolicy ($null, "naa. ") 00xxxxxxxxxxxxxxx', "VMW_PSP_RR") . } {

    $esxcli.nmp.roundrobin.setconfig ($null, "naa. ") ( 00xxxxxxxxxxxxxxx", 1,"Ops ES/s», $null)}

    It's a failure... can anyone give me a suggestion as to why? or do you have any suggestions for a better approach? Thanks guys,.

    Chris

    All three declarations of esxcli to use the variable $_.

    The script loops through all the elements in the table $luns.

    Inside the loop, the value is available in the variable $_.

  • Service alarm report filter

    Hello

    I'm writing a groovy script to get a list of filters of alarm for a service, but with not a lot of success. Anyone have advice on how to do this?

    Thank you

    Kris

    Hello

    the bottom should cover all the possible filter that can be created:

    def service = #! FSMService WHERE name = "YourServiceName" #. getTopologyObjects() [0]
    def filters = service. Get ("alarmFilterConditions")

    def filtersToString =]

    (filter filter)
    {
    include some DEF = filter. include
    def severityThreshold = filter. severityThreshold
    def filterToString = "";

    If (include! = null & severityThreshold! = null)
    {
    If (include)
    {
    Switch (severityThreshold.get ("name"))
    {
    "Fatal" case: filterToString = "include Fatal."
    break;
    case "Criticism": filterToString = "include fatal and critical."
    break;
    box "Warning": filterToString = "include all".
    break;
    }
    }
    on the other
    {
    Switch (severityThreshold.get ("name"))
    {
    "Fatal" case: filterToString = "exclude Fatal."
    break;
    case "Criticism": filterToString = "exclude fatal and critical."
    break;
    box "Warning": filterToString = "exclude".
    break;
    }
    }
    }

    Rule def = ID filter. Rule ID
    If (ruleId! = null)
    {
    def rule = server. RuleService. getRule (ruleId)
    If (! filterToString isEmpty ()).
    {
    filterToString += «...» "
    }
    filterToString += "State:"+ rule. " Name + «...» Scope: "+ rule. scopingTopologyObjectType?. name
    }

    expression of def = filter. expression
    If (expression! = null)
    {
    If (! filterToString isEmpty ()).
    {
    filterToString += «...» "
    }
    filterToString += "Groovy Expression:"+ expression. "
    }

    filtersToString. Add (filterToString)
    }

    return filtersToString

    Thank you

    Alain Abdulsater

  • Configure alarms for VMware Datastore latency in version FREE Foglight!

    Hi all

    I downloaded the version free foglight and that I imported the FVO in my test harness. I want that when a data store has over 50ms latency so I should launch an alert.

    I can't see the alarms on the console free foglight.

    Can you please how can I do to achieve the same thing.

    Thank you

    Vaibhav

    Hi vaibhav,

    The free version does not include a rule to check latency of data store. I checked with development and looks like a new rule has been added to the Foglight for virtualization Enterprise Edition 7.2 (to be released in the following months). The new rule is called: VMW Datastore total latency.

    For the moment, in my view, there is a latency of data store rule included in one of the established community of cartridges. These cartridges are not created by Dell and are not supported. Take a look at it and see if it meets your request.

    http://communities.quest.com/docs/doc-12956#comment-6001

    Note: If your Foglight does not have the ability to install cartridges, chances are that you are running the Standard Edition version. If you have problems, please indicate the full version number. You should find it in the topic of the article.

    Concerning

    Gaston.

  • create an alarm to be notified when oracle db is shutdown

    Hello

    on 5.5.4, we control an oracle database. How cofigure a notification so that to be notified when oracle db is shutdown?

    In help, I saw this:

    Foglight for Oracle configuration alarms for Email Notification

    To configure Foglight for Oracle email notification:

    1

    Select dashboards > Administration > rules & Notifications > manage registry Variables.

    2

    In the filter by the Variable name field, enter the string dbo-email to only display the email related variable notifications.

    But do not know how to change them to receive an email when oracle db is stopped.

    A tutorial that shows with an example?

    in the Configuration Guide and Administration Foglight 5.5.4 I do not see any chapter to this topic.

    Thank you.

    Guy,

    You start by specifying a mail server in Foglight.

    Under the houses > welcome edge > configure alarms reporting and power outages

    and then configure e-mail settings

    Configure the mail server

    then set the DB admin user

    Golan

  • configuration of the plugin simple text report

    I am updating a project of Teststand 4.2 for 2012. The original was a text via a report updated the sequential model and ICB code. I have trying to find current best practices to achieve a similar report.

    I installed the plugin to report simple text example but can find no documentation on how to configure it.

    The example works fine, but the columns have no limits or the measured value and have other items that I didn't need.

    Looking through the code I can see these are defined in the settings of the plugin, but I do not see where in my project to put.

    I'll also have to configure the report header and the name of the file.

    David

    What exactly do you mean by "key values"? Are you referring to the Key property in the NI_SimpleTextReport_CVI.seq?

    In order to get the type of comparison of a numerical limit test, for example, you can use an Expression like this post:

    Locals.ComparisonType = Step.Comp

    This would amount to "FROZEN".

    Regarding the addition of the results of the report, the key values are a string of research compared to a result object. In this case, you can add what you want to log on to the other results of this approach. Then, you can add a new column to the report in the NI_SimpleTextReport_CVI.seq file and the value of the key:

    AdditionalResults ["NameOfAdditonalResult"]

  • Unifying Primavera - Configuration of custom report

    Background:

    We have configured Oracle BEEP and followed procedures in accordance with the configuration document. We must unify 9.11 in our environment.

    I have defined data views -> I was able to successfully perform the steps "Configuration-> new report--> report" . "» To run this report, I need to provide access of the company space and work within the Shell Instance.

    Now when I try to access this report. Miss me the c option if superior.

    I logged in as "OOTBADMIN": company Workspace-> Admin Mode-> access control-access User Mode-> company-> reports-> workspace > I can't see option "Custom Reports"


    Company Workspace-> Admin-> Access Mode control-> user access Mode-> shells/projects-> reports-> I can't see option "Custom Reports"


    Any help would be sincerely appreciated.


    Thanks in advance

    Once the report personalized, follow the steps below:

    Go to: company Workspace--> Mode Admin-->--> User Mode Browser Configuration

    Select Project/Shell on the right and double-click on who opens the Edit Project/Shell browser window.

    Locate the report published in the section Modules available and business processes (right).

    Select the report, and then move it with the arrow to the left in the middle of the reports tab (or any other subfolder under reports where you want than the State of residence) on the project / Shell Navigator (left side) and select OK.

    Reselect the project/Shell under the browser Mode, then select the button 'Deploy' on top. This will save the changes you made.

    Now you can give permission to the report (skip this step if the authorization is checked by default) and return to the report using the User Mode and you should be able to see the report.

    I would like to know if it works.

  • utility for documenting the ESXi server configuration?

    I know that we can use tools of command line following this kb KB VMware: backup and restore ESXi configuration using the vSphere command-line Interface and vSphere PowerCLI...

    to save and restore a configuration of the host.

    But what I'm looking for is a way to 'capture' the current configuration of a particular server, so that I can use this config as a starting point for the construction of host config documentation. The bundle of config which is created by running the command above creates a bunch of text and other files that I think hold configurations, but they do not provide a way to look through the config, or copy and paste easily the different elements.

    Anyone know of a free util that will do something like what I'm looking for?

    Hi TedH256,

    It's easy...  RVTools completely!  It is a simple, lightweight windows install you simply point your vCenter (or $vmhost), and then save the report in Excel.  It creates tabs for everything you can imagine including network vmkernel.  That should be all you need.  Still hungry?  Launch PowerCLI and use vCheck, Reports of CDPand NIC Firmware.

  • Inventory report - multiple vCenters

    Hello group,

    I am trying to run a report of inventory using the script below. When it is executed on a vCenter only the output is great, but when I try to run the same report on multiple vCenters then the output has the values of the first vCenter in the script for others as well... So in this case the script runs first on vcenter01 and prints the output and then runs on vcenter02 but prints only the same values of vcenter01... Pls help...

    $vcenters = "vcenter01", "vcenter02".
    $portvc = "443".

    SE connect-VIServer $vcenters - port $portvc

    $vcreport = @)
    {Foreach ($vcserver to $vcenters)
    $intyhosts = get-VMHost | Name sort
    $intyvms = get - VM | Where {($_.)} PowerState - eq "Receptor")} | Name sort
    $intyds = get-Datastore. where {$_.} Type - eq "VMFS" - and $_. Extensiondata.Summary.MultipleHostAccess}
    $nohosts = $intyhosts. County
    $novms = $intyvms. County

    $vcrow = "" | Select 'vCenter Name', 'Center', 'Clusters', 'ESXi Hosts","VMs","VMFS data warehouses.
    $vcrow. "' vCenter name" = $vcserver
    $vcrow. "' Data centers ' = (get-data center |) SELECT name. mesure-objet) .count
    $vcrow. "' Clusters ' = (Get-Cluster |) SELECT name. mesure-objet) .count
    $vcrow. "' ESXi Hosts ' = ($intyhosts). County
    $vcrow. "' Virtual Machines ' = ($intyvms). County
    $vcrow. "" VMFS data warehouses "= .count ($intyds)
    $vcreport += $vcrow
    }

    Kind regards

    VMSavvy

    Hello, VMSavvy-

    The results you see are due to the 'DefaultVIServerMode' of your PowerCLI instance configuration.  When it is "multiple" and make you a Get - VM, it gets for example, VMS in all connected vCenters.

    So you can change your code a couple of different ways in order to get info from both single vCenter.

    One way would be to change the location to connect to vCenter servers give - navigate the script block Foreach Connect-VIServer and have simply plug the $vcserver current in this iteration of the Foreach loop.  Then, at the end of the script Foreach block, add a logout-VIServer-confirm: $false to disconnect.  The next iteration through will connect to the following server vCenter.

    Another way would be to add the server to the GET setting-* cmdlets.  Thus, for example, the line that gets the VMHosts would change something like:

    ...$intyhosts = Get-VMHost -Server $vcserver | Sort Name...
    

    That tells the cmdlet to contact the vSphere server specified in the request.  Preventing counties apparently duplicate that have seen you.

    How does do for you?

Maybe you are looking for

  • I need 128-bit encryption to use a government site

    I need to go to this web site for an app of the job, he won't let me submit my information, because he says that I need 128-bit encryption

  • June 16 corrupt update of Windows Vista

    I lost internet access and most of the program window features (I'm running in safe mode, which is the only way to connect). The only change was the update of Windows that loaded on 15 June. I tried to restore to June 6, but nothing works. I spent ho

  • E-mail-Outlook Express does not open.

    Don't know if I'm in the right place to ask this question. When I try to open my Outlook Express I get a box that reads, "Outlook Express could not be started because MSOE." DLL could not be initialized. "Outlook Express from my is not installed corr

  • Pavilion ts 23: HP Pavilion 23-f200br for W7 SM bus controller

    Hello After much research I could finally install W7 on my desktop (originally W8) Now I can´t find a bus controller/chipset for W7 driver. HP does not have drivers for W7 on this machine (thanks for this HP) Can anyone help

  • 8100 printer all in one

    Is it possible to print from my iphone 4 or newer of the ipad to my 8100 printer?