Wes Carroll 59a0a53812 Help system (#4)
* Establish a help system

* Continue to update Help System

* Update Get-ZertoAlert.md

* Update Get-ZertoDatastore.md

* Add Link to Zerto API for Datastores

* Update Get-ZertoLicense.md

* Update Links to Zerto API documentation

* Update the Readme Information

* Continue to update README

* Update README

* Update README.md

* Update Help Markdown Files

* Correct API URL

* Update ZertoApiWrapper-help.xml

* Update Get-ZertoProtectedVm.md

* Update Help Markdown files

* Update Get-ZertoVpgSetting.md

* Added online url to each help object.

* Update Help Markdown Files

* Update ZertoApiWrapper-help.xml
2019-03-06 20:50:14 -05:00
2019-02-19 17:26:47 -05:00
2019-03-06 20:50:14 -05:00
2019-03-02 08:44:28 -05:00
2019-03-06 20:50:14 -05:00
2019-02-26 09:59:34 -05:00
2019-02-19 15:21:30 -05:00
2019-03-06 20:50:14 -05:00

ZertoApiWrapper

PowerShell Core wrapper for Zerto Virtual Manager API

This script is an example script and is not supported under any Zerto support program or service. The author and Zerto further disclaim all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose.

In no event shall Zerto, its authors or anyone else involved in the creation, production or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or the inability to use the sample scripts or documentation, even if the author or Zerto has been advised of the possibility of such damages. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you.

Getting Started

Place the folder and contents on your hard drive in a location known to you. From there run the following command to import the module into your session:

PS C:\>Import-Module <path>\ZertoApiWrapper\ZertoApiWrapper\ZertoApiWrapper.psm1 -force

This will import the module into your current session and make the function available to you use and test.

Connecting to a ZVM

Before any of the functions will work, you will need to connect to a Zerto Virtual Manager server. To do this you will use the Connect-ZertoServer function passing in a Server Name or IP address of the Zerto Virtual Manager. If you are using a non-standard port, you will need to provide that as well with the -zertoPort parameter. You will also need to supply credentials to authenticate against the Zerto Virtual Manager. If credentials are not provided, the user will be prompted for a username and password.

PS C:\>$credential = Get-Credential
PS C:\>Connect-ZertoServer -zertoServer "192.168.222.20" -credential $credential

After successful execution, a few Module level variables are set that are not currently exposed. These variables keep track of the Zerto Server connection information such as Server Name and Port information along with the authentication headers. A "Last Action" variable is also set to keep track of when the last call was made to the API to determine if the authentication information has expired or not. Should this command be run again with a different server, the old information will be overwritten and all commands from that point will be executed against the new server information.

Using the Module

A help system is currently under development. While each command has a help page, it may not be fully fleshed out yet. To see all possible functions you can use the following command after the module has been imported:

PS C:\>Get-Command -module ZertoApiWrapper

Once you have found the command that you want to know about you can call Get-Help <Command> to take a look at the help page, or if you want to see syntax, Get-Command <Command> -syntax.

Ending the Session

If you are using this as part of a larger script, I highly suggest explicitly ending your session with the Disconnect-ZertoSession command. This will delete the token authorization from the Zerto Virtual Manager as well as clear all Module scoped variables.

TODO:

  • Complete Help Markdown Files
  • JFLR Functionality
  • Create VPG
  • Edit VPG
  • Delete Zerto License
  • Flesh out Pester Tests
  • Complete Automated Build Process
S
Description
Languages
PowerShell 100%