![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Searching for two objects Hello, I'm trying to filter out two services on 60 servers. I'm using the following: get-wmi-object -class Win32_service -computer name $remoteserver -filter "name='xxx'" but i can only find that one service. i'm having trouble adding the second object to the filter option. I guess my question is what is correct syntax to add the second object I'm filtering for? thanks! |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: Searching for two objects Use WQL's 'Or': get-wmi-object -class Win32_service -computer name $remoteserver -filter "name='xxx' or name='yyy'" -- Kiron |
My System Specs![]() |
| | #3 (permalink) | ||||||||||||
| Guest | RE: Searching for two objects This should work - just need to add the computername parameter Get-WmiObject -Class Win32_Service -Filter "Name='W32Time' or Name='PlugPlay'" | Format-Table and change the service names to whatever you need -- Richard Siddaway All scripts are supplied "as is" and with no warranty PowerShell MVP Blog: http://richardsiddaway.spaces.live.com/ PowerShell User Group: http://www.get-psuguk.org.uk "papa940911" wrote:
| ||||||||||||
My System Specs![]() | |||||||||||||
| | #4 (permalink) | ||||||||||||||||||||||||
| Guest | RE: Searching for two objects Cool! It worked! thanks! that was easy.. "RichS [MVP]" wrote:
| ||||||||||||||||||||||||
My System Specs![]() | |||||||||||||||||||||||||
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using SMO objects | Carlos Felipe França da Fonseca | PowerShell | 0 | 07-06-2008 03:57 PM |
| Formating objects | Shay Levi | PowerShell | 2 | 09-09-2007 12:00 PM |
| Instantiating COM objects | Mycroft | PowerShell | 12 | 05-24-2007 08:47 PM |
| Searching for deleted AD objects in PowerShell | RichS | PowerShell | 1 | 04-29-2007 08:06 AM |
| Outerglow on 3D objects | AlexB | Avalon | 2 | 11-24-2006 11:30 PM |