3.5 New-AzureDRAGroup

Synopsis

Creates a group in Azure Active Directory.

Syntax

New-AzureDRAGroup -Tenant <String> [-Members <String[]>] [-Owners <String[]>] -Properties <Hashtable> [-DRARestServer <String>] [-DRARestPort <Int32>] [-IgnoreCertificateErrors <SwitchParameter>] [-Force <SwitchParameter>] [-Timeout <Int32>] [<CommonParameters>]

Description

The New-AzureDRAGroup cmdlet creates a group in Azure Active Directory. The requesting user must have the Create Azure Group and Modify All Properties power or a custom power with the necessary powers for the requested attributes.

Parameters

Attribute / Description

Values

Required

Position

Default Value

Accept Pipeline input?

Accept wildcard characters?

Members [<String[]>]

Adds members while creating an Azure group by providing the distinguished name of each member. For example: "CN=John Smith,OU=Sales,DC=MyCompany,DC=COM"

false

named

false

true (ByPropertyName)

false

Owners [<String[]>]

Adds owners while creating an Azure group by providing the distinguished name of each owner. For example: "CN=Rick Jones,OU=Executives,DC=MyCompany,DC=COM"

false

named

false

true (ByPropertyName)

false

Properties <Hashtable>

A hashtable of property values. The key is the name of a defined attribute in the REST interface. For example: -Properties @{Attribute1DRADisplayName="my value"; Attribute2DRADisplayName=value}

Multiple values are specified as a comma-separated list.For example: -Properties @{Attribute1DRADisplayName=value1, value2}

If the property name contains non-alphanumeric characters it needs to be quoted.For example: -Properties @{"Attribute1-DRA-DisplayName"=value}

If the property value contains a quote it needs to be escaped with a backtick (`).For example: -Properties @{Attribute1DRADisplayName="`"sample`" value"}

true

named

 

true (ByPropertyName)

false

Tenant <String>

The Tenant ID of the object in GUID or displayname format. For example: b201dhg8-087e-5n9d-9986-c4d987bfa0b1 or MyTenant

true

named

 

true (ByPropertyName)

false

DRARestServer [<String>]

The name of the computer running the DRA REST Service. The requested DRA operation will execute on this server. If the parameter is not specified, the value defaults to 'localhost'.

false

named

true (ByPropertyName)

false

DRARestPort [<Int32>]

The port where the DRA REST Service listens for requests. This parameter is used only when the DRARestServer parameter is also specified. If the parameter is not specified, the value defaults to 8755.

false

named

8755

true (ByPropertyName)

false

IgnoreCertificateErrors [<SwitchParameter>]

Allows the request to bypass any SSL certificate errors, such as the InvalidOperation error that occurs when the REST Service is bound to a self-signed certificate.

false

named

false

false

Force [<SwitchParameter>]

Suppresses any request for user input and supplies a 'yes' response. For example: -Force with a delete request will perform the delete without presenting the confirmation request to the user.

false

named

false

false

Timeout [<Int32>]

The wait time in seconds before the request to the DRA REST server times out. To specify an infinite timeout, you can set this parameter to -1.

false

named

100 seconds

true (ByPropertyName)

false

<CommonParameters>

Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see About CommonParameters.

 

 

 

 

 

NOTE:For more information, type "Get-Help New-AzureDRAGroup -detailed". For technical information, type "Get-Help New-AzureDRAGroup -full".

Example 3-10 1

PS C:\>New-AzureDRAGroup  -Tenant MyTenant -Properties @{DisplayName="MyGroup";GroupType="Security"}

This example creates an Azure group named MyGroup of type Security in Azure Active Directory using the DisplayName property. The Azure group will be created in the tenant MyTenant. There are three properties set on this Azure group. The Azure group will be a security-enabled Azure group.

Example 3-11 2

PS C:\>New-AzureDRAGroup -Tenant MyTenant -Properties @{DisplayName="MyGroup";MailNickName="MyGroup";GroupType="Distribution list";Mail="MyGroup@MyTenant.online.com"}

This example creates an Azure group named MyGroup of type Distribution in Azure Active Directory using the DisplayName property. The Azure group will be created in the tenant MyTenant. There are four properties set on this Azure group. The Azure group will not be a security-enabled Azure group.

Example 3-12 3

PS C:\>New-AzureDRAGroup -Tenant MyTenant -Properties @{DisplayName="MyGroup";MailNickName="MyGroup";GroupType="Mail-Enabled security";Mail="MyGroup@MyTenant.online.com"}

This example creates an Azure group named MyGroup of type Mail-Enabled Security in Azure Active Directory using the DisplayName property. The Azure group will be created in the tenant MyTenant. There are four properties set on this Azure group. The Azure group will not be a security-enabled Azure group.

Example 3-13 4

PS C:\>New-AzureDRAGroup -Tenant MyTenant -Properties @{DisplayName="MyGroup";MailNickName="MyGroup";GroupType="Office365";Mail="MyGroup@MyTenant.online.com"} -Owners "CN=b7795c1d-6341-4d83-9aa9-5bd465f81c59,AZ=MyTenant","CN=MyUser,DC=MyDomain,DC=COM" -DRARestServer localhost -DRARestPort 9000 -IgnoreCertificateErrors -Force -Timeout 180

This example creates an Azure group named MyGroup of type Office 365 in Azure Active Directory using the DisplayName property. The Azure group will be created in the tenant MyTenant. The Azure group will not be a security-enabled Azure group. It specifies the server and its and REST port. Also, it ignores certificate errors and suppresses confirmations.

Example 3-14 5

PS C:>New-AzureDRAGroup -Tenant MyTenant -Properties @{DisplayName="MyGroup";groupType="Security";Mail="MyGroup @MyTenant.online.com"} -Owners "CN=b7795c1d-6341-4d83-9aa9-5bd465f81c59,AZ=MyTenant","CN=MyUser,DC=MyDomain,DC=COM" -DRARestServer localhost -DRARestPort 8755 -IgnoreCertificateErrors -Force

This example creates an Azure group named MyGroup of type Security. The Azure group will be created in the tenant MyTenant. This example adds Azure objects and synced objects as owners to the group while creating a group.

Example 3-15 6

PS C:\>New-AzureDRAGroup -Tenant MyTenant -Properties @{DisplayName="MyGroup";groupType="Mail-enabled security";Mail="MyGroup@MyTenant.online.com"} -Members "CN=MyUser,dc=MyDomain,dc=COM", "CN=b68faff8-6496-4308-a9b9-8375e03e00f2,az=a131cea8-097d-4f9e-9816-b2d758bfa0b1", "CN=314c6f4c6a05-41e8-a3ba-7bdbaa3e122c,az=MyTenant", "CN=8acfc08d-a1c1-4183-945e-67f2a7737190,az=MyTenant" -DRARestServer localhost -DRARestPort 8755 -IgnoreCertificateErrors -Force

This example creates an Azure group named MyGroup of type Mail-enabled security. The Azure group will be created in the tenant MyTenant. This example adds Azure objects and synced objects as members to the group while creating a group.