2019年5月7日

Exchange Management Shell筆記

Get-MailboxDatabase | fl Identity,JournalRecipient
Get-MailboxDatabase | select name, JournalRecipient
Set-MailboxDatabase "Sales Database" -JournalRecipient "Sales Database Journal Mailbox"
 
Get-MailboxDatabase | fl Name,EdbFilePath,LogFolderPath

Get-ExchangeServer | Format-List Name, Edition, AdminDisplayVersion

1. 檢查DB是否開啟循環記錄,未開啟交易紀錄不會刪除  需卸載再裝載才會生效

Get-MailboxDatabase | select name, circularloggingenabled | sort circularloggingenabled -desc | ft -AutoSize


2. 新增DB,將使用者移到新DB
Get-Mailbox -Database "YD-DB02" -ResultSize Unlimited | New-MoveRequest -TargetDatabase "YD-DB03" 
 
Get-MoveRequestStatistics -MoveRequestQueue "MBXDB02" 

Get-MoveRequest -MoveStatus Completed | Remove-MoveRequest

列出DB Size, Free Space, User Count
 
Get-MailboxDatabase -Status | select Name,@{Label="Free Space";Expression={$_.AvailableNewMailboxSpace.ToGB()}},@{Label="Size";Expression={$_.DatabaseSize.ToGB()}},@{Name="NumberofUsers";Expression={(Get-Mailbox -resultsize unlimited -Database $_.name).Count}} | ft -auto
 
Get-MailboxDatabase|FL name,*public*
 
 
 
 
get-exchangeserver

Export-Csv d:\temp\11.csv -NoTypeInformation -Encoding UTF8


檢查DB空白區

Get-MailboxDatabase -status | select Name,DatabaseSize,AvailableNewMailboxSpace













 
Get-MailboxDatabase -Server TCI-HQ-MBX01 | Set-MailboxDatabase -JournalRecipient "internalhq"
Get-MailboxDatabase -Server TCI-HQ-MBX02 | Set-MailboxDatabase -JournalRecipient "internalhq"
Get-MailboxDatabase -Server HPPI-MAIL | Set-MailboxDatabase -JournalRecipient "internalhq"
Get-MailboxDatabase -Server NTCI-MAIL01 | Set-MailboxDatabase -JournalRecipient "internal"
Get-MailboxDatabase -Server TCI-HQ-MBX03 | Set-MailboxDatabase -JournalRecipient "internalhq"
Get-MailboxDatabase -Server J-MAIL | Set-MailboxDatabase -JournalRecipient "internal"
Get-MailboxDatabase -Server G-MAIL | Set-MailboxDatabase -JournalRecipient "internal"
Get-MailboxDatabase -Server Y-MAIL | Set-MailboxDatabase -JournalRecipient "internal" 
 
 
Name                                    Server                                  JournalRecipient                       
----                                    ------                                  ----------------                       
HQ-TCI                                 TCI-HQ-MBX01                            taicement.com/Users/internalhq      
HQ-TCI-01                               TCI-HQ-MBX01                                                                 
 




get-mailboxserver |get-logonstatistics | select username,applicationid,clientversion,lastaccesstime |export-CSV D:\TEMP\LASTACCESS.CSV
 
想要在多個資料庫和伺服器輕易套用已刪除郵件的保留限制嗎? 試試下列命令來設定指定的伺服器上所有資料庫的已刪除郵件保留設定
:

 Get-MailboxDatabase -Server  | Set-MailboxDatabase -DeletedItemRetention 45.00:00:00

您也可以將相同的已刪除郵件保留限制或信箱保留限制套用於組織內的所有伺服器:

 Get-MailboxDatabase | Set-MailboxDatabase -DeletedItemRetention 45.00:00:00 -MailboxRetention 120.00:00:00 

Vmware ESXi 更新網卡韌體及驅動程式


DL380G7 Broadcom 5719

http://www.vmware.com/resources/compatibility/search.php

https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1027206

Obtaining Network card driver and firmware information

esxcli network nic list

ethtool -i vmnic0


cd /vmfs/volumes/localdisk

chmod +x CP023978.scexe

./cp023978.exe


or

esxcli software vib update --depot=/vmfs/volumes/53ec5a51-8898e460-9adf-ac162d79e0e9/nx1_tg3-3.137l.v50.1-offline_bundle-2877467.zip




Download

VMware ESXi 5.x tg3 3.137l.v50.1 NIC Driver for Broadcom NetXtreme I Gigabit Ethernet

net-tg3-3.137l.v50.1-1OEM.500.0.0.472560.x86_64.vib

HP Broadcom 線上韌體升級公用程式 (適用於 VMware 5.x) 1.4.5

CP023978.scexe

Microsoft Network Monitor抓封包指令

c:\Program Files\Microsoft Network Monitor 3>nmcap.exe /Network * /Capture "(ip
4.Address == 192.168.1.1)" /CaptureProcesses /file c:\temp\netmon.chn:100MB

2015年9月2日

Cisco switch cpu high



源起

輸入sh process cpu sorted  發現是dhcpd作怪

處理方法

新增一個acl如下

access-list 111 permit udp any any eq bootpc log-input
access-list 111 permit udp any any eq bootps log-input
access-list 111 permit ip any any


然後在有ip helper-address的介面上加上ip accesss-group 111 in

從log查到異常大量dhcp封包來源:

%SEC-6-IPACCESSLOGP: list 111 permitted udp 172.18.24.7(68) (Vlan150 0025.112b.c20c) -> 255.255.255.255(67), 1 packet
%SEC-6-IPACCESSLOGP: list 111 permitted udp 172.18.28.3(68) (Vlan190 382c.4a77.f1b2) -> 255.255.255.255(67), 1 packet
%SEC-6-IPACCESSLOGP: list 111 permitted udp 0.0.0.0(68) (Vlan230 60a4.4ce7.d541) -> 255.255.255.255(67), 38773 packets
%SEC-6-IPACCESSLOGP: list 111 permitted udp 172.18.29.7(68) (Vlan200 14dd.a94f.7122) -> 255.255.255.255(67), 1 packet

追蹤者