Exchange 2010 mails bounce back with Mailbox disabled
#554-5.2.1 mailbox disabled 554 5.2.1 STOREDRV.Deliver.Exception:AccountDisabledException.MapiExceptionMailboxDisabled; Failed to process message due to a permanent exception with message Cannot open mailbox /o=First Organization/ou=Exchange Administrative Group.
Exchange PowerShell
Clean-MailboxDatabase <databasename>
Room Mailbox - enable view of subject and body
Set-MailboxFolderPermission -Identity ITTraining9MEM:\calendar -User default -AccessRights LimitedDetails
Set-CalendarProcessing -Identity ITTraining9MEM -AddOrganizerToSubject $true -DeleteComments $false -DeleteSubject $false
source: https://blog.ctglobalservices.com/office-365/bfa/enable-users-to-show-calendar-information-of-room-mailboxes/
Snapin for Public Folder Management
Add-PSSnapin Microsoft.Exchange.Management.Powershell.e2010
get-command add-p* -module Microsoft.Exchange.Management.Powershell.e2010
Add permissions recursively to Public Folders
In PowerShell, run:
Get-PublicFolder -Identity "\Folder Name" -Recurse | Add-PublicFolderClientPermission -User jsmith -AccessRights Owner
Verify the change was successful:
Get-PublicFolder -Identity "\Folder Name" -Recurse | Get-PublicFolderClientPermission | Where-Object { $PSItem.User -like "SMITH*" }
Another ditty to CSV
Get-PublicFolder \ -Recurse | Get-PublicFolderClientPermission | Select-Object Identity,@{Expression={$_.User};Label="User";},@{Expression={$_.AccessRights};Label="AccessRights";} | Export-Csv C:\PublicFolderClientPermission.csv
Import IIS Relay IP's
Option Explicit
Dim objSMTP,objRelayIpList,objCurrentList,objIP,objFSO,objTextFile,count,newIpList(),inputOption,strText
Set objSMTP = GetObject("IIS://localhost/smtpsvc/1")
Set objRelayIpList = objSMTP.Get("RelayIpList")
'objRelayIpList is of type IIsIPSecuritySetting http://msdn.microsoft.com/en-us/library/ms525725.aspx
Wscript.Echo "============================================"
Wscript.Echo "CURRENT SETTINGS"
Wscript.Echo "================"
Wscript.Echo " "
Wscript.Echo "Computer(s) that may relay through this virtual server."
Wscript.Echo " "
' GrantByDefault returns 0 when "only the list below" is set (false) and -1 when all except the list below is set(true)
If objRelayIpList.GrantByDefault = true Then
Wscript.Echo "All except the list below :"
objCurrentList = objRelayIpList.IPDeny
Else
Wscript.Echo "Only the list below :"
objCurrentList = objRelayIpList.IPGrant
End If
count = 0
For Each objIP in objCurrentList
Wscript.Echo objIP
count = count + 1
Next
If count = 0 Then
Wscript.Echo "*NIL*"
End If
Wscript.Echo "============================================"
Wscript.Echo " "
Wscript.Echo "Replacing ReplayIpList with the IP address(es) from the ip.txt file."
Wscript.Echo " "
Do While Not((inputOption = "a") Or (inputOption = "d") Or (inputOption = "x") )
Wscript.Echo "ENTER "
Wscript.Echo "A to add to Allow List (Only the list below)"
Wscript.Echo "D to add to Deny List (All except the list below)"
Wscript.Echo "X Exit without making changes"
Wscript.Echo " "
inputOption = lcase(trim(Wscript.StdIn.ReadLine))
Loop
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists("ip.txt") Then
Set objTextFile = objFSO.OpenTextFile("ip.txt",1)
count = 0
Do Until objTextFile.AtEndOfStream
Redim Preserve newIpList(count)
newIpList(count) = objTextFile.Readline
wscript.echo ">> " & newIpList(count)
count = count + 1
Loop
'strText = objTextFile.ReadAll
'wscript.echo strText
objTextFile.Close
For each objIP in newIpList
Wscript.Echo objIP
Next
Wscript.Echo " "
Select Case inputOption
Case "a"
objRelayIpList.GrantByDefault = false
objRelayIpList.IpGrant = newIpList
Wscript.Echo "SET " & count &" address(es) to Allow List"
Case "d"
objRelayIpList.GrantByDefault = true
objRelayIpList.IpDeny = newIpList
Wscript.Echo "SET " & count &" address(es) to Deny List"
Case "x"
Wscript.Echo "Exiting without making changes"
Wscript.Echo "============================================"
Wscript.Quit
End Select
objSMTP.Put "RelayIpList",objRelayIpList
objSMTP.SetInfo
Wscript.Echo " "
Wscript.Echo "============================================"
Else
Wscript.Echo "Please create a file ip.txt that contains the list of IP address(es)"
Wscript.Echo "FORMAT : Each Line should be IP,MASK "
Wscript.Echo "EX : 127.0.0.1,255.255.255.255"
End If