diff --git a/.gitignore b/.gitignore index 03a576d..e4bc748 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ *.zip +temp/* +Tests/Public/TestResults.xml diff --git a/LICENSE b/LICENSE index f288702..44122ce 100644 --- a/LICENSE +++ b/LICENSE @@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - - Copyright (C) + ZertoApiWrapper + Copyright (C) 2019 Wes Carroll This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - Copyright (C) + ZertoApiWrapper Copyright (C) 2019 Wes Carroll This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/README.md b/README.md index 6508ec2..e2f76cc 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ PowerShell Core wrapper for Zerto Virtual Manager API +## Current Build Status + +[![Build Status](https://dev.azure.com/wescarroll/ZertoApiWrapper/_apis/build/status/wcarroll.ZertoApiWrapper?branchName=master)](https://dev.azure.com/wescarroll/ZertoApiWrapper/_build/latest?definitionId=1&branchName=master) + ## Legal Disclaimer 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. diff --git a/Tests/Public/ZertoApiWrapper.Tests.ps1 b/Tests/Public/ZertoApiWrapper.Tests.ps1 index 94d1e0e..4657824 100644 --- a/Tests/Public/ZertoApiWrapper.Tests.ps1 +++ b/Tests/Public/ZertoApiWrapper.Tests.ps1 @@ -2,15 +2,9 @@ $moduleName = "ZertoApiWrapper" $moduleFileName = "ZertoApiWrapper.psm1" $filePath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests', 'ZertoApiWrapper' $docsPath = (Split-Path -Parent $MyInvocation.MyCommand.Path) -replace 'Tests[\\\/]Public', 'docs' -$fileName = (Split-Path -Leaf $MyInvocation.MyCommand.Path ) -replace '.Tests.', '.' $modulePath = $filePath -replace "Public", "" -$userName = "zerto\build" -$password = ConvertTo-SecureString -String "ZertoBuild" -AsPlainText -Force -$credential = New-Object -TypeName System.Management.Automation.PSCredential($userName, $password) -# $credential = Import-Clixml -Path C:\ZertoScripts\Creds.xml -$zertoServer = "192.168.1.100" -$zertoPort = "7669" +Import-Module $modulePath\$moduleFileName Import-Module $modulePath\$moduleFileName @@ -42,7 +36,14 @@ Describe "File Tests" { it "$command has the External Help File Defined" { Get-Content -Path $path -First 1 | should be "<# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #>" } + it "$command external Help file is filled out" { + $stubExist = Get-Content -Path $externalHelpFile | Where-Object {$_.Trim() -like '*{{*}}*'} + if ($stubExist) { + Write-Warning "Found a stub in the Markdown File $externalHelpFile" + Write-Warning "$stubExist" + } + $stubExist | should benullorempty + } } } } - diff --git a/ZertoApiWrapper.Depend.psd1 b/ZertoApiWrapper.Depend.psd1 new file mode 100644 index 0000000..9b60641 --- /dev/null +++ b/ZertoApiWrapper.Depend.psd1 @@ -0,0 +1,50 @@ +@{ + psake = @{ + Name = 'InvokeBuild' + DependencyType = 'PSGalleryModule' + Parameters = @{ + Repository = 'PSGallery' + SkipPublisherCheck = $true + } + Target = 'CurrentUser' + Version = '5.4.3' + Tags = 'Bootstrap' + } + + Pester = @{ + Name = 'Pester' + DependencyType = 'PSGalleryModule' + Parameters = @{ + Repository = 'PSGallery' + SkipPublisherCheck = $true + } + Target = 'CurrentUser' + Version = '4.6.0' + Tags = 'Bootstrap' + } + + PSScriptAnalyzer = @{ + Name = 'PSScriptAnalyzer' + DependencyType = 'PSGalleryModule' + Parameters = @{ + Repository = 'PSGallery' + SkipPublisherCheck = $true + } + Target = 'CurrentUser' + Version = '1.17.1' + Tags = 'Bootstrap' + } + + Platyps = @{ + Name = 'Platyps' + DependencyType = 'PSGalleryModule' + Parameters = @{ + Repository = 'PSGallery' + SkipPublisherCheck = $true + } + Target = 'CurrentUser' + Version = '0.12.0' + Tags = 'Bootstrap' + } + +} diff --git a/ZertoApiWrapper.build.ps1 b/ZertoApiWrapper.build.ps1 index d37dca3..b21dd4f 100644 --- a/ZertoApiWrapper.build.ps1 +++ b/ZertoApiWrapper.build.ps1 @@ -6,10 +6,13 @@ <# [CmdletBinding()] param([switch]$Install, [string]$Configuration = (property Configuration Release)) - $targetDir = "temp/$Configuration/ZertoApiWrapper" #> -task . Analyze +$versionMajor = '0' +$versionMinor = '1' +$versionBuild = "{0}" -f $(get-date -format 'yyyyMMdd') + +task . AnalyzeSourceFiles, CreateModule <# Synopsis: Ensure platyPS is installed #> task CheckPlatyPSInstalled { @@ -33,13 +36,28 @@ task CheckPSScriptAnalyzerInstalled { } <# Synopsis: Analyze ZertoApiWrapper functions for Code Violations #> -task Analyze CheckPSScriptAnalyzerInstalled, CheckPesterInstalled, CheckPlatyPSInstalled, { +task AnalyzeSourceFiles CheckPSScriptAnalyzerInstalled, { $scriptAnalyzerParams = @{ Path = "$BuildRoot\ZertoApiWrapper\" Severity = @('Error', 'Warning') Recurse = $true Verbose = $false - ExcludeRule = @('PSUseDeclaredVarsMoreThanAssignments', 'PSUseShouldProcessForStateChangingFunctions') + ExcludeRule = @('PSUseDeclaredVarsMoreThanAssignments', 'PSUseShouldProcessForStateChangingFunctions', 'PSUseToExportFieldsInManifest') + } + $saresults = Invoke-ScriptAnalyzer @scriptAnalyzerParams + if ($saResults) { + $saResults | Format-Table + throw "One or more PSScriptAnalyzer errors/warnings were found" + } +} + +task AnalyzeBuiltFiles CheckPSScriptAnalyzerInstalled, { + $scriptAnalyzerParams = @{ + Path = "$BuildRoot\temp\" + Severity = @('Error', 'Warning') + Recurse = $true + Verbose = $false + ExcludeRule = @('PSUseDeclaredVarsMoreThanAssignments', 'PSUseShouldProcessForStateChangingFunctions', 'PSUseToExportFieldsInManifest') } $saresults = Invoke-ScriptAnalyzer @scriptAnalyzerParams @@ -49,42 +67,86 @@ task Analyze CheckPSScriptAnalyzerInstalled, CheckPesterInstalled, CheckPlatyPSI } } -$buildMamlParams = @{ - Inputs = { Get-ChildItem docs/*.md } - Outputs = "$targetDir/en-us/ZertoApiWrapper-help.xml" +task FileTests CheckPesterInstalled, { + $testResultsFile = "$BuildRoot\Tests\Public\TestResults.xml" + $script:results = Invoke-Pester -Script "$BuildRoot\Tests\Public\ZertoApiWrapper.Tests.ps1" -OutputFile $testResultsFile -PassThru + $FailureMessage = '{0} Unit test(s) failed. Aborting build' -f $results.FailedCount + assert ($results.FailedCount -eq 0) $FailureMessage } -task BuildMamlHelp @buildMamlParams { +$buildMamlParams = @{ + Inputs = { Get-ChildItem docs\*.md } + Outputs = "$BuildRoot\temp\en-us\ZertoApiWrapper-help.xml" +} + +task BuildMamlHelp CheckPlatyPSInstalled, { + if (Test-Path $buildMamlParams.Outputs) { + Remove-Item $buildMamlParams.Outputs + } platyPS\New-ExternalHelp .\docs -Force -OutputPath $buildMamlParams.Outputs } -task FileTests CheckPesterInstalled, { - Invoke-Pester "$BuildRoot\Tests\Public\ZertoApiWrapper.Tests.ps1" -Show Fails +task UpdateMarkdownHelp CheckPlatyPSInstalled, { + remove-module ZertoApiWrapper -force -ErrorAction SilentlyContinue + Import-Module .\ZertoApiWrapper\ZertoApiWrapper.psm1 -Force + Update-MarkDownHelp -Path docs -AlphabeticParamsOrder } -task UpdateModuleFunctions { - $functionsToExportPath = "$BuildRoot\ZertoApiWrapper\Public\" - Update-ModuleManifest -Path "$BuildRoot\ZertoApiWrapper\ZertoApiWrapper.psd1" -FunctionsToExport $(Get-ChildItem -Path $functionsToExportPath -File).name.Replace('.ps1', '') +task CreatePsd1ForRelease CleanTemp, { + $functionsToExport = Get-ChildItem -Path 'ZertoApiWrapper\Public\*.ps1' | ForEach-Object { $_.BaseName } + $ManifestParams = @{ + Path = "$BuildRoot\temp\ZertoApiWrapper.psd1" + RootModule = 'ZertoApiWrapper.psm1' + ModuleVersion = '{0}.{1}.{2}' -f $versionMajor, $versionMinor, $versionBuild + GUID = '4c0b9e17-141b-4dd5-8549-fb21cccaa325' + Author = 'Wes Carroll' + CompanyName = 'Zerto' + Copyright = '(c) {0} Wes Carroll. All rights reserved.' -f $(Get-Date -format 'yyyy') + Description = 'PowerShell Core Wrapper Module for Zerto Virtual Manager API' + PowerShellVersion = '6.0.0' + ProjectUri = 'https://github.com/wcarroll/ZertoApiWrapper' + LicenseUri = 'https://github.com/wcarroll/ZertoApiWrapper/blob/master/LICENSE' + Tags = @("Zerto", "Automation") + FunctionsToExport = $functionsToExport + CmdletsToExport = @() + VariablesToExport = @() + AliasesToExport = @() + } + New-ModuleManifest @ManifestParams } -task UpdateVersion { - try { - $moduleManifestFile = "$BuildRoot\ZertoApiWrapper\ZertoApiWrapper.psd1" - $manifestContent = Get-Content $moduleManifestFile -Raw - [version]$version = [regex]::matches($manifestContent, "ModuleVersion\s=\s\'(?(\d+\.)?(\d+\.)?(\*|\d+))") | ForEach-Object {$_.groups['version'].value} - $newVersion = "{0}.{1}.{2}" -f $version.Major, $version.Minor, ($version.Build + 1) +task CleanTemp { + if (-not $(Test-Path "$BuildRoot\temp")) { + New-Item -Path $BuildRoot -Name "temp" -ItemType "Directory" + } + Remove-Item -Recurse -Path "$BuildRoot\temp\*" +} - $replacements = @{ - "ModuleVersion = '.*'" = "ModuleVersion = '$newVersion'" - } - - $replacements.GetEnumerator() | ForEach-Object { - $manifestContent = $manifestContent -replace $_.Key, $_.Value - } - - $manifestContent | Set-Content -Path "$moduleManifestFile" - } catch { - Write-Error -Message $_.Exception.Message - $host.SetShouldExit($LastExitCode) +task CreatePsm1ForRelease CreatePsd1ForRelease, { + $emptyLine = "" + $psm1Path = "$BuildRoot\temp\ZertoApiWrapper.psm1" + $lines = '#------------------------------------------------------------#' + $Public = @( Get-ChildItem -Path $PSScriptRoot\ZertoApiWrapper\Public\*.ps1 -ErrorAction SilentlyContinue ) + $Private = @( Get-ChildItem -Path $PSScriptRoot\ZertoApiWrapper\Private\*.ps1 -ErrorAction SilentlyContinue ) + Add-Content -Path $psm1Path -Value $lines + Add-Content -Path $psm1Path -Value "#---------------------Private Functions----------------------#" + Add-Content -Path $psm1Path -Value $lines + Add-Content -Path $psm1Path -Value $emptyLine + foreach ($file in $private) { + Add-Content -Path $psm1Path -Value $(Get-Content -Path $file.Fullname -Raw) + Add-Content -Path $psm1Path -Value $emptyLine + } + Add-Content -Path $psm1Path -Value $lines + Add-Content -Path $psm1Path -Value "#----------------------Public Functions----------------------#" + Add-Content -Path $psm1Path -Value $lines + Add-Content -Path $psm1Path -Value $emptyLine + foreach ($file in $public) { + Add-Content -Path $psm1Path -Value $(Get-Content -Path $file.Fullname -Raw) + Add-Content -Path $psm1Path -Value $emptyLine } } + +task CreateModule CleanTemp, FileTests, CreatePsd1ForRelease, CreatePsm1ForRelease, AnalyzeBuiltFiles, BuildMamlHelp, { + +} + diff --git a/ZertoApiWrapper/Public/Import-ZertoVpg.ps1 b/ZertoApiWrapper/Public/Import-ZertoVpg.ps1 index 4c269d0..bbc45ef 100644 --- a/ZertoApiWrapper/Public/Import-ZertoVpg.ps1 +++ b/ZertoApiWrapper/Public/Import-ZertoVpg.ps1 @@ -24,7 +24,7 @@ function Import-ZertoVpg { $importedSettings.VpgSettingsIdentifier = $vpgSettingsIdentifier $uri = "{0}/{1}" -f $baseUri, $vpgSettingsIdentifier Invoke-ZertoRestRequest -uri $uri -method "PUT" -body $($importedSettings | convertto-json -Depth 10) - $vpgSettingsIdentifier | Save-ZertoVpgSettings + $vpgSettingsIdentifier | Save-ZertoVpgSetting if ($settingsFile.Count -gt 1) { Start-Sleep 5 } diff --git a/ZertoApiWrapper/Public/Save-ZertoVpgSettings.ps1 b/ZertoApiWrapper/Public/Save-ZertoVpgSetting.ps1 similarity index 95% rename from ZertoApiWrapper/Public/Save-ZertoVpgSettings.ps1 rename to ZertoApiWrapper/Public/Save-ZertoVpgSetting.ps1 index 24f5084..8e06784 100644 --- a/ZertoApiWrapper/Public/Save-ZertoVpgSettings.ps1 +++ b/ZertoApiWrapper/Public/Save-ZertoVpgSetting.ps1 @@ -1,5 +1,5 @@ <# .ExternalHelp ./en-us/ZertoApiWrapper-help.xml #> -function Save-ZertoVpgSettings { +function Save-ZertoVpgSetting { [cmdletbinding( SupportsShouldProcess = $true )] diff --git a/ZertoApiWrapper/Public/en-us/ZertoApiWrapper-help.xml b/ZertoApiWrapper/Public/en-us/ZertoApiWrapper-help.xml index 0ee3eb7..98cacd1 100644 --- a/ZertoApiWrapper/Public/en-us/ZertoApiWrapper-help.xml +++ b/ZertoApiWrapper/Public/en-us/ZertoApiWrapper-help.xml @@ -3859,11 +3859,11 @@ Get ZertoVirtualizationSite - {{Fill in the Synopsis}} + Returns information about the hypervisor site where the API is run and all the sites paired with this site. The information returned can be tailored to specific information about the resources managed at a specified site. - {{Fill in the Description}} + Returns information about the hypervisor site where the API is run and all the sites paired with this site. The information returned can be tailored to specific information about the resources managed at a specified site. @@ -4302,9 +4302,30 @@ -------------------------- Example 1 -------------------------- - PS C:\> {{ Add example code here }} + PS C:\> Get-ZertoVirtualizationSite -siteIdentifier "MySiteIdentifier" - {{ Add example description here }} + Returns information about the site with identifier "MySiteIdentifier" + + + + -------------------------- Example 2 -------------------------- + PS C:\> Get-ZertoVirtualizationSite -siteIdentifier "MySiteIdentifier" -datastoreClusters + + Returns information about datastore clusters at site with site identifier "MySiteidentifier" + + + + -------------------------- Example 3 -------------------------- + PS C:\> Get-ZertoVirtualizationSite -siteIdentifier "MySiteIdentifier" -datastores + + Returns information about datastores at site with site identifier "MySiteidentifier" + + + + -------------------------- Example 4 -------------------------- + PS C:\> Get-ZertoVirtualizationSite -siteIdentifier "MySiteIdentifier" -devices + + Returns information about devices at site with site identifier "MySiteidentifier" @@ -5977,35 +5998,35 @@ -------------------------- Example 1 -------------------------- - PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" + PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" Returns all current settings for vpgSettingsIdentifier "MySettingsIdentifier" -------------------------- Example 2 -------------------------- - PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" -vmIdentifier "MyVmId" + PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" -vmIdentifier "MyVmId" Returns all current vm level settings for the vmIdentifier "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier" -------------------------- Example 3 -------------------------- - PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" -vmIdentifier "MyVmId" -volumes + PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" -vmIdentifier "MyVmId" -volumes Returns current vm level settings for volumes for vmId "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier" -------------------------- Example 4 -------------------------- - PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" -nics + PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" -nics Returns current vm level settings for nics for vmId "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier" -------------------------- Example 5 -------------------------- - PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" -basic + PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" -basic Returns current basic settings for vpgSettingsIdentifier "MySettingsIdentifier" @@ -10656,9 +10677,9 @@ - Save-ZertoVpgSettings + Save-ZertoVpgSetting Save - ZertoVpgSettings + ZertoVpgSetting Commits the updated Vpg Settings with the configured Vpg Settings Identifier @@ -10668,8 +10689,8 @@ - Save-ZertoVpgSettings - + Save-ZertoVpgSetting + vpgSettingsIdentifier VpgSettings Identifier to save @@ -10706,7 +10727,7 @@ - + vpgSettingsIdentifier VpgSettings Identifier to save @@ -10771,7 +10792,7 @@ -------------------------- Example 1 -------------------------- - PS C:> Save-ZertoVpgSettings -vpgSettingsIdentifier "MyVpgSettingsIdentifier" + PS C:> Save-ZertoVpgSetting -vpgSettingsIdentifier "MyVpgSettingsIdentifier" Commits vpg settings with vpg settings identifier "MyVpgSettingsIdentifier" @@ -10780,7 +10801,7 @@ Online Version: - https://github.com/wcarroll/ZertoApiWrapper/blob/master/docs/Save-ZertoVpgSettings.md + https://github.com/wcarroll/ZertoApiWrapper/blob/master/docs/Save-ZertoVpgSetting.md Zerto REST API VPG Settings End Point Documentation diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..3baef72 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,58 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml + +name: $(TeamProject)_$(BuildDefinitionName)_$(SourceBranchName)_$(Date:yyyyMMdd)$(Rev:.rr) + +jobs: + - job: Build_PS_Win2016 + timeoutInMinutes: 10 + cancelTimeoutInMinutes: 2 + pool: + vmImage: vs2017-win2016 + steps: + - script: | + pwsh -c ".\build.ps1 -Verbose" + displayName: 'Build and Test' + - task: PublishTestResults@2 + inputs: + testRunner: 'NUnit' + testResultsFiles: '**/Public/TestResults.xml' + testRunTitle: 'PS_Win2016' + displayName: 'Publish Test Results' + condition: always() + + - job: Build_PSCore_Ubuntu1604 + timeoutInMinutes: 10 + cancelTimeoutInMinutes: 2 + pool: + vmImage: ubuntu-16.04 + steps: + - script: | + pwsh -c '.\build.ps1 -verbose' + displayName: 'Build and Test' + - task: PublishTestResults@2 + inputs: + testRunner: 'NUnit' + testResultsFiles: '**/Public/TestResults.xml' + testRunTitle: 'PSCore_Ubuntu1604' + displayName: 'Publish Test Results' + condition: always() + + - job: Build_PSCore_MacOS1013 + timeoutInMinutes: 10 + cancelTimeoutInMinutes: 2 + pool: + vmImage: xcode9-macos10.13 + steps: + - script: | + pwsh -c '.\build.ps1 -verbose' + displayName: 'Build and Test' + - task: PublishTestResults@2 + inputs: + testRunner: 'NUnit' + testResultsFiles: '**/Public/TestResults.xml' + testRunTitle: 'PSCore_MacOS1013' + displayName: 'Publish Test Results' + condition: always() diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 0000000..9ce90cf --- /dev/null +++ b/build.ps1 @@ -0,0 +1,16 @@ +# Bootstrap the environment +$null = Get-PackageProvider -Name NuGet -ForceBootstrap + +if (-not (Get-Module -Name PSDepend -ListAvailable)) { + Install-Module -Name PSDepend -Scope CurrentUser -Force -Confirm:$false +} + +Import-Module -Name PSDepend +Invoke-PSDepend ` + -Path $PSScriptRoot ` + -Force ` + -Import ` + -Install ` + -Tags 'Bootstrap' + +Invoke-Build . diff --git a/docs/Get-ZertoVirtualizationSite.md b/docs/Get-ZertoVirtualizationSite.md index 049d2e9..7f44405 100644 --- a/docs/Get-ZertoVirtualizationSite.md +++ b/docs/Get-ZertoVirtualizationSite.md @@ -8,7 +8,8 @@ schema: 2.0.0 # Get-ZertoVirtualizationSite ## SYNOPSIS -{{Fill in the Synopsis}} + +Returns information about the hypervisor site where the API is run and all the sites paired with this site. The information returned can be tailored to specific information about the resources managed at a specified site. ## SYNTAX @@ -68,16 +69,38 @@ Get-ZertoVirtualizationSite -siteIdentifier [] ``` ## DESCRIPTION -{{Fill in the Description}} + +Returns information about the hypervisor site where the API is run and all the sites paired with this site. The information returned can be tailored to specific information about the resources managed at a specified site. ## EXAMPLES ### Example 1 ```powershell -PS C:\> {{ Add example code here }} +PS C:\> Get-ZertoVirtualizationSite -siteIdentifier "MySiteIdentifier" ``` -{{ Add example description here }} +Returns information about the site with identifier "MySiteIdentifier" + +### Example 2 +```powershell +PS C:\> Get-ZertoVirtualizationSite -siteIdentifier "MySiteIdentifier" -datastoreClusters +``` + +Returns information about datastore clusters at site with site identifier "MySiteidentifier" + +### Example 3 +```powershell +PS C:\> Get-ZertoVirtualizationSite -siteIdentifier "MySiteIdentifier" -datastores +``` + +Returns information about datastores at site with site identifier "MySiteidentifier" + +### Example 4 +```powershell +PS C:\> Get-ZertoVirtualizationSite -siteIdentifier "MySiteIdentifier" -devices +``` + +Returns information about devices at site with site identifier "MySiteidentifier" ## PARAMETERS diff --git a/docs/Get-ZertoVpgSetting.md b/docs/Get-ZertoVpgSetting.md index d812532..8c97811 100644 --- a/docs/Get-ZertoVpgSetting.md +++ b/docs/Get-ZertoVpgSetting.md @@ -118,35 +118,35 @@ It is important to note that only once a VPG settings object has been created, w ### Example 1 ```powershell -PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" +PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" ``` Returns all current settings for vpgSettingsIdentifier "MySettingsIdentifier" ### Example 2 ```powershell -PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" -vmIdentifier "MyVmId" +PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" -vmIdentifier "MyVmId" ``` Returns all current vm level settings for the vmIdentifier "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier" ### Example 3 ```powershell -PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" -vmIdentifier "MyVmId" -volumes +PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" -vmIdentifier "MyVmId" -volumes ``` Returns current vm level settings for volumes for vmId "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier" ### Example 4 ```powershell -PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" -nics +PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" -nics ``` Returns current vm level settings for nics for vmId "MyVmId" in vpgSettingsIdentifier "MySettingsIdentifier" ### Example 5 ```powershell -PS C:\> Get-ZertoVpgSettings -vpgSettingsIdentifier "MySettingsIdentifier" -basic +PS C:\> Get-ZertoVpgSetting -vpgSettingsIdentifier "MySettingsIdentifier" -basic ``` Returns current basic settings for vpgSettingsIdentifier "MySettingsIdentifier" diff --git a/docs/Remove-ZertoPeerSite.md b/docs/Remove-ZertoPeerSite.md index 142d574..6bb3816 100644 --- a/docs/Remove-ZertoPeerSite.md +++ b/docs/Remove-ZertoPeerSite.md @@ -150,8 +150,7 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. -For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/docs/Save-ZertoVpgSettings.md b/docs/Save-ZertoVpgSetting.md similarity index 85% rename from docs/Save-ZertoVpgSettings.md rename to docs/Save-ZertoVpgSetting.md index 16d9dda..2e2efaf 100644 --- a/docs/Save-ZertoVpgSettings.md +++ b/docs/Save-ZertoVpgSetting.md @@ -1,92 +1,92 @@ ---- -external help file: ZertoApiWrapper-help.xml -Module Name: ZertoApiWrapper -online version: https://github.com/wcarroll/ZertoApiWrapper/blob/master/docs/Save-ZertoVpgSettings.md -schema: 2.0.0 ---- - -# Save-ZertoVpgSettings - -## SYNOPSIS -Commits the updated Vpg Settings with the configured Vpg Settings Identifier - -## SYNTAX - -``` -Save-ZertoVpgSettings [-vpgSettingsIdentifier] [-WhatIf] [-Confirm] [] -``` - -## DESCRIPTION -Commits the updated Vpg Settings with the configured Vpg Settings Identifier - -## EXAMPLES - -### Example 1 -```powershell -PS C:> Save-ZertoVpgSettings -vpgSettingsIdentifier "MyVpgSettingsIdentifier" -``` - -Commits vpg settings with vpg settings identifier "MyVpgSettingsIdentifier" - -## PARAMETERS - -### -vpgSettingsIdentifier -VpgSettings Identifier to save - -```yaml -Type: String -Parameter Sets: (All) -Aliases: vpgSettingsId - -Required: True -Position: 0 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -### System.String -## OUTPUTS - -### System.Object -## NOTES - -## RELATED LINKS - -[Zerto REST API VPG Settings End Point Documentation](http://s3.amazonaws.com/zertodownload_docs/Latest/Zerto%20Virtual%20Replication%20Zerto%20Virtual%20Manager%20%28ZVM%29%20-%20vSphere%20Online%20Help/RestfulAPIs/StatusAPIs.5.108.html#) +--- +external help file: ZertoApiWrapper-help.xml +Module Name: ZertoApiWrapper +online version: https://github.com/wcarroll/ZertoApiWrapper/blob/master/docs/Save-ZertoVpgSetting.md +schema: 2.0.0 +--- + +# Save-ZertoVpgSetting + +## SYNOPSIS +Commits the updated Vpg Settings with the configured Vpg Settings Identifier + +## SYNTAX + +``` +Save-ZertoVpgSetting [-vpgSettingsIdentifier] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Commits the updated Vpg Settings with the configured Vpg Settings Identifier + +## EXAMPLES + +### Example 1 +```powershell +PS C:> Save-ZertoVpgSetting -vpgSettingsIdentifier "MyVpgSettingsIdentifier" +``` + +Commits vpg settings with vpg settings identifier "MyVpgSettingsIdentifier" + +## PARAMETERS + +### -vpgSettingsIdentifier +VpgSettings Identifier to save + +```yaml +Type: String +Parameter Sets: (All) +Aliases: vpgSettingsId + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### System.String +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS + +[Zerto REST API VPG Settings End Point Documentation](http://s3.amazonaws.com/zertodownload_docs/Latest/Zerto%20Virtual%20Replication%20Zerto%20Virtual%20Manager%20%28ZVM%29%20-%20vSphere%20Online%20Help/RestfulAPIs/StatusAPIs.5.108.html#)