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
List of Powershell cmdlets for Exchange 2007/Exchange 2010
List of Powershell cmdlets for Exchange 2007/Exchange 2010 | ||||||
cmdlet | cmdlet name | client access | hub transport | mailbox | edge transport | unified messaging |
AcceptedDomain | Get-AcceptedDomain | X | X | |||
New-AcceptedDomain | X | X | ||||
Remove-AcceptedDomain | X | X | ||||
Set-AcceptedDomain | X | X | ||||
ActiveSyncConnectivity | Test-ActiveSyncConnectivity | X | ||||
ActiveSyncDevice | Clear-ActiveSyncDevice | X | ||||
Remove-ActiveSyncDevice | X | |||||
ActiveSyncDeviceStatistics | Get-ActiveSyncDeviceStatistics | X | ||||
ActiveSyncLog | Export-ActiveSyncLog | X | ||||
ActiveSyncMailboxPolicy | Get-ActiveSyncMailboxPolicy | X | ||||
New-ActiveSyncMailboxPolicy | X | |||||
Remove-ActiveSyncMailboxPolicy | X | |||||
Set-ActiveSyncMailboxPolicy | X | |||||
ActiveSyncVirtualDirectory | Get-ActiveSyncVirtualDirectory | X | ||||
New-ActiveSyncVirtualDirectory | X | |||||
Remove-ActiveSyncVirtualDirectory | X | |||||
Set-ActiveSyncVirtualDirectory | X | |||||
AddressList | Get-AddressList | X | ||||
Move-AddressList | X | |||||
New-AddressList | X | |||||
Remove-AddressList | X | |||||
Set-AddressList | X | |||||
Update-AddressList | X | |||||
AddressRewriteEntry | Get-AddressRewriteEntry | X | ||||
New-AddressRewriteEntry | X | |||||
Remove-AddressRewriteEntry | X | |||||
Set-AddressRewriteEntry | X | |||||
ADPermission | Add-ADPermission | X | X | X | X | X |
Get-ADPermission | X | X | X | X | X | |
Remove-ADPermission | X | X | X | X | X | |
ADSite | Get-AdSite | X | ||||
Set-AdSite | X | X | ||||
AdSiteLink | Get-AdSiteLink | X | ||||
Set-AdSiteLink | X | |||||
AgentLog | Get-AgentLog | X | X | |||
AntispamUpdates | Disable-AntispamUpdates | X | X | |||
Enable-AntispamUpdates | X | X | ||||
Get-AntispamUpdates | X | X | ||||
AttachmentFilterEntry | Add-AttachmentFilterEntry | X | ||||
Get-AttachmentFilterEntry | X | |||||
Remove-AttachmentFilterEntry | X | |||||
AttachmentFilterListConfig | Get-AttachmentFilterListConfig | X | ||||
Set-AttachmentFilterListConfig | X | |||||
AutoDiscoverConfig | Export-AutoDiscoverConfig | X | ||||
AutodiscoverVirtualDirectory | Get-AutodiscoverVirtualDirectory | X | ||||
New-AutodiscoverVirtualDirectory | X | |||||
Remove-AutodiscoverVirtualDirectory | X | |||||
Set-AutodiscoverVirtualDirectory | X | |||||
AvailabilityAddressSpace | Add-AvailabilityAddressSpace | X | ||||
Get-AvailabilityAddressSpace | X | |||||
Remove-AvailabilityAddressSpace | X | |||||
AvailabilityConfig | Get-AvailabilityConfig | X | ||||
Set-AvailabilityConfig | X | |||||
CASMailbox | Get-CASMailbox | X | ||||
Set-CASMailbox | X | |||||
ClientAccessServer | Get-ClientAccessServer | X | ||||
Set-ClientAccessServer | X | |||||
ClusteredMailboxServer | Move-ClusteredMailboxServer | X | ||||
Start-ClusteredMailboxServer | X | |||||
Stop-ClusteredMailboxServer | X | |||||
ClusteredMailboxServerStatus | Get-ClusteredMailboxServerStatus | X | ||||
Contact | Get-Contact | X | ||||
Set-Contact | X | |||||
ContentFilterConfig | Get-ContentFilterConfig | X | X | |||
Set-ContentFilterConfig | X | X | ||||
ContentFilterPhrase | Add-ContentFilterPhrase | X | X | |||
Get-ContentFilterPhrase | X | X | ||||
Remove-ContentFilterPhrase | X | X | ||||
ContinuousReplicationHostName | Disable-ContinuousReplicationHostName | X | ||||
Bitmap | Enable-ContinuousReplicationHostName | X | ||||
Database | Dismount-Database | X | ||||
Mount-Database | X | |||||
DatabaseCopy | Enable-DatabaseCopy | X | ||||
DatabasePath | Move-DatabasePath | X | ||||
DetailsTemplate | Get-DetailsTemplate | X | ||||
Restore-DetailsTemplate | X | |||||
Set-DetailsTemplate | X | |||||
DistributionGroup | Disable-DistributionGroup | X | ||||
Enable-DistributionGroup | X | |||||
Get-DistributionGroup | X | |||||
New-DistributionGroup | X | |||||
Remove-DistributionGroup | X | |||||
Set-DistributionGroup | X | |||||
DistributionGroupMember | Add-DistributionGroupMember | X | ||||
Get-DistributionGroupMember | X | |||||
Remove-DistributionGroupMember | X | |||||
DynamicDistributionGroup | Get-DynamicDistributionGroup | X | ||||
New-DynamicDistributionGroup | X | |||||
Remove-DynamicDistributionGroup | X | |||||
Set-DynamicDistributionGroup | X | |||||
EdgeSubscription | Get-EdgeSubscription | X | X | |||
New-EdgeSubscription | X | X | ||||
Remove-EdgeSubscription | X | X | ||||
EdgeSynchronization | Start-EdgeSynchronization | X | X | |||
Test-EdgeSynchronization | X | X | ||||
EmailAddressPolicy | Get-EmailAddressPolicy | X | ||||
New-EmailAddressPolicy | X | |||||
Remove-EmailAddressPolicy | X | |||||
Set-EmailAddressPolicy | X | |||||
Update-EmailAddressPolicy | X | |||||
EventLogLevel | Get-EventLogLevel | X | X | X | X | X |
Set-EventLogLevel | X | X | X | X | X | |
ExchangeAdministrator | Add-ExchangeAdministrator | X | ||||
Get-ExchangeAdministrator | X | |||||
Remove-ExchangeAdministrator | X | |||||
ExchangeCertificate | Enable-ExchangeCertificate | X | X | |||
Export-ExchangeCertificate | X | X | ||||
Get-ExchangeCertificate | X | X | ||||
Import-ExchangeCertificate | X | X | ||||
New-ExchangeCertificate | X | |||||
Remove-ExchangeCertificate | X | X | ||||
ExchangeSearch | Test-ExchangeSearch | X | ||||
ExchangeServer | Get-ExchangeServer | X | X | X | X | X |
Set-ExchangeServer | X | X | X | X | X | |
FileDistributionService | Update-FileDistributionService | X | X | |||
ForeignConnector | Get-ForeignConnector | X | X | |||
New-ForeignConnector | X | X | ||||
Remove-ForeignConnector | X | X | ||||
Set-ForeignConnector | X | X | ||||
GlobalAddressList | Get-GlobalAddressList | X | ||||
New-GlobalAddressList | X | |||||
Remove-GlobalAddressList | X | |||||
Set-GlobalAddressList | X | |||||
Update-GlobalAddressList | X | |||||
Group | Get-Group | X | ||||
Set-Group | X | |||||
ImapConnectivity | Test-ImapConnectivity | X | ||||
ImapSettings | Get-IMAPSettings | X | ||||
Set-IMAPSettings | X | |||||
IPAllowListConfig | Get-IPAllowListConfig | X | X | |||
Set-IPAllowListConfig | X | X | ||||
IPAllowListEntry | Add-IPAllowListEntry | X | X | |||
Get-IPAllowListEntry | X | X | ||||
Remove-IPAllowListEntry | X | X | ||||
IPAllowListProvider | Add-IPAllowListProvider | X | X | |||
Get-IPAllowListProvider | X | X | ||||
Remove-IPAllowListProvider | X | X | ||||
Set-IPAllowListProvider | X | X | ||||
Test-IPAllowListProvider | X | X | ||||
IPAllowListProvidersConfig | Get-IPAllowListProvidersConfig | X | X | |||
Set-IPAllowListProvidersConfig | X | X | ||||
IPBlockListConfig | Get-IPBlockListConfig | X | X | |||
Set-IPBlockListConfig | X | X | ||||
IPBlockListEntry | Add-IPBlockListEntry | X | X | |||
Get-IPBlockListEntry | X | X | ||||
Remove-IPBlockListEntry | X | X | ||||
IPBlockListProvider | Add-IPBlockListProvider | X | X | |||
Get-IPBlockListProvider | X | X | ||||
Remove-IPBlockListProvider | X | X | ||||
Set-IPBlockListProvider | X | X | ||||
Test-IPBlockListProvider | X | X | ||||
IPBlockListProvidersConfig | Get-IPBlockListProvidersConfig | X | X | |||
Set-IPBlockListProvidersConfig | X | X | ||||
Bitmap JournalRule | Disable-JournalRule | X | ||||
Enable-JournalRule | X | |||||
Get-JournalRule | X | |||||
New-JournalRule | X | |||||
Remove-JournalRule | X | |||||
Set-JournalRule | X | |||||
LogonStatistics | Get-LogonStatistics | X | ||||
Mailbox | Connect-Mailbox | X | ||||
Disable-Mailbox | X | |||||
Enable-Mailbox | X | |||||
Export-Mailbox | X | |||||
Get-Mailbox | X | |||||
Import-Mailbox | X | |||||
Move-Mailbox | X | |||||
New-Mailbox | X | |||||
Remove-Mailbox | X | |||||
Restore-Mailbox | X | |||||
Set-Mailbox | X | |||||
MailboxCalendarSettings | Get-MailboxCalendarSettings | X | ||||
Set-MailboxCalendarSettings | X | |||||
MailboxDatabase | Clean-MailboxDatabase | X | ||||
Get-MailboxDatabase | X | |||||
New-MailboxDatabase | X | |||||
Remove-MailboxDatabase | X | |||||
Set-MailboxDatabase | X | |||||
MailboxFolderStatistics | Get-MailboxFolderStatistics | X | ||||
MailboxPermission | Add-MailboxPermission | X | ||||
Get-MailboxPermission | X | |||||
Remove-MailboxPermission | X | |||||
MailboxServer | Get-MailboxServer | X | ||||
Set-MailboxServer | X | |||||
MailboxStatistics | Get-MailboxStatistics | X | ||||
MailContact | Disable-MailContact | X | ||||
Enable-MailContact | X | |||||
Get-MailContact | X | |||||
New-MailContact | X | |||||
Remove-MailContact | X | |||||
Set-MailContact | X | |||||
MailFlow | Test-Mailflow | X | ||||
MailPublicFolder | Disable-MailPublicFolder | X | ||||
Enable-MailPublicFolder | X | |||||
Get-MailPublicFolder | X | |||||
Set-MailPublicFolder | X | |||||
MailUser | Disable-MailUser | X | ||||
Enable-MailUser | X | |||||
Get-MailUser | X | |||||
New-MailUser | X | |||||
Remove-MailUser | X | |||||
Set-MailUser | X | |||||
ManagedContentSettings | Get-ManagedContentSettings | X | ||||
New-ManagedContentSettings | X | |||||
Remove-ManagedContentSettings | X | |||||
Set-ManagedContentSettings | X | |||||
ManagedFolder | Get-ManagedFolder | X | ||||
New-ManagedFolder | X | |||||
Remove-ManagedFolder | X | |||||
Set-ManagedFolder | X | |||||
ManagedFolderAssistant | Start-ManagedFolderAssistant | X | ||||
Stop-ManagedFolderAssistant | X | |||||
ManagedFolderMailboxPolicy | Get-ManagedFolderMailboxPolicy | X | ||||
New-ManagedFolderMailboxPolicy | X | |||||
Remove-ManagedFolderMailboxPolicy | X | |||||
Set-ManagedFolderMailboxPolicy | X | |||||
MAPIConnectivity | Test-MapiConnectivity | X | ||||
Message | Export-Message | X | X | |||
Get-Message | X | X | ||||
Remove-Message | X | X | ||||
Resume-Message | X | X | ||||
Suspend-Message | X | X | ||||
MessageClassification | Get-MessageClassification | X |
-
Archives
- June 2013 (2)
- December 2012 (4)
- November 2012 (1)
- August 2012 (8)
- July 2012 (1)
- June 2012 (3)
- May 2012 (14)
- April 2012 (8)
- March 2012 (7)
- February 2012 (4)
- January 2012 (9)
- December 2011 (6)
-
Categories
-
RSS
Entries RSS
Comments RSS