Η καλύτερη πηγή σας πληροφοριών και ειδήσεων περίπου λογισμικό, παράθυρα και υλικό στο διαδίκτυο

Vista ΑΡΘΡΑ ΚΟΡΥΦΗ 50 Vista ΒΙΝΤΕΟ Vista SOFT Vista ΒΟΗΘΕΙΑ

Ο διαγωνισμός φίλτρων WMI - είστε ο ιππότης στο λάμποντας τεθωρακισμένο;


Υποδοχή «Η αναζήτηση για το ιερό φίλτρο υπολογιστών γραφείου WMI», αυτό είναι μια σφαιρική αναζήτηση αυτό που μπορέσατε να καλέσετε «Το τέλειο φίλτρο υπολογιστών γραφείου WMI". Ένα φίλτρο WMI που, με τη χρησιμοποίηση της γλώσσας διατύπωσης ερωτήσεων WMI (WQL), πρέπει να είναι σε θέση στους υπολογιστές γραφείου σημείων μόνο. Πρέπει να είναι μια γενική ερώτηση - που σημαίνει πρέπει να είναι δυνατό να χρησιμοποιηθεί το φίλτρο στα περισσότερα ενεργά περιβάλλοντα καταλόγου σε όλη την υδρόγειο για το πολιτικό φιλτράρισμα ομάδας.

Έτσι, τι είναι ένας υπολογιστής γραφείου πραγματικά; Καλά, πραγματικά σε αυτήν την περίπτωση θα πούμε ότι είναι το αντίθετο ενός lap-top. Το Hmm, έπειτα τι είναι ένα lap-top; Αρκετά εύκολος: ένας υπολογιστής με μια μπαταρία! Έχουμε το φίλτρο WMI για να βρούμε τα lap-top ήδη:

Επιλέξτε * από Win32_Battery  - δεν αγαπάτε ακριβώς την απλότητα σε αυτήν την ερώτηση;

Αυτό το φίλτρο θα κάνει έναν υπολογιστή με μια μπαταρία να αποκριθεί πίσω με «ΑΛΗΘΙΝΟ» (επειδή η περίπτωση κατηγορίας WMI είναι παρούσα), η σημασία ενός GPO με αυτό το φίλτρο θα ισχύσει για τους υπολογιστές με τις μπαταρίες. Απλό δικαίωμα; Και δύναμη σκέφτεστε ότι είναι εύκολο ακριβώς «να γυριστεί γύρω από» για να βρεί τους υπολογιστές γραφείου, όπως:

Επιλέξτε * από Win32_Battery όπου διαθεσιμότητα! = 2
  ή
Επιλέξτε * από Win32_Battery όπου η διαθεσιμότητα ΔΕΝ ΕΊΝΑΙ ΜΗΔΕΝΙΚΉ
  ή
«Όπου όχι Χ όπως το Υ» ή οποιοσδήποτε

Ίσως είναι, ίσως δεν είναι… Σκέφτομαι ότι είναι όμορφη βλασφημία σκληρή! Για την επισήμανση των lap-top θα μπορούσαμε να έχουμε εξετάσει τις κατηγορίες Win32_PortableBattery, Win32_PCMCIAController, Win32_POTSModem επίσης - αλλά κάπως σκέφτομαι ότι οι περισσότεροι άνθρωποι θα συμφωνήσουν, ότι το «ουσιαστικό κουδούνισμα», που κάνει ένα lap-top ένα lap-top, είναι στην πραγματικότητα η παρουσία μπαταριών!

Αλλά, οι δοκιμές μας για την επισήμανση των ΥΠΟΛΟΓΙΣΤΩΝ ΓΡΑΦΕΊΟΥ μόνο (μηχανές χωρίς μια μπαταρία - ναι, ξέρω ότι αυτό θα περιλάβει τους κεντρικούς υπολογιστές δεδομένου ότι αυτοί «ένας στάσιμος» επίσης) δεν είναι μια επιτυχία ακόμα! Πιθανώς ακριβώς χρειαζόμαστε τη σωστή σύνταξη; Και αυτό είναι όπου παίρνετε στην εικόνα!

 

Είστε ικανοί να ραγίσετε ανοικτός αυτό το καρύδι; Υπάρχει μια δροσερή τιμή!

Αυτός ο όλος άρχισε σε έναν κατάλογο διευθύνσεων για τους πολιτικούς τύπους και τα κορίτσια ομάδας - αποκαλούμενους GPTalk - που δημιουργήθηκε και που διατηρήθηκε από τον πολιτικό γκουρού και MVP Darren χαλώ-Elia ομάδας - ο τύπος πίσω GPOguy.com και Λογισμικό SDM. Μπορείτε να ενώσετε τον κατάλογο ΔΙΚΑΙΩΜΑ ΕΔΩ και συμμετέχετε σε αυτόν τον διαγωνισμό ΚΕΡΔΙΣΤΕ ένα ελεύθερο αντίγραφο από:

Ανίχνευση μηχανικών βλαβών Pak GPExpert™ 

ΑΛΛΑ πρέπει να είστε το πρώτο πρόσωπο για να ραγίσετε αυτό το πράγμα, θα υπάρξει μόνο ΕΝΑΣ ΝΙΚΗΤΗΣ - αυτός μπόρεσε να είναι εσείς!

Θα αξιολογώ τις εισερχόμενες απαντήσεις - FIFO: " Πρώτα πρώτα έξω" method is used. Hopefully we'll see the most simple solution first - simplicity works, right? Actually I wouldn't know in this case would I...

One important thing! We will ask you kindly to TEST any WMI query submissions before sending them to everybody on the list. During your testing, you should use a tool to verify the WMI filter against a minimum of 2 desktops and 2 laptops. You can use the free WMI Filter Validation Tool to test you WMI filters in your environment. Personally I’m also using Scriptomatic version 2 and WBEMTEST for finding the available classes, items, queries etc.

Please have a look at the "rules" further down!

Why do this? Well, because it's fun - and useful at the same time... When looking at it generally, the purpose of this filter is to say: "I want these user settings to apply, but only when the user logs on to stationary machines". This can be used for a lot of security related setting, eg. in the case where Automatically cached Offline Files/Folders are unwanted on stationary machines for certain users etc. The job of most WMI filters placed on User policies is to limit which machines the policy setting(s) should apply to (even though WMI filters could check for user specific things too). Besides from that it's a nice challenge, we can pretty easily "spot" laptops, as they have batteries – and desktops don’t, but that’s not good enough for Mr. WQL, is it?!

 

Stuff we have tried - and the rules

We’ve been around solutions looking for Win32_SystemEnclosure > ChassisType before - which basically doesn’t work in a WMI filter because that’s an Array (and yes, I've also seen lots of posts on forums out there claiming that particular class is the solution – but for WMI/WQL queries it’s not). If would work in a script (because you can add additional logic to scripts), but we are searching for a WMI Filter - not workarounds of any kind!

As mentioned we tried with the Win32_Battery WMI class. However, as desktops don’t know this class at all, they'll return FALSE no matter what. Basically a desktop computer is gonna say “Heck, I don’t know anything about that class *Panic* I’m out!” – or just “False”... Bummer!

We have also tried PowerSupplyState, Win32_DesktopMonitor, Win32_DisplayConfiguration, Win32_SystemSlot, Win32_Fan and other classes – just haven’t found the perfect “this is definitely a desktop WMI item value or class”…

We're basically looking for something like:

A) Select * from Win32_SomeClassOnlyDesktopsHave

Or

B )Select * from Win32_SomeClass.SomeItem = “SomeValueOnlyDesktopsHave”

Or

C) Some way of saying “if you don’t know the class (eg. Win32_Battery), then apply the GPO anyway”

Again, the “quest” is to find the perfect, *universal*, way of spotting “Non-laptops” or Desktops – it can of course be done by looking for some special computer Manufacturer/Model, BIOS version, specific hardware driver or whatever – but that stuff it most likely gonna be different from environment to environment. Also, if we all just used computer names like “DESKxxx” for desktops and “LAPTxxx” for laptops, we could have used WMI filters for computer name – but unfortunately that’s not the case - or at least I won't consider that a valid solution :)

The thing is, that normally it’s the LAPTOPS that have special hardware – like Batteries and built-in Modems, PCMCIA slots etc. – so they are pretty easy to find. With desktop computers it’s another story – hope you can help us out here!

Please, again, we know lot’s of “workarounds”, but what we need is a *WMI filter* and it has to return *TRUE* for *DESKTOPS* (or let’s call the NON-LAPTOPS or NON-PORTABLES, it doesn’t really matter).

Remember, simplicity works - maybe the answer/solution is pretty straight forward? Feel free to post any additional questions to the mailing list!

 

Another example of what has been tried

We could maybe try to go for presence of PCI (and not Mini-PCI) or AGP slots, as we expect most desktops to have PCI slots (and laptops to have Mini-PCI, but that would depend on the form factor) – or maybe AGP (but does onboard VGA count as AGP? Any PCI VGA cards left out there? Yeah, probably...). If not we could maybe go for something like this:

A) Select * From Win32_SystemSlot Where SlotDesignation = “PCI%”
Or
B) Select * From Win32_SystemSlot Where SlotDesignation = “AGP”

However, this is not accepted as a solution as we cannot say that all desktop computers have AGP slots. But - maybe you can convince us otherwise?

 

Other cool Group Policy information:

You'll find additional Group Policy information at these sites:

www.gpanswers.com - The home of Group Policy guru and MVP Jeremy Moskowitz, check out the community there too!
TechNet Group Policy Forum - A brand new Group Policy forum on Microsoft TechNet
The Group Policy Team - The home of the Microsoft Group Policy Team
Jakob H. Heidelberg blog - My own blog, mostly about Group Policy and Security
www.heidelbergit.dk - My website with blog RSS, certifications, LinkedIn info etc.

 

Hope to hear from you soon - O' Yee Knight of the Microsoft Group Policy Table!

Popularity: 17%


Written by Jakob H. Heidelberg. Read more great feeds at is source WEBSITE
no comments.
Read more articles on Jeremy Moskowitz and otherSoftware and MVP and technet and Group Policy and Microsoft.

Related articles

No comments

There are still no comments on this article.

Leave your comment...

If you want to leave your comment on this article, simply fill out the next form:




You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> .