Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1
Topic Last Modified: 2009-05-12

Use the Set-Group cmdlet to modify the settings of an existing Microsoft Windows group.

Syntax

Set-Group -Identity <GroupIdParameter> [-Confirm [<SwitchParameter>]] [-DisplayName <String>] [-DomainController <Fqdn>] [-IgnoreDefaultScope <SwitchParameter>] [-ManagedBy <GeneralRecipientIdParameter>] [-Name <String>] [-Notes <String>] [-PhoneticDisplayName <String>] [-SimpleDisplayName <String>] [-UseRusServer <String>] [-WhatIf [<SwitchParameter>]] [-WindowsEmailAddress <SmtpAddress>]
Set-Group -Identity <GroupIdParameter> [-Confirm [<SwitchParameter>]] [-DisplayName <String>] [-DomainController <Fqdn>] [-IgnoreDefaultScope <SwitchParameter>] [-ManagedBy <GeneralRecipientIdParameter>] [-Name <String>] [-Notes <String>] [-PhoneticDisplayName <String>] [-SimpleDisplayName <String>] [-Universal <SwitchParameter>] [-UseRusServer <String>] [-WhatIf [<SwitchParameter>]] [-WindowsEmailAddress <SmtpAddress>]
Set-Group [-Confirm [<SwitchParameter>]] [-DisplayName <String>] [-DomainController <Fqdn>] [-IgnoreDefaultScope <SwitchParameter>] [-Instance <WindowsGroup>] [-ManagedBy <GeneralRecipientIdParameter>] [-Name <String>] [-Notes <String>] [-PhoneticDisplayName <String>] [-SimpleDisplayName <String>] [-UseRusServer <String>] [-WhatIf [<SwitchParameter>]] [-WindowsEmailAddress <SmtpAddress>]

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.GroupIdParameter

The Identity parameter specifies the object that you want to modify. The Identity parameter can take any of the following values for the group:

  • Distinguished name (DN)

  • Canonical name

  • GUID

  • Name

  • Display name

Identity cannot be used if the Instance parameter is specified.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm parameter causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm parameter.

DisplayName

Optional

System.String

The DisplayName parameter specifies the name of the group in the Exchange Management Console and in the Exchange global address list (GAL). This parameter has significance only if the group is mail enabled.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory, include the DomainController parameter.

IgnoreDefaultScope

Optional

System.Management.Automation.SwitchParameter

The IgnoreDefaultScope parameter instructs the command to ignore the default recipient scope setting for the Exchange Management Shell and use the entire forest as the scope. This allows the command to access Active Directory objects that are not currently in the default scope. Using the IgnoreDefaultScope parameter introduces the following restrictions:

  • You cannot use the DomainController parameter. The command will use an appropriate global catalog server automatically.

  • You can only use the DN for the Identity parameter. Other forms of identification, such as alias or GUID, are not accepted.

Instance

Optional

Microsoft.Exchange.Data.Directory.Management.WindowsGroup

The Instance parameter enables you to pass an entire object to the command to be processed. It is mainly used in scripts where an entire object must be passed to the command.

The Instance parameter cannot be used if the Identity parameter is specified.

ManagedBy

Optional

Microsoft.Exchange.Configuration.Tasks.GeneralRecipientIdParameter

The ManagedBy parameter specifies the name of the user, group, or contact that appears in the Managed by tab of the Active Directory object. You can use any of the following values for this parameter:

  • Distinguished name (DN)

  • Canonical name

  • GUID

  • Name

  • Display name

Name

Optional

System.String

The Name parameter specifies the name of the group. The Name parameter specifies the group name in Active Directory Users and Computers and also in the Group Name field in the Exchange Management Console if the group is mail enabled.

Notes

Optional

System.String

The Notes parameter specifies the notes that describe the purpose of the group.

PhoneticDisplayName

Optional

System.String

The PhoneticDisplayName parameter specifies a phonetic pronunciation of the DisplayName parameter.

The maximum length of this parameter value is 255 characters. For more information about the PhoneticDisplayName parameter and speech recognition, see Understanding Automatic Speech Recognition Directory Lookups.

SimpleDisplayName

Optional

System.String

The SimpleDisplayName parameter displays an alternative description of the object when only a limited set of characters is permitted. This limited set of characters consists of ASCII characters 26 through 126, inclusively. SimpleDisplayName has meaning only for mail-enabled objects.

Universal

Optional

System.Management.Automation.SwitchParameter

The Universal parameter changes the scope of the group from global or domain local to universal.

UseRusServer

Optional

System.String

Note:
This parameter is available only in Exchange 2007 SP2.

The UseRusServer parameter instructs the command to use the specified Mailbox server on which the Address List service is running to obtain and then set mailbox and Active Directory user attributes.

The Address List service is a component in the Exchange System Attendant service. The Address List service creates and maintains Exchange-specific attribute values in Active Directory. You can use the Address List service to update recipient objects in a domain by using specific information, such as address list membership and e-mail addresses.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf parameter.

WindowsEmailAddress

Optional

Microsoft.Exchange.Data.SmtpAddress

The WindowsEmailAddress parameter specifies the value of the E-mail field of the Active Directory object.

Detailed Description

You can use the Set-Group cmdlet to modify group object settings that are visible in Active Directory Users and Computers. If the group is a mail-enabled security group or a distribution group, you can use the Set-DistributionGroup cmdlet to modify other Microsoft Exchange Server 2007 settings that are not available by using the Set-Group cmdlet.

You cannot use the Set-Group cmdlet to modify dynamic distribution groups. To modify dynamic distribution groups, use the Set-DynamicDistributionGroup cmdlet.

To run the Set-Group cmdlet, the account you use must be delegated the following:

  • Exchange Recipient Administrator role

  • Account Operator role for the applicable Active Directory containers 

For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.

Input Types

Return Types

Errors

Error Description

 

 

Exceptions

Exceptions Description

 

 

Example

The following code example shows how to use the Set-Group command to apply the following changes to an existing global security group that is named Legal Department:

  • Change the group's scope to universal.

  • Add a Notes value of verified.

Copy Code
Set-Group -Identity "Legal Department" -Universal -Notes "verified"