Notice-EEG-filter problem

Hello

I wanted to ask if I'm doing something wrong here, or documentation is wrong for this filter.

http://pubs.VMware.com/vSphere-50/index.jsp?topic=%2Fcom.VMware.PowerCLI.ug.doc_50%2FGUID-CE297107-09C8-49E0-827E-7978217911CC.html

in the guide it is said:

"

1

Create a filter by the power status and the name of the client operating system of the virtual machines.

$filter = @{"Runtime.PowerState" ="poweredOn"; "Config.GuestFullName" = "Windows XP"}
2

A list of virtual machines by using the created filter and call the ShutdownGuest method for each virtual machine in the list.

Get-View -ViewType "VirtualMachine" -Filter $filter | foreach{$_.ShutdownGuest()}

The filter gets a list of virtual machines under tension whose names OS comments contain the string Windows XP . The cmdlet Get-view then initiates the stop for each operating system in the list.

"
I myself wrote similar filter, but I would like to see virtual machines which are windowsfamily AND are not therefore models:
$filter=@{'Guest.GuestFamily'='windowsGuest «;» {Config.Template '=' False'}
Notice-EEG - ViewType virtualmachine-filter $filter | Select name, @{n = "y"; e = {$_.}} Config.Template}},@{n='yyy';e={$_. Guest.GuestFamily}}
According to helps them get-view
"
-Filter < Hashtable >
Specify a hash of < name > - < value > pairs, where < name > is the value of the property to test, and < value > represents a pattern must match the property. If more than one pair is present, all models must match.
"
so I put 2 pairs, one for config.template and one for guest.guestfamily. TWO of them should be true to get the result according to the documentation, but when I run this I receive the result where and not 'and '.
I receive entires:
col1 col2 col3
VM1 False
False WindowsGuest VM2
So why do I receive entries with guestFamily blan, for me it looks like it's ' if I find 1 property propert or 2nd "and not 1 Property AND 2nd property '.
Can someone confirm this is how it works with and for pairs of gold, or if I do not correctly
Thank you in advance!

The Get-View Filter parameter works as described, but I'm sure that you hit a particular situation.

I suspect that you have virtual machines that do not have the VMware tools running.

A condition in the filter when the property is $null will always succeed it seems.

If you replace the filter like this, you should see the accurate virtual machines.

$filter=@{"Guest.guestState"="^Running";"Guest.GuestFamily"="windowsGuest";"Config.Template"=[string]$false}
Get-View -ViewType "VirtualMachine" -Filter $filter | Sort-Object Name | Select Name,  @{N="Guest State";E={$_.Guest.GuestState}},  @{N="Family";E={$_.Guest.GuestFamily}},  @{N="Template";E={$_.Config.Template}}

The additional condition will ensure that Guest.GuestFamily is present and has a value.

Note, I don't think that this behavior of the filter is, in my opinion, should be done. If the filter meets a $null in one of the properties, it should return $false for this condition, no $true.

There is room for improvement on the behaviour of the filter

Tags: VMware

Similar Questions

  • Notice-EEG-filter HashTable expression helps

    Need help with the help of the view - get - filter the hash table.    I have a script that I use get - view for clusters, I am providing a method to limit the results to a specific cluster where the person running the script must only to face a single cluster.   My problem is when we have two clusters that are almost the same name (the first part is the same then a space and more text) the filter returns two clusters...  I believe you can use a regular expression express with the - hastable filter but I don't know exactly how to do or how to build this expression.    Here is an example of the scenario and the example of group names.

    Cluster environment:

    NLX-TST-001

    NLX-TST-001 (BETA)

    NLX-TST-002

    NLX-TST-003

    NLX-TST-INF-001

    Essential parts of the script on my topic.

    $viserver = "nlxtxtvc01".

    $clustername = "NLS-TST-001.

    $ClusterFilter = @{"name" = $clustername}

    $clustersview = get - view viewtype - clustercomputeresource-Server $viserver - filter $clustername

    When I run get - above the $clustersview view will contain 2 results:

    NLX-TST-001

    NLX-TST-001 (BETA)

    When I want to return only NLX-TST-001.      Now, I know, I could test to see if $clustersview contains more than 1 result and then using a loop or other filter mechanism corresponding to the one that I want.  But I think since the - filter will allow you to use regex, this should be done?   Possibly having to have two criteria in the express regex using the name... Unfortunately, I'm not this experience with the use or construction of the regex expressions and I used for the most part very simple - filters in the past...

    Any help will be greatly appreciated.

    @Get-View

    @PowerCli

    @Regex

    @-Filter

    @hashtable

    Change the regular expression to this

    $clustername = "NLS-TST-$001".

    The dollar sign indicates a RegEx that the match must end with the characters you specify, it is an end of line in a way

  • Notice-EEG - ViewType for data store

    Notice-EEG - ViewType 'VirtualMachine' - property @("Nom", "Config.DatastoreUrl") | Select-Object - property name, @{N = "DataStore"; E={$_. Config.DatastoreUrl}}

    Above don't gives no path of the store of data... suggest what is missing?

    This works well for vm alone tho

    Hello, esxi1979-

    By 'path of data store', looking for the names of the stores of data on which the virtual machine is located?  If so, you can adjust this property calculated to something like:

    Get-View -ViewType "VirtualMachine" -Property "Name", "Config.DatastoreUrl" | Select-Object -Property Name, @{N="DataStore";E={$_.Config.DatastoreUrl | %{$_.Name}}}
    

    What do I do?

  • Notice-EEG - ViewType VM list only the virtual computer in a data store

    All, it seems to be confused about something that should be easy.  I guess it stems from a lack of understanding of Get - view.

    I'm changing the script of v3 vCheck virtu-al.  In it, he uses the line below to obtain the views of the virtual machine.  I want only the views of the virtual machine in a specific data store.  I was able to change the rest of the code, but I'm stuck here.

    $FullVM = get-View - ViewType VirtualMachine. Where {-not $_.} Config.Template}

    I tried: $FullVM = Get-Data Center & lt; Data CENTER & gt; Notice-EEG - ViewType VirtualMachine. Where {-not $_.} Config.Template} without success. Following error:

    Get-view: the input object cannot be bound to all the parameters of the command either because the command does not

    input pipeline or entry and its properties do not match any parameters that accept entries of pipeline.

    On line: 1 char: 25

    + $FullVM = $DC | Get-View & lt; & lt; & lt; & lt;  -ViewType VirtualMachine. Where {-not $_.} Config.Template}

    + CategoryInfo: InvalidArgument: (Server Management Denver: PSObject) , ParameterBindingExcepti

    on

    + FullyQualifiedErrorId: InputObjectNotBound, VMware.VimAutomation.Commands.DotNetInterop.GetVIView

    Any help would be appreciated, Josh

    Try this

    Get-View -Viewtype VirtualMachine -Searchroot (Get-Datacenter  | Get-View).MoRef
    
  • noticed the same problem, my friend had 2 months in hardware of the iphone 6!

    Hello

    I use the iphone 6, which is out of the now (india) warranty period. I noticed a problem on the screen detaches from the main frame around one of the edges. It's the same problem happened to one of my friends who ultimately involving more areas progresed and encrypted him a good amount of money to repair! I searched online on the issue and learned that this has happened to many! I'm pretty sure that's not due to mishandling (which can easily be checked during the inspection) atleast in my case!

    I called apple in India care a couple of hours. Care agent told me that they can't do anything on this issue since his release from the warranty period (even if it's a manufacturing defect). I have a strong feeling that my question has not been properly processed there. Is not a manufacturer, selling a defective product ensuring there will be no problem in the first 6 months and declaring that they are not rsponsible for what past of the next day. It should not be considered on the side of manufacturers, it should rather be on the side of the average consumer, who spent a good amount of money to purchase!

    Kindly understand that I don't have time to run in the stores of stores and calls calls! I need a solution to the authorities of apple before moving on to the Court in India on behalf of fellow sufferers!

    Thank you

    Hello

    You don't talk to Apple here - it is a community of used-based technical support.

    If you are unhappy with the decision that is provided by Apple, you will need to discuss the issue with them.

  • transparent filter problem

    I regularly visit a Web site were members of the community can submit/attach photos with each submission blogfeed on their own profile page. When more then 2 photos are submitted/joint there are only 2 thumbnails shown and one line "and x" (x = quantity of photos).
    When I clicked on this line in the past, I could always see these photos in a new window, but now, I got the message "Clear filter" (very often) What should I do? The website (home page) is excluded from pop up block.
    Hope someone could help me.
    I use the Dutch language Firefox with Windows 7 Professional.
    Thanks in advance

    It is difficult to say what the issue could be without actually seeing. May I reproduce if you posted a link to the site? Also, do you think you could provide a screenshot?

    If you need help to create a screenshot, please see How to make a screenshot of my problem?

    Once you have done so, attach the file to screen shot saved to your post on the forum by clicking on the button Browse... under the box to post your reply . This will help us to visualize the problem.

    Thank you!

  • Brightness & yelow filter problems

    Hello!

    My problem is that I can not increase the brightness in the games.
    I use the nwidia Control Panel to increase the brightness, my office is almost white, but nothing happens in the games...
    Everything was OK under XP (so I change the brightness of the Panel, it also changes in the games)

    I also had a problem with the Windows Photo Viewer, all the photos as under yelow filter... and some gatget are yelow too... and menu of Rockstar Games Social Club is ander yelow filter too...

    Quite different is OK.

    Thank you

    Hi raf73,

    Thank you for visiting the website of Microsoft Windows Vista Community. The question you have posted is related to the material and would be better suited to the TechNet community. Please visit the link below to find a community that will provide the support you want.

    http://social.technet.microsoft.com/Forums/en/category/w7itpro?ITPID=sprblog.

    Thank you for using answers Forum. Please let us know how it works.

    Joseph
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Keys/keyboard filter problem?

    turned on the filter then it off key keyboard still does not work. also, has a restored system and KB has not yet responded. i a hp wireless kb and never had a problem w / until I have turned on accidntally filtr keys. have 2 use the keyboard to the screen w/mouse

    http://welcome.HP.com/country/us/en/support_task.html

    Try the uninstall/reinstall keyboard Drivers/software.

    You can find the HP drivers/software at the link above

    See you soon.

    Mick Murphy - Microsoft partner

  • Filter problem of keyboard dv7-1170US trying to upgrade to Windows 7

    I have a laptop DV7-1170us with Windows Vista Edition Home Premium and try to upgrade to Windows7 but I have a problem with the update of the keyboard filter. Where can I download an updated driver?

    Thanks in advance

    Ric

    You can download the filter of keyboard also called quick launch in the following hyperlink:

    FTP://ftp.HP.com/pub/SoftPaq/sp45001-45500/sp45058.exe

  • Adobe Photoshop Camera Raw Filter problem

    I get the same weird problem whenever I try to take a .jpg image and apply the Camera Raw filter on it. This is what it looks like:

    Capture (2).PNG

    I uninstalled and reinstalled in a first time, and then I gave my laptop image and nothing, still the same error. I also have a desktop computer with Adobe Photoshop and I tried it and it worked. But, why is it not this work on my laptop? Its the same exact version of Photoshop with all the updates.

    That's what it should look like:

    001.jpg

    Try

    Win: Edit > Preferences > Performance

    Mac: Photoshop > Preferences > performance

    Deselect use Graphics Processor.

    Quit and restart Photoshop application.

    More information: Photoshop troubleshoot graphics hardware (GPU) and video card problems

  • FILTER PROBLEMA "EFFETTI LUCE.

    Ciao a tutti ragazzi
    Spero qualcuno come to mi in aiuto pole really non so più che inventarmi possa. da some giorno ormai ho no problema con filter it "effetti luce", ossia quando che lo provo ad attempt non mi fa requested the classica where by change i parametri della luce del mouse my it cursore semplice. quindi non posso in nessun modo change grandezza o posizione della luce.
    qualcuno mi aiuti a favore

    I hope someone can help me because I don't really know any more than the inventor. Since a few days I have a problem with the filter "lighting effects", which means that when I try to apply do me not see the ellipse classic to change the settings of the light, but the mouse cursor. so I can in no way change size or position of the light.

    someone help me please

    What happens if you check view > Show > all.

  • Security filter problem

    Hello

    I am facing a problem with the security filter for a single user. We are on the edition of Fusion Hyperion Version 11.1.2.1.

    We had a user created in the SSP with ID: TESTUSER and added in the group. Initially for this user was working fine. Subsequently, we have removed this user of shared services like us is needed more than that.

    According to the new requirements that we are supposed to create a user with the same username, so we created new new user "TESTUSER" and added in the same group of users, then we refreshed the Planning Application security by "Administration-> Application-> Refresh Database-> security filters '." " Refreshing security created filters to filter for above the user and we checked this consol EAS.

    However, when connect us to the Application via Smart View we get the error below.

    *****************

    Could not open the cube View.Essbase error (1054060): Essbase failed to select

    Application APP1, because the TESTUSER@Native directory is not\

    completely updated in service planning.

    *****************

    Could you please advice how we can solve this problem.

    Try to remove user security file EAS using MAXL and try again to create security filters.

  • paint with oil filter problem. works fine in preview mode, but seems blurry and fuzzy when finished.

    Why my picture look fuzzy after the use of oil paint. When I use the filter and I'm in the preview window, it seems, but once I'm actually it doesn't look like any good as. It looks blurry. my photos are work that I stretched and they have little effect on them to iPhoto. I use Mac OS 10.6.8.

    In my experience, after using tons of plugins art/painting over the years, I find that paint programs and files of lower density as opposed to 300 dpi files.

    The pictorial influence is very different on 300 dpi as opposed to the 100 dpi file file.

    It may be barely noticed in 300 dpi, thus confusing the Viewer, but the effect is obvious boldly in a file of 100 dpi.

  • Library filter problem

    In the past, I used the text and attribute filters at the same time to perform a search on a keyword and starry images. But tonight, I open the text filter, but when I click on the attribute, it replaces the filter text instead of opening beside him. I guess I've hit inadvertently a shortcut key change this function. I searched the forum and looked through the view menu, but can't find how to solve this problem. Any thoughts?

    Try to hold down the Ctrl (probably the key command on Mac) key when you click on the second.

    HAL

  • Interactive report filter problem

    Hello

    Today I met a problem with an interactive report. When the report first, load no problem. If a filter is added, an error is returned. The error is actually produced by a routine of affirmation that triggers and exception if a NULL value is passed. Here is a modified and simplified the application version:
    SELECT id,
       name,
       dept,
       emp.year_of_emp(hire_date) AS years_of_employment
    FROM emp_table
    WHERE id IN (
       SELECT c001
       FROM apex_collections
       WHERE collection_name = 'EMPS_UNDER_MANAGER'
    );
    Once again, when the report first no loading, no problem. When the Manager applies, say a filter on dept, an error is raised by the emp.year_of_emp function because a NULL value was passed.

    I know that all the EMOS with an id of PGE in the collection have a hire_date so I don't think that I should add another condition in where clause to filter those (even if it's the work at this stage). Anyone has any ideas as to what could be the cause?

    Kind regards
    Dan

    http://danielmcghan.us
    http://sourceforge.NET/projects/tapigen
    http://sourceforge.NET/projects/plrecur

    Hello Dan,.

    Most points on the road ;-)

    Select / * + SORTED * / seems to do the trick... (I've updated your sample app and it works)

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this response in marking it as useful or Correct ;-)

Maybe you are looking for

  • Control buttons do not work on my Satellite A660

    Satellite A660 / 07T running windows 7 For some reason any no longer works them that my control buttons, IE his mute, wireless, touchpad and buttons etc. I can still control these functions using the buttons F displayed at the top of the screen. Have

  • Satellite 1605cds: RAM has not reported in Windows 2000

    Hello I have a 2nd hand Toshiba Satellite 1605cds/4.3 (amd k6-2 450 mhz basic system).It has 32 MB of ram on board and a dimm slot - so put in a memory of 128 MB. But I read this Web page: http://fandelem.com/toshiba2.html where it says it can be imp

  • Wireless kit PA3298U-1MPC and Satellite A30 - where is the antenna cable?

    HelloI have Toshiba Satellite A30 (part No. PSA33A - 87 M 34) which was bought in Australia.I just bought the PA3298U-1MPC wireless connection kit a couple of days. The installation guide says I should connect two cables. But I can't find them. There

  • Replace the CPU in Satellite M70

    Hello I would like to ask if it is possible to improve and replace my old laptop Satellite M70 with a new CPU dual core.And if it is possible, it is recommended to witch one?I would be glad of any help. ^ THX ^. + My Satellite M70 technical data: +.

  • How to get the form of Boolean control LED (round or square) in Labview 8.6?

    Well, it's pretty simple... Can be any kind of response, error, errors, Style ID anything. But I can't seem to find an answer. Help, please