Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

What Is a Cmdlet?

The cmdlet (pronounced “command let”) is a basic tenant of Exchange Management Shell. It always is formatted as a verb-noun combination. (There are never any spaces between the verb and the noun.) The verb is an action and the noun is the object on which you perform the action. Unless a pipe character (|) appears in the statement, there cannot be more than one cmdlet in a single statement. Everything you do in Exchange Management Shell starts with a cmdlet. Some cmdlets have only a few parameters associated with them (such as the Mount-Database cmdlet), whereas others have many parameters that may be associated with them (such as the New-Mailbox cmdlet). The following table illustrates how two cmdlets could have many differences in terms of their available parameters.

Mount-Database parameters:

AcceptDataLoss

Confirm

DomainController

Force

Identity

WhatIf

Syntax:

Mount-Database -Identity name

Example:

PS C:\Users\Administrator>Mount-Database -Identity

AssemblyDB
The Mount-Database cmdlet has only six parameters available to it, as shown.
New-Mailbox parameters:

AccountDisabled

ActiveSyncMailboxPolicy

Alias

Arbitration

ArbitrationMailbox

Archive

ArchiveDatabase

ArchiveDomain

BypassLiveId

Confirm

Database

Discovery

DisplayName

DomainController

Equipment

EvictLiveId

ExternalDirectoryObjectId

FederatedIdentity

FirstName

Force

ImmutableId

ImportLiveId

Initials

LastName

LinkedCredential

LinkedDomainController

LinkedMasterAccount

MailboxPlan

ManagedFolderMailboxPolicy

ManagedFolderMailboxPolicyAllowed

ModeratedBy

ModerationEnabled

Name

NetID

Office

Organization

OrganizationalUnit

OverrideRecipientQuotas

PartnerObjectId

Password

Phone

PrimarySmtpAddress

QueryBaseDNRestrictionEnabled

RemoteAccountPolicy

RemoteArchive

RemotePowerShellEnabled

RemovedMailbox

ResetPasswordOnNextLogon

ResourceCapacity

RetentionPolicy

Room

RoleAssignmentPolicy

SamAccountName

SendModerationNotifications

Shared

SharingPolicy

SKUAssigned

SKUCapability

ThrottlingPolicy

UsageLocation

UseExistingLiveId

UserPrincipalName

WhatIf

WindowsLiveID

Syntax:

New-Mailbox
-Name name -Alias alias
-UserPrincipalName
upn_name
-SamAccountName user_
logon -FirstName first_
name
-LastName last_name
-Password user_password
-ResetPasswordOnNextLogon
$boolean value

Examples:
PS C:\Users\Administrator>
New-Mailbox
-Name 'Dale Syhre' -Alias
'Dale'
-UserPrincipalName
'Dale@romacsign.com'
-SamAccountName 'Dale'
-FirstName 'Dale'
-LastName 'Syhre'-Password
Pa$$w0rd
-ResetPasswordOnNextLogon
$false

On the other hand, the New-Mailbox cmdlet has 64 parameters, as shown. (There are many more configuration options necessary when you create a mailbox versus when you simply need to mount a database.)



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial