Pipeline Input Help!

Hi guys,
I'm having a bit of difficulty turning a script of mine into a re distributable tool and I've spent the best part of two days on it so here I am looking for some guidance.
Basically I am using Quest-AD cmdlets to copy users whilst adding unique information to them as they are created.
When I attempt to turn this into a parametrised cmdlet I have an issue in getting the get-qaduser cmdlet to recognise the "modelID" argument supplied by import-csv.
#Create function
function new-bulkaduser {
[CmdletBinding()]
#Setup Import and Set Variable
#Make sure path is reachable
param(
[Parameter(Mandatory=$true,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true)]
[string[]]$userlist='localhost'
Begin {
#import AD and Quest Snap-In
import-module activedirectory
Add-PSSnapin Quest.ActiveRoles.ADManagement
Process {
ForEach ($User in $Userlist)
$source=$User.ModelID
$fn=$User.FirstName
$ln=$User.LastName
$pw=$User.UserPassword
$un=$User.SamAccountName
$ip=$User.IpPhone
$gn=$User.Group
$pc = (Get-QADUser -identity $source).parentcontainer
$domain = 'PINKE.NET'
get-qaduser -includeallproperties -identity $source
And a .csv example below:
ModelID,Name,SamAccountName,DisplayName,FirstName,LastName,IPPhone,UserPassword,group
cmnaa,TestUserx1,TUserx1,Test Userx1,Testx1,Userx1,6661,B1xgBuxxx01,UK Service Desk
Any help would be appreciated! 
Thanks!

Your userlist contains blank entries.  Just write trace statements to see what is actually being sent.
The following is wrong. If you set a default then"Mandatory" is not used.
It should be this way:
Param(
[Parameter(          Mandatory=$true,
          ValueFromPipeline=$true,
          ValueFromPipelineByPropertyName=$true    
)]$userlist
A CSV is not [string[]]  it is [Object[]]
Start like this and fix all errors before adding to it.
function new-bulkaduser{
[CmdletBinding()]
Param(
[Parameter(
Mandatory=$true,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true
)][object[]]$userlist
Begin{
Add-PSSnapin Quest.ActiveRoles.ADManagement
Process{
foreach($user in $userlist){
Write-Host "Processing ID: $($user.ModelID)" -ForegroundColor green
Get-QADUser -identity $user.ModelID
Be careful with code format so errors are not lost.
¯\_(ツ)_/¯

Similar Messages

  • Multiple parameters with pipeline input?

    Hello,
    The answer to this may just be that this is not a case for using pipeline input.. 
    I have a function that takes two parameters, one is an object (the result of a third party web services call) and the second parameter is a string. To simply explain what the function does you can think of the object parameter like a table definition and
    the string parameter like the name of one of the fields... you supply the table and a fieldname and the function returns the 'ID' of that fieldname... I have this written as a normal function right now but I'm wondering if it's possible to change it to accept
    pipeline input... the other function I've designed as 'advanced functions' that take pipeline input typically only have one parameter.
    how would I do this with my case? two params, one an object and one a simple type (string)?
    1. I know I *could* make it take one object input param, and bundle that web service returned object and the other string value into a custom object and do property name binding... however that feels to me like forcing something that should not be.. I think
    I would put that in the 'not a case for pipeline input' bucket... but I'm unsure.
    2. how could I pass these two parameters pipeline style, without doing the one custom input object approach?
    I can see it for one set of them, like:
    $objectParam, $stringParam | MyFunction
    but how would I specify multiple sets of those two params?
    $objectParam1, $stringParam1, $objectParam2, $stringParam2 | MyFunction
    each iteration within the PROCESS block would work on a pair of params at a time...
    maybe I'm just thinking about this all wrong... which is why I'm posting.. maybe this just is not where I should be doing pipeline input?
    any input would be appreciated, thanks

    Hi DJC,
    I’m writing to just check in to see if the suggestions were
    helpful. If you need further help, please feel free to reply this post directly so we will be notified to follow it up.
    If you have any
    feedback on our support, please click here.
    Best Regards,
    Anna
    TechNet Community Support

  • Error while adding a custom field with Input help via AET

    Hi All,
    I need to add two custom field under Service orders at Item level in component BT140I_SRVP.
    One field is required to have the input search help f4 and autopopulates the second field
    I am able to add one field(not requiring help) successfully through AET .
    I have created one Zsearch_help in se11 and its successfully running  and Autopopulating seocnd field while I am testing it
    While adding second field through AET,I need to enter following details as -
    field label,search relevant ,serach help etc.
    When I type the name of my 'Zsearch_help' against field search help it gives me following error
    'Search help is not compatible'.
    Secondly,not getting getter and setter methods for the attrributes in BTAdminI.
    Last,please tell me if i create zhelp and activate it,would it automatically appear in the list on AETwhile assiging it to input field?
    Please help me out.Kindly be detailed as I am new to SAP CRM.
    Thanks,
    Shivani

    The question is answered in CRM 7.0 forum:
    Getting error while adding a custom field (with input help) through AET

  • F4 input help on Variable screen is not working on Portal

    Dear Experts,
    We are facing one issue when we run the WAD report on portal, variable screen gets hang after clicking on input help button (F4) for couple of variables. We are facing same issues when we run the base queries on portal. But when we run the same base queries in RSRT (Tcode) or in BEx Analyzer we are not facing this issue and able to get the input help screen with values.
    I also have gone through some old posts related to such issues but didn't help much. We are already on SAP BW 7.4 SP Level 008 and for Char IO Query Filter Value setting is kept as "Values in Master Data Table" only. This is a MD IO with Compounding.
    Kindly let me know if anyone has faced such issue.
    Thanks in Advance,
    Nilesh

    Dear Martin,
    There is a no long running work process in the backend and data volume is more in Master Data Table, there are around 19 Lacks records available.
    For BI Java patch and defaultTrace for errors I will check it with BASIS Admin team. Unfortunately I don’t have rights to do same.
    Thanks,
    Nilesh

  • I defaulted input help field (pick list) but SAP CRM still asking for one

    We are running SAP CRM 7.0.
    Some fields as you know are dialog / pick list fields.
    What I mean by this is they are input help fields where you
    can click a little square (in sap crm 7.0) to the right of the text box
    and it brings up a dialog screen of values that you can select from.
    Here is an example screen shot of what I am talking about:
    http://img834.imageshack.us/img834/5676/imageschak.png
    So what I have done is implemented the GETTER function for this input help field so that by default it has a value.
    The code is like so:
    method GET_CURRENCY.
    CALL METHOD SUPER->GET_CURRENCY
      EXPORTING
        ATTRIBUTE_PATH = attribute_path
       ITERATOR       = iterator
      RECEIVING
        VALUE          = value.
          if value eq ''.
            IF sy-langu EQ 'E'.
              VALUE = 'USD'.
            elseif sy-langu EQ 'D'.
              VALUE = 'EUR'.
            ENDIF.
          endif.
    endmethod.
    Here even is a link to this method that I created: Field Currency of Context Node BTADMINH - How to set default
    The method works great it sets the default of the currency to say USD.  When I click the create button to create an opportunity the field currency is set to USD, this is great because it makes my job easier that I dont have to click the input help button and select a currency, it is already there.
    But once I click the "Save" button for an opportunity I get a small error in the error notification box that tells me I need to select a currency!  But why is this happening a currency already exists?  So If I click the input help (the little button) and reselect the currency value USD then save my opportunity this error goes away.
    The question is why does this happen?  I need it so that the default currency value is recognized by the SAP CRM system.  Why do I have to go back in and re-select the currency if it is already set?  Is there some sort of consistency check or something I need to do to eliminate this problem? 
    Here is a screen shot after creating an opportunity with the default Currency set to USD (this means I did not select USD in the dialog input help it was defaulted by the getter method:
    http://img832.imageshack.us/img832/3011/enteracurrency.png
    Only if I go back into edit mode and actually click the little square to bring up the dialog of values and select USD does this error go away.  Why does this happen ?

    I called SET_CURRENCY right after setting my value and the error is now gone. 
      SET_CURRENCY( EXPORTING ATTRIBUTE_PATH = ATTRIBUTE_PATH
                    iterator = iterator
                    value = value ).
    Got the tip from Pieter who has a good blog on SAP CRM: http://sapcrmweblog.blogspot.com/

  • Passing parameter to an Input Help Component

    Hi ,
    Someone knows a way to pass parameters or any value to an Input Help Component that is built in a separate WDP application ?
    Thanks in advance for your help.

    Hi Baskaran,
    I have a WDP component that implements "".
    Then, i use it as search help (F4 function) for an input field  in another WDP component.
    I would like to use the same " search help component " for many input fields.
    In this purpose, I would like to pass a parameter to specify the caller input field.
    So, do you know a way to pass parameters to "the search help component" ?
    Here is the tutorial that i followed, for the first part.
    [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50fd6096-a4b6-2d10-bfa8-bbd9001e0d0e?quicklink=index&overridelayout=true |http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50fd6096-a4b6-2d10-bfa8-bbd9001e0d0e?quicklink=index&overridelayout=true ]
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50fd6096-a4b6-2d10-bfa8-bbd9001e0d0e?quicklink=index&overridelayout=true

  • How to hide values in F4 input help

    Hi firends,
                        I have a requirement to hide the values from F4 input help. In tcode F110, when I press F4 in Identification field then i will get the F4 help value for identification for which payment run is already done. I want to hide that data in F4 help and i don't want to delete it from table. Is it possible??
    Please help me.
    Thanks,
    Ziad

    Hi,
    Please check this [Thread for your help.|Re: Regading OVS]
    You can check also [This thread.|Re: Hide F4 personal value list;
    Thanks,
    Abhijit

  • System is not showing in dropdown list for input help

    hi,
    I am using one data service in iview and i have dragged an input form.I want to add input help in it.
    Now my problem is that: When i am trying to select system for input help it is not showing any system in dropdown list.
    Can anybody help me to solve this.
    Thanks

    Hi ,
    if the System is not Mapped to VC User it will not appear in the Dropdown list.
    So do the Usermapping for that system useing System alias.
    Do you know how to do Usermapping?
    If not get back to me.
    Regards,
    Govindu

  • Input help for a selection screen field

    I have a selection screen with field species and checkoff activity .
    For a given species('sc','sb' or 'ss') , the input values allowed for the
    check off activity must be 'SCCK' for species 'SC' ,'SBCK' for species 'SB' and so on.
    I need to provide input help for check off activity based on the value of the species.How do i do that?

    PARAMETER : p_val(10) TYPE c ,
                p_val2(10) TYPE c.
    AT SELECTION-SCREEN on p_val.
      IF p_val = 'SC'.
        p_val2 = 'SCCK'.
      ENDIF.

  • Standard input help in zreport selection screen

    Hi All,
       I am having a selection sceen like S_PERNR FOR PA0001-PERNR.
       when I put f4 help then it is comming right and showing the value
      of personnel number which is correct.
       But when you execute the transaction PA30 and select f4 help in
    personnel number then it iscomming with window and all information
    is cooming. I want to put that help on my selection screnn S_PERNR FOR PA0001-PERNR.
    is it possible? Please give me the solution.
    Thanks,
    Rakesh

    Yes, i am getting input help for position in that program also in ECC 6.0 version.
    SELECT-OPTIONS:pchobjid FOR pchdy-objid_seq.           
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pchobjid-low.    
      rhx-f4-objid-low pchplvar pchotype pchobjid '' ''.     
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pchobjid-high.   
      rhx-f4-objid-high pchplvar pchotype pchobjid '' ''.     
    AT SELECTION-SCREEN ON pchobjid.
      PERFORM check_objid_sign(rhxchk00) USING pchobjid-sign.
    Which version are you working ?
    Note: Plz post only one question per thread.

  • Problem with Input help inside an adobe interactive forms

    Hi Experts,
    I'm currently implementing a Webdynpro ABAP application containing a Interactive forms.
    I'm using Adobe Live Cycle Designer 8.0, Acrobat reader 9.2, Internet Explorer 7.0
    My problem is that when I click on the "input help" button inside the adobe form, he automatically refresh all the forms UI element with their initial values. Is-it a refresh event included when we pressed the "Input help" button or an other event? How Can I deactivate that action, event?
    Because since he automatically refresh my form data I loose the context current values.
    Thanks in advance,
    Louis

    P740741 wrote:>
    > Hi Norbert,
    >
    > Thanks for reply, yes I use ZCI and I inserted the Webdynpro script  through Utilities.
    >
    > Best Regards,
    > Louis
    strange, but you could compare the version of the zci scripting
    in your form in the hierarchy tab there are variables and the ContainerFoundation_JS script --> the first line
    // DO NOT MODIFY THE CODE BEYOND THIS POINT - xxxxxxxxxxxxxxxxxxxxxxxxxxx - ContainerFoundation_JS gives you the requested information about the scripting version...have a look at this version...
    norbert
    perhaps this note helps:
    Note 999998 - Analyzing errors with Adobe Integration of Web Dynpro ABAP
    --> for debugging!
    A client debug function is available as of SAP NetWeaver Release 7.00 Support Package 19 (or after you implement Note 1287114) and for all Enhancement Packages. Activate this client debug function using the URL parameter "sap-wd-clientDebug=X" (attach it to the URL using "&"). You can then activate the client trace using the key combination <CTRL><ALT><SHIFT>T (move the focus to a Web Dynpro UI element, for example, to an InputField, do NOT move the focus to Adobe Reader). The system opens a new browser window with the trace output. The trace may contain an error entry ("Network Error", and so on). The URL also activates the Adobe document services (ADS) trace. The trace outputs of the ADS are copied to the generated PDF document as an attachment. Open the file "Error.pdf" of the ADS trace: Form errors (for example, script errors) are listed there.
    Edited by: Norbert Prager on Oct 24, 2009 7:31 PM

  • Input help not showing up for columns in CATS regular application

    I am using standard iView Time Entry in ESS available in EP7 ECC6.0.
    the issue I am having is that there is no popup (input help)  for columns 'Reason Code',  'Region' and 'OT Rsn'. But if I go into ECC6.0 t-code CAT2, the popups are available.
    Any idea what may be causing this issue?
    Tiberiu

    Suresh is right, You need to build your own search help with above table and implement the class
    ie CL_XSS_CAT_VALUE_HELP* in se24

  • PA30 - Personnel Number field greyed out - No input help available.

    Hi Experts,
    In our System in DEV, & Quality  in PA30, we are unable to select employees either by directly giving the number (greyed out) or by selecting through F4 (No input help is available).
    But in Production System we can directly give Pernr or select through F4.
    Any body tell me what is the reason behind this.
    Thanks in advance.
    Samanvita.

    Hi Hariprasath,
    It is not the issue with NUMKR, The number Ranges are already maintained, and are defaulted in NUMKR feature.
    This is showing same in DEV / QA/ Prod.
    Issue is in DEV / QA,  The Personnel Number Field is Greyed out, and not able to select any number.
    For that we are going to PA20, open the personnel number first, and open PA30 in another window, then we are changing the data of the employee.
    But we want to give Personnel Number in PA30 itself as per SAP Standard.
    Any Idea, why it is like this.
    Thanks,
    Samanvita

  • UI: Popup content (input helps, ...) not shown

    We're running the CRM 2007 web UI. We've got problems with the content of popups. The behaviour is different on several hosts calling the UI internally (intranet) and using the same browser (IE6).
    Here's a description on how we're able to reproduce the problem:
    1. Open CRM UI url
    2. Open any search view that contains a field with input help (e.g. business partner ID)
    3. Call the input help of this field
    --- This is what we already found out in debugging mode:
    4. A server cookie is stored in table SSCOOKIE for the given session ID
    5. In BSP application BSP_WD_BASE, page "popup_buffered_frame.htm", the server cookie is selected. For any reason, on some hosts the session ID that is given and used for the selection of the server-side cookie is not the same as the one used for storing the cookie. Thus, the cookie cannot be read and the popup remains empty.
    Until yet we've found no differences in the configuration of the hosts / browser.
    I searched for SAP notes dealing with such an issue, however, didn't find any hits. We tested with IE6.
    Thanks for any hints & kind regards
    Wolfgang

    I found the solution by calling the URL using "?sap-syscmd=nocookie"

  • How to use standard Search Input Help (return 2 data code and desc) ?

    Hi,
    Please advise how to use standard Input Help provided by SAP and return 2 data (code and description) ? because the standard Input Help only return the code only ?
    Thank You and Best Regards
    Fernand

    >
    Saket  Abhyankar wrote:
    > Hi,
    >
    > I think you need to go for 'Search Help Exit' or OVS.
    >
    > Regards,
    >
    > Saket.
    That is not true that this is the only way.  The standard Data Dictory based search help can return more than one value as long as there are multiple exporting values defined in the search help, the search help is attached to a Data Dictionary Structure, and this same data dictionary structure is used as the source of the context node. You can read more about this in the online help:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/47/9f724642314aabe10000000a42189b/frameset.htm
    The Note section under Integration:
    If an input help structure is stored in a field in the ABAP Dictionary, and if you want to use the field mapping of search help parameters stored in the ABAP Dictionary as the field name for the structure for your Web Dynpro input help, then map your context nodes to this structure. This ensures that all components of the structure are available dynamically at runtime as attributes of the node.
    If the context node is not mapped to the structure, the data element's input help can be used if there is one.

Maybe you are looking for