-
Notifications
You must be signed in to change notification settings - Fork 341
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1845 from microsoft/main
Release 10-4-23
- Loading branch information
Showing
18 changed files
with
2,631 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
111 changes: 111 additions & 0 deletions
111
...stics/HealthChecker/DataCollection/ExchangeInformation/Get-ExchangeVirtualDirectories.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT License. | ||
|
||
. $PSScriptRoot\..\..\..\..\Shared\ErrorMonitorFunctions.ps1 | ||
|
||
function Get-ExchangeVirtualDirectories { | ||
param( | ||
[Parameter(Mandatory = $true)] | ||
[string]$Server | ||
) | ||
begin { | ||
Write-Verbose "Calling: $($MyInvocation.MyCommand)" | ||
|
||
$failedString = "Failed to get {0} virtual directory." | ||
$getActiveSyncVirtualDirectory = $null | ||
$getAutoDiscoverVirtualDirectory = $null | ||
$getEcpVirtualDirectory = $null | ||
$getMapiVirtualDirectory = $null | ||
$getOabVirtualDirectory = $null | ||
$getOutlookAnywhere = $null | ||
$getOwaVirtualDirectory = $null | ||
$getPowerShellVirtualDirectory = $null | ||
$getWebServicesVirtualDirectory = $null | ||
$paramsNoShow = @{ | ||
Server = $Server | ||
ErrorAction = "Stop" | ||
ADPropertiesOnly = $true | ||
} | ||
$params = $paramsNoShow + @{ | ||
ShowMailboxVirtualDirectories = $true | ||
} | ||
} | ||
process { | ||
try { | ||
$getActiveSyncVirtualDirectory = Get-ActiveSyncVirtualDirectory @params | ||
} catch { | ||
Write-Verbose ($failedString -f "EAS") | ||
Invoke-CatchActions | ||
} | ||
|
||
try { | ||
$getAutoDiscoverVirtualDirectory = Get-AutodiscoverVirtualDirectory @params | ||
} catch { | ||
Write-Verbose ($failedString -f "Autodiscover") | ||
Invoke-CatchActions | ||
} | ||
|
||
try { | ||
$getEcpVirtualDirectory = Get-EcpVirtualDirectory @params | ||
} catch { | ||
Write-Verbose ($failedString -f "ECP") | ||
Invoke-CatchActions | ||
} | ||
|
||
try { | ||
# Doesn't have ShowMailboxVirtualDirectories | ||
$getMapiVirtualDirectory = Get-MapiVirtualDirectory @paramsNoShow | ||
} catch { | ||
Write-Verbose ($failedString -f "Mapi") | ||
Invoke-CatchActions | ||
} | ||
|
||
try { | ||
$getOabVirtualDirectory = Get-OabVirtualDirectory @params | ||
} catch { | ||
Write-Verbose ($failedString -f "OAB") | ||
Invoke-CatchActions | ||
} | ||
|
||
try { | ||
$getOutlookAnywhere = Get-OutlookAnywhere @params | ||
} catch { | ||
Write-Verbose ($failedString -f "Outlook Anywhere") | ||
Invoke-CatchActions | ||
} | ||
|
||
try { | ||
$getOwaVirtualDirectory = Get-OwaVirtualDirectory @params | ||
} catch { | ||
Write-Verbose ($failedString -f "OWA") | ||
Invoke-CatchActions | ||
} | ||
|
||
try { | ||
$getPowerShellVirtualDirectory = Get-PowerShellVirtualDirectory @params | ||
} catch { | ||
Write-Verbose ($failedString -f "PowerShell") | ||
Invoke-CatchActions | ||
} | ||
|
||
try { | ||
$getWebServicesVirtualDirectory = Get-WebServicesVirtualDirectory @params | ||
} catch { | ||
Write-Verbose ($failedString -f "EWS") | ||
Invoke-CatchActions | ||
} | ||
} | ||
end { | ||
return [PSCustomObject]@{ | ||
GetActiveSyncVirtualDirectory = $getActiveSyncVirtualDirectory | ||
GetAutoDiscoverVirtualDirectory = $getAutoDiscoverVirtualDirectory | ||
GetEcpVirtualDirectory = $getEcpVirtualDirectory | ||
GetMapiVirtualDirectory = $getMapiVirtualDirectory | ||
GetOabVirtualDirectory = $getOabVirtualDirectory | ||
GetOutlookAnywhere = $getOutlookAnywhere | ||
GetOwaVirtualDirectory = $getOwaVirtualDirectory | ||
GetPowerShellVirtualDirectory = $getPowerShellVirtualDirectory | ||
GetWebServicesVirtualDirectory = $getWebServicesVirtualDirectory | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.