API Reference
Command
New-ADXComputer
Creates a new Active Directory computer account.
Examples
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
- Gets or sets the computer sAMAccountName.
- OrganizationalUnit string
- Gets or sets the destination organizational unit distinguished name.
- Attribute Hashtable
- Gets or sets optional custom attributes to apply after creation.
- CommonName string
- Gets or sets optional common name (CN). Defaults to normalized SamAccountName.
- Description string
- Gets or sets optional description.
- DnsHostName string
- Gets or sets optional dNSHostName.
- Enabled bool
- Gets or sets optional enabled state.
- Location string
- Gets or sets optional location.
- ManagedBy string
- Gets or sets optional managedBy distinguished name.
- Office string
- Gets or sets optional office (physicalDeliveryOfficeName).
- OperatingSystem string
- Gets or sets optional operatingSystem.
- OperatingSystemServicePack string
- Gets or sets optional operatingSystemServicePack.
- OperatingSystemVersion string
- Gets or sets optional operatingSystemVersion.
- ServicePrincipalName string[]
- Gets or sets optional service principal names.
Outputs
ADPlayground.DirectoryMutationResult