<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.twig.es/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.twig.es/index.php?action=history&amp;feed=atom&amp;title=Using_get-ADUser</id>
		<title>Using get-ADUser - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.twig.es/index.php?action=history&amp;feed=atom&amp;title=Using_get-ADUser"/>
		<link rel="alternate" type="text/html" href="https://wiki.twig.es/index.php?title=Using_get-ADUser&amp;action=history"/>
		<updated>2026-05-06T17:30:30Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.0</generator>

	<entry>
		<id>https://wiki.twig.es/index.php?title=Using_get-ADUser&amp;diff=1323&amp;oldid=prev</id>
		<title>George2 at 21:13, 8 November 2014</title>
		<link rel="alternate" type="text/html" href="https://wiki.twig.es/index.php?title=Using_get-ADUser&amp;diff=1323&amp;oldid=prev"/>
				<updated>2014-11-08T21:13:15Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 21:13, 8 November 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;a&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Get-ADUser&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Get-ADUser&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>George2</name></author>	</entry>

	<entry>
		<id>https://wiki.twig.es/index.php?title=Using_get-ADUser&amp;diff=1322&amp;oldid=prev</id>
		<title>George2: Created page with &quot;&lt;source lang=&quot;text&quot;&gt;a  Get-ADUser  Get one or more Active Directory users.  Syntax       Get-ADUser -Filter string [-ResultPageSize int] [-ResultSetSize int32]          [-Sear...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.twig.es/index.php?title=Using_get-ADUser&amp;diff=1322&amp;oldid=prev"/>
				<updated>2014-11-08T21:12:56Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;a  Get-ADUser  Get one or more Active Directory users.  Syntax       Get-ADUser -Filter string [-ResultPageSize int] [-ResultSetSize int32]          [-Sear...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;a&lt;br /&gt;
&lt;br /&gt;
Get-ADUser&lt;br /&gt;
&lt;br /&gt;
Get one or more Active Directory users.&lt;br /&gt;
&lt;br /&gt;
Syntax&lt;br /&gt;
      Get-ADUser -Filter string [-ResultPageSize int] [-ResultSetSize int32]&lt;br /&gt;
         [-SearchBase string] [-SearchScope {Base | OneLevel | Subtree}]&lt;br /&gt;
            [-SearchScope {Base | OneLevel | Subtree}]&lt;br /&gt;
               [-AuthType {Negotiate | Basic}]&lt;br /&gt;
                  [-Credential PSCredential] [-Partition string]&lt;br /&gt;
                     [-Properties string[]] [-Server string] [CommonParameters]&lt;br /&gt;
&lt;br /&gt;
      Get-ADUser [-Identity] ADUser [-AuthType {Negotiate | Basic}]&lt;br /&gt;
         [-Credential PSCredential] [-Partition string]&lt;br /&gt;
            [-Properties string[]] [-Server string] [CommonParameters]&lt;br /&gt;
&lt;br /&gt;
      Get-ADUser -LDAPFilter string [-ResultPageSize int] [-ResultSetSize int32]&lt;br /&gt;
         [-SearchBase string] [-SearchScope {Base | OneLevel | Subtree}]&lt;br /&gt;
            [-AuthType {Negotiate | Basic}]&lt;br /&gt;
               [-Credential PSCredential] [-Partition string]&lt;br /&gt;
                  [-Properties string[]] [-Server string] [CommonParameters]&lt;br /&gt;
&lt;br /&gt;
Key&lt;br /&gt;
   -AuthType {Negotiate | Basic}&lt;br /&gt;
       The authentication method to use: Negotiate (or 0), Basic (or 1)&lt;br /&gt;
       A Secure Sockets Layer (SSL) connection is required for Basic authentication.&lt;br /&gt;
&lt;br /&gt;
   -Credential PSCredential&lt;br /&gt;
       The user account credentials to use to perform this task.&lt;br /&gt;
       The default credentials are those of the currently logged on user unless the&lt;br /&gt;
       cmdlet is run from an Active Directory PowerShell provider drive.&lt;br /&gt;
       If the cmdlet is run from such a provider drive, the account associated with the drive is the default.&lt;br /&gt;
&lt;br /&gt;
       Type a user name, such as &amp;quot;User64&amp;quot; or &amp;quot;Domain64\User64&amp;quot; or specify a&lt;br /&gt;
       PSCredential object such as one generated by Get-Credential &lt;br /&gt;
&lt;br /&gt;
       If a user name is specified, the cmdlet will prompt for a password.&lt;br /&gt;
&lt;br /&gt;
   -Filter string&lt;br /&gt;
       A query string that retrieves Active Directory objects.&lt;br /&gt;
       This string uses the PowerShell Expression Language syntax:&lt;br /&gt;
&lt;br /&gt;
       filter ::= &amp;quot;{&amp;quot; FilterComponentList&amp;quot;}&amp;quot;&lt;br /&gt;
       FilterComponentList ::= FilterComponent | FilterComponent JoinOperator FilterComponent | NotOperator FilterComponent&lt;br /&gt;
       FilterComponent ::= attr FilterOperator value | &amp;quot;(&amp;quot; FilterComponent&amp;quot;)&amp;quot;&lt;br /&gt;
       FilterOperator ::= &amp;quot;-eq&amp;quot; | &amp;quot;-le&amp;quot; | &amp;quot;-ge&amp;quot; | &amp;quot;-ne&amp;quot; | &amp;quot;-lt&amp;quot; | &amp;quot;-gt&amp;quot;| &amp;quot;-approx&amp;quot; | &amp;quot;-bor&amp;quot; | &amp;quot;-band&amp;quot; | &amp;quot;-recursivematch&amp;quot; | &amp;quot;-like&amp;quot; | &amp;quot;-notlike&amp;quot;&lt;br /&gt;
       JoinOperator ::= &amp;quot;-and&amp;quot; | &amp;quot;-or&amp;quot;&lt;br /&gt;
       NotOperator ::= &amp;quot;-not&amp;quot;&lt;br /&gt;
       attr ::= PropertyName | LDAPDisplayName_of_the_attribute&lt;br /&gt;
       value::= &amp;lt;compare this value with an attr by using the specified FilterOperator&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   -Identity ADUser&lt;br /&gt;
       An AD account object, specified with one of the following values.&lt;br /&gt;
       (The identifier in parentheses is the LDAP display name for the attribute.)&lt;br /&gt;
&lt;br /&gt;
          Distinguished Name &lt;br /&gt;
            Example: CN=JonSmith,CN=Sales,OU=europe,CN=users,DC=corp,DC=SS64,DC=com &lt;br /&gt;
          GUID (objectGUID) &lt;br /&gt;
            Example: 599c3d2e-f72d-4d20-8a88-030d99495f20&lt;br /&gt;
          Security Identifier (objectSid) &lt;br /&gt;
            Example: S-1-5-21-3165297888-301567370-576410423-1103&lt;br /&gt;
          Security Accounts Manager (SAM) Account Name (sAMAccountName)&lt;br /&gt;
            Example: JonSmith&lt;br /&gt;
&lt;br /&gt;
       The cmdlet searches the default naming context or partition to find the object.&lt;br /&gt;
       If two or more objects are found, the cmdlet returns a non-terminating error.&lt;br /&gt;
&lt;br /&gt;
       This parameter can also get this object through the pipeline or you can set this&lt;br /&gt;
       parameter to an object instance.&lt;br /&gt;
&lt;br /&gt;
       This example shows how to set the parameter to a distinguished name.&lt;br /&gt;
          -Identity  &amp;quot;CN=JonSmith,CN=Sales,OU=europe,CN=users,DC=corp,DC=SS64,DC=com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
       This example shows how to set this parameter to a group object instance named &amp;quot;accountInstance&amp;quot;.&lt;br /&gt;
          -Identity $accountInstance&lt;br /&gt;
&lt;br /&gt;
   -LDAPFilter string&lt;br /&gt;
       An LDAP query string that is used to filter AD objects.&lt;br /&gt;
       Use this parameter to run existing LDAP queries. &lt;br /&gt;
       See also Help about_ActiveDirectory_Filter.&lt;br /&gt;
&lt;br /&gt;
       For example to search an OU for names beginning with &amp;quot;sara&amp;quot;.&lt;br /&gt;
       -LDAPFilter &amp;quot;(name=sara*)&amp;quot; -SearchScope Subtree -SearchBase &amp;quot;DC=demo,DC=SS64,DC=com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
   -Partition string&lt;br /&gt;
       The distinguished name of an AD partition.&lt;br /&gt;
       string must be one of the naming contexts on the current directory server.&lt;br /&gt;
       The cmdlet searches this partition to find the object defined by the -Identity parameter. &lt;br /&gt;
       Examples:&lt;br /&gt;
         -Partition &amp;quot;CN=Configuration,DC=Europe,DC=Test,DC=SS64,DC=com&amp;quot;&lt;br /&gt;
         -Partition &amp;quot;CN=Schema,CN=Configuration,DC=Europe,DC=Test,DC=SS64,DC=com&amp;quot;&lt;br /&gt;
          &lt;br /&gt;
       In many cases, a default value will be used for -Partition if no value is specified.&lt;br /&gt;
        &lt;br /&gt;
   -Properties string[]&lt;br /&gt;
       The properties of the output object to retrieve from the server (comma-separated list).&lt;br /&gt;
       Use this parameter to retrieve properties that are not included in the default set.&lt;br /&gt;
&lt;br /&gt;
       To display all of the attributes that are set on the object, specify * (asterisk).&lt;br /&gt;
&lt;br /&gt;
       Specify the property Name or,for non default/extended properties, the LDAP Display Name of the attribute.&lt;br /&gt;
&lt;br /&gt;
   -ResultPageSize int&lt;br /&gt;
       The number of objects to include in each page for an AD Domain Services query.&lt;br /&gt;
       default = 256&lt;br /&gt;
&lt;br /&gt;
   -ResultSetSize Int32&lt;br /&gt;
       The maximum number of objects to return for an AD Domain Services query.&lt;br /&gt;
       To receive all objects, set this to $null. Ctrl+c will stop the query and return of objects.&lt;br /&gt;
       default = $null.&lt;br /&gt;
&lt;br /&gt;
   -SearchBase string&lt;br /&gt;
       An Active Directory path to search under.&lt;br /&gt;
       e.g.&lt;br /&gt;
       -SearchBase &amp;quot;ou=training,dc=demo,dc=ss64,dc=com&amp;quot;&lt;br /&gt;
&lt;br /&gt;
   -SearchScope&lt;br /&gt;
       The scope of an AD search.&lt;br /&gt;
       Possible values for this parameter are:&lt;br /&gt;
       Base or 0        Search only the current path or object.&lt;br /&gt;
       OneLevel or 1    Search the immediate children&lt;br /&gt;
       Subtree or 2     Search the current path/object and all children&lt;br /&gt;
&lt;br /&gt;
   -Server string&lt;br /&gt;
       The AD Domain Services instance to connect to, this may be a Fully qualified domain name,&lt;br /&gt;
       NetBIOS name, Fully qualified directory server name (with or without port number)&lt;br /&gt;
&lt;br /&gt;
   CommonParameters:&lt;br /&gt;
       -Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable,&lt;br /&gt;
       -OutBuffer -OutVariable.&lt;br /&gt;
&lt;br /&gt;
Get-ADUser gets a user object or performs a search to retrieve multiple user objects.&lt;br /&gt;
&lt;br /&gt;
The -Identity parameter specifies the AD user to get. Identify a user with a distinguished name (DN), GUID, security identifier (SID), Security Accounts Manager (SAM) account name or name. Alternatively set the -Identity parameter to a user object variable, or pass a user object through the PowerShell pipeline.&lt;br /&gt;
&lt;br /&gt;
To search for and retrieve more than one user, use -Filter or -LDAPFilter. -Filter uses the PowerShell Expression Language to write query strings for AD. see help about_ActiveDirectory_Filter. If you have existing LDAP query strings, you can use -LDAPFilter.&lt;br /&gt;
&lt;br /&gt;
This cmdlet retrieves a default set of user object properties. To retrieve additional properties use -Properties&lt;br /&gt;
&lt;br /&gt;
Examples&lt;br /&gt;
&lt;br /&gt;
Get all users under the container 'OU=Personnel,DC=SS64,DC=COM':&lt;br /&gt;
&lt;br /&gt;
PS C:\&amp;gt; Get-ADUser -Filter * -SearchBase &amp;quot;OU=Personnel,DC=SS64,DC=COM&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Get all users that have a name that ends with 'SvcAccount':&lt;br /&gt;
&lt;br /&gt;
PS C:\&amp;gt; Get-ADUser -Filter 'Name -like &amp;quot;*SvcAccount&amp;quot;' | FT Name,SamAccountName -A&lt;br /&gt;
&lt;br /&gt;
Get all properties of the user with samAccountName 'StanGetz':&lt;br /&gt;
&lt;br /&gt;
PS C:\&amp;gt; Get-ADUser StanGetz -Properties *&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>George2</name></author>	</entry>

	</feed>