MsExchange Blog Spot Telnet25

November 11, 2013

One Liner Useful Random Collection of snippets # 1

Filed under: General — telnet25 @ 2:31 pm

 

Below are collection of one Liner snippets you can copy and paste them into EMS and use it for your needs. Please make sure you understand the power of using Pipe ( | ) and Set commands  in PS.

### List Mailbox Databases

Get-mailboxdatabase  *22*

 

image

###Locate DB which has the string  the *22*  ( locate a specific DB )

Get-mailboxdatabase  *22*

###Enabling CL on the Specific DB

Get-MailboxDatabase db01elt | Set-MailboxDatabase -CircularloggingEnabled:$true

###Disabling CL on the Specific DB

Get-MailboxDatabase db01elt | Set-MailboxDatabase -CircularloggingEnabled:$False

### After CL is Enable in order CL to work you need to Dismount and Mount the database

This snippet will dismount DB01elt and it will NOT ask confirmation

###Enabling CL on the ALL Databases

Get-MailboxDatabase | Set-MailboxDatabase -CircularloggingEnabled:$true

###Disabling CL on the ALL Databases

Get-MailboxDatabase | Set-MailboxDatabase -CircularloggingEnabled:$false

### Dismount all Databases

Get-MailboxDatabase | Dismount-Database -Confirm:$false

### Mount all Databases

 

Get-MailboxDatabase | Mount-Database -Confirm:$false

### Dismount Specific Database

Get-MailboxDatabase db01elt | Dismount-Database -Confirm:$False

### Mount Specific Database

Get-MailboxDatabase db01elt | Mount-Database -Confirm:$False

### CL Enabled

Get Databases CL is enabled

Get-MailboxDatabase | where {$_.CircularLoggingEnabled -eq $true}

image

### CL is NOT Enabled

Get Databases CL is NOT enabled

Get-MailboxDatabase | where {$_.CircularLoggingEnabled -eq $False}

 

image

More to come……….

Oz Casey, Dedeal

( Exchange Server North America MVP)

MCITP (EMA), MCITP (SA)
MCSE 2003, M+, S+, MCDST
Security+, Project +, Server +
http://smtp25.blogspot.com/ (Blog)
https://telnet25.wordpress.com/ (Blog)

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: