Welcome Guest, Login or Sign up

Zimbra Gallery

ZimbraPowerShell

by sam

A set of MS PowerShell scripts to send SOAP requests to the Zimbra server. Can be used to create an interactive command line session to the Zimbra server for both administrative and mailbox operations. Currently a subset of all the admin/mailbox commands are implemented. Useful for developing Zimbra clients or scripting operations against the Zimbra server.

  1. Set your execution policy PS> get-help set-executionPolicy
  2. Source the master script file (adds all the functions to your shell)
    PS> . .\ZimbraPowerShell.ps1
  3. Create a user session
    PS> Create-Session http://localhost:7070 user1@example.com test123 The session is stored in $zimbraSession. The session stores the host, user
    authToken, request and response. The SOAP scripts require the session to be
    valid or you may experience unexpected behavior.
  4. Create an admin session
    PS> Create-Sesion https://localhost:7071 admin@example.com test123 -IsAdmin $true

    The session is stored in $zimbraSession. The session stores the host, user
    authToken, request and response. The SOAP scripts require the session to be
    valid or you may experience unexpected behavior.

========================================

Tips

  • View a list of all the commands
    PS> Get-ZimbraHelp
  • Get detailed help on each command by specifying -? or -help
  • View the debug output of the scripts by setting $DebugPreference
    PS> $DebugPreference="Continue"
  • To turn off debug output
    PS> $DebugPreference="SilentlyContinue"
  • Pretty print the previous SOAP request
    PS> $zimbraSession.Request | format-xml
  • Pretty print the previous SOAP response
    PS> $zimbraSession.Response | format-xml
  • Inspect the sample scripts
  • When using SSL and your server has self-signed certificates, you
    must import the certificate. To import the certificate, open the
    target url using IE and click the certificate. Follow the steps
    in the wizard.

=====================================

Add-AccountAlias
Add-Msg
Auth-Admin
Auth-User
AutoComplete-Gal
Browse-Items
Change-Password
Check-Spelling
Copy-NotebookToBriefcase
Create-Account
Create-Contact
Create-Session
Create-Tag
Delete-Identity
Empty-Folder
Get-AccountInfo
Get-AccountMembership
Get-AllAdminAccounts
Get-AllCos
Get-AllDomains
Get-AllServers
Get-Appt
Get-AvailableSkins
Get-Contact
Get-Conv
Get-Folder
Get-Identities
Get-Info
Get-Mbx
Get-Msg
Get-Note
Get-Prefs
Get-ServiceStatus
Get-SpecialFolderIds
Get-Tag
Get-Task
Grant-Folder
Modify-Contact
Move-Item
Query-WaitSet
Remove-AccountAlias
Save-Document
Search-GAL
Search-Mbx
Send-Request
Sync-DelegateMbx
Sync-GAL
Sync-Mbx
Upload-File

 

Downloads: 3,396
Latest Version: 1.1
Categories: Developer Tools, Utilities
Compatibility: ZCS 3.0, ZCS 4.0, ZCS 4.5, ZCS 5.0, ZCS 5.0.23, ZCS 6.0, ZCS 6.0.6
License: AL
Created: January 04, 2007
Updated: May 18, 2011

Reviews

Nice

4

by GregA on May 05, 2010 for version 1.0

But only 4 stars Sam just because it's MS.

by Mr.Aloof on Jun 15, 2010 for version 1.1

I have the mixed infrastructure, and this set of scripts very was useful to me.

Add a Review

Please log in to post review/comments.

Older Versions

Version 1.1

Compatibility: ZCS 3.0, ZCS 4.0, ZCS 4.5, ZCS 5.0, ZCS 5.0.23, ZCS 6.0, ZCS 6.0.6
Created: May 07, 2010
  More details…