Commands › Exchange Online

New-ActiveSyncVirtualDirectory

Exchange Online ExchangeOnlineManagement New-*

Create Exchange ActiveSync virtual directories that are used in Internet Information Services (IIS) on Microsoft Exchange servers.

Quick start script

# New-ActiveSyncVirtualDirectory — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-ActiveSyncVirtualDirectory
$before | Format-List

# 3. Make the change (dry run first)
New-ActiveSyncVirtualDirectory  -WhatIf
New-ActiveSyncVirtualDirectory

# 4. Verify and diff
$after = Get-ActiveSyncVirtualDirectory
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

New-ActiveSyncVirtualDirectory [-ApplicationRoot <String>]
 [-AppPoolId <String>]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-ExtendedProtectionFlags <MultiValuedProperty>]
 [-ExtendedProtectionSPNList <MultiValuedProperty>]
 [-ExtendedProtectionTokenChecking <ExtendedProtectionTokenCheckingMode>]
 [-ExternalAuthenticationMethods <MultiValuedProperty>]
 [-ExternalUrl <Uri>]
 [-InstallProxySubDirectory <Boolean>]
 [-InternalAuthenticationMethods <MultiValuedProperty>]
 [-InternalUrl <Uri>]
 [-Path <String>]
 [-Role <VirtualDirectoryRole>]
 [-Server <ServerIdParameter>]
 [-WebSiteName <String>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (17)

ParameterTypeRequiredWhat it controls
-ApplicationRoot String The ApplicationRoot parameter specifies the metabase path of the virtual directory. By default, this path is the same as the website in which the virtual directory is created.
-AppPoolId String The AppPoolId parameter specifies the IIS application pool in which the virtual directory runs. We recommend that you leave this parameter at its default setting.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-ExtendedProtectionFlags MultiValuedProperty The ExtendedProtectionFlags parameter specifies custom settings for Extended Protection for Authentication on the virtual directory. Valid values are:
-ExtendedProtectionSPNList MultiValuedProperty The ExtendedProtectionSPNList parameter specifies a list of valid Service Principal Names (SPNs) if you're using Extended Protection for Authentication on the virtual directory. Valid values are:
-ExtendedProtectionTokenChecking ExtendedProtectionTokenCheckingMode The ExtendedProtectionTokenChecking parameter specifies whether Extended Protection for Authentication is used for client connections to the virtual directory. Valid values are:
-ExternalAuthenticationMethods MultiValuedProperty The ExternalAuthenticationMethods parameter restricts the authentication methods that can be used to connect to the virtual directory from outside the firewall. Valid values are:
-ExternalUrl Uri The ExternalURL parameter specifies the URL that connects to the virtual directory from outside the firewall.
-InstallProxySubDirectory Boolean The InstallProxySubDirectory parameter was used to create an subdirectory that was required for proxying ActiveSync connections with Exchange 2007.
-InternalAuthenticationMethods MultiValuedProperty The InternalAuthenticationMethods parameter restricts the authentication methods that can be used to connect to the virtual directory from inside the firewall. Valid values are:
-InternalUrl Uri The InternalURL parameter specifies the URL that connects to the virtual directory from inside the firewall.
-Path String The Path parameter specifies the file system path of the virtual directory. We recommend using this parameter only when you need to use a custom location for the virtual directory files. The default value is blank...
-Role VirtualDirectoryRole The Role parameter species the configuration for the virtual directory. Valid values are:
-Server ServerIdParameter The Server parameter specifies the Exchange server that hosts the virtual directory. You can use any value that uniquely identifies the server. For example:
-WebSiteName String The WebSiteName parameter specifies the name of the IIS website under which the virtual directory is created. You don't need to use this parameter to create the virtual directory under the default website.
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.