# Пляски @() вокруг Get-Content не нужны, foreach и так всё переберёт как массив, если вы не на PSv2
$serials = Get-Content ...
foreach ($serial in $serials) {
Invoke-WebRequest "https://...api..$serial..."
}
$result.Tables.Item($i) | Select-Object -Property * -ExcludeProperty RowError,RowState,Table,ItemArray,HasErrors | Export-Excel
$DataSet.Tables[0] | Export-Csv ....
-Features
Centralized: Enables transport servers to handle all message transport between the on-premises Exchange and Exchange Online organizations, including external message delivery to the Internet for both organizations. If this value is $false, the on-premises transport servers and Exchange Online organization are each responsible for their own Internet message delivery.
Get-ExCommand >c:\temp\log