Set-QADComputer

From PowerGUI Wiki

Jump to: navigation, search

Make changes to a 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

Set-QADComputer [-Identity] <IdentityParameter> [-SecondaryOwner <UpdateIdentityParameter[]>] [-TrustForDelegation [<Boolean>]] [-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 modify properties of an Active Directory computer object. You can modify some commonly used computer properties by using the corresponding cmdlet parameters. Properties that are not associated with cmdlet parameters can be modified by using the ObjectAttributes parameter. Thus, to modify 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 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
Identity Specify the Distinguished Name (DN), Canonical Name, GUID or, if applicable, the Domain\Name, UPN or SID of the object you want the cmdlet to act upon. The cmdlet makes changes to, or otherwise manages, the object identified by this parameter value. When you pipe an object into the cmdlet, this parameter is used to receive the object. true true (ByValue)
SecondaryOwner Use this parameter to add or remove secondary owners. Parameter value can be a string array or an associative array that specifies the identifiers, such as DN, SID, GUID, UPN or Domain\Name, of one or more users or groups to add or remove from the secondary owner role. Some examples of possible parameter values are:

-SecondaryOwner 'domain\administrator','domain\user' Replace the existing identities in the secondary owners list with the identities specified.

-SecondaryOwner @{append=@('domain\administrator','domain\user')} Add the specified identities to the secondary owners list, without removing the existing owners.

-SecondaryOwner @{delete=@('domain\administrator','domain\user')} Remove the specified identities from the secondary owners list, leaving the other owners intact. -SecondaryOwner $null Clear the secondary owners list, so that no secondary owners are specified.

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 the parameter value of $true or $false depending on whether or not you want to configure the computer object so that the computer is trusted for delegation. When a computer is trusted for delegation, any service running under the Local System account on that computer can access resources on other computers and 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 @{title='Associate';l='Paris'} array to the ObjectAttributes parameter causes the cmdlet to set the 'Job Title' attribute to 'Associate' and the 'City' attribute to 'Paris'.

For information about associative arrays, type the following command at the PowerShell command-prompt:

help about_associative_array

false true (ByValue, ByPropertyName)
Description Set or clear the 'description' attribute. false false
DisplayName Set or clear the 'displayName' attribute. 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

Set-QADComputer 'lab.local/computers/Comp4' -Location 'AMS/HQ/Building A'

Modify the location for a given computer.

Example 2

Set-QADComputer 'lab.local/computers/Comp4' -ManagedBy 'domainName\logonName'

Set the 'managedBy' attribute value for a given computer using the pre-Windows 2000 logon name of the user.

Example 3

Set-QADComputer 'lab.local/computers/Comp4' -objectAttributes @{servicePrincipalName=@('MSSQLSvc/Comp4.lab.local:1362','ldap/Comp4.lab.local:389')}

Replace the SPN values for a given computer.

Example 4

Set-QADComputer 'lab.local/computers/Comp4' -objectAttributes @{servicePrincipalName=@{Append=@('MSSQLSvc/Comp4.lab.local:1362','ldap/Comp4.lab.local:389')}}

Add two new items to the SPN values for a given computer.

Personal tools