Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,16 @@ begin {
. $PSScriptRoot\ConfigurationAction\Invoke-TextExtractionOverride.ps1
. $PSScriptRoot\..\Shared\Get-ProcessedServerList.ps1
. $PSScriptRoot\..\..\..\Shared\Confirm-ExchangeManagementShell.ps1
. $PSScriptRoot\..\..\..\Shared\Confirm-Administrator.ps1
. $PSScriptRoot\..\..\..\Shared\GenericScriptStartLogging.ps1
. $PSScriptRoot\..\..\..\Shared\Show-Disclaimer.ps1
. $PSScriptRoot\..\..\..\Shared\ScriptUpdateFunctions\GenericScriptUpdate.ps1

if (-not(Confirm-Administrator)) {
Write-Host "The script needs to be executed in elevated mode. Start the PowerShell as an administrator." -ForegroundColor Yellow
exit
}

$includeExchangeServerNames = New-Object System.Collections.Generic.List[string]
} process {
foreach ($server in $ExchangeServerNames) {
Expand Down
7 changes: 0 additions & 7 deletions Shared/GenericScriptStartLogging.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
. $PSScriptRoot\OutputOverrides\Write-Progress.ps1
. $PSScriptRoot\OutputOverrides\Write-Verbose.ps1
. $PSScriptRoot\OutputOverrides\Write-Warning.ps1
. $PSScriptRoot\Confirm-Administrator.ps1
. $PSScriptRoot\LoggerFunctions.ps1
. $PSScriptRoot\Show-Disclaimer.ps1

function Write-DebugLog ($Message) {
$Script:DebugLogger = $Script:DebugLogger | Write-LoggerInstance $Message
Expand Down Expand Up @@ -41,8 +39,3 @@ if ($Script:DualLoggingEnabled) {
} else {
SetWriteHostAction ${Write-DebugLog}
}

if (-not(Confirm-Administrator)) {
Write-Host "The script needs to be executed in elevated mode. Start the PowerShell as an administrator." -ForegroundColor Yellow
exit
}