Site icon TOSS

Get-ADAuthenticationPolicy

powershell

Get-ADAuthenticationPolicy is accessible with the help of addsadministration module. To install addsadministration on your system please refer to this link.

Synopsis
Gets one or more Active Directory Domain Services authentication policies.

Description
The Get-ADAuthenticationPolicy cmdlet gets an authentication policy or performs a search to get authentication policies.
The Identity parameter specifies the Active Directory Domain Services authentication policy to get. You can identify an authentication policy by its distinguished name (DN), GUID or name. You can also use the Identity parameter to specify a variable that contains an authentication policy object, or you can use the pipeline operator to pass an authentication policy object to the Identity parameter.
You can search for and use multiple authentication policies by specifying the Filter parameter or the LDAPFilter parameter. The Filter parameter uses the Windows PowerShell expression language to write query strings for Active Directory Domain Services. Windows PowerShell expression language syntax provides rich type conversion support for value types received by the Filter parameter. For more information about the Filter parameter syntax, see about_ActiveDirectory_Filter. If you have existing LDAP query strings, you can use the LDAPFilter parameter.

Parameters

 -AuthType 
         Specifies the authentication method to use. The acceptable values for this parameter are: 
   --Negotiate or 0
    --Basic or 1

    Required?                    false
    Position?                    named
    Default value                Microsoft.ActiveDirectory.Management.AuthType.Negotiate
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Credential <PSCredential>
    Specifies a user account that has permission to perform the task. The default is the current user. Type a user name, such as "User01" or "Domain01\User01", or enter a PSCredential object, such as one generated by the Get-Credential cmdlet.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Filter <String>
    Specifies a query string that retrieves Active Directory Domain Services objects. This string uses the Windows PowerShell expression language syntax. The Windows PowerShell expression language syntax provides rich type-conversion support for value types received by the Filter parameter.

    Required?                    true
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Identity <ADAuthenticationPolicy>
    Specifies an Active Directory Domain Services authentication policy object. Specify the authentication policy object in one of the following formats: 
    --Distinguished Name
    --GUID
    --Name

    Required?                    true
    Position?                    0
    Default value                
    Accept pipeline input?       True (ByValue)
    Accept wildcard characters?  false

-LDAPFilter <String>
    Specifies an LDAP query string used to filter Active Directory Domain Services objects. Use this parameter to run your existing LDAP queries.

    Required?                    true
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Properties <String[]>
    Specifies the properties of the output object to get from the server. Use this parameter to get properties that are not included in the default set.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-ResultPageSize <Int32>
    Specifies the number of objects to include in one page for an Active Directory Domain Services query. The default value is 256 objects per page.

    Required?                    false
    Position?                    named
    Default value                256
    Accept pipeline input?       false
    Accept wildcard characters?  false

-ResultSetSize <Int32>
    Specifies the maximum number of objects to return for an Active Directory Domain Services query. If you want to get all of the objects, set this parameter to $Null. You can use Ctrl+C to stop the query and the return of objects.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Server <String>
    Specifies the Active Directory Domain Services instance to which to connect, by providing one of the following values for a corresponding domain name or directory server. The service may be any of the following:  Active Directory Lightweight Domain Services, Active Directory Domain Services or Active Directory Snapshot instance.

    Required?                    false
    Position?                    named
    Default value                
    Accept pipeline input?       false
    Accept wildcard characters?  false

Syntax

Get-ADAuthenticationPolicy [-AuthType <ADAuthType>] [-Credential <PSCredential>] -Filter <String> [-Properties <String[]>] [-ResultPageSize <Int32>] [-ResultSetSize <Int32>] [-Server <String>] [<CommonParameters>]

Get-ADAuthenticationPolicy [-AuthType <ADAuthType>] [-Credential <PSCredential>] [-Identity] <ADAuthenticationPolicy> [-Properties <String[]>] [-Server <String>] [<CommonParameters>]

Get-ADAuthenticationPolicy [-AuthType <ADAuthType>] [-Credential <PSCredential>] -LDAPFilter <String> [-Properties <String[]>] [-ResultPageSize <Int32>] [-ResultSetSize <Int32>] [-Server <String>] [<CommonParameters>]

Get an authentication policy
PS C:> Get-ADAuthenticationPolicy -Identity AuthenticationPolicy01
This command gets an authentication policy object by specifying the object name.

Get an authentication policy by using an LDAP filter
PS C:> Get-ADAuthenticationPolicy -LDAPFilter “(name=AuthenticationPolicy*)” -Server Srv01.TOSSolution.com
This command gets all authentication policies that match the LDAP filter specified by the LDAPFilter parameter.

You can check the Version, CommandType and Source of this cmdlet by giving below command.

Get-Command Get-ADAuthenticationPolicy

You can also read about
. New-ADAuthenticationPolicy
. Remove-ADAuthenticationPolicy
. Set-ADAuthenticationPolicy

To know more PowerShell cmdlets(Commands) on addsadministration (Active Directory) click here

Click on this Link for an Single place where you get all the PowerShell cmdlet sorted based on the modules.

You can also refer other blogs on PowerShell at link

You can also refer other blogs on Microsoft at link

And also if you required any technology you want to learn, let us know below we will publish them in our site http://tossolution.com/

Like our page in Facebook and follow us for New technical information.

References are taken from Microsoft

Exit mobile version