Monday, March 23, 2015

Exchange 2010 Powershell

Use to find messages sent TO any users at a domain ,  domain.com

Get-MessageTrackingLog -ResultSize Unlimited -Start "04/1/2014" -End "12/29/2014" | where{$_.recipients -like "*@domain.com"} | select-object Timestamp,SourceContext,Source,EventId,MessageSubject,Sender,{$_.Recipients} | export-csv C:\ExchangeLogResults.txt

Use to find messages RECEIVED from a domain, domain.com

Get-MessageTrackingLog -ResultSize Unlimited -Start "04/1/2014" -End "12/29/2014" | where{$_.sender -like "*@domain.com"} | select-object Timestamp,SourceContext,Source,EventId,MessageSubject,Sender,{$_.Recipients} | export-csv C:\ExchangeLogResults.txt

Wednesday, March 4, 2015

Patch / Update / Downgrade ESXi



- place host into maintenance mode

- connect to host using SSH

- allow outbound http-client connections in local firewall,
esxcli network firewall ruleset set -e true -r httpClient

- view available Image Profiles,
esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

- install a new Image Profile,
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.1.0-799733-standard

- downgrading, add --allow-downgrades
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.1.0-799733-standard --allow-downgrades

Standard profiles will include VMWare tools

- reboot the host

- when done, disable the http-client in local firewall,
esxcli network firewall ruleset set -e false -r httpClient