Hello,
I have created a simple Powershell script to list the Receive Connectors on a particular server.
$Server = get-ExchangeServer -Identity "ServerName"
$RcvConnector = Get-ReceiveConnector -server "ServerName"
foreach ($Connector in $RcvConnector)
{
"================================================= ======"
"Server Name: " +$Server.Name
" "
" "
"Connector Name: " +$Connector.Name
" "
" "
"IP Ranges: " + $Connector.RemoteIpRanges
" "
" "
"PermissionGroups: " + $Connector.PermissionGroups
" "
" "
" "
"================================================= ======= "
}
I can output the script by using the out-file command from the Shell.
I have one problem though, one of the connectors has a lot of RemoteIPs. When I run the script these IP addresses are not on a single line, they are wrapped which in turn makes hard to read and if I ever needed them would take a long time to decipher!
I have tried adding | fl at the end of this line: "IP Ranges: " + $Connector.RemoteIpRanges | fl
This makes no difference. Does anyone have an idea how I can force the output to have an IP address on a single line (rather than it being wrapped?)
Cheers
Pdog



1Likes
LinkBack URL
About LinkBacks




Reply With Quote
