Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b3e27c8ef7 | |||
| 5b9c692f5b | |||
| 31638c5f48 | |||
| a7642eee67 | |||
| 42ac97ca4c |
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project is transitioning to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [2.1.0]
|
||||
|
||||
### Added
|
||||
|
||||
* Added Support for Zerto 10.7u1 Virtual Appliance - You can now authenticate to Zerto Virtual Appliances and run the other functions of this module.
|
||||
|
||||
### Updated
|
||||
|
||||
* Updated `Invoke-ZertoRestRequest` function [help documentation](https://github.com/ZertoPublic/ZertoApiWrapper/blob/master/docs/Install-ZertoVra.md)
|
||||
|
||||
## [2.0.0]
|
||||
|
||||
### Added
|
||||
|
||||
@@ -36,7 +36,6 @@ All recent updates can now be tracked via the [Change Log](https://github.com/Ze
|
||||
|
||||
## TODO
|
||||
|
||||
* Support ZVM appliance (different connection flow)
|
||||
* JFLR Functionality
|
||||
* Create VPG (Per-VM modification and Backup Settings)
|
||||
* Edit VPG
|
||||
|
||||
@@ -9,12 +9,12 @@ function Add-ZertoPeerSite {
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$targetHost,
|
||||
[Parameter(
|
||||
HelpMessage = "Target communication port. Default is 9081"
|
||||
HelpMessage = "Target communication port. Default is 9071 for Zerto 10.0 and Later. For ZVR 9.7 and earlier, use port 9081."
|
||||
)]
|
||||
[ValidateRange(1024, 65535)]
|
||||
[int]$targetPort = 9081,
|
||||
[int]$targetPort = 9071,
|
||||
[Parameter(
|
||||
HelpMessage = "The generated token from the destination site. Note: This is only supported when both sites support pairing authentication. This was implemented to support ZVR 7.5 and later."
|
||||
HelpMessage = "The generated token from the destination site. Note: This is only supported when both sites support pairing authentication. This was implemented to support ZVR 10.0 and later."
|
||||
)]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[string]$token
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml
|
||||
#>
|
||||
<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #>
|
||||
function Connect-ZertoAnalytics {
|
||||
[cmdletbinding()]
|
||||
param(
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml
|
||||
#>
|
||||
<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #>
|
||||
function Connect-ZertoServer {
|
||||
[cmdletbinding()]
|
||||
[OutputType([hashtable])]
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml
|
||||
#>
|
||||
<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #>
|
||||
function Disconnect-ZertoServer {
|
||||
[cmdletbinding()]
|
||||
param()
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml
|
||||
#>
|
||||
<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #>
|
||||
function Get-ZertoVpg {
|
||||
[cmdletbinding( DefaultParameterSetName = "main" )]
|
||||
param(
|
||||
|
||||
@@ -53,6 +53,7 @@ function Import-ZertoVmNicSetting {
|
||||
$NicUri = "{0}/nics/{1}" -f $uri, $nic.NicIdentifier
|
||||
Invoke-ZertoRestRequest -uri $NicUri -Method "DELETE" > $null
|
||||
$nicSettings = Invoke-ZertoRestRequest -uri $NicUri -Method "GET"
|
||||
$nicSettings.failover.Hypervisor.ShouldReplaceIpConfiguration = "True"
|
||||
$nicSettings.failover.Hypervisor.NetworkIdentifier = $NetworkMap[$vm.LiveNetwork]
|
||||
$nicSettings.failover.Hypervisor.ShouldReplaceMacAddress = $vm.LiveShouldReplaceMac
|
||||
if ($vm.LiveIsDHCP -imatch "true") {
|
||||
@@ -77,6 +78,7 @@ function Import-ZertoVmNicSetting {
|
||||
$nicSettings.failover.Hypervisor.IpConfig = $IpConfig
|
||||
$nicSettings.failover.Hypervisor.DnsSuffix = $vm.LiveDnsSuffix
|
||||
}
|
||||
$nicSettings.failoverTest.Hypervisor.ShouldReplaceIpConfiguration = "True"
|
||||
$nicSettings.failoverTest.Hypervisor.NetworkIdentifier = $NetworkMap[$vm.TestNetwork]
|
||||
$nicSettings.failoverTest.Hypervisor.ShouldReplaceMacAddress = $vm.TestShouldReplaceMac
|
||||
if ($vm.TestIsDHCP -imatch "true" ) {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
<#
|
||||
.ExternalHelp ./en-us/ZertoApiWrapper-help.xml
|
||||
#>
|
||||
function Invoke-ZertoRestRequest {
|
||||
[cmdletbinding()]
|
||||
param(
|
||||
@@ -63,6 +66,7 @@ function Invoke-ZertoRestRequest {
|
||||
'username' = $credential.GetNetworkCredential().UserName
|
||||
'password' = $credential.GetNetworkCredential().Password
|
||||
'grant_type' = 'password'
|
||||
'scope' = 'openid'
|
||||
}
|
||||
|
||||
$params = @{
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
RootModule = '.\ZertoApiWrapper.psm1'
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '2.0.0'
|
||||
ModuleVersion = '2.1.0'
|
||||
|
||||
# Supported PSEditions
|
||||
# CompatiblePSEditions = @()
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
$Body = @{
|
||||
'client_id' = 'zerto-client'
|
||||
'username' = 'admin'
|
||||
'password' = 'Zertodata987!'
|
||||
'grant_type' = 'password'
|
||||
}
|
||||
$Params = @{
|
||||
'Uri' = 'https://192.168.50.60/auth/realms/zerto/protocol/openid-connect/token'
|
||||
'Method' = 'Post'
|
||||
'Body' = $Body
|
||||
'ContentType' = 'application/x-www-form-urlencoded'
|
||||
}
|
||||
$Result = Invoke-RestMethod @Params -SkipCertificateCheck
|
||||
|
||||
Write-Host $Result
|
||||
|
||||
$ExpiresIn = $Result.expires_in
|
||||
$ExpiresAt = (Get-Date).AddSeconds($ExpiresIn)
|
||||
|
||||
Write-Host $ExpiresAt
|
||||
|
||||
Write-Host $Result
|
||||
+1
-1
@@ -1 +1 @@
|
||||
2.0.0
|
||||
2.1.0
|
||||
|
||||
Reference in New Issue
Block a user