How to find groups in domain based on input file of groups

Hi,
I want to find if groups exist in the domain based on a list of groups in a text file as follows.  My Get-AdGroup doesn't work, so Im looking for suggestions.
$MyGroups = Get-Content -path c:\MyGroups.txt
Foreach ($Group in $MyGroups)
            Get-Adgroup -filter 'Name -like "$Group"' -SearchBase "DC=MyDomain,DC=Com" -SearchScope SubTree
Thanks in advance.
Thanks for your help! SdeDot

One additional suggestion - you need wildcards too, if you really want to use -like:
Get-ADGroup -Filter "Name -like '*$group*'"
Don't retire TechNet! -
(Don't give up yet - 12,950+ strong and growing)

Similar Messages

  • How to find number of lines in an input file.

    Hi,
    Can someone tell me, if there is a way to find out the number of lines in an input file. I do not want to read line by line and then count the number of lines read.

    Then how do you think a program could determine the amount of lines in an input file? How does a human know how many lines are on a page? You're going to have to count the items that separate two lines to know how many lines are in your file.
    Either read line by line and count the amount or read char by char and count the number of '\n' occurences instead.
    If you have control over writing the input files, however, you can make this better. Write a header in the file that specifies the amount of lines in it. The first line of your file will then hold a number that represents the amount of lines in the file, so you need only read the first line to know how many lines are in your file.

  • How to find name of partner based on partner number

    Hello All,
    Can any one help me how to find name of partner based on partner number.
    Regards,
    Lisa

    SELECT kunnr name1 erdat
              FROM kna1
              INTO TABLE i_kna1
              WHERE erdat IN s_date.
      SELECT kunnr kunn2 knref vkorg vtweg spart
                    FROM knvp
                    INTO TABLE i_knvp
                    FOR ALL ENTRIES IN i_kna1
                    WHERE kunnr = i_kna1-kunnr AND
                    vkorg IN s_vkorg AND
                    vtweg IN s_vtweg AND
                    spart IN s_spart AND
                    parvw = 'ZR'.
      LOOP AT i_kna1.
        READ TABLE i_knvp WITH KEY kunnr = i_kna1-kunnr.
        IF sy-subrc = 0.
          MOVE-CORRESPONDING i_kna1 TO i_cust2.
          MOVE-CORRESPONDING i_knvp TO i_cust2.
          APPENd i_cust2.
       endif.
      ENDLOOP.
    *SELECT kunnr name1
              FROM kna1
              INTO TABLE i_kna1.
      loop at i_cust2.
        read table i_kna1 with key kunnr = i_cust2-kunn2.
         IF sy-subrc = 0.
           i_cust2-name2 = i_kna1-name1.
        modify i_cust2.
      endif.
    endloop.*
    icust2 will have partner number ,....partner name is in KNA1,..
    so look in tat ..by above code.._ if this is wat u r luking for

  • How to find the Org.key based on Job key and Org Unit.

    Hi,
      Please Let me know how to find the Org.Key based on the Job Key and org Unit.
    Regards
    nagendra.

    On recent ThinkPad, the Product ID Key sticker has been moved from the bottom of the unit to behind the battery.
    You need to contact Lenovo technical support directly to ask about recovery media.

  • In BI how to filter the selection options based on inputs on top field

    Hi Friends,
    In BI, How to filter the selection options based on inputs on top field.
    The system should automatically filter the lower level drop downs based on the selection of a higher level.
    For e.g. :
    If a user selects a Country then the States drop down should only display the State's belongs to the Country. Similarly when a State is selected, the District drop down should display only those District's belongs to the State.
    Thanks in Advance.
    Regards
    Jayaram M

    Hi Anil,
    Thanks for reply but I couldn't use Compounding Characteristic here. Need some other solution.
    Regards
    Jayaram M

  • How to find the dsn name from an *.rpd file provided?

    How to find the dsn name from an *.rpd file provided? All the ODBC details which would require to run your dashboard.

    Hi
    DSN name is not a part of .rpd file. So There is no information about DSN name in .rpd file.
    Thanks
    Siddhartha P

  • How to do the validation in sap xi (input file)

    hi,
    how to do the validation in sap xi (input file)?
    regards
    Ruban

    Hi Ruban
    There are no fixed set of validations.
    It all depends on the exact functional requirements. Most of validations revolve in XI around,
    1. Validation of madatory fields.
    2. Cross Referncing of data.
    3. Validation for data in some fields , etc
    refr the below links for few details regarding validation
    <b>File Validations in SAP XI – A Case Study</b>
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/99593f86-0601-0010-059d-d2dd39dceaa0
    refer this Blog
    <b>Validating messages in XI using XML Schema</b>
    /people/morten.wittrock/blog/2006/03/21/validating-messages-in-xi-using-xml-schema
    <b> Where to create logical validations  </b>
    Where to create logical validations
    <b> HTTP to File with source XML validation </b>
    HTTP to File with source XML validation
    Thanks!!
    Regards
    Abhishek Agrahari

  • HOW TO FIND LAST DOCUMENT DATE BASED ON MATERIAL NUMBER

    Hi,
           I want to know how to find the last document details based on material number.
    Is there any Functional modulle or BAPI programe?
    i,e, I want know last goods receipt details (MIGO)  based on material number.
    Can u please anybody tell me.
    Thanks,
    S.Muthu.
    Edited by: Subramaniyan Marimuthu on Jan 2, 2008 9:07 AM

    Hello.
    Check the BAPI_GOODSMVT_GETITEMS
    -example--
    Get GRs after a specific date for a specific plant/ storage location and movement types
      wa_budats-sign = 'I'.
      wa_budats-option = 'GE'.
      wa_budats-low = '20071201'.
      APPEND wa_budats TO budats.
      wa_plants-sign = 'I'.
      wa_plants-option = 'EQ'.
      wa_plants-low = '1000'.
      APPEND wa_plants TO plants.
      wa_stlocs-sign = 'I'.
      wa_stlocs-option = 'EQ'.
      wa_stlocs-low = '0001'.
      APPEND wa_stlocs TO stlocs.
      wa_mvts-sign = 'I'.
      wa_mvts-option = 'EQ'.
      wa_mvts-low = '101'.
      APPEND wa_mvts TO mvts.
      wa_mvts-low = '901'.
      APPEND wa_mvts TO mvts.
      wa_mvts-low = '123'.
      APPEND wa_mvts TO mvts.
      CALL FUNCTION 'BAPI_GOODSMVT_GETITEMS'
        TABLES
          plant_ra        = plants
          stge_loc_ra     = stlocs
          move_type_ra    = mvts
          pstng_date_ra   = budats
          goodsmvt_header = header
          goodsmvt_items  = item
          return          = return.
    Reward if helpful.
    Cheers,
    George

  • How to find count of records based on batch wise.

    Hi All,
    We are working on OWB10gr2. I would like share one requirement. Any one can suggest me how to do it and which is the best way to get accurate information.
    We have 2 schemas’ like nia_src and nia_tgt. currently we are moving data from nia_src to nia_tgt for that reason we implemented some mappings based on requirement. In my source schema (nia_src) having 100 tables with data and similar structure replicated in target schema (nia_tgt).
    In source schema every table having one date field for which record is inserted and based on that field we can find how may records are inserted on particular table ,particular time.
    Same like target also maintaining date fields for tracking purposes.
    We have done some mappings and scheduled also. Every day we are into the target with incremental data. All are working fine not any issues.
    I wanted to know how many records inserted, updated, merged for particular batch
    How can we find?
    Can we find exact information in OWB_REP_OWNER schema on WB_RT_AUDIT?.
    For tracking purposes I need to find those values how many records are available in
    Source table and how many records are populated to the target schema?
    How to find schedule batch count of records table wise for batch wise?
    Please suggest me any one on this.
    thanks and regards,
    venkat.

    RE: based on pre operator can we find count of records. if yes how to do it.
    No, you cannot tell from the pre- operator how many records will be inserted or updated into a mapping. How could you? The mapping hasn't run yet!
    At best (if you have simple mappings with single targets) you could come up with a strategy to have the pre-mapping procedure aware of it's package name, then select from user_source for that package body until you find that first cursor used for the row-based processing, copy the cursor into a local variable, and then execute immediate select count(*) from that cursor definition. But still, all that would get you is the number of rows selected - not inserted / updated / errored etc.
    A post-mapping procedure that is aware of the package name will, however, run prior to package exit so that the package spec is still in memory so you can access the public variables in the package spec. We do that in our standard post-mapping procedure
    CREATE OR REPLACE procedure erscntrl_finalize_prc(
                           p_process_id     in  number,
                           p_process_name   in  varchar2)
    as
          l_numread      number         := 0;
          l_numInserted  number         := 0;
          l_numUpdated   number         := 0;
          l_numMerged    number         := 0;
          l_owb_audit_id number         := 0;
          l_owb_status   number         := 0;
          sqlStmt        varchar2(2000) :=
                               'begin '||
                               '  :1 := '||p_process_name||'.get_selected; '||
                               '  :2 := '||p_process_name||'.get_inserted; '||
                               '  :3 := '||p_process_name||'.get_updated; '||
                               '  :4 := '||p_process_name||'.get_merged; '||
                               '  :5 := '||p_process_name||'.get_audit_id; '||
                               '  :6 := '||p_process_name||'.get_status; '||
                               ' end;';
    begin
          -- we use dynamic SQL to return required audit field values.
          --  This allows us to alter which values we need at a later date
          --  without impacting the deployed mappings.
        execute immediate sqlStmt
        using   out l_numread,   out l_numInserted,  out l_numUpdated,
                out l_numMerged, out l_owb_audit_id, out l_owb_status;
      -- then execute our own logging package.
       owb_mapping_log_pkg.finalize(
                           p_process_id,
                           p_process_name,
                           l_numread,
                           l_numInserted,
                           l_numUpdated,
                           l_numMerged,
                           l_owb_audit_id,
                           l_owb_status
    end;
    /However, even in this case bear in mind that if you run the mapping in set-base mode, all Oracle returns is the number merged which does not give values for the inserted and updated counts. If you really need those values you need to either a) run in row-based mode or row-based-target-only, or come up with some custom queries. For example, in your pre-mapping do a select count(*) from your_target_table, then run the mapping, then get the number merged, then do another select count(*) from your_target_table. With these values and basic math you could tell the number inserted by the growth in the table, and the rest of the number merged must have been updates.
    That being said, if you are playing with dimensions as large as most of the ones I am - there is no bloody way that you want to do two select count(*) statements on each run without a really, really good reason.....
    Cheers,
    Mike

  • How to find SOLMAN CR number based on Trnsport request number

    I want to find CR Number in SOLMAN of a changed query.
    I found the user  who changed the query Request number of changed query.
    How can I find the CR number based on this Information.
    Please help.
    Thanks.

    you can goto SOLAR_PROJECT_ADMINISTRATION / System Landscape / CR  / Task list
    regards
    Nesimi

  • How to find the configuration status of REDO logs files?

    I am in the process of moving the redo log files.
    Before that I want to find out whether it is set up as duplex or any other configurations.
    How to find the REDO log configurations.
    Oracle 10g R2
    Thank you,
    Smith

    Example:
    Not duplexed redo log - if number of member is 1, then it is not duplexed:
    SQL> select group#, members from v$log;
        GROUP#    MEMBERS
             1          1
             2          1
             3          1
    SQL> select group#, member from v$logfile;
        GROUP# MEMBER
             1 /u01/app/oracle/oradata/db1/redo01.log
             2 /u01/app/oracle/oradata/db1/redo02.log
             3 /u01/app/oracle/oradata/db1/redo03.log
    SQL> alter database add logfile member '/u01/app/oracle/oradata/db1/redo01_2.log' to group 1;
    Database altered.
    SQL> alter database add logfile member '/u01/app/oracle/oradata/db1/redo02_2.log' to group 2;
    Database altered.
    SQL> alter database add logfile member '/u01/app/oracle/oradata/db1/redo03_2.log' to group 3;
    Database altered.Duplexed redolog
    SQL> select group#, members from v$log;
        GROUP#    MEMBERS
             1          2
             2          2
             3          2
    SQL> select group#, member from v$logfile;
        GROUP# MEMBER
             1 /u01/app/oracle/oradata/db1/redo01.log
             2 /u01/app/oracle/oradata/db1/redo02.log
             3 /u01/app/oracle/oradata/db1/redo03.log
             1 /u01/app/oracle/oradata/db1/redo01_2.log
             2 /u01/app/oracle/oradata/db1/redo02_2.log
             3 /u01/app/oracle/oradata/db1/redo03_2.log

  • How to Find the Latest Version of Cluster Binary Files available at Microsoft website

    How we can find the latest version of Cluster binary files available for download at Microsoft Website and which Cluster Binaries should be update to make the Cluster services stable healthy.

    @AnatolySV : I believe you need to put some efforts to understand what he is asking.
    You may find the latest version of Cluster Binaries by entering the required keywords for Microsoft Failover Clustering. Some of the main Cluster binaries(Keywords) are:-
    Clusres.dll (For Cluster Resources like Disk, Application or Service, Cluster IP)
    Clussvc.exe (Cluster Service)
    TCPIP.sys (If the Storage is presented to the cluster Nodes via ISCSI Network).
    MPIO.sys / ISCSIprt.sys (If we are using Multipathing for the disks to be presented).
    RHS.exe (Resource Host Subsystem)
    So, the Answer to your question is: You need to enter the binary name "Clusres.dll" and mention the Operating System you want to install your binaries to "Windows Server 2008 R2 Sp1" on Bing (Preferred for Microsoft Hotfixes). In Result you will get the
    list of hotfixes for clusres.dll
    You need to try this multiple times in order to get the latest version as Microsoft does not have a single Link.
    Hope this answers your query. Feel free to leave a message incase you need more help.
    Maybe) 
    But hey, you`ve got +1 from me for clarification) 
    Anyway, I still think that the initial question could be more clear and exact. 

  • Grouped output required based on input group :No one???????

    Hi to all,
    I want grouped output based on input group.
    e.g
    SQL> select * from test_data;
    FIELD
    a
    b
    c
    d
    e
    a
    e
    c
    d
    e
    10 rows selected.
    SQL>
    Now I want grouped output like this
    When I give input set (a,b) then output should be :
    a,b
    a
    c
    c
    d
    d
    e
    e
    e
    When I give input set (a,e) then output should be :
    a,e
    a,e
    b
    c
    c
    d
    d
    e
    I want a query regarding this , I know this is possible through Pl/SQL, but the requirement is through query.....
    rgds,
    Rup

    I want grouped output based on input group.
    I want a query regarding this
    with
    test_data as
    ( select substr(p, instr(p, ',', 1, level) + 1, instr(p, ',', 2, level) - instr(p, ',', 1, level) - 1) as field
        from (select ',' || 'a,b,c,d,e,a,e,c,d,e' || ',' as p from dual)
        connect by level <= length(p) - length(replace(p, ',')) - 1
    input_set as
    ( select distinct substr(p, instr(p, ',', 1, level) + 1, instr(p, ',', 2, level) - instr(p, ',', 1, level) - 1) as field
        from (select ',' || 'a,d,e' || ',' as p from dual)
        connect by level <= length(p) - length(replace(p, ',')) - 1
    group_count as
    ( select min(count(i.field)) as group_cnt
        from test_data t, input_set i
        where i.field(+) = t.field
        group by t.field
        having count(i.field) > 0
    test_data2 as
    ( select field,
          row_number() over (partition by field order by null) as group_no1,
          row_number() over (                   order by null) as group_no2
        from test_data
    input_set2 as
    ( select field, row_number() over (order by field) as item_no
        from input_set
    select max(fields) as fields
      from
      ( select
            replace(sys_connect_by_path(decode(level, 1, group_no2), '-'), '-') as group_no,
            ltrim(sys_connect_by_path(t.field, ','), ',') as fields,
            level as lvl
          from test_data2 t, input_set2 i, group_count
          where i.field(+) = t.field
          start with group_no1 > group_cnt or item_no = 1 or item_no is null
          connect by prior group_no1 <= group_cnt and group_no1 = prior group_no1 and item_no = prior item_no + 1
      group by group_no
      order by max(lvl) desc, fields
    FIELDS
    a,d,e
    a,d,e
    b
    c
    c
    e
    6 rows selected.

  • How to find which communication channel is picking the file

    Hi
    Can any one tell me, how can i  find which communication channel is picking the file from the source directory?
    I have a file scenario. File is coming to directory but it disappears even after I STOP the communication channel, I am using for this scenario
    I want to find out which communication channel is picking the file.
    How can i do it?

    Hi,
    you can try this:
    Go to Communication Channel monitoring in Runtime Workbench.
    Select all file adapters and check cluster node for each Channel. If the file is picked by the channel you will see processing details or errors related to channel here.
      Since as you say the message is not seen in sxmb_moni then the communicaition channel would be red. Files that are picked from directories but not visible in sxmb_moni are usually in error at channel level.
    Hope this helps.
    Regards,

  • How to find out when a folder or a file has been renamed?

    I need to find out when a folder and some files have been renamed.
    This happened when Mac OS X was 10.6 (Leopard Snow), now the Max OS X is Lion.
    I use standard HFS+ filesystem format.
    In Lion apparently there is a file property "Date Added" that change if a file is renamed, but the same property seems to be unused (e.g. -/-) before Lion.
    I have Time Machine backups that help me to know that rename happened within a certain week, but I was looking for something more accurate (at least day accuracy).
    If file system metadata can't help, I'm wondering if there is some log that track the first time spotlight indexed a specific file.
    Thank you
    /Andrea

    Maybe you could keep tabs of the file size. If the file size grows (which it will do each time the writing process flushes that files output buffer), then the file was written to.
    What I'd like to know is if there is some way to monitor the entire drive for changes and respond to stuff like that. I know that the Win32 API provides services that monitor the file system for changes, but I don't know if other OS's do... or if Java provides an interface to those features.

Maybe you are looking for

  • Best way to copy ALL DATA from song to song?

    Hello everyone, I'm in the middle of scoring a film and have ran into what seems to be a corrupted song, and want to attempt to transfer all data from this song into a new file. I'm running multiple global tracks with changes in tempos and time sigs

  • Extended Program check for multipl programes in single run

    Hello All, I wan to do the syntax check for multiple programs at single execution run. SAP has provided SLIN transaction for single program, Is there any SAP standard transaction similar as SLIN for multiple program check at single execution run? Tha

  • Retrieve role-activity relationship via papiws

    We have a demand from a client who is asking for access the information about the audit trail activities and the role which those activities are associated in an external application. We're using PAPIWS' method processGetVisibleActivities(String) fro

  • Separate Audio Tracks

    I'm using logic with little knowledge of the program. I have 1 audio track with samples, then i needed more audio tracks for more samples and vocals, however it seems that every individual audio track plays all the other audio tracks thru it at the s

  • 9.0.3 serving Sun One Studio 4 EE project

    What do I need to do to the 9iAS server (9.0.3) to deploy Sun One Studio 4 EE projects to it? TIA, Ed.