0% found this document useful (0 votes)
10 views21 pages

Exchange Server Management Scripts

The document lists various Microsoft server technologies and tools, including Exchange Server, SharePoint Server, and SQL Server, among others. It provides examples of scripting for mailbox management in Exchange 2003 and Exchange 2007, demonstrating how to retrieve mailbox statistics and manage storage groups. Additionally, it outlines parameter conventions used in scripting, such as indicating required and optional arguments.

Uploaded by

pormurasuu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views21 pages

Exchange Server Management Scripts

The document lists various Microsoft server technologies and tools, including Exchange Server, SharePoint Server, and SQL Server, among others. It provides examples of scripting for mailbox management in Exchange 2003 and Exchange 2007, demonstrating how to retrieve mailbox statistics and manage storage groups. Additionally, it outlines parameter conventions used in scripting, such as indicating required and optional arguments.

Uploaded by

pormurasuu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

70+ active internal partners

Lync Server • SharePoint Server • Service Manager • Windows Small


Business Server • Exchange Server • Windows Diagnostics • Server
Manager • SQL Server • Active Directory • Failover Clustering •
System Center Operations Manager • Windows Backup • Server
Migration • System Center Virtual Machine Manager • Best Practices
Analyzer • Active Directory Rights Management Services • Internet
Information Services • Background Intelligent Transfer Service •
System Center Data Protection Manager • Network Load Balancing •
Remote Desktop Services • Group Policy • WS-Management •
AppLocker • WMI
interactive composable
programmatic
production oriented
Exchange 2003 (VBScript) Exchange 2007
(PowerShell)
Mailbox
Set listExchange_Mailboxs =
GetObject("winmgmts:{impersonationLevel=impersonate}!\\COMPUTERNAME\ROOT\MicrosoftExchangeV2").InstancesOf("Exchan get-mailboxstatistics
Stats
ge_Mailbox")
–server $servername
For Each objExchange_Mailbox in listExchange_Mailboxs
[Link] "AssocContentCount =” + objExchange_Mailbox.AssocContentCount
[Link] " DateDiscoveredAbsentInDS =” + objExchange_Mailbox.DateDiscoveredAbsentInDS
[Link] " DeletedMessageSizeExtended =” + objExchange_Mailbox. DeletedMessageSizeExtended
[Link] " LastLoggedOnUserAccount =” + objExchange_Mailbox. LastLoggedOnUserAccount
[Link] " LastLogoffTime =” + objExchange_Mailbox. LastLogoffTime
[Link] " LastLogonTime =” + objExchange_Mailbox. LastLogonTime
[Link] " LegacyDN =” + objExchange_Mailbox. LegacyDN
[Link] " MailboxDisplayName =” + objExchange_Mailbox. MailboxDisplayName
[Link] " MailboxGUID =” + objExchange_Mailbox. MailboxGUID
[Link] " ServerName =” + objExchange_Mailbox. ServerName
[Link] " Size =” + objExchange_Mailbox. Size
[Link] " StorageGroupName =” + objExchange_Mailbox. StorageGroupName
[Link] " StorageLimitInfo =” + objExchange_Mailbox. StorageLimitInfo
[Link] " StoreName =” + objExchange_Mailbox. StoreName
[Link] " TotalItems =” + objExchange_Mailbox. TotalItems
Next

Database Dim StorGroup as New [Link]


move-storagegrouppath
Mgmt [Link] "LDAP://" + DCServer + "/ CN=First Storage Group,CN=InformationStore,CN=" +
Server + ",CN=Servers,CN=First Administrative Group, CN=Administrative Groups,CN=First Organization,
-identity “First Storage Group“
CN=Microsoft Exchange,CN=Services, CN=Configuration," + DomainName
–log "C:\newlogPath”
[Link]("C:\newlogPath", 0)

Recipient Dim objMailbox As [Link]


enable-mailbox
Mgmt Set objMailbox = GetObject("LDAP://" + DCServer + "CN=FOO,CN=users," + DomainName) -identity domain\FOO
[Link] "LDAP://" + DCServer + "/CN=Private MDB,CN=First Storage –database “First Storage
Group,CN=InformationStore,CN=" + Server + ",CN=Servers,CN=First Administrative Group,
CN=Administrative Groups,CN=First Organization, CN=Microsoft Exchange,CN=Services, CN=Configuration,"
+ DomainName
Group\Private MDB”
YOU THEM
• Parameter sets

- Indicates A Parameter [] Argument Accepts Multiple Values [Param] is Positional

<> Indicates Arguments [Param Arg] is Optional

You might also like