Applies to: Exchange Server 2007
Topic Last Modified: 2007-06-11

The New-ActiveSyncVirtualDirectory command allows you to create new Microsoft Exchange ActiveSync virtual directories on your specified Web sites.

Syntax

New-ActiveSyncVirtualDirectory [-ApplicationRoot <String>] [-AppPoolId <String>] [-DomainController <Fqdn>] [-ExternalAuthenticationMethods <MultiValuedProperty>] [-ExternalUrl <Uri>] [-InternalAuthenticationMethods <MultiValuedProperty>] [-InternalUrl <Uri>] [-Path <String>] [-Server <ServerIdParameter>] [-TemplateInstance <PSObject>] [-WebSiteName <String>]

Parameters

Parameter Required Type Description

ApplicationRoot

Optional

System.String

This parameter sets the metabase path of the virtual directory. By default, this path is the same as the Web site in which the virtual directory is created.

AppPoolId

Optional

System.String

This parameter sets the pool of programs which can be used with the virtual directory.

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 on the command.

ExternalAuthenticationMethods

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies the authentication methods supported by the server that contains the virtual directory when access is requested from outside the network's firewall. If this parameter is not set, all authentication methods can be used.

ExternalUrl

Optional

System.Uri

This parameter specifies the uniform resource locator (URL) that is used to connect to the virtual directory from outside the network's firewall.

InternalAuthenticationMethods

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies the authentication methods supported by the server that contains the virtual directory when access is requested from inside the network's firewall. If this parameter is not set, all authentication methods can be used.

InternalUrl

Optional

System.Uri

This parameter specifies the URL that is used to connect to the virtual directory from inside the network's firewall.

Path

Optional

System.String

This parameter sets the directory that contains the virtual directory's system files.

Server

Optional

Microsoft.Exchange.Configuration.Tasks.ServerIdParameter

This parameter defines the server on which the new Exchange ActiveSync virtual directory will be created.

TemplateInstance

Optional

System.Management.Automation.PSObject

When an existing object is supplied to this parameter, the command will use that object's configuration to create an exact duplicate of the object on a local or target server.

WebSiteName

Optional

System.String

This parameter specifies the name of the Exchange ActiveSync Web site in which to create the new virtual directory.

Detailed Description

The New-ActiveSyncVirtualDirectory command causes a new Exchange ActiveSync virtual directory to be created on the specified server under the specified Web site. The Exchange ActiveSync virtual directory that is created will be named "Microsoft-ActiveSync-Server". Only one Exchange ActiveSync virtual directory can exist in each Exchange ActiveSync Web site.

To run the New-ActiveSyncVirtualDirectory cmdlet,the account you use must be delegated the following:

  • Exchange Server Administrator role and local Administrators group for the target server

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 creates a new virtual directory on the server Contoso.

Copy Code
New-ActiveSyncVirtualDirectory -Server "Contoso" -WebSiteName "Contoso/Default Web Site" -ExternalURL "http://www.contoso.com/Microsoft-Server-ActiveSync"