Get-ADUser -server

Hi all
I am at the beginning of my powershell skills so excuse my silly question.
I am writing a script where I want to use a specific AD controller. And want to define the server as a variable.
$dc=srv01.contoso.com
Get-ADUser -Identity "test" -server $dc -Properties name,enabled
However I always get the error:
+ Get-ADUser -Identity "test" -server <<<<  $dc -Properties name,enabled
    + CategoryInfo          : InvalidData: (:) [Get-ADUser], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.ActiveDirectory.Management.Commands.GetADUser
If I run:
Get-ADUser -Identity "test" -server srv01.contoso.com -Properties name,enabled
It runs with no issues.
Thanks for your help.

Hi Grimbi,
try this:
$dc = "srv01.contoso.com"
Get-ADUser -Identity "test" -server $dc -Properties name,enabled
Why does this happen?
As a parameter of a command, powershell assumes the input is a string (since the parameter demands a string). However when you Store something in a variable it has to guess about the input type. By wrapping it in double-quote, you tell PowerShell "This
is a string". Otherwise it can't tell whether it's supposed to be a command, an Alias, etc. .
Cheers,
Fred
There's no place like 127.0.0.1

Similar Messages

  • 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

  • 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)

  • Get-ADUser lastLogonTimestamp is reporting blank

    Hey guys,
    I'm simply looking to get a list of users and their last login, in it's simplest form I'm trying this:
    Get-ADUser -filter * -searchbase 'CN=Users,DC=domain,DC=com,DC=au' -Properties name,lastLogonTimestamp | select name,lastLogonTimestamp | out-gridview
    Which works in a way, the problem is that most of the 'lastLoginTimestamp' properties are empty. If I go through AD Explorer (from SysInternals) there is definitely a value in that property.  Even if I test with my own user name that logs in every day
    it returns blank.
    If they were all blank I would look at a problem in the script, but some of them DO return the correct value.
    Is there something I'm missing?

    Hi,
    Please take a look at following links about lastlogon and lastlogontimestamp attributes.
    http://blogs.technet.com/b/askds/archive/2009/04/15/the-lastlogontimestamp-attribute-what-it-was-designed-for-and-how-it-works.aspx
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/1ae08081-dcfe-44cd-bc3b-f5ac26d53f76/difference-between-lastlogon-and-lastlogontimestamp
    Please also try with following examples:
    To collect user's lastlogon attribute across ALL DCs in domain: (Some user may have different last logon value on different DCs)
    foreach ($dc in (Get-ADDomainController -Filter "domain -eq '$((Get-ADDomain).DnsRoot)'" | % { $_.HostName} ) ) { Get-ADUser -Filter '*' -searchbase 'CN=Users,DC=domain,DC=com,DC=au' -Server $dc -Properties LastLogon | Select SamAccountName, LastLogon, @{n='LastLogonDC'; e={ $dc }} }
    To collect users' latest lastlogon attribute:
    $( foreach ($dc in (Get-ADDomainController -Filter "domain -eq '$((Get-ADDomain).DnsRoot)'" | % { $_.HostName} ) ) { Get-ADUser -Filter '*' -searchbase 'CN=Users,DC=domain,DC=com,DC=au' -Server $dc -Properties LastLogon | Select SamAccountName, LastLogon, @{n='LastLogonDC'; e={ $dc }} } ) | Group SamAccountName | % { ($_.Group | sort lastLogon -Descending)[0] } | select SamAccountName, lastlogon,@{n='LastLogon1'; e={ (Get-Date $_.LastLogon).ToLocalTime() }}, LastLogonDC
    You can pipe the above code with Export-CSV or grid view.
    Without using AD module:
    $adSearcher = [adsisearcher]""
    $adSearcher.Filter = '(&(objectClass=user)(objectCategory=person))'
    $adSearcher.PageSize = 1000
    $adSearcher.PropertiesToLoad.Add('LastLogon')
    $adSearcher.PropertiesToLoad.Add('SamAccountName')
    $( foreach ( $dc in ([System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()).DomainControllers ) { $adSearcher.SearchRoot = 'LDAP://'+$dc.name; $adSearcher.FindAll() | select @{n='SamAccountName'; e={ $_.properties.samaccountname}}, @{n='LastLogonDC'; e= { $dc.name}}, @{n='LastLogon'; e={ $_.properties.lastlogon}} } ) | Group SamAccountName | % { ($_.Group | sort lastLogon -Descending)[0] } | select SamAccountName, LastLogon, @{n='LastLogon1'; e={ (Get-Date $_.LastLogon).ToLocalTime() }}, LastLogonDC
    rgds,
    AZ

  • Get-AdUser -Filter for homeDirectory

    I guess there's something I don't know about -filter syntax for this command...
    get-aduser -filter {homeDirectory -like "*\faculty\homes\*"} -property homeDirectory
    returns results, but...
    get-aduser -filter {homeDirectory -like "\\faculty\homes\*"} -property homeDirectory
    ...will not. All results returned by the first have homes starting with \\faculty\homes\...
    What gives?

    Hi,
    you need to use the LDAP escape character for \, which is \5c
    So, you could write it like this:
    $DirectoryInfo = Get-Item \\server\share\User1HomeDirectory
    $strFilter = $DirectoryInfo.FullName.Replace("\","\5c")
    $AdUser = Get-AdUser -Filter {homeDirectory -like $strFilter}
    If ($AdUser.HomeDirectory -like $DirectoryInfo.FullName) { #not abandoned home directory }
    /Fridden
    Just a simple hacker

  • Get-ADUser Excluding Specific Groups

    I'm using Get-ADUser to retrieve all of the users in the DC except those in three specific groups previously defined using their distinguished name. The below returns 14 users when it should return 5.
    $users = Get-ADUser -Filter { ((memberof -notlike $grp1) -and (memberof -notlike $grp2) -and
    (memberof -notlike $grp3))} | MyFunction | Where-Object {$_.Enabled -ne $false}
    Any thoughts? Thanks in advance.

    Enabled is a default property for Get-ADUser so you should include this in the filter (server side) rather than filtering client side.
    What is 'MyFunction'?
    I tend to validate the groups using Get-ADObject first.
    For example...
    $group = (Get-ADObject -Filter {cn -like "group"}).DistinguishedName
    $users = Get-ADObject -Filter {memberof -like $group}
    I've tried filtering the memberof without having the distinguishedname, and using wildcards but it fails (which might be where you are having an issue).  The wildcards work fine against CN.
    These all work...
    {cn -like "group"}
    {cn -like "group*"}
    {cn -like "*group*"}
    It might be something to do with the fact that the memberof property is a multi-attribute field and each group is listed against the user with its distinguished name.
    Hopefully, someone will be able to explain why wildcards don't seem to work.

  • 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

  • Unable to get SQL Server Agent to run after installing SQL 2012 Standard with SP1

    I am unable to get SQL Server Agent to run after installing SQL 2012 Standard with SP1. Log message is as follows:
    Attempting to load library 'xplog70.dll' into memory. This is an informational message only. No user action is required.
    Failed to verify Authenticode signature on DLL 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\xplog70.dll'.
    Error: 17750, Severity: 16, State: 0.
    Could not load the DLL xplog70.dll, or one of the DLLs it references. Reason: (null).

    Hi JFriedley,
    According to your error message, there might three reasons for this issue.
    xplog70.dll is corrupt, you need to check if you have any SQL Server running on same file version and same production
     edition. If xplog70.dll is corrupt, you can copy it from the new server where agent is running fine to your problematic server.
    Native client not installed properly. If you try applying any latest Service Pack or Cumulative Update then check if the SQL Server Agent can start, if that also doesn’t solve issue then try to reinstalling SQL Server Native client from SQL Server setup
    files.
    There is a similar issue about error 17750, you can review the following article.
    http://blogs.lostincreativity.com/sqldba/sqlserver-error-17750-could-not-load-the-dll-xpstar90-dll/
    Regards,
    Sofiya Li
    If you have any feedback on our support, please click here.
    Sofiya Li
    TechNet Community Support

  • Search Problem with SharePoint 2010: Get Internal server error when doing search

    Hi,
    Am getting Internal server error, corelation id.. when I use the search functionality in SP2010. 
    I've installed Sharepoint 2010 trial version on windows server 2008 r2 and the database server used is a SQL server 2008 R2.
    I got the following messages with ULs viewer for the relative Corelation ID:
    Process
    Product
    Category
    Level
    Message
    w3wp.exe (0x1808)
    SharePoint Foundation
    Monitoring
    High
    Leaving Monitored Scope (Search Statistics). Execution Time=404.4175
    w3wp.exe (0x1808)
    SharePoint Server
    General
    Medium
    Constructed a new async cache named Location Configuration Cache
    w3wp.exe (0x1808)
    SharePoint Server Search
    Administration
    High
    'SharePoint_SearchApplicationProxy', location cache: 
    Refreshing location cache
    w3wp.exe (0x1808)
    SharePoint Server Search
    Administration
    High
    SharePoint_SearchApplicationProxy', location cache: Exception while fetching
    location configuration data. StackTrace: Microsoft.SharePoint.SPEndpointAddress
    NotFoundException: There are no addresses available for this application.    
    at Microsoft.SharePoint.SPRoundRobinServiceLoadBalancer.BeginOperation()    
    at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.
    GetLocationConfigurations(Int64& lastUpdate, Boolean& useCrawlProxy)    
    at
    Microsoft.Office.Server.Search.Administration.LocationConfigurationCollection.
    PopulateCollection()    
    at Microsoft.Office.Server.Search.Administration.
    LocationConfigurationCollection.Init()    
    at Microsoft.Office.Server.Search.
    Administration.LocationConfigurationCollection..ctor(SearchServiceApplicationProxy
    searchAdmin)    
    at Microsoft.Office.Server.Search.Administration.LocationCache.
    FetchLocationConfigurationData()
    w3wp.exe (0x1808)
    SharePoint Server Search
    Query
    Unexpected
    CoreResultsWebPart::OnInit: Exception initializing: System.NullReferenceException:
    Object reference not set to an instance of an object.    
    at Microsoft.Office.Server.
    Search.WebControls.CoreResultsWebPart.SetPropertiesOnQueryReader()    
    at
    Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.OnInit(EventArgs e)
    w3wp.exe (0x1808)
    SharePoint Server Search
    Query
    Exception
    Internal server error exception: System.NullReferenceException: Object reference
    not set to an instance of an object.    
    at Microsoft.Office.Server.Search.WebControls
    .CoreResultsWebPart.SetPropertiesOnQueryReader()    
    at Microsoft.Office.Server.
    Search.WebControls.CoreResultsWebPart.OnInit(EventArgs e) System.
    NullReferenceException: Object reference not set to an instance of an object.    
    at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.
    SetPropertiesOnQueryReader()    
    at Microsoft.Office.Server.Search.WebControls.
    CoreResultsWebPart.OnInit(EventArgs e)
    w3wp.exe (0x1808)
    SharePoint Server
    Unified Logging Service
    Monitorable
    Watson bucket parameters: SharePoint Server 2010, ULSException14, 06175311
    "sharepoint server search", 0e00129b "14.0.4763.0", 17853a8f "microsoft.
    office.server.search", 0e00129a "14.0.4762.0", 4bad937d "sat mar 27 09:11:25
    2010", 0000320d "0000320d", 0000002d "0000002d", 4a6d3421 "nullreferenceexception"
    , 67316a39 "g1j9"
    w3wp.exe (0x1808)
    SharePoint Foundation
    Monitoring
    High
    Leaving Monitored Scope (Search Action Links OnInit). Execution Time=395.3955
    w3wp.exe (0x1808)
    SharePoint Foundation
    Monitoring
    High
    Leaving Monitored Scope (Add WebPart with error#4). Execution Time=527.8118
    w3wp.exe (0x1808)
    SharePoint Foundation
    Monitoring
    High
    Leaving Monitored Scope (Add WebParts). Execution Time=3601.2636
    w3wp.exe (0x1808)
    Web Content Management
    Publishing
    Medium
    Caught a thread abort exception in TemplateRedirectionPage.ProcessRequest,
    the exception may be expected. stack trace=  
    at System.Web.UI.Page.
    ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean
    includeStagesAfterAsyncPoint)    
    at System.Web.UI.Page.ProcessRequest()    
    at
    System.Web.UI.Page.ProcessRequest(HttpContext context)    
    at ASP.SEARCHRESULTS_ASP
    X__1518441470.ProcessRequest(HttpContext context)    
    at Microsoft.SharePoint.
    Publishing.TemplateRedirectionPage.ProcessRequest(HttpContext context)
    w3wp.exe (0x1808)
    SharePoint Foundation
    Monitoring
    Medium
    Leaving Monitored Scope (Request (GET:http://nestestsp:25943/Pages/results.aspx
    ?k=home%20nesintranet)). Execution Time=3811.6724
    Can anybody help me find a solution for this issue.
    Thanks

    After making sure that all services are up and running,  I had to deactive and activate the "SharePoint Server Site Search" web site collection feature.  Then the search started working for the time being. 
    However, it throws the error again after 8 to 9 hours.  This has been happening for last couple of weeks.  I also came to know from my windows server team that they moved the AD from one place to another.  Since then I am having this issue. 
    The log file has the following error:
    CoreResultsWebPart::OnInit: Exception initializing: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.SetPropertiesOnQueryReader()    
    at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.OnInit(EventArgs e)
    Internal server error exception: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.SetPropertiesOnQueryReader()    
    at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.OnInit(EventArgs e) System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.SetPropertiesOnQueryReader()    
    at Microsoft.Office.Server.Search.WebControls.CoreResultsWebPart.OnInit(EventArgs e)
    Harish Vajja

  • How do I get facetime on a MacBook Pro to work?  I keep getting a " server encountered problem during registration.." message.  I have FaceTime ver. 1.1.1

    How do I get facetime on a MacBook Pro to work?  I keep getting a " server encountered problem during registration.." message.  I have FaceTime ver. 1.1.1
    Thanks

    Icapper wrote:
    I will end up getting something other than Logitech speakers, since I'm just weird like that.
    Your not weird, your a audiophile.
    https://en.wikipedia.org/wiki/Audiophile
    Good sound costs money. And with a 5.1 system your usually doing surround sound decoding for BlueRay movies etc. for home theater purposes.
    The PC 5.1 surround sound systems require a audio card in a PC tower and mainly used for playing 3D games so that won't work for any Mac at all. So don't buy a PC 5.1 surround sound system for your Mac.
    Harmon Kardon has the GoPlay, it's a portable stereo with awesome sound (not as good as their theater systems) and you can hook up a analog male/male stereo mini cable to it from the Mac.
    $200 and it has a iPod dock and also takes like 8 batteries so it's portable.
    http://www.amazon.com/dp/B002GHBTNC
    There is also the Bose Wave clock/radio, you will need a stereo mini to RCA break out cable for that.
    http://www.bose.com/controller?url=/shop_online/wave_systems/index.jsp
    The GoPlay has much better sound than the Bose, I think the Bose are overpriced.

  • I am getting a server message when i try to log onto icloud on my pc and it won't let me log in

    I am trying to log into icloud on my pc and getting a server message that will not let me log  in

    Try doing the following steps:
    1) Click on Start
    2) Type cmd and press enter. A new window will open up.
    3) Type "netsh winsock reset"
    4) restart the machine and try again
    5) Let me know how if it worked.

  • How do I use Get-ADUser to get just the Managers attribute? And then get rid of duplicates in my array/hash table?

    Hello,
          I am trying to just get the Managers of my users in Active Directory. I have gotten it down to the user and their manager, but I don't need the user. Here is my code so far:
    Get-ADUser-filter*-searchbase"OU=REDACTED,
    OU=Enterprise Users, DC=REDACTED, DC=REDACTED"-PropertiesManager|SelectName,@{N='Manager';E={(Get-ADUser$_.Manager).Name}}
    |export-csvc:\managers.csv-append 
    Also, I need to get rid of the duplicate values in my hash table. I tried playing around with -sort unique, but couldn't find a place it would work. Any help would be awesome.
    Thanks,
    Matt

    I would caution that, although it is not likely, managers can also be contact, group, or computer objects. If this is possible in your situation, use Get-ADObject in place of Get-ADUser inside the curly braces.
    Also, if you only want users that have a manager assigned, you can use -LDAPFilter "(manager=*)" in the first Get-ADUser.
    Finally, if you want all users that have been assigned the manager for at least one user, you can use:
    Get-ADUser
    -LDAPFilter "(directReports=*)" |
    Select @{N='Manager';E={ (Get-ADUser
    $_.sAMAccountName).Name }}
    -Unique | Sort Manager |
    Export-Csv .\managerList.csv -NoTypeInformation
    This works because when you assign the manager attribute of a user, this assigns the user to the directReports attribute of the manager. The directReports atttribute is multi-valued (an array in essence).
    Again, if managers can be groups or some other class of object (not likely), then use Get-ADObect throughout and identify by distinguishedName instead of sAMAccountName (since contacts don't have sAMAccountName).
    Richard Mueller - MVP Directory Services

  • Is there a way to speed up Get-QADUser or Get-ADUser?

    Hello,  I was wondering if there was a way to speed the commands up to query faster?  My one-liner looks like:
    Get-ADUser -SearchBase "OU=People,DC=Domain,DC=Company,DC=Net" -Filter {Title -eq "Job Title"} -ResultSetSize $null -Properties * | Select SamAccountName, DisplayName, Manager
    Are we able to somehow omit property fields that it looks up?  Would that help?
    I've tried looking through Google and couple of forums, but could not find the answer.
    I have used a tool called "ADFind" and was able to get the results in less than 5 minutes, but Powershell seems to take WAYY longer to do this.
    Thank you!

    Hi,
    Yes, drop the wildcard from Properties and only request the properties that you're interested in.
    Out of curiosity, how many users are returned by this query?
    Don't retire TechNet! -
    (Don't give up yet - 12,700+ strong and growing)

  • HT4910 My iCal has frozen after I tried to paste info from an email into a reminder.  I get a "server reports an error" message with what I tried to paste in the box.  Calendar is frozen and will only close by forcing it.  Any help?

    My iCal has frozen after I tried to paste info from an email into a reminder.  I get a "server reports an error" message with what I tried to paste in the box.  Calendar is frozen and will only close by forcing it.  Any help?

    Did another window open with the pasted information?  If so, try hitting "enter/return" key and "delete" key at the same time.  That should get rid of the current action on the ical, the extra window should go bye-bye, and all should be fine with the world.

  • When ever i try logging into FaceTime or iMessage on my Macpro i get The server encountered an error processing registration. Please try again later. what could be the problem..N.B I'm located in trinidad in the caribbean message

    When ever i try logging into FaceTime or iMessage on my Macpro i get The server encountered an error processing registration. Please try again later. what could be the problem..N.B I'm located in trinidad in the caribbean message

    Hi,
    As the Other threads suggests I would check the Date and Time settings on the Mac and compare that with the settings in the router.
    Messages (and iChat before that) send Time stamped info to Login and to send IMs.
    Obviously most people set their Macs to their Time Zone and nearest city/town.
    What people sometimes forget is that their Router/Modem device(s) have to be set correctly as well.
    EDIT
    Also Add a Public DNS server to your System Preferences> Network > Advanced Button > DNS  tab
    A Google one such as 8.8.4.4 or 8.8.8.8 seem to work well for most people
    10:15 PM      Saturday; March 17, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.3)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously
    Message was edited by: Ralph Johns (UK)

Maybe you are looking for

  • Trouble syncing MS Outlook 2011 calendar with iPod touch

    I use MS Outlook 2011 on my iMac for email, contacts and calendar. The Outlook calendar is syncing fine with iCal, which I know it has to do first since the iPod & iCloud will not sync directly with Outlook (go figure, MS & Apple still haven't figure

  • How to get album artwork from amazon

    How can I get album artwork from amazon ?

  • Pleas help

    Hi when i plug in my iphone 4 s to charge the volume turns off,how can i fix it? When i unplug it it will be fine

  • Support pack has error status

    Hi All, Could you please let me know  if any last updated support pack has error status can we apply spam/saint update ?? Regards, Pankaj

  • HP 655 won't turn on, power light on and won't turn off.

    My HP 655 laptop has apparently gone into sleep mode, permanently. It was up, went into sleep mode and now it will not come back up. I have removed the battery and unplugged the power source for an hour. As soon as I plug in the power or battery, the