Commands › Exchange Online

Set-ActiveSyncVirtualDirectory

Exchange Online ExchangeOnlineManagement Set-*

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

Quick start script

# Set-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)
Set-ActiveSyncVirtualDirectory -Identity <VirtualDirectoryIdParameter> -WhatIf
Set-ActiveSyncVirtualDirectory -Identity <VirtualDirectoryIdParameter>

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

Syntax

Set-ActiveSyncVirtualDirectory [-Identity] <VirtualDirectoryIdParameter>
 [-ActiveSyncServer <String>]
 [-BadItemReportingEnabled <Boolean>]
 [-BasicAuthEnabled <Boolean>]
 [-ClientCertAuth <ClientCertAuthTypes>]
 [-CompressionEnabled <Boolean>]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-ExtendedProtectionFlags <MultiValuedProperty>]
 [-ExtendedProtectionSPNList <MultiValuedProperty>]
 [-ExtendedProtectionTokenChecking <ExtendedProtectionTokenCheckingMode>]
 [-ExternalAuthenticationMethods <MultiValuedProperty>]
 [-ExternalUrl <Uri>]
 [-InstallIsapiFilter <Boolean>]
 [-InternalAuthenticationMethods <MultiValuedProperty>]
 [-InternalUrl <Uri>]
 [-MobileClientCertificateAuthorityURL <String>]
 [-MobileClientCertificateProvisioningEnabled <Boolean>]
 [-MobileClientCertTemplateName <String>]
 [-Name <String>]
 [-RemoteDocumentsActionForUnknownServers <RemoteDocumentsActions>]
 [-RemoteDocumentsAllowedServers <MultiValuedProperty>]
 [-RemoteDocumentsBlockedServers <MultiValuedProperty>]
 [-RemoteDocumentsInternalDomainSuffixList <MultiValuedProperty>]
 [-SendWatsonReport <Boolean>]
 [-WhatIf]
 [-WindowsAuthEnabled <Boolean>]
 [<CommonParameters>]

Parameters (27)

ParameterTypeRequiredWhat it controls
-Identity VirtualDirectoryIdParameter yes The Identity parameter specifies the ActiveSync virtual directory that you want to modify. You can use any value that uniquely identifies the virtual directory. For example:
-ActiveSyncServer String The ActiveSyncServer parameter specifies the URL of the Mailbox server. This value is in the following format: https://servername/Microsoft-Server-ActiveSync.
-BadItemReportingEnabled Boolean The BadItemReportingEnabled parameter specifies whether items that can't be synchronized should be reported to the user. If set to $true, the user receives a notification when an item can't be synchronized to the...
-BasicAuthEnabled Boolean The BasicAuthentication parameter specifies whether Basic authentication is enabled on the virtual directory. Valid values are:
-ClientCertAuth ClientCertAuthTypes The ClientCertAuth parameter specifies the status of client certificate authentication. By default, client certificate authentication is disabled. The default setting is Ignore.
-CompressionEnabled Boolean The CompressionEnabled parameter is a Boolean value that identifies the compression applied to the specified Exchange ActiveSync virtual directory. The default setting is $true.
-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.
-InstallIsapiFilter Boolean The InstallIsapiFilter parameter specifies whether the Internet Server API (ISAPI) filter is installed.
-InternalAuthenticationMethods MultiValuedProperty The InternalAuthenticationMethods parameter specifies the authentication methods supported by the server that contains the virtual directory when access is requested from inside the network firewall. If this...
-InternalUrl Uri The InternalURL parameter specifies the URL that connects to the virtual directory from inside the firewall.
-MobileClientCertificateAuthorityURL String The MobileClientCertificateAuthorityURL parameter specifies the URL for the certification authority (CA) used by the mobile phone.
-MobileClientCertificateProvisioningEnabled Boolean The MobileClientCertificateProvisioningEnabled parameter specifies whether the Autodiscover service returns the Certificate Services server URL in the XML file.
-MobileClientCertTemplateName String The MobileClientCertTemplateName parameter specifies the template name for the client certificate.
-Name String The Name parameter specifies the name of the Exchange ActiveSync virtual directory.
-RemoteDocumentsActionForUnknownServers RemoteDocumentsActions The RemoteDocumentsActionForUnknownServers parameter specifies the action that occurs when a Microsoft Windows SharePoint Services or Microsoft Windows file share request comes in via Exchange ActiveSync. When a...
-RemoteDocumentsAllowedServers MultiValuedProperty The RemoteDocumentsAllowedServers parameter is a multivalued property that lists all the allowed servers for remote document access.
-RemoteDocumentsBlockedServers MultiValuedProperty The RemoteDocumentsBlockedServers parameter is a multivalued property that lists all the blocked servers for remote document access.
-RemoteDocumentsInternalDomainSuffixList MultiValuedProperty The RemoteDocumentsInternalDomainSuffixList parameter is used in organizations that don't run Windows Internet Name Service (WINS) in their network. In these environments, you can specify one or more FQDNs that...
-SendWatsonReport Boolean The SendWatsonReport parameter specifies whether a Watson report is sent for errors and events.
-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.
-WindowsAuthEnabled Boolean The WindowsAuthEnabled parameter specifies whether Integrated Windows authentication is enabled. The default value is $false.

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