How to query a Collection for Collection rules (Powershell only)

I have :
 $Collection = gwmi -computer MyServer -namespace "root\sms\Site_XXX" -class "SMS_Collection"
 $MyCollection = $collection | where { $_.Name -eq "TEST" }
$MyCollection have a property named CollectionRules
I could'nt manage to read this property,
nor $MyCollection.CollectionRules
nor  $MyCollection.CollectionRules | % { $_ }
is Working.
Any help on this ?

Hi, 
the above code works, but if you have a large environment then it may take a long time to run as you are querying for every collection before looking for the 'TEST' collection.
The following code only looks (filters) for the specific collection so should execute much faster.
$Collection = gwmi -computer MyServer -namespace "root\sms\Site_XXX" -class "SMS_Collection" -filter "Name='TEST'"
$Collection.Get()
$Collection.CollectionRules | % { $_ }
Another method of doing the same would be this:
$Collection = Get-WMIObject -computer MyServer -namespace "root\sms\Site_XXX" -query "Select * FROM SMS_Collection WHERE Name = 'TEST'"
$Collection.Get()
$Collection.CollectionRules | % { $_ }
Hope you or someone else may find this useful :)

Similar Messages

  • How to query opening balance for all customer or Vendor for an speci. date

    Hi,
    How to query opening balance for all customer or Vendor for an specific date?
    Example:
    put any date and query will show all customer/ Vendor  that date opening/current balance.
    Regards,
    Mizan

    Hi mizan700 ,
    Try this
    SELECT T0.[DocNum] As 'Doc No.', T0.[CardCode] As 'Customer Code',
    T0.[CardName] As 'Customer Name',(T0.[DocTotal]-T0.[PaidSys]) As 'O/S Balance'
    FROM OINV T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode
    INNER JOIN OCRG T2 on T1.GroupCode = T2.GroupCode
    INNER JOIN INV1 T3 ON T0.DocEntry = T3.DocEntry
    WHERE T0.[DocStatus] ='O'
    AND
    (T0.[DocDate] >='[%0]' AND T0.[DocDate] <='[%1]')
    Regards:
    Balaji.S

  • How to use "Mail Merge for Word" to include only Account fields?

    We're attempting to use the Mail Merge for Word template to create a document containing several fields from the Account object. We do not need any fields from the Contact object, and there are many contacts linked to each account.
    When choosing "Get On Demand Data > Accounts", removing all the [Contacts] fields, selecting the necessary [Accounts] fields, then clicking "OK", a "List Download in Progress" window appears, followed by one that says "Microsoft Word - Subscript out of range". None of the [Accounts] fields are available in the downloaded data.
    Can anyone tell me how to include the appropriate Account fields without any Contact fields (which pulls a separate Merge record for every Contact linked with the selected Account)?
    Thanks.

    Thanks for trying to help with this.
    So far, we've been unable to pull even a SINGLE account record. So the problem is not related to data volume limitations. The tool seems to require that Contacts are selected, but for this application we only want a single merge document per Account.
    If anyone else has had success using the Mail Merge for Word tool to pull only Account data, please give us your guidance. Thanks.

  • How to query a  collection  for a particular feild value

    I have a service called as RevenueItemsService and iam calling the below operation:
    <wsdl:operation name="GetRevenueItems">
    <wsdl:input message="tns:GetRevenueItemsSoapIn" />
    <wsdl:output message="tns:GetRevenueItemsSoapOut" />
    </wsdl:operation>
    and in the response i get array of UserDefinedField as a part of response The array is of below type :
    <s:complexType name="UserDefinedField">
    <s:attribute name="Name" type="s:string" />
    <s:attribute name="Version" type="s:decimal" use="required" />
    <s:attribute name="UDFType" type="tns:UDFType" use="required" />
    <s:attribute name="Enabled" type="s:boolean" use="required" />
    <s:attribute name="Required" type="s:boolean" use="required" />
    <s:attribute name="Index" type="s:int" use="required" />
    <s:attribute name="Value" type="s:string" />
    <s:attribute name="ForBizLogicEntity" type="s:string" />
    </s:complexType>
    My question is when i get array(assume i got 5 userdefined feilds as the array)
    I want to query the xpath in such a way that in the array if i ask for a particular version in the userdefined feilds then it has to give me that particular index value.
    Example:
    we have a array of following :
    Array1:
    name: xxx
    version : 1.0
    UDF type: udf1
    Index: 1
    Array 2
    name: YYY
    version : 2.0
    UDF Type : Udf2
    index : 2
    etccc.....upto n .
    so my question is , i want the result in such a way if i say version=2.0 then it has to return me the corresponding index as 2. How do i do that in BPEL.
    Please provide me some suggestions.
    Or .
    you can provide me some link where i can find the answer
    Any suggestions are appreciated.
    Regards
    Pavan

    little example :
    <element name="assignInArrayProcessRequest">
      <complexType>
       <sequence>
        <element name="array" maxOccurs="unbounded">
         <complexType>
          <sequence>
           <element name="name" type="string"/>
           <element name="version" type="string"/>
          </sequence>
         </complexType>
        </element>
       </sequence>
      </complexType>
    </element>so the array element is unbound.
    this is the process payload
    <ns1:array>
      <ns1:name>test1</ns1:name>
      <ns1:version>213562363</ns1:version>
    </ns1:array>
    <ns1:array>
      <ns1:name>test2</ns1:name>
      <ns1:version>yeryeryer</ns1:version>
    </ns1:array>
    <ns1:array>
      <ns1:name>test3</ns1:name>
      <ns1:version>fytetr</ns1:version>
    </ns1:array> now you can use this peace of code
            <assign name="setArrayValue">
                <copy>
                    <from expression="string('1.9999')"/>
                    <to variable="inputVariable" part="payload"
                        query="/client:assignInArrayProcessRequest/client:array[1]/client:version"/>
                </copy>
            </assign>to update the value of version in the first element of the array.
    in this example you can also create some loop and use the 'index' , the [1] value dynamic to update more then 1 values in the array-element
    the response after the update
    <ns1:array>
      <ns1:name>test1</ns1:name>
      <ns1:version>1.9999</ns1:version>
    </ns1:array>
    <ns1:array>
      <ns1:name>test2</ns1:name>
      <ns1:version>yeryeryer</ns1:version>
    </ns1:array>
    <ns1:array>
      <ns1:name>test3</ns1:name>
      <ns1:version>fytetr</ns1:version>
    </ns1:array>Maybe you can use it :)

  • How to define smart collection rules to match a folder's path?

    I was hoping to define a tree of (smart) collections to match my folders tree, but coming up with a search criteria to match the folder path is proving difficult at best, impossible at worst.
    Any ideas?

    Hi John,
    John R. Ellis wrote:
    Perhaps the best you can do is
         Folder contains words f1 f2 ... fn
    where f1..fn are the elements of the path of the folder
    Yes, that's exactly what I came up with, and for many folders it's correct, but for others - not so much...
    Reminder: Using double spaces between words gets around the "big mallard ducks" (contains words) bug.
    PS - I went ahead and purchased AnyFilter - I'll see what I can do with it :-)
    Thanks,
    Rob

  • How to query in java for Oracle 10gr2 XMLDB

    Hi,
    I�ve some problems.
    I�ve some search queries which are working on normal relation table, but I don�t know how it works on XMLDB(Oracle 10gR2)
    Structure of XML file
    My xml table structure will be :
    Create table <tablename>
    Person_Id number primary key,
    Person_BankName varchar2,
    DateOfEntry date,
    Xmlcol xmltype
    Xmlcol xmltype will be mapped to a schema for the below xml file.
    XML File
    <Person>
         <Information>
              <firstname>Suchendra</firstname>
              <lastname>Kumar</lastname>
              <middlename>Krishna</middlename>
         </Information>
         <Account>
              <accountno>12212</accountno>
              <balance>42323.89</balance>
              <opendate>12-03-2005</opendate>
         </Account>
         <Transaction>
              <transamount>1000</transamount>
              <balance>41323.89</balance>
              <trandate>14-03-2005</ trandate >
              <trantime>10:40:22</trantime>
         </ Transaction >
    </Person>
    SQL Queries Required
    1.     Query to fetch the records whose transaction has been done from date 12-03-2001 to date 01-01-2005.
    2.     Query to fetch the records whose lastname= �*Kumar�
    3.     Query to fetch the records whose transaction has been done from time 9:09:55 to time12:26:23.
    4.     Query to fetch the records whose balance > 4000 and balance < 5000.
    5.     Regular expression Search in XMLDB. Ex: searching for records whose firstname has �su*� or �*ab� in it.
    How to extract these result set values in java for XMLDB (JDBC)?
    How to fetch these values from the result set?
    Whether Prepared Statement, Execute Query are compatible in XMLDB
    Can anyone help me in this..
    Thanks
    Athar

    Athar,
    You have been busy! You posted this same question to the SQL forum and the XMLDB forum. I see you got some answers regarding the XML part, so I will try to help you with the JDBC part. Have a look at this example:
    http://tinyurl.com/oemd7
    Good Luck,
    Avi.

  • How to design a framework for implementing rules in JSF/Spring Application

    We use JSF 1.2 (MyFaces 1.2.2) in the presentation layer, Spring 2.5.3 in the service layer and Hibernate3.2 as persistence layer.
    The java application we are building is mostly CRUD but involves tons of business rules which needs to be implemented at both presentation and service layers
    We are planning to design a business rule framework so that developers can work on individual business rules without stepping on each other and also to prevent redundant implementation of the same business rules .
    Here are the Goals
    Solution Goals:
    &bull; Business rules are implemented in only one piece of code. i.e. Rule is packaged into a unit
    &bull; Business rules have an consistent, identifiable form.
    &bull; Rules have to be Abstract
    &bull; View technology like JSF says I want to createManufacturer(Manufacturer manuf) passing Manufacturer object as parameter. Then the business rule framework should go and fetch the rules to do the job of createManufacturer () and then return the result.
    &bull; Fetch the Rule based on
    �X Target object
    Is the concrete object on which you are performing the Rule for example Device object
    �X Operation Type
    Is C R U D Validate
    Proposed Solution:
    &bull; To have catalog of business rules which will have name of the rulewith parameters and dependencies
    &bull; To have Rule Context designed in such a way that it goes and fetches the Rule i.e. give me all the Rules from the RuleContext and the client will decide which Rule to Apply.
    We modeled the business rule framework as a variant of Strategy pattern. But this approach has limitation in the sense it requires Rules to be injected into the Service Layer Spring Beans .
    Then we looked at other design patterns like Command, Visitor but that doesn&rsquo;t seems to fit the bill either.
    Any pointers/suggestions will be greatly appreciated

    "In many cases multiple instances of a single class works just as well."
    This sounds a lot like the way I would do something in other languages. I would simply create an array of structs (or records) containing variables like these:
    type critter:record
      int x,y; // The critter's position, of course
      int vx,vy; // Used to keep track of velocity
      int ctype; // What kind of thing this is
      int subtype; // Additional flags or info that may affect behavior
      int yadayadayada,etcetera;
    end;
    var critters:array[0..somelargenumber] of critter;Of course, I suspect that what may work well in Pascal might not work as well in Java. For one thing, I don't think Java even has records per se. It may be necessary to use a class to duplicate that functionality. (Is this true? Or did I miss something?) The array then becomes an array of objects.
    Since I'm using classes anyway, I guess it makes sense that I should go all the way, creating interfaces for common functions and subclassing a basic Critter class for each different kind of critter (at least in cases where the behavior and/or rendering methods would be significantly different from the basic class methods).
    This is okay as long as I don't go overboard, right?

  • How to query the data for required service calls

    Hi Experts,
    I have one requirement in oracle
    I have one table with columns actvy_code, actvy_seq_id, date.
    Data is as follows                    400008    1234431     12/01/2013
                                                 400010    1234431     12/02/2013
                                                 400020    1234431     12/03/2013
                                                 400008    1234431     12/01/2013
                                                 400005    1234431     12/02/2013 etc...!!!
    actvy_id is also containing 5M7, 5M8, 6M6, 4M4, 4M5 some are existed in same date and other codes present with different date.
    Here I want to extract data based on the actvy_code column, say for example in scope I have some actvy_codes like 4M8, 4M5, 5M8 etc..
    when you do select * from table where actvy_code in (4M8, 4M5, 5M8) gives the out put as needed.
    But I want to know whether these codes are present with same date or not. How to do this.
    Please do me this favor..
    regards,
    Sahadeva.

    one thing i forgot to add.
    we shouldnt use ascii values for the special characters.
    means we shouldnt use ascii values for restricting the sspecial characters.
    pls get me the reply as soon as possible
    thanq

  • How to query on a single row form using only one page

    Hi APEX experts, I am just a beginner in apex and I face several problems on development. Despite that the forum helps me a lot and your answers to other people are valuable , I have stacked into something. Could you please someone tell me : if there is a way to define a single row form page based on table in which I could query and update without using a tabular page (to call the single row form). I want only to use only one page. Does APEX has this functionality? Thank you very much?

    I haven't tried it, but I am going to guess that yes it's possible (or if I were going to do this, this is what I'd try and I suspect it will work).
    If you take a moment and step back and look at what the wizard does when building a "form on a table with report", all it does is build two pages with page 1 (report overview with drill-down Edit button or link usually) calling page 2 (form) and setting the PK field on the page 2 form with an automated row fetch process and built-in DML processes. It's not that hard.
    Page 2 really doesn't care what the calling page was in order to query a single row; it just cares that ANY caller sets the primary key value for the ARF process to fetch a row. So I would just make page 2 call itself. This is what I'd do (and you might have to fine-tune little things that I might not have forseen but I think this will work).
    For the sake of example, let's say our table is PARTS and in it is a PART_ID, PART_NUMBER, PART_DESCRIPTION, PART_COST, etc. Assume PART_ID is the primary key and sequentially assigned by the DB in a trigger and is functionally meaningless to the user and is for PK purposes only. Let's assume PART_NUMBER is a unique key (although not the PK) by which the user will "know" a unique row (since the PK of PART_ID is more internal and not meaningful to the user). Assume PART_DESCRIPTION, PART_COST, etc. are just attributes.
    1. Use the wizard and build a "form on a table with report". This is just to get the handy dandy ARF process and DML processes, validations, etc. all generated for you. Let's assume the report page is Page 1 and the form is Page 2.
    2. When done, delete the report page entirely (so delete page 1).
    3. Edit the form page (page 2) and change any branch references from the nonexistent page 1 to now be page 2.
    Now here's the part where something has to set the internal P2_PART_ID field when page 2 is run. So why not set it from itself from something the user will uniquely enter?
    4. Create a P2_PART_NUMBER_FETCH item (text item is fine or if you want a LOV or whatever that's good too....whatever works. For clarity, you might even want to create a separate "search" or "query" region separate and above your existing form region to set this field apart visually so users know it's a search field. Source for this field should be "only when current value in session state is null".
    5. Created some sort of "GO" button to go along with the P2_PART_NUMBER_FETCH field.
    6. Make sure none of your existing post-submit processes fire when GO is pressed (edit all of the computations and validations and processes and ensure that they have conditions such that they do not fire when the submit value is "GO", so like a PL/SQL expression and set to v('REQUEST')<> 'GO').
    7. Add a new validation to your page that only fires when GO is pressed. Have it validate only when GO is pressed. Have it validate that P2_PART_NUMBER_FETCH is not null.
    8. Add a new PL/SQL process to your post-submit processing that only fires when GO is pressed. Have it look up to the database based on P2_PART_NUMBER_FETCH and get the PART_ID that corresponds to the part number the user entered and set the part number, something like this (even better for style and reusability if you embed this in a DB package function and call it):
    SELECT part_id
    INTO :P2_PART_ID
    FROM PARTS
    WHERE PART_NUMBER = :P2_PART_NUMBER_FETCH;
    9. Not sure if the branches that were generated will suffice for this (might need to add a new one...review what you have and see) but the bottom line is that the page should branch to itself (page 2) and not clear the cache.
    10. When the page repaints, since :P2_PART_ID is now populated in session state (again, page 2 should not care how it got populated...only should care that it did get populated by anything (including itself)), the automated row fetch (ARF) should fire and query up the row from the database for editing.

  • How to setup FS Items for debit and credit only Financial Statement Items

    Hi,
    In Financial Statement, there are line items that report for the same accounts that are debit only under Assets and credit only under Liabilities. How should I setup Consolidation Chart of Accounts/FS Items in EC-CS for such items?
    Regards,
    B Lim

    Hi Prem,
    We have already assigned all the co-codes to only 1 COA.
    However, we did not create any Group COA and has no intention to.
    My issue is this:
    As you are aware in the Financial Statement, we are able to maintain for GL accounts to be reported under Assets by specifying the DR indicator and for the same accounts to be reported under Liabilities by specifying the CR Indicator.
    When I maintain the Consoliated COA in the Consolidation module (tcode CX16), I have problem with these accounts. How do I create the FS Items such that DRs goes to Assets lines and CRs goes to Liabilities?
    Regards,
    Bernard

  • How to set new role for new custom entity only

    I created a new custom entity, I want to create new role for it only.  So I created new role and set custom entity User role. But When I login the user with created role, it show now right to access CRM.
    Awen

    Are you trying to grant access so that users can use this custom entity but no other data at all?
    You will still have to include access to all sorts of bits of CRM just to make the user interface work - especially the things on the Business Management and Customization tabs of your security role. You also need to check these 6 settings:
    Special privileges in CRM Security Roles
    If this is the only security role you plan to give to your users, I would suggest you start from a standard role and remove access to other entities, rather than start from blank and work upwards.
    Hope this helps.
    Adam Vero, Microsoft Certified Trainer | Microsoft Community Contributor 2011
    UK CRM Guru Blog

  • Turning off 504 non reporting performance collection rules in the Exchange 2010 MP

    Hello
    I read the following MS article about tuning the Exchange 2010 Management Pack
    http://support.microsoft.com/kb/2592561
    It advises to turn off 504 non reporting performance collection rules, then only turn back on the ones of interest.
    However it does not state how to identify / locate these 504 rules. I would prefer to find/disable them via PowerShell rather than manually.
    Can someone please advise how to locate these 504 rules please and disable on mass.
    Thanks
    AAnotherUser__
    AAnotherUser__

    you’ll need a script that performs the following steps:
    Retrieve the management pack in which to store the overrides
    Retrieve the class that will be targeted by the override
    Retrieve the rules or monitors that will be disabled
    Disable the rule or monitor
    To disable bulk of rule, Here is the sample that disables all rules matching the “*events/sec*” filter.
    $MP =
    Get-SCOMManagementPack -displayname
    "Exchange 2010 Overrides" |
    `
    where {$_.Sealed
    -eq $False}
    $Class =
    Get-SCOMClass -DisplayName
    "Exchange Performance rule"
    $Rule =
    Get-SCOMRule -DisplayName
    "*Events/sec"
    Disable-SCOMRule
    -Class $Class -Rule
    $Rule -ManagementPack
    $MP -Enforce
    Also, you can refer below link
    http://www.systemcentercentral.com/opsmgr-2012-disabling-rules-and-monitors-in-bulk-in-powershell/
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"

  • How to achieve Delegation & Substitution for GP system in UWL for CE 7.1

    Hi all
    Could you please guide me , how to achieve delegation & substitution concept for GP system in UWL for CE 7.1.
    when i am trying to click on the Manage Delegation dropdown link which was there in top right corner of the UWL screen , then i am getting the error as " No system is activated for substitution rule " .
    Could you please tell me in our scenario how to activate the System for delegation rule since we are using GP system for GP related tasks in UWL. in all the documents they have mentioned how to achieve the same in R/3 workflow tasks but we are looking for GP tasks how to activate system.
    Is there any changes are required in UWL XML files for achieving this substitution & delegation rule for CE 7.1??
    In EP 7.0 how this delegation & substitution was enabled in UWL , could you pls tell me what are the changes are required to be done??
    if anybody helps on this then it is great help!
    Regards
    Sunil

    Hi Sr,
    There is Trails view in Result . which is newly introduced by Oracle.
    With the help of this you can achive this solution.
    Thanks & Regards
    Rahul

  • How can I use Siri for IPhone?

    How can I use Siri for IPhone?

    Siri only works on the iPhone 4S or iPhone 5. If you have one of those devices, turn it on in Settings > General > Siri.
    If you need more info than that, ask in the Apple forums.

  • How to download iOS 6 for iPad

    How to download iOS 6 for iPad

    iOS 6 can only be installed on iPad 2 & iPad 3.
    iOS 5: Updating your device to iOS 5 or Later
    http://support.apple.com/kb/HT4972
    How to install iOS 6
    http://www.macworld.com/article/2010061/hands-on-with-ios-6-installation.html
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    If you are currently running an iOS lower than 5.0, connect to your computer & click on the "Update your device using iTunes".
    Tip - You may need to disable your firewall and anitvirus software temporarily.  Then download and install the iOS update. Be sure and backup your iPad before the iOS update. After you update to iOS 6.x, the next update can be installed via wifi (i.e., not connected to your computer).
     Cheers, Tom

Maybe you are looking for

  • Creation of RFC function module

    Hi experts,         My requirement is, an XML file is coming from non sap to middleware in XML format. Middleware converts it into sap format and  it will access the RFC, i.e., BAPI, which will be created by me and updates the same in CRM.        The

  • Server Socket Threading

    My program does a couple of things, one of the thing it does is it runs a ServerSocket in the background. The problem is that when I run the my Server class, I can't do anything else since the ServerSocket is stuck in an infinite loop waiting for a n

  • Looking for tree like left navigation

    Has anyone implemented a navigation that would be like the windows file explorer folder tree. I want my navigation to be collapsable, indented and tree like Example Community 1Community 2 page 1 page 2 sub community 1 sub community 2 sub page 1 sub p

  • How can I restrict the values obtained in a search help?

    Hi guys, The thing is that there is a function module that according to the user name, and a material number, it tells wheter the user has permission to see the material or not. It is possible to use that function module to restrict the values of the

  • I'm struggling to turn the passcode off

    This should be simple but it isnt.  Every time i try to turn off the passcode i enter a loop which leads to a request to change the passcode , not to turn it off.  The 'turn passcode off' button remains greyed out.  How do i overcome this.