Error troubleshooting in AD Module - Get-Aduser w/created filter

Hi All,
I'm working as an intern with my university, and I've been tasked with clearing out old student accounts in AD. There are currently over 4000 users in our system, and it's estimated that there are over 3500 old accounts that need to be deleted.
We are at the 2008 R2 Domain Functional Level.
I am going to script this through Powershell, but I'm having a terrible time getting a certain query to run properly.
I am using the following:
get-aduser -filter {created -lt '1/1/2010' -and lastlogontimestamp -notlike '*'} -properties created
I will sometimes narrow my query by adding another filter for created -gt '1/1/2008', for instance.
When I run the command as written, however, it will return several hundred users, but then it spits out the following error after the last displayed result:
Get-ADUser : The specified method is not supported
At C:\Users\Administrator.CSC\Desktop\test1.ps1:4 char:15
+ get-aduser <<<< -filter {created -lt '1/1/2010'} -properties created | ft name,samaccountname,created
+ CategoryInfo : NotSpecified: (:) [Get-ADUser], ADException
+ FullyQualifiedErrorId : The specified method is not supported,Microsoft.ActiveDirectory.Management.Commands.GetADUser
If I narrow my search scope by created date, I can sometimes get the error to not appear. My guess is that there are several accounts in the database that trigger the error (or at least, that's how it appears).
I have tried running this on both a DC and a non-dc server with server management tools installed. It doesn't matter what other filters are used, so omitting the lastlogontimestamp filter doesn't prevent the error.
My supervisor seems to think there may be errors in the AD database, but I've done every AD health check I can think of.
Does anyone have any suggestions?
Thanks,
Brandon

If you have access to Microsoft Connect (I believe you must be an MVP), it would help to vote on this report, as that should help prioritize it.
You don't need to be a MVP for access to Connect, here's a direct link to the bug report Richard opened:
https://connect.microsoft.com/PowerShell/feedbackdetail/view/963333/ad-module-cmdlets-raise-error-if-there-are-more-than-256-results
The command from the report does appear to work for me in v4 (Win7):
PS C:\> Get-ADUser -Properties Created -Filter "Created -gt '9/1/2014'" | measure
Count : 260
I also tested the command that failed in the post above and v3 appears to be working for me as well (WS2012):
PS C:\> $start = (Get-Date).AddDays(-1)
PS C:\> get-aduser -filter {modified -gt $start} | measure
Count : 263
Perhaps the count needs to be higher to replicate this.
EDIT: I just created a bunch of new user accounts and I still can't replicate this (v3 on WS2012 again):
PS C:\> $start = (Get-Date).AddDays(-1)
PS C:\> get-aduser -filter {modified -gt $start} | measure
Count : 1803
EDIT2: DC is WS2008SP2.
Don't retire TechNet! -
(Don't give up yet - 13,085+ strong and growing)

Similar Messages

  • Help with get-aduser -filter command

    Hi! I'm having problems with getting user info from displayname
    function searchuzv {
    $uzvinfo=$InputBoxuzv.text;
    $uzvcheck = Get-ADUser -filter "DisplayName -like '*$uzvinfo*'"
    If i run Get-ADUser -filter "DisplayName -like '*$uzvinfo*'" line separately, everything is ok, and working, but when I run function, I m getting error "Get-ADUser : The search filter cannot be recognized"
    My objective is get user info when only part of displayname is provided.
    I suppose there is problem with syntax, but I can't find anything about this.
    Any suggestions?
    Bert regards,
    Ronald

    Hi Ronald,
    Try this.
    function searchuzv
    $uzvinfo=$InputBoxuzv.text
    $uzvDisp = "*"+$uzvinfo+"*"
    $uzvcheck = Get-ADUser -filter "DisplayName -like $uzvDisp"
    Regards,
    Satyajit
    Please “Vote As Helpful”
    if you find my contribution useful or “Mark As Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

  • MSXML6 not supporting VB6 outlook.Attachments (MailItem.Attachments) getting ActiveX cannot create object error

    Hi, This is about msxml4 removal from my application for security reason.
    Currently in my application Outlook Addin with VB6 using Office2010 and outlook object is refering with MSOUTL.OLB from C:\Program Files\Microsoft Office\Office14
    When unregister MSXML4.dll to remove the dependacy of it and use MSXML6.dll, My application getting error.
    VB6 outlook.Attachments getting ActiveX cannot create object error
    if i register msxml4.dll again, then the same is working fine.
    Pls suggest how to remove msxml4 dependancy without this error
    Regards,
    Sathiya

    Firstly, you shouldn't be messing with the system dlls.
    Secondly, do you create an instance of the outlook.Attachments object (using "new" etc.)? That object cannot be created, you can only retrieve if from an Outlook item (e.g. MailItem.Attachments property).
    Please show the relevant snippet of your code.
    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

  • Premiere elements 12, new installation, serial no. accepted, installation completed and new started, but does not run. I get following msg-box: "LoadLibrary failed with error 126: Das angegebene Modul wurde nicht gefunden."

    premiere elements 12, new installation, serial no. accepted, installation completed and new started, but does not run. I get following msg-box: "LoadLibrary failed with error 126: Das angegebene Modul wurde nicht gefunden."   Installation in German Language on WIN7 professional 64bit, Samsung SSD. What can I do to run that program?

    Jurgen Freund
    Premiere Elements 12 on Window 7 64 bit. What video card/graphics card does your computer use - AMD Radeon?
    I have found this YouTube video on the subject of Error 126 with details for resolving the problem.
    How to fix the ERROR 126 when you open OpenGL programs - YouTube
    The link was contributed in an old 2013 thread here by the ID danneomarre (see post 6 of the following thread)
    LoadLibrary failed with error 126: cant find the required
    Please let us know if that worked for you.
    Thank you.
    ATR
    Add On...When all is OK and working, please update 12 to 12.1 Update using an opened project's Help Menu/Update.

  • Getting error in the function module

    Hi everybody.
    I have created one function module in se37 and i am calling that function module in the se38 report, when i am executing the report it is throwing me an error.
    here in my report i am having the select option fields ex matnr, in the function module importing i have given the parameter matnr over there and when i am running the report it is through an error that 
    "The function module interface allows you to specify only 
    fields of a particular type under "MATNR".               
    The field "S_MATNR" specified here is a different        
    field type                                                "
    IF i am giving the parameter instead of select-options in the report and executing, then the function module is getting triggered and receiving the data what ever the code is available in the source code.
    can anyone help me out in this issue so that i can get the data while using the select-option instead of parameter.
    Thanks in advance

    Hi,
    Actually, I wouldn't recommend the use of that tables parameter...
    From sap help:
    Table parameters are obsolete CHANGING parameters that are typed as standard tables with a header line. If an internal table without a header line or a table body is passed as an actual parameter to a formal parameter of this type, an empty local header line is generated in the function module. If an internal table with a header line is used as an actual parameter, both the table body and the header line are passed to the function module. Pass by value is not possible in formal parameters defined using TABLES. Formal parameters defined with TABLES can be replaced by formal parameters defined with CHANGING. A local work area can be created for the internal table in the function module by using the addition LIKE LINE OF itab of the DATA statement.
    Exceptions
    So i definitely would go with either importing or changing parameter...
    Cheers,
    m.

  • I just installed Lightroom 5 but can't import photos, there is no import option anywhere. Get pop-up saying error attempting to change modules  ?? Any help with this??

    I just installed Lightroom 5 but can't import photos, there is no import option anywhere. Get pop up saying error attempting to change modules.
    I had this with the trial , then I purchased license and still happens.  Any help with this ??

    <moved from Downloading, Installing, Setting Up to Photoshop Lightroom>

  • Get-ADUser : The server has returned the following error: invalid enumeration context.

    I'm running a powershell command to add the email (AD mail) attribute to users in a specific OU.  It seems to work then will bomb out with the error in the title.
    I'm using a "scripting guy" command that I've altered with my specfic OU/domain information however, I'm pasting in the more "generic" version :: Get-ADUser -LDAPFilter "(!(mail=\.name*))" -resultSetSize $null -searchbase "ou=test,dc=nwtraders,dc=com"|
    % {set-aduser -identity $_.distinguishedname -email ($_.samaccountname + "@nwtraders.com")}
    I work for a school district and this command is being used to add the mail attribute to the student's accounts.  I think about 2/3 of the students are completed but the script/command bombs and I'm not sure where or why.  I've resubmitted the
    command several times but I'm not sure whether it's starting from where it bombed or if it's starting again at the beginning and essentially re-doing the ones already completed.
    Can someone point me in the direction of a work around or a resolution to the Get-ADUser error?
    Thanks!!

    I don't know the error, so I can only guess there. But the LDAP syntax filter cannot be correct. Can you provide a link to the reference where "Scripting Guy" suggested this?
    As written, you are retrieving all users where the mail attribute does not begin with the string ".name" (case insensitve), where "name" is not a property or attribute, but a string value. LDAP syntax clauses are in the format:
    (<attributeName><operator><value>)
    In your case, <operator> is "=", <attributeName> is "mail", and <value> is ".name". The "\" character is the escape character, which means to interpret the following character (the period in
    this case) literally. You cannot use an attribute name on the right side of the operator (the "="), unless PowerShell has introduced some functionality I am not familiar with to expand the LDAP syntax. For example, the following does not filter
    on users where the first name is the same as the last name:
    (givenName=\.sn)
    Instead, it filters on users where the first name is the string ".sn". Even if "\.name" was interpreted by the Get-ADUser cmdlet to be the "Name" attribute of the user, this would cause problems. "Name" is the
    Relative Distinguished Name of the user (the value of the cn attribute) and it could include commas or spaces. I would expect "\.sAMAccountName" to make more sense.
    Richard Mueller - MVP Directory Services

  • Get-ADUser Script Runs but issues error command before returning all results

    Greetings;
    I am running Windows Server 2008-R2 and try to execute a PowerShell command as follows:
    I am trying to locate user objects that have been inactive since September 1 and do not have any Exchange mailboxes. The query does run and I do get a number of records, however, the error is issued, as shown above.
    can you please shed some light as to why I am getting this error message? I do appreciate your time.
    Behrooz

    I see this thread isn't answered yet, so I'm taking another shot at it.  I am positive my script is going to give you the results you are looking for. I have reproduced this in my lab.
    What I did:
    - I created a set of users in an OU in my domain.
    - I populated the 'employeeType' property on a handful of them
    - I created mailboxes fora subset of those users on my Exchange server
    - I did NOT log in with any of these accounts, but that is the easy part.
    Run this query and you will get a returned set of accounts that:
    - Have not logged on since 9/1/2013
    - Do NOT have a mailbox (this is query-able through Get-ADUser because the HomeMDB property is only populated when you have a mailbox.  Using the Exchange tools is not necessary)
    - Accounts that do NOT have any anything in their 'employeeType' property.
    Get-AdUser -filter * -properties * |
    Where-Object {$_.HomeMDB -eq $NULL -AND
    $_.employeeType -eq $NULL -AND
    $_.lastlogondate -ge "9/01/2013"} |
    Select displayname,distinguishedname,samaccountname,employeetype |
    Export-Csv "employeetype.csv" -notypeinformation
    ** This result is going to find people with NO employeeType.  If that is the opposite of what you're looking for, change that like from -eq (equal) to -ne (not equal) or you can use -like and -notlike.  Both give the same results.
    Your results will export to a CSV and will not print to the screen.  Again, with the way this is written, the employeetype column will be empty.
    If you want to copy and paste this script, please paste it into the ISE and push play.  If you save it as a .ps1, you'll have to ensure you have the appropriate executionpolicy set (Open PS as an admin, run 'set-executionpolicy unrestricted')
    If you chose to run it in a PS window as is, please ensure this whole syntax is all on one line.
    Okay! Come back and tell me you were successful and mark me as the answer!! :)
    Chris Ream

  • The Command Get-ADUser -Identity username -Properties * No Longer Works Due to a Bug in PowerShell 4 and Win8-1 Pro

    The 'Command Get-ADUser -Identity <username> -Properties *' No Longer Works Due to a Bug in PowerShell 4 and Win8-1 Pro
    It produces the following error:
    Get-ADUser : One or more properties are invalid.
    Parameter name: msDS-AssignedAuthNPolicy
    At line:1 char:1
    + Get-ADUser -Identity ********** -Properties *
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (**********:ADUser) [Get-ADUser], ArgumentException
        + FullyQualifiedErrorId : ActiveDirectoryCmdlet:System.ArgumentException,Microsoft.ActiveDirectory.Management.Commands.GetADUser
    This is already documented in these forums:
    1. http://social.technet.microsoft.com/Forums/systemcenter/en-US/1bf9568e-6adc-495d-a37c-48877f86985a/powershell-40-and-the-activedirectory-ps-module?forum=w81previtpro
    2. https://connect.microsoft.com/PowerShell/feedback/details/806452/windows-8-1-powershell-4-0-get-adcomputer-properties-bug
    Unfortunately, in typical style, Microsoft have archived number 1 without bothering to respond with advice.  Can someone in Microsoft please advise your customers here if this is being investigated and of any available workaround or fix ?
    -- huddie "If you're not seeking help or offering it, you probably shouldn't be here."

    Did you consider using one of the "workarounds" below to run an existing version of the AD Module for PowerShell under a specific PowerShell version:
    a. #require -version 3.0    (in ps1 script)
    b. powershell -version 3.0
    Thank you for sharing with us if this helps.
    Desmond, did you miss my reply below ?  I still haven't heard back from you:
    >> "Desmond,
    >> 
    >> Thanks for your quick response.
    >> 
    >> I'm running this just as a command, not in a script:
    >> 
    >> Get-ADUser -Identity <username> -Properties *
    >> 
    >> When I try to run powershell
    -version 3.0 first, then run the above command, it still fails with the same error.  When I then run Get-Host,
    the version still shows as 4.0 so maybe there's more I need to do to launch a 3.0 host.  Anyway, from what I've read it seems your command is more aimed at script compatibility.
    >> 
    >> Can you help ?"
    -- huddie "If you're not seeking help or offering it, you probably shouldn't be here."

  • My iPhone 3GS 16gb, is stuck in restore mode, downloaded and tried to do a restore multiple times. Keep getting an error The iPhone "iPhone" could not be restored. Unknown error occured (-1). Cannot get it out of restore mode, keeps rebooting!

    My iPhone 3GS 16gb, is stuck in restore mode, downloaded and tried to do a restore multiple times. Keep getting an error The iPhone "iPhone" could not be restored. Unknown error occured (-1). Cannot get it out of restore mode, keeps rebooting!
    I have tried to hold the "home" and "power" button to reboot
    I have tried powering it off
    I have tried, to unplug the cable, hold the "home" button and then plug it in.
    Can't check the SN or warranty, cause it is stuck in restore mode.
    Is the hard drive gone? Should there be something replaced.

    http://support.apple.com/kb/TS3694#error1
    Error 1 or -1
    This may indicate a hardware issue with your device. Follow Troubleshooting security software issues, and restore your device on a different known-good computer. If the errors persist on another computer, the device may need service.
    Usually this is caused by your antivirus or firewall blocking iTunes access to the Internet. It can also occur if the phone is jailbroken or if the computer you are using was ever used to jailbreak an iDevice.

  • Get-ADUser and Get-ADPrincipalGroupMembership combined

    I'm trying to get a list of template user account and what their membership are exported to a csv file. I'm trying to combine the tables on them but having a hard time figuring it out. I spent the day racking my brain on this and figured I would reach out
    for help. This gets all my template users.
    Import-Module ActiveDirectory
    $User = "*Template*"
    $usernames = (Get-ADUser -Filter "DisplayName -like '*$User*'" -Properties * | format-table Displayname, SamAccountName)
    $usernames
    I can use this to get all the members of the groups, but since the groups repeat it doesnt break down where one user stops and the others begin. 
    $groups = Get-ADUser -Filter "SamAccountName -like '*$Usr*'" -Properties DisplayName | foreach-object{Get-ADPrincipalGroupMembership -Identity $_.SamAccountName} | format-table name
    I was thinking of joining the tables but that wasnt much help to me since I cant figure out what to join on. I also thought about looping through the first table with a foreach loop but it was assigning the whole table in the first pass and displaying nothing.
    If anyone could help or suggest something, I would greatly appreciate.
    Matt

    Hi Matt,
    Give this a shot:
    Get-ADUser -Filter "DisplayName -like '*Template*'" -Properties MemberOf | ForEach {
    $username = $_.SamAccountName
    $_.MemberOf | ForEach {
    $props = @{
    Username = $username
    GroupName = (Get-ADGroup $_).Name
    New-Object PsObject -Property $props
    } | Sort Username,GroupName |
    Select Username,GroupName |
    Export-Csv .\GroupMemberships.csv -NoTypeInformation
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

  • Why do I get "generic error" message when trying to upload a self-created, 1hr .wmv file?

    I went through the forums and made sure that any blocks or copywrites weren't triggered by the file, it's clean and can be opened using a media player and other video editing software like windows MovieMaker. I keep getting "The importer reported a generic error" message and have no idea how to proceed. Can someone please help?

    Re: Why do I get "generic error" message when trying to upload a self-created, 1hr .wmv  file?
    This ARTICLE starts with a checklist on setting up a computer to run PrE best, then goes into a series of links for tuning up one's computer and OS, and then links on troubleshooting.
    There is also a link on posting all necessary info, to help others help you.
    Without knowing much more about your system, it is impossible to say much beyond that WMV's are tough assests to work with, requiring a lot of CPU horsepower.
    Good luck,
    Hunt

  • Error in Conversion Agent Module

    I have tried to set up a scenario using conversion agent to transform a PDF file to XML. I followed the instruction steps in this blog <a href="/people/william.li/blog/2006/03/17/how-to-get-started-using-conversion-agent-from-itemfield:///people/william.li/blog/2006/03/17/how-to-get-started-using-conversion-agent-from-itemfield  .But the communication channel can't work properly. I check the status of communication channel in RWB, and it gives following error message:
    2007-03-14 10:22:00 Success Channel InvoicePDF_Sender: Send binary file  "C:SharefolderDemoinvoice.pdf". Size 14378 with QoS EO
    2007-03-14 10:22:00 Success TransformationName: InvoicePDF
    2007-03-14 10:22:00 Error Transformation failed; CMException: Failure while trying to create engine log C:/Documents and Settings/admin/Application Data/SAP/ConversionAgent/CMReports/Init/Events.cme- for more information see file://internal
    2007-03-14 10:22:00 Error Attempt to process file failed with com.itemfield.contentmaster.CMException
    However I have already granted the access permission of the event folder to user "<sid>adm" and "SAPservice<sid>". Even grant full control access to everyone for the folder, the issue remains unsolved. Hope someone can help to give some advice on my case. Thank you in advance.

    HI,
    The module name must be localejbs/sap.com/com.sap.nw.cm.xi/CMTransformBean.
    The parameter name must be TransformationName.
    The parameter value must be the conversion agent project name deployed in serviceDB. In the above example, the Tutorial_3 project from the documentation in step 1 is used.
    And also it was failed to update the log.See the folder access onceagain.
    many links provided in that blog itself ,plz check.
    Regards
    Chilla..

  • Flex 4 - Error with DataGrid in Module

    Hey, I'm using Flex 4 final and am now getting the following error when loading a Module with a DataGrid inside:
    TypeError: Error #1009: Cannot access a property or method of a null object reference
        at mx.styles::StyleProtoChain$/initProtoChainForUIComponentStyleName()[E:\dev\4.0.0\framewor ks\projects\framework\src\mx\styles\StyleProtoChain.as:356]
    It is created via MXML:
    <mx:Module layout="absolute" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx">
        <mx:DataGrid>
            ... config etc.
        </mx:DataGrid>
        ... other code
    </mx:Module>
    If I remove the DataGrid the Module works fine. The code used to work in the various betas.
    If I put a DataGrid in the main application that also renders fine, so it's only inside Modules.
    Thanks in advance for any help or ideas!

    Hi Darrell,
         I have the exact same error, and yes I am using module.factory.create() but I get an error when I try to add the module to my stage.  Here it is the code in my modReady function.
    var _sd:Object = new Object();         
    _sd = util.app.SDModule.factory.create() as SequenceDetail;
                _sd.sequenceId = event.currentTarget.selectedItem.sequenceId;
                _sd.environment = event.currentTarget.selectedItem.environment;
                _sd.seqname = event.currentTarget.selectedItem.sequenceName;
                util.app.page.addChildAt(_sd as SequenceDetail, util.app.page.numChildren);
                util.app.nav_buttons.selectedIndex = -1;
                util.app.page.selectedIndex = util.app.page.numChildren-1;
    I get an error on util.app.page.addChildAt(........).
    error is
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at mx.styles::StyleProtoChain$/initProtoChainForUIComponentStyleName()[E:\dev\4.0.0\framewor ks\projects\framework\src\mx\styles\StyleProtoChain.as:356]
        at mx.styles::StyleProtoChain$/initProtoChain()[E:\dev\4.0.0\frameworks\projects\framework\s rc\mx\styles\StyleProtoChain.as:171]
        at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::initProtoChain()[E:\dev\4.0.0\frameworks\proje cts\framework\src\mx\core\UIComponent.as:10186]
        at mx.core::UIComponent/regenerateStyleCache()[E:\dev\4.0.0\frameworks\projects\framework\sr c\mx\core\UIComponent.as:10249]
        at mx.core::Container/regenerateStyleCache()[E:\dev\4.0.0\frameworks\projects\framework\src\ mx\core\Container.as:3737]
        at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::addingChild()[E:\dev\4.0.0\frameworks\projects \framework\src\mx\core\UIComponent.as:7114]
        at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::rawChildren_addChild()[E:\dev\4.0.0\frameworks \projects\framework\src\mx\core\Container.as:4464]
        at mx.core::ContainerRawChildrenList/addChild()[E:\dev\4.0.0\frameworks\projects\framework\s rc\mx\core\ContainerRawChildrenList.as:143]
        at mx.containers::TabNavigator/createChildren()[E:\dev\4.0.0\frameworks\projects\framework\s rc\mx\containers\TabNavigator.as:559]
        at mx.core::UIComponent/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\ UIComponent.as:7250]
        at mx.core::Container/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Co ntainer.as:3129]
        at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.0.0\frameworks\projects\ framework\src\mx\core\UIComponent.as:7142]
        at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.0.0\frameworks\projects\ framework\src\mx\core\Container.as:3951]
        at mx.core::Container/addChildAt()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Co ntainer.as:2616]
        at mx.core::Container/addChild()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Cont ainer.as:2534]
        at mx.core::Container/createComponentFromDescriptor()[E:\dev\4.0.0\frameworks\projects\frame work\src\mx\core\Container.as:4371]
        at mx.core::Container/createComponentsFromDescriptors()[E:\dev\4.0.0\frameworks\projects\fra mework\src\mx\core\Container.as:4160]
        at mx.containers::Panel/createComponentsFromDescriptors()[E:\dev\4.0.0\frameworks\projects\f ramework\src\mx\containers\Panel.as:1685]
        at mx.core::Container/createChildren()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\cor e\Container.as:3187]
        at mx.containers::Panel/createChildren()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\c ontainers\Panel.as:1198]
        at mx.core::UIComponent/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\ UIComponent.as:7250]
        at mx.core::Container/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Co ntainer.as:3129]
        at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.0.0\frameworks\projects\ framework\src\mx\core\UIComponent.as:7142]
        at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.0.0\frameworks\projects\ framework\src\mx\core\Container.as:3951]
        at mx.core::Container/addChildAt()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Co ntainer.as:2616]
        at mx.core::Container/addChild()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Cont ainer.as:2534]
        at mx.core::Container/createComponentFromDescriptor()[E:\dev\4.0.0\frameworks\projects\frame work\src\mx\core\Container.as:4371]
        at mx.core::Container/createComponentsFromDescriptors()[E:\dev\4.0.0\frameworks\projects\fra mework\src\mx\core\Container.as:4160]
        at mx.core::Container/createChildren()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\cor e\Container.as:3187]
        at mx.core::UIComponent/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\ UIComponent.as:7250]
        at mx.core::Container/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Co ntainer.as:3129]
        at SequenceDetail/initialize()
        at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.0.0\frameworks\projects\ framework\src\mx\core\UIComponent.as:7142]
        at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.0.0\frameworks\projects\ framework\src\mx\core\Container.as:3951]
        at mx.core::Container/addChildAt()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\Co ntainer.as:2616]
        at mx.containers::ViewStack/addChildAt()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\c ontainers\ViewStack.as:1426]
        at com::MyDBResult/displaySequenceDetail()[/Users/jbhavsar/Documents/workspace/virome/src/co m/MyDBResult.as:114]
        at <anonymous>()[/Users/jbhavsar/Documents/workspace/virome/src/com/MyDBResult.as:103]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at ModuleInfoProxy/moduleEventHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\mo dules\ModuleManager.as:1168]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at ModuleInfo/readyHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\modules\Modul eManager.as:812]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.core::FlexModuleFactory/update()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\cor e\FlexModuleFactory.as:433]
        at mx.core::FlexModuleFactory/docFrameHandler()[E:\dev\4.0.0\frameworks\projects\framework\s rc\mx\core\FlexModuleFactory.as:582]
        at mx.core::FlexModuleFactory/docFrameListener()[E:\dev\4.0.0\frameworks\projects\framework\ src\mx\core\FlexModuleFactory.as:126]
    Thanks
    Jay
    p.s: Please dont hammer me if my code isn't upto standard, I am learning this as I go along.

  • Get-ADUser SamAccount from CSV file does not work.

    So I'm trying to get HomeDirectory + SamAccountName using Get-ADUser from an imported csv file called $csvFile
    $GetUserInfo = Get-ADUser (Get-ADUser -Filter { displayName -eq $csvFile[$index].DisplayName}).SamAccountName -Properties SamAccountName,HomeDirectory
    It gives me an error. 
    Get-ADUser : Invalid type 'System.Object[]'.
    Parameter name: displayName
    At line:1 char:28
    + $GetInfoUser = Get-ADUser (Get-ADUser -Filter { displayName -eq $csvFile[5].Disp ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidArgument: (:) [Get-ADUser], ArgumentException
    + FullyQualifiedErrorId : ActiveDirectoryCmdlet:System.ArgumentException,Microsoft.ActiveDirectory.Management.Commands.GetADUser
    However if I do like this 
    $DisplayName = $csvFile[$index].DisplayName
    and replace $DisplayName to the filter like this, it works flawless and I get HomeDirectory and the SamAccountName
    (Get-ADUser -Filter { displayName -eq $DisplayName }).SamA...
    Any ideas or improvements

    Still produces the same error. I'm running 4.0
    How about this?
    Import-Csv C:\Temp\user.csv | % {
    $displayname = $_.displayname;
    get-aduser -filter { displayname -eq $displayname } | Select SamAccountname , HomeDirectory
    The below was my CSV format
    DisplayName
    Chendrayan Venkatesan
    Ramesh Venkatesan
    Regards Chen V [MCTS SharePoint 2010]

Maybe you are looking for