Commands › Exchange Online

Set-EcpVirtualDirectory

Exchange Online ExchangeOnlineManagement Set-*

Modify Exchange Control Panel (ECP) virtual directories that are used in Internet Information Services (IIS) on Microsoft Exchange servers. The ECP virtual directory manages the Exchange admin center. The ECP web management interface was introduced in Exchange Server 2010. In Exchange Server 2013 and Exchange Server 2016, the EAC virtual directories and the corresponding management cmdlets still use ECP in the name. You can use these cmdlets to manage ECP virtual directories on Exchange 2010, Exchange 2013, and Exchange 2016 servers.

Quick start script

# Set-EcpVirtualDirectory — 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-EcpVirtualDirectory
$before | Format-List

# 3. Make the change (dry run first)
Set-EcpVirtualDirectory -Identity <VirtualDirectoryIdParameter> -WhatIf
Set-EcpVirtualDirectory -Identity <VirtualDirectoryIdParameter>

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

Syntax

Set-EcpVirtualDirectory [-Identity] <VirtualDirectoryIdParameter>
 [-AdfsAuthentication <Boolean>]
 [-AdminEnabled <Boolean>]
 [-BasicAuthentication <Boolean>]
 [-Confirm]
 [-DigestAuthentication <Boolean>]
 [-DomainController <Fqdn>]
 [-ExtendedProtectionFlags <MultiValuedProperty>]
 [-ExtendedProtectionSPNList <MultiValuedProperty>]
 [-ExtendedProtectionTokenChecking <ExtendedProtectionTokenCheckingMode>]
 [-ExternalAuthenticationMethods <MultiValuedProperty>]
 [-ExternalUrl <Uri>]
 [-FormsAuthentication <Boolean>]
 [-GzipLevel <GzipLevel>]
 [-InternalUrl <Uri>]
 [-OAuthAuthentication <Boolean>]
 [-OwaOptionsEnabled <Boolean>]
 [-WhatIf]
 [-WindowsAuthentication <Boolean>]
 [<CommonParameters>]

Parameters (19)

ParameterTypeRequiredWhat it controls
-Identity VirtualDirectoryIdParameter yes The Identity parameter specifies the ECP virtual directory that you want to modify. You can use any value that uniquely identifies the virtual directory. For example:
-AdfsAuthentication Boolean The AdfsAuthentication parameter specifies that the ECP virtual directory allows users to authenticate through Active Directory Federation Services (AD FS) authentication. This parameter accepts $true or $false. The...
-AdminEnabled Boolean The AdminEnabled parameter specifies that the EAC isn't able to be accessed through the Internet. For more information, see [Turn off access to the Exchange admin...
-BasicAuthentication Boolean The BasicAuthentication parameter specifies whether Basic authentication is enabled on the virtual directory. Valid values are:
-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.
-DigestAuthentication Boolean The DigestAuthentication parameter specifies whether Digest authentication is enabled on the virtual directory. Valid values are:
-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 specifies the authentication methods supported on the Exchange server from outside the firewall.
-ExternalUrl Uri The ExternalURL parameter specifies the URL that connects to the virtual directory from outside the firewall.
-FormsAuthentication Boolean The FormsAuthentication parameter specifies whether forms-based authentication is enabled on the ECP virtual directory. Valid values are:
-GzipLevel GzipLevel The GzipLevel parameter sets Gzip configuration information for the ECP virtual directory.
-InternalUrl Uri The InternalURL parameter specifies the URL that connects to the virtual directory from inside the firewall.
-OAuthAuthentication Boolean {{ Fill OAuthAuthentication Description }}
-OwaOptionsEnabled Boolean The OwaOptionsEnabled parameter specifies that Outlook on the web Options is enabled for end users. If this parameter is set to $false, users aren't able to access Outlook on the web Options. You might want to...
-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.
-WindowsAuthentication Boolean The WindowsAuthentication parameter specifies whether Integrated Windows authentication is enabled on the virtual directory. Valid values are:

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