Skip to content

Commit

Permalink
Wrap in a function
Browse files Browse the repository at this point in the history
  • Loading branch information
SamErde committed Jun 20, 2024
1 parent 4029258 commit 5d5a19a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Exchange Server/Get-ExchangeVirtualDirectories.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function Get-ExchangeVirtualDirectories {
<#
.SYNOPSIS
Get all Exchange Server virtual directories on the current server.
.DESCRIPTION
A fun way to find every cmdlet that gets Exchange virtual directories and then pipe that list
to run it on the current server.
#>
foreach ( $command in ( (Get-Command "Get*VirtualDirectory" -CommandType Function).Name ) ) {
& $command -server $env:COMPUTERNAME | Format-List Name,InternalUrl,ExternalUrl
}
}

0 comments on commit 5d5a19a

Please sign in to comment.