Wednesday, October 31, 2007

Excluding computers from a collection

There are many ways to exclude computers from a collection. One way is to have a sub collection and exclude that one. The next is to create a sub select statement with a few machines..

where SMS_G_System_COMPUTER_SYSTEM.Name not in ( "comp1", "comp2" )

Assuming you have a collection of computers and you want to exclude certain ones then simply append this statement to your Where clause. This will remove these two computer from your list. Test it and see what happens..