TestimoX

API Reference

Command

New-ADXComputer

Namespace ADPlayground.PowerShell
Outputs
ADPlayground.DirectoryMutationResult

Creates a new Active Directory computer account.

Examples

Authored help example

Example 1: Preview a new application server computer object


New-ADXComputer -SamAccountName 'srv-app-17' -OrganizationalUnit 'OU=Servers,OU=Production,DC=contoso,DC=com' -DnsHostName 'srv-app-17.contoso.com' -Description 'Payroll API node 17' -Location 'Warsaw DC' -WhatIf
        

Example 2: Create a staged computer account before the server joins the domain


New-ADXComputer -SamAccountName 'srv-rds-05' -OrganizationalUnit 'OU=Terminal Servers,OU=Infrastructure,DC=contoso,DC=com' -DnsHostName 'srv-rds-05.contoso.com' -ManagedBy 'CN=Server Provisioning,OU=Groups,DC=contoso,DC=com' -Description 'Reserved for the April RDS rollout' -Enabled $false
        

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

New-ADXComputer -SamAccountName <string> -OrganizationalUnit <string> [-Attribute <Hashtable>] [-CommonName <string>] [-Description <string>] [-DnsHostName <string>] [-Enabled <bool>] [-Location <string>] [-ManagedBy <string>] [-Office <string>] [-OperatingSystem <string>] [-OperatingSystemServicePack <string>] [-OperatingSystemVersion <string>] [-ServicePrincipalName <string[]>] [<CommonParameters>]
#

Parameters

SamAccountName string requiredposition: 0pipeline: false
Gets or sets the computer sAMAccountName.
OrganizationalUnit string requiredposition: 1pipeline: false
Gets or sets the destination organizational unit distinguished name.
Attribute Hashtable optionalposition: namedpipeline: false
Gets or sets optional custom attributes to apply after creation.
CommonName string optionalposition: namedpipeline: false
Gets or sets optional common name (CN). Defaults to normalized SamAccountName.
Description string optionalposition: namedpipeline: false
Gets or sets optional description.
DnsHostName string optionalposition: namedpipeline: false
Gets or sets optional dNSHostName.
Enabled bool optionalposition: namedpipeline: false
Gets or sets optional enabled state.
Location string optionalposition: namedpipeline: false
Gets or sets optional location.
ManagedBy string optionalposition: namedpipeline: false
Gets or sets optional managedBy distinguished name.
Office string optionalposition: namedpipeline: false
Gets or sets optional office (physicalDeliveryOfficeName).
OperatingSystem string optionalposition: namedpipeline: false
Gets or sets optional operatingSystem.
OperatingSystemServicePack string optionalposition: namedpipeline: false
Gets or sets optional operatingSystemServicePack.
OperatingSystemVersion string optionalposition: namedpipeline: false
Gets or sets optional operatingSystemVersion.
ServicePrincipalName string[] optionalposition: namedpipeline: false
Gets or sets optional service principal names.

Outputs

ADPlayground.DirectoryMutationResult