No entry in department field and exclude 3 OU's

Hi,
I'm trying to get a list of all my users who do not have entry in the department field, but exclude user account in 3 OU's (Ex Employees, MyTest and the Users container). This what I have come up with so far:
Get-ADUser -Filter {Department -notlike "*"} -Properties Name, Department, Office, OfficePhone, MobilePhone | ? { ($_.distinguishedname -notlike '*USERS*') -or ($_.distinguishedname -notlike '*Ex Employees*') -or ($_.distinguishedname -notlike '*My Test*') } | Format-Table -Property Name, Department, Office, OfficePhone, MobilePhone
When I run this I get all the account in these 3 OU's. Any help appreciated!
Thanks
Tony

Hi Tony,
Give this a try:
$ou1 = '*,OU=Conference Room Mailboxes,*'
$ou2 = '*,OU=Mail Enabled Users,*'
$ou3 = '*,OU=FTP Accounts,*'
Get-ADUser -Filter "Department -notlike '*'" -Properties Office,OfficePhone,MobilePhone |
Where { $_.DistinguishedName -notlike $ou1 -and $_.DistinguishedName -notlike $ou2 -and $_.DistinguishedName -notlike $ou3 } |
Sort Name | Select Name,Office,OfficePhone,MobilePhone
You'll need to adjust the $ouX variables to match your OU names. Also, I haven't added the Department property to the final select, as you're only returning users who don't have that property set anyway.
Don't retire TechNet! -
(Don't give up yet - 12,830+ strong and growing)

Similar Messages

  • .Mac does not sync address book's department field

    Hi,
    when performing a sync via .Mac on address book entries, the department field is not synchronized. This seems to be an pretty old story. This is a major issue if you reset you entries using .Mac information.
    Any ideas, how to solve this problem?
    Chris
    iMac Core Duo   Mac OS X (10.4.6)   Address Book 4.0.3 (477.6)
    iBook G4   Mac OS X (10.4.3)  
    iBook G4   Mac OS X (10.4.3)  

    No, not through iSync.
    But if you do the built-in backup for AddressBook and you need to reset, you can restore from there and you will have all data back.

  • Change project department field

    Is there a way to change project department field from within pwa, I searched a lot for this but can't find a way.
    We published them from project professional and selected department but now we cannot change this.
    Thanks

    Have you tried below:
    1.Open Project from PWA project center in Edit mode 
    2. Click on project information PDP then change the Project department and save and publish the project.
    If you are not having Project Department Field on Project Information Page (PDP) then From Server setting --> Workflow Project Details Page-->  Click on Project detail page
    then edit the Project Information PDP and add Department field or if you have any specific PDP page then edit that and add Department field   and save it.
    http://blogs.msdn.com/b/chrisfie/archive/2010/01/08/how-to-project-2010-edit-project-custom-fields-in-pwa.aspx
    Then open Project and Change the Department value for project
    kirtesh

  • List item with user and/or department field linked + dynamic update of department field

    Hi all,
    I've the mission to create a Sharepoint 2010 list to manage our IT assets.
    An asset is linked to a user or to a department. The user field is not mandatory, the department field yes.
    When creating or updating an item, we should be able to choose a user (person column) and the department should be automatically populated. Or we should also be able to let the user field blank and only choose a department.
    1. How can I manage this ? The user profile service is already configured, linked to the Active Directory. So user and department information is already in the User Profile.
    2. Second constraint : when a user is moving to an other department, the department field should be automatically updated for all items linked to this user. Any idea ?
    Thanks a lot and best regards,
    Steve Roh

    I think you must write some code for this functionality.
    It could be a custom web part or a custom field.

  • During MRP run unwanted plant and storage location include and exclude

    Hi There,
    During MRP run how to include and exclude the unwanted plant and storage location pls let me know the required configuration settings.
    Thanks in advance.

    HI,
    To control whether a particular storage location will be included or excluded from the MRP run.  (MD02/MD41).
    To exclude it from MRP run :-
    OMIR - Define storage location MRP per plant
    Put the MRP ind. as.         1 - storage location stock excluded for MRP
    To include it from MRP run:-
    OMIR - Define storage location MRP per plant
    Put the MRP ind. as.      space - storage location stock also planned at plant level and save it
    Next go to transaction MM01 - tick only view MRP 2
    Key in Plant and Storage Location
    Look at the Storage Location MRP section
    change the SLoc MRP indicator to space  and save it
    MMD1 - Create MRP Profile - MRP profile is a useful entry aid and makes it easier to manage MRP data.
    You define which fields are filled with values when MRP data is entered in the material master record, which of these values can be overwritten and which not.   You use the information stored in a profile is standard information that is needed again and again in similar constellations when material master records are maintained.
    Regards
    KK

  • Double entry in each field of Adobe Acrobat Pro

    I am using Adobe Acrobat Pro to complete a prepared form.  Upon entering data in to blank fields, I get a duplicate entry in each field box in a different font size when I tab or enter to the next field. I am sure it is a setting, any suggestions?

    Thank you George.
    After messing around a bit I was able to open in acrobat pro and remove the duplicate fields. Thank you for your help.
    Randy

  • How to map journal fields and whats is the better  process type

    /Journal/JournalSuspenseCostCentre     NULL
    /Journal/JournalBalancingCentre     Lookup from Organisation ID
    /Journal/JournalMultiCompany     u2018Nu2019
    /Journal/JournalBatchNumber     NULL
    /Journal/JournalNumTransactions     Total number of /Journal/JournalLine transactions
    /Journal/JournalBaseDRTotal     Sum of /Journal/JournalLine/JournalLineBaseValue u2013 Debit Values only
    /Journal/JournalBaseCRTotal     Sum of /Journal/JournalLine/JournalLineBaseValue u2013 Credit Values only
    How to map journal fields and whats is the better  process type idoc/proxies?please let me know
    Journal Line
    Multiple journal lines per header:
    Schema Element     Data
    /Journal/JournalLine/JournalLineCostCentre     Bank account control Cost Centre
    /Journal/JournalLine/JournalLineAccount     Bank account control Account Code
    /Journal/JournalLine/JournalLineMoneyTotal     Transaction Line Amount
    /Journal/JournalLine/JournalLineVolume     NULL
    /Journal/JournalLine/JournalLineDescription     Payee Name
    /Journal/JournalLine/JournalLineChequeBookReference     NULL
    /Journal/JournalLine/JournalLineMatchField     Cheque Number
    NB Contra accounting entries should be posted to:
    Schema Element     Data
    /Journal/JournalLine/JournalLineCostCentre     Bank account control Cost Centre
    /Journal/JournalLine/JournalLineAccount     Bank account control Account Code
    /Journal/JournalLine/JournalLineMoneyTotal     Transaction Line Amount * -1
    /Journal/JournalLine/JournalLineDescription     Payee Name
    /Journal/JournalLine/JournalLineMatchField     Cheque Number
    /Journal/JournalPeriod     Current General Ledger Period
    /Journal/JournalYear     Current General Ledger Year

    It looks you are new to PI,
    you have to develop scenario end to end, by creating source data type and target data type(if you have XSD's not required),then use Graphical mapping (message mapping) to map source and target structures.
    Search in sdn for one end to end scenario you will understand easily
    Regards,
    Raj

  • No entry in key field of table MARM

    Hi,
    I am trying to import and create a Article Master using LSMW with IDoc method. ARTMAS IDoc is getting generated but it is showing error as No entry in Key field MARC, MVKE, etc etc and now finally stuck in No entry in key field of table MARM even after filling all possible data.
    Function Module used here is BAPI_MATERIAL_MAINTAINDATA_RT. I don't know any technical aspects here to look into.
    Kindly help me out with the information on what could have gone wrong here and what are the possible solutions?
    Thanks & Regards,
    Sudhanva Joshi

    Hi Venu,
    Now i am stuck in somewhat a deadlock situation. and this is in MARM segment. below are the issues,
    1. If I provide an entry in Alternate UOM field in MARM, Ex: EA is base unit and PC is ALT unit, I am getting an error as ' The Alternative unit of measure is same as Base unit of measure'
    2. And, If i don't give an entry in ALT_UOM field (which SAP suggests, in case there is no other units than Base unit, leave the ALT-UOM field as blank), I am getting an error as "No entry in key field of table MARM"
    Can you please assist in resolving this issue.
    Thanks & Regards,
    Sudhanva Joshi

  • Journal entry disappears after saving and not available to post

    Hi Gurus
    On BPC for Netweaver version 7.5 and excel 2003 i am able to save the journal entry but am not able to post it since it disappears after saving. I could see the Journal ID being generated and then the layout gets cleared . i am unable to post this journal. Also when i go to journal manager and tries to list the journals this saved journal does not show up.
    I have already set the application parameter "JRN_MAXCOUNT" to 1000  so that i can see the journals that i create.
    Have any of you faced such an issue?
    Regards

    Hi Tara,
    Thank you very much for your tip. I had Datasource as one of the header fields and i moved it to the item fields to make it work. I am still not sure why does that. May be because when we create the journal template system proposes only the required fields in Header and if select additional ones its not liking it.
    I cannot come up with a reasoning why we cannot incorporate a non required field in header journal template . The obvious reason that i included the datasource dimension in header itself was because it was a common value that i want to use for all my journals.
    Anyway i hope SAP would either fix this or come up with a reasoning.
    Thanks again..

  • Duplicate entries in the Fields array

    I came across a (strange) pdf and after an analysis it turned out that some of the fields occur multiple times in the Fields array.
    Now when looking up the spec it states:
    "An array of references to the document’s root fields (those with no ancestors in the field hierarchy)."
    Is that a violation of the spec (although it doesn't state that explicitly)?
    So how to deal with this kind of PDFs?

    A follow up to the discussion: I opened the document in the Life Cycle Designer and it showed me an error (as I would have expected it from acrobat).
    The explanaination was that a (checked) radiobutton was referenced several times (due to the above problem). And that is definetly a violation of the spec - you can't have several checked radiobuttons in a group - and that is the reason why it should be illegal to have duplicate entries in the /Field or /Annots array (in my opinion).
    Interesting to know that Lifecycle Designer seems "better" in this way than acrobat - since acrobat didn't complain and LifeCycle Designer showed the correct warning in the first place.

  • Use of Department field in project online

    Hi All,
    In project server, we have the provision to use the field Department to have some control on the data visibility to a user, right?
    Is this feature available for project online in Sharepoint permission mode? Can I get some article on this?
    Is there any article/document which gives details of impact/areas affected when permission mode is converted from sharepoint permission mode to project server permission for project online?
    Please help.
    Thanks, Rose

    Rose,
    The Departments field is NOT a security feature. It is purely a "Visbility" feature. So regardless of SharePoint Permission mode or Project Server Permission mode, you can use the Departments field, and one does not have an impact on the other.
    Cheers,
    Prasanna Adavi, Project MVP
    Blog:Podcast:
    Twitter:LinkedIn:
    If it gives you any comfort, here is a screenshot from my project online tenant, with SharePoint Permisssion mode.

  • User Defined Fields and Reference Fields on the B/S

    Dear Experts,
       On the balance sheet in SAP 9.0/8.82 once you click on the expanded button, there are user defined fields and reference fields which are blank. Could someone assist on how to use them ?
    Kind Regards

    Hi Martin,
    If you add any user defined fields (UDF) in Journal Entry (JE) screen, You can use the udf's in the
    balance sheet report.
    Regards
    Neslin

  • User Defined Fields and Tables

    I am trying to create U defined fields and link it with a usr defined table. Whenevr i am trying to link its throwing error - Alphanumeric field size cannot be decreased.
    Also can anyone tell me how to create data entry form through user defined objects. Can it be done without involving sdk/programming

    First question, Your UDF length field is morethan 8, if you linking with UDT the length should be 8. if your UDF less then 8 e.g. 1-7. after you linking it the UDF length will be 8, it's because default length field in UDT ( Code(8), Name(30)).
    Second, yes it can, but on for simple requeirement, if Your requirement is complex, You need SDK.
    Step :
    - create UDT
    - Create UDF
    - Register  ( Tool >> User Defined Object >> Registration Wizard ) don't forget to tick Default Form.
    fyi, there 2 kind of UDO : Document and Master Data,  You should consider this.
    Rgds,

  • Table entries for Personnel administration and organisation management

    Hi ,
    For a functional consultant do we need to remember the table entries where the employee infotypes saved or where the table entries is useful as far as Personnel administration and organisation management is concerned.....
    and one more thing how to create a custom Infotype (employee) detail documentation required ...
    keep me posted
    Thanks

    hi,
    it is really helpful if you rember the table name which holds the information about the infotypes
    table starting with <b>PA</b> contains all the personnel information data
    like <b>PA0001</b> holds the information of<b> infoty0001</b>
    similary you can check for other info types
    and hr haster table like<b> HRP1000</b> or<b> HRP1001</b> hold all the other hr objects including your personnel objects as well as organizational related objects
    <b>infotype numbers</b>
    Four digit number nnnn
    Unique identification
    <b>9000 to 9999 reserved for customer infotypes</b>
    <b>naming convention
    0000 to 0999 – HR Master data  / Applicant data
    1000 to 1999 – Organizational Management
    2000 to 2999 – Time data                     
    4000 to 4999 – Applicant data           
    9000 to 9999 – Customer defined</b>
    defination of infotypes
    <b>Each infotype nnnn requires at least two structures and one table</b>:
    <b>Structure PSnnnn</b>
         Structure PSnnnn contains all of the infotype data fields.
    <b>Structure Pnnnn</b>
         Structure Pnnnn contains infotype key fields and all of the data fields
    from structure PSnnnn .
    <b>Transparent table</b> PAnnnn and/or transparent table PBnnnn
    <b>infotype module pool</b>
    A module pool should be used with each infotype. This module pool is the main program for the maintenance interface for the info type.
    The name of the program is MPnnnn00. Where P stands for Human Resources (personnel) and nnnn is the four-digit info type number.
    Transparent table PAnnnn is required if you want to use an infotype within Personnel Administration.
         If you want to use an infotype within Recruitment, transparent table PBnnnn is required.
    In accordance with the distribution of infotype name ranges, objects P9nnn , PS9nnn , PA9nnn and PB9nnn are assigned to the customer name range.
    <b>infotype screen</b>
    An initial screen
    A single screen
    A list screen
    <b>Initial screen</b> is used as technical interface
    Screen 1000 is used for all info types
    Processed in background and not displayed
    Performs general initialization procedures
    <b>A single screen</b>
    Its an interface between the system and the user.
    It enables to create, display or maintain data records.
    Screen 2000 is used for single screen.
    <b>list screen</b>
    Unable to list all records in info type
    Screen 3000 is used for list screen
    <b>infotype time constrains</b>
    A time constraint indicates whether more than one infotype record may be available at one time. The following time constraint indicators are permissible:
    A    Only one record may exist, valid  from 01/01/1800 to 12/31/9999. Splitting and deletion is not permissible.
    B    Only one record may exist, valid  from 01/01/1800 to 12/31/9999. Splitting is not permissible, but may be deleted.
    T    The time constraint varies depending on the subtype.
    Z    Refers to time management infotypes.
    <b>
    to create infotype</b>
    Transaction code
    <b>‘PM01’.</b>
    <b>enhancing PA infotype</b>
    Start the Personnel Administration info type copier (PM01)
    Enter the info type number.
    Choose Enhance info type.
    Start transaction PM01
    You access the Create Info type screen:
    Choose Enhance Info types.
    In the Info type no. field, enter the four-digit number of the info type you want to create. When you specify the info type number, please remember to enter any leading zeros.
    In the Sub-Objects group box, flag CI Include.
    Choose Create. The Dictionary: Initial Screen is displayed.
    Create the Cl include.
    Choose Activate.
    Return to the Create Info type screen.
    Choose Create All.
    hope this information will help you..
    and don't forget to reward points

  • Attaching search help to SCREEN FIELDS AND TABLE FIELDS

    Hello experts,
    Himanshu here.
    Could you please explain how we can assign search Help to a screen field AND TABLE FIELDS in ABAP?
    Please reply at the earliest,as we have some deliverables to be met
    Thanks

    Hi,
    In the initial screen of the ABAP Dictionary, select object class Search help, enter the name of the search help and choose Create.
    A dialog box appears in which you must select the type of search help.
    Select Collective search help and choose .
    The maintenance screen for collective search helps is displayed.
    Enter an explanatory text in the field Short text.
    You can for example find the search help at a later time using this short text.
    In the Definition tab page enter the parameters of the collective search help.
    Select the Imp flag if it is an import parameter. Select the Exp flag if it is an export parameter.
    Define the types for the parameters of a collective search help by assigning a data element. Enter the name of the data element that describes the contents of the search help parameter in the Data element field.
    You can assign the parameter a default value in the Default value field.
    In exceptions it could be necessary to change the standard process defined by the search help. You can implement the deviation from the standard using a search help exit.
    In this case enter the name of the search help exit in the corresponding field.
    On the Included search helps tab page, define the search helps that you want to include in the collective search help.
    You can include elementary search helps and collective search helps.
    Use the Hide flag to control whether an included search help should appear in the dialog box for selecting the elementary search help. If the flag is set, the search help is not offered.
    It makes sense to hide search help inclusions if one or more search paths in the standard system should not be used in a concrete R/3 System. Similarly, search help inclusions can also be already hidden in the standard system because they only can be used meaningfully in a few R/3 Systems. You have to cancel the flag in this case.
    Position the cursor one after the other on each allocated search help and choose Parameter assignment.
    In the next screen, enter the parameter names of the elementary search helps to which the corresponding parameters of the collective search help should be assigned in the field Reference parameter.
    You can select the parameters contained in the included search help using the input help. Create a proposal for the assignment with Proposal.
    Save your entries.
    A dialog box appears in which you have to assign a development class to the search help.
    Choose .
    Result
    The collective search help is activated. You can find information about the activation flow in the activation log, which you can display with Utilities ® Activation log. If errors occurred when the collective search help was activated, the activation log is automatically displayed.
    Do not forget to link the search help to a screen field. The search help attachment is not part of the search help definition; it is part of the object definition to which the search help is attached.
    regards,
    veeresh.

Maybe you are looking for