TestimoX

API Reference

Command

Disable-ADXUser

Namespace ADPlayground.PowerShell
Outputs
ADPlayground.DirectoryMutationResult

Disables an Active Directory user account.

Examples

Authored help example

Example 1: Preview disabling a departing employee account


Disable-ADXUser -Identity 'anna.kowalska' -Domain 'contoso.com' -WhatIf
        

Example 2: Disable a service account ahead of retirement


Disable-ADXUser -Identity 'svc_sql_ops' -Domain 'contoso.com'
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Disable-ADXUser -Identity <string> [-Domain <string>] [<CommonParameters>]
#

Parameters

Identity string requiredposition: 0pipeline: falsealiases: CommonName, DistinguishedName, DN, Mail, Name, SamAccountName, UPN, UserPrincipalName
Gets or sets user identity (sAMAccountName, UPN, DN, mail, or name).
Domain string optionalposition: namedpipeline: falsealiases: DomainName
Gets or sets the optional domain DNS name.

Outputs

ADPlayground.DirectoryMutationResult