Skip to content

Instantly share code, notes, and snippets.

@tostka
Created March 29, 2018 22:09
Show Gist options
  • Save tostka/b9b8dc9e559471a6685f64a21f0c7a86 to your computer and use it in GitHub Desktop.
Save tostka/b9b8dc9e559471a6685f64a21f0c7a86 to your computer and use it in GitHub Desktop.
# 1-line, wrapped at pipes and semi-colons for readability
$drvs="e","f","c" ; get-exchangeserver |
where{$_.isHubTransportServer -eq $true} |
foreach{
write-host $_ ;
foreach ($drv in $drvs) { if (test-path \\$_\$drv`$\scripts\) { break } } ;
copy \\SourceServer\e$\scripts\get-HT-MsgTrk-TopTraffic-LastXMin.ps1 \\$_\$drv`$\scripts\ -whatif ;
} ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment