GAPTHEGURU

Geek with special skills

Powershell commands

# Create a new mailbox-enabled user
new-Mailbox -alias testmbx -name TestMailbox -database “Mailbox Database” -org Users -UserPrincipalName testmbx@example.com
Password: <userpassword>

# Create a new resource mailbox (Conference Room or Equipment)
New-Mailbox -alias testresmbx -name TestResourceMailbox -database “Mailbox Database” -org Users <-Room | -Equipment>  -UserPrincipalName testresourcembx@example.com

# Create a shared mailbox
new-Mailbox -alias testsharedmbx -name TestSharedMailbox -database “Mailbox Database” -org Users -shared -UserPrincipalName testsharedmbx@example.com

# Create a new linked mailbox
New-Mailbox -alias testlinkedmbx -name TestLinkedMailbox -database “Mailbox Database” -org Users -LinkedMasterAccount account@userdomain.com -LinkedDomainController userdomain-dc-01 -UserPrincipalName testmbx@example.com

# Mail-enable an existing user as a user mailbox
Enable-Mailbox logondisableduser -database “Mailbox Database”

# Mail-enable an existing (AD logon-disabled) user as a resource mailbox (Conference Room or Equipment)
Enable-Mailbox logondisableduser <-Room | -Equipment> -database “Mailbox Database”

# Mail-enable an existing (AD logon-disabled) user as a linked mailbox
Enable-Mailbox logondisableduser -database “Mailbox Database” -LinkedMasterAccount account@userdomain.com -LinkedDomainController userdomain-dc-01

# Move an individual mailbox
Move-Mailbox testmbx -targetdatabase “Mailbox Database”

# Move all mailboxes stored on a server to a target mailbox database
Get-Mailbox -server testserver | Move-Mailbox -targetdatabase “Mailbox Database”

# Disable one individual mailbox
Disable-Mailbox testmbx

# Disable all mailboxes stored on a server
Get-Mailbox -server testserver | Disable-Mailbox

# Remove one individual mailbox-enabled user
Remove-Mailbox testmbx

# Remove all mailbox-enabled users stored on a server
Get-Mailbox -server testserver | Remove-Mailbox

# Set storage quotas
Set-Mailbox testmbx -UseDatabaseQuotaDefaults:$False -IssueWarningQuota 90MB -ProhibitSendQuota 95MB -ProhibitSendReceiveQuota 100MB

# Set a mailbox to forward mail to another recipient and recipients limits
Set-Mailbox testmbx -DeliverToMailboxAndForward:$True -ForwardingAddress testuser@example.com -RecipientLimits 10

# Grant “Send on behalf” permission
Set-Mailbox testmbx -GrantSendOnBehalfTo testuser

# Grant “Send-As” permission
Add-ADPermission testmbx -ExtendedRights Send-As -user testuser

# Grant full mailbox access permission
Add-MailboxPermission testmbx -AccessRights FullAccess -user testuser

#For Creating Resource
New-Mailbox -Name:”Resourcecal” -Alias:Resourcecal -OrganizationalUnit:Users -Database:”Database Name” -UserPrincipalName:”Resourcecal@domain.com” -DisplayName:”Resource Mailbox” -Room

#To Enable Auto-Acceptance
Set-MailboxCalendarSettings Resourcecal -AutomateProcessing:Autoaccept

#New mailbox
New-Mailbox -Name:”Resource1″ -Alias:Resource1 -OrganizationalUnit:Users -Database:”Database Name” -UserPrincipalName:”Resource1@domain.com” -DisplayName:”Resource Mailbox” -Room

#how to set autoaccept
Set-MailboxCalendarSettings Resource1 -AutomateProcessing:Autoaccept

#how to give a user full access to a resource (sentalbord)
Add-MailboxPermission -Identity:Resource1 -AccessRights:fullaccess -User:user1

#how to specify the delegate for the resource mailbox.
Set-MailboxCalendarSettings Resource1 -ResourceDelegates:Delegate1

Advertisements

03/08/2012 - Posted by | Exchange server, Powershell | , , ,

No comments yet.

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

%d bloggers like this: