Enable circular logging on a Particular databaseGet-mailboxdatabase -Identity DBname | set-mailboxdatabase -CircularloggingEnabled $trueDisable circular logging on a Particular databaseGet-mailboxdatabase -Identity DBname | set-mailboxdatabase -CircularloggingEnabled $falseEnable Circular logging on all the Database in a perticular DAGGet-mailboxdatabase -identity DAGname* | set-mailboxdatabase -CircularloggingEnabled $trueDisable Circular logging on all the database in a perticular DAGGet-mailboxdatabase -identity DAGname* | set-mailboxdatabase -CircularloggingEnabled $false
Feeling nice to blog after a long time on a auspecious day
Below power shell enabled and disabled Active for all the users in the exchange Organization
get-Mailbox -resultsize unlimited | set-CASMailbox -ActiveSyncEnabled:$False
get-Mailbox -resultsize unlimited | set-CASMailbox -ActiveSyncEnabled:$True
Below powershell command to enable and disable active sync for given set of users in the text file
Get-content C:\users.txt | set-CASMailbox -ActiveSyncEnabled:$True
Get-content C:\users.txt| set-CASMailbox -ActiveSyncEnabled:$True
Below powershell command to get the list of users who ActiveSync is Enabled and Disabled
Get-CASMailbox -ActiveSyncEnabled:$True
Get-CASMailbox -ActiveSyncEnabled:$False
]]>http://www.quest.com/powershell/activeroles-server.aspx
Commands to check if mailbox is active or disabled
Get-QADUser <username> -enabled
Will get the result if acount in active
Get-QADUser <username> -disabled
Will get result if account is disabled
Get-QADUser -Enabled
Will get all the enabled in the Active Directory
Get-QADUser -Disabled
Will get all the disabled users in the Active Directory
get-content “C:\users.txt” | Get-QADUser -enabled | select Email
Will get list of all active users email address from the given input users
]]>
$UserName = “UserName”
$searcher = new-object DirectoryServices.DirectorySearcher([ADSI]””)
$searcher.filter = “(&(objectClass=user)(sAMAccountName= $UserName))”
$founduser = $searcher.findOne()
$founduser.Properties.useraccountcontrol
$value = $founduser.Properties.useraccountcontrol
if ($Value -eq 514)
{
Write-Output “Account is disabled”
}
if ($Value -eq 512)
{
Write-Output “Account is Enabled”
}