Welcome Guest, Login or Sign up

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

 


Download

Rating ( 2 ratings )
Downloads 31561
Latest Version 1.1
Categories Developer Tools , Utilities
Compatibility ZCS Legacy
License No License Specified
Created on 1/4/07
Updated on 10/5/15

Reviews

  • Nice 

    By: GregA on on 7/1/15 for version 1.0

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

  • Very necessary! 

    By: Mr.Aloof on on 6/16/10 for version 1.1

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



Older Versions:

Version 1.1

Download
Compatibility ZCS Legacy
Created 5/7/10 10:37 PM
Toggle description

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. To use * Set your execution policy PS> get-help set-executionPolicy * Source the master script file (adds all the functions to your shell) PS> . .\ZimbraPowerShell.ps1 * 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. * 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