New-QADComputer
From PowerGUI Wiki
Create a new computer object in Active Directory Domain Services.
This cmdlet is part of the Quest ActiveRoles Server product. Use Get-QARSProductInfo to view information about ActiveRoles Server.
Contents |
Syntax
New-QADComputer -ParentContainer <IdentityParameter> [-Name] <String> [-SecondaryOwner <IdentityParameter[]>] [-TrustForDelegation] [-SamAccountName <String>] [-ManagedBy <IdentityParameter>] [-Location <String>] [-Password <String>] [-ObjectAttributes <ObjectAttributesParameter>] [-Description <String>] [-DisplayName <String>] [-ExcludedProperties <String[]>] [-IncludedProperties <String[]>] [-DeserializeValues] [-UseDefaultExcludedProperties [<Boolean>]] [-Proxy] [-UseGlobalCatalog] [-Service <String>] [-ConnectionAccount <String>] [-ConnectionPassword <SecureString>] [-Credential <PSCredential>] [-Connection <ArsConnection>] [-WhatIf] [-Confirm] [<CommonParameters>]
Detailed Description
Use this cmdlet to create a new Active Directory computer object. You can use this cmdlet to provision a computer account before the computer is added to the domain. Note that this cmdlet does not join a computer to a domain.
You can set some commonly used computer properties by using the corresponding cmdlet parameters. Properties that are not associated with cmdlet parameters can be set by using the ObjectAttributes parameter. Thus, to set the value of the 'description' or 'displayName' attribute, you can use the Description or DisplayName parameter, respectively. If a particular attribute is referred to by both the ObjectAttributes array and an attribute-specific parameter, the ObjectAttributes setting has no effect on that attribute. The cmdlet sets the attribute to the value specified by the attribute-specific parameter.
The cmdlet can use the connection that is established by the Connect-QADService cmdlet.
The cmdlet has optional parameters that determine the server and the security context for the operation. Normally, the connection parameters could be omitted so far as a connection to a server is established prior to using the cmdlet. In this case, the server and the security context are determined by the Connect-QADService cmdlet.
If you do not use Connect-QADService and have no connection established prior to using a cmdlet, then the connection settings, including the server and the security context, are determined by the connection parameters of the first cmdlet you use. Subsequent cmdlets will use those settings by default.
Related Commands
Parameters
| Name | Description | Required? | Pipeline Input | Default Value |
|---|---|---|---|---|
| ParentContainer | Specify the distinguished name (DN) of the container in which you want this cmdlet to create a new computer object. | true | true (ByPropertyName) | |
| Name | Specify the name for the new computer object to be created. | true | true (ByValue, ByPropertyName) | |
| SecondaryOwner | Set the 'edsvaSecondaryOwners' attribute. Supply the DN, SID, GUID, UPN or Domain\Name of the user or group to be set as a secondary owner. You can supply a string array of object identifiers to specify several secondary owners. This parameter has an effect only in conjunction with the Proxy connection parameter because secondary owner settings are stored and managed by ActiveRoles Server. | false | false | |
| TrustForDelegation | Supply this parameter to configure the computer object so that the computer is trusted for delegation. In this way you enable any service running under the Local System account on that computer to gain access to resources on other computers, and to impersonate its clients when accessing resources on other computers. | false | false | |
| SamAccountName | Set the 'sAMAccountName' attribute (pre-Windows 2000 name) to this parameter value. | false | false | |
| ManagedBy | Specify the DN, SID, GUID, UPN or Domain\Name of the user or group to be set as the 'managedBy' attribute value on the object in the directory. | false | false | |
| Location | Set the 'location' attribute to this parameter value. | false | false | |
| Password | Set the password in the computer account to this parameter value. | false | false | |
| ObjectAttributes | Specify an associative array that defines the attributes to set. The array syntax:
@{attr1='val1';attr2='val2';...} In this syntax, each of the key-value pairs is the LDAP display name and the value of an attribute to set. Thus, passing the @{sAMAccountName='Admins'} array to the ObjectAttributes parameter causes the cmdlet to set the 'sAMAccountName' attribute to 'Admins'. For information about associative arrays, type the following command at the PowerShell command-prompt: help about_associative_array | false | true (ByValue, ByPropertyName) | |
| Description | Set the value of the 'description' attribute on the object to be created. | false | false | |
| DisplayName | Set the value of the 'displayName' attribute on the object to be created. | false | false | |
| ExcludedProperties | Use this parameter to specify the attributes that you do not want the cmdlet to update in the directory. Supply a list of the attribute LDAP display names as the parameter value. You could use this parameter when importing attribute values from a text file, in order to prevent some attributes found in the file from being set in the directory. | false | false | |
| IncludedProperties | Use this parameter to specify explicitly the attributes that you want the cmdlet to update in the directory. Supply a list of the attribute LDAP display names as the parameter value. When used together with UseDefaultExcludedProperties, this parameter allows you to have the cmdlet update some attributes that would not be updated otherwise.
Note: If a particular attribute is listed in both ExcludedProperties and IncludedProperties, the cmdlet does not set the value of that attribute the directory. | false | false | |
| DeserializeValues | Supply this parameter on the command line if the input you pass to the cmdlet contains serialized attribute values (for instance, when importing a directory object from a text file that was created using the Serialize parameter). For examples of how to export and import an object, see help on the Get-QADUser cmdlet. | false | false | |
| UseDefaultExcludedProperties | When set to 'true', this parameter causes the cmdlet not to update a certain pre-defined set of attributes in the directory. This pre-defined set of attributes (referred to as "default excluded properties") can be viewed or modified by using the Get-QADPSSnapinSettings or Set-QADPSSnapinSettings cmdlet, respectively. | false | false | false |
| Proxy | For parameter description, see help on the Connect-QADService cmdlet. | false | false | |
| UseGlobalCatalog | For parameter description, see help on the Connect-QADService cmdlet. | false | false | |
| Service | For parameter description, see help on the Connect-QADService cmdlet. | false | false | |
| ConnectionAccount | For parameter description, see help on the Connect-QADService cmdlet. | false | false | |
| ConnectionPassword | For parameter description, see help on the Connect-QADService cmdlet. | false | false | |
| Credential | For parameter description, see help on the Connect-QADService cmdlet. | false | false | |
| Connection | For parameter description, see help on the Connect-QADService cmdlet. | false | false | |
| WhatIf | Describes what would happen if you executed the command, without actually executing the command. | false | false | |
| Confirm | Prompts you for confirmation before executing the command. | false | false |
Examples
Example 1
New-QADComputer -Name 'LAB-SRV3' -SamAccountName 'LAB-SRV3' -ParentContainer 'CN=Computers,DC=lab,DC=local' -Location 'AMS/HQ/Building A'
Create a new computer object in the 'Computers' container, and set a particular location value for that object.
