Merge remote-tracking branch 'vmware/master'
This commit is contained in:
@@ -32,13 +32,13 @@
|
|||||||
If a -LocationType is not chosen, the function will default to FTP.
|
If a -LocationType is not chosen, the function will default to FTP.
|
||||||
The destination location for a backup must be an empty folder (easiest to use the get-date cmdlet in the location)
|
The destination location for a backup must be an empty folder (easiest to use the get-date cmdlet in the location)
|
||||||
-ShowProgress will give you a progressbar as well as updates in the console
|
-ShowProgress will give you a progressbar as well as updates in the console
|
||||||
-SeatBackup will only backup the config whereas -Fullbackup grabs the historical data as well
|
-CommonBackup will only backup the config whereas -Fullbackup grabs the historical data as well
|
||||||
#>
|
#>
|
||||||
param (
|
param (
|
||||||
[Parameter(ParameterSetName=’FullBackup’)]
|
[Parameter(ParameterSetName=’FullBackup’)]
|
||||||
[switch]$FullBackup,
|
[switch]$FullBackup,
|
||||||
[Parameter(ParameterSetName=’SeatBackup’)]
|
[Parameter(ParameterSetName=’CommonBackup’)]
|
||||||
[switch]$SeatBackup,
|
[switch]$CommonBackup,
|
||||||
[ValidateSet('FTPS', 'HTTP', 'SCP', 'HTTPS', 'FTP')]
|
[ValidateSet('FTPS', 'HTTP', 'SCP', 'HTTPS', 'FTP')]
|
||||||
$LocationType = "FTP",
|
$LocationType = "FTP",
|
||||||
$Location,
|
$Location,
|
||||||
@@ -50,13 +50,14 @@
|
|||||||
)
|
)
|
||||||
Begin {
|
Begin {
|
||||||
if (!($global:DefaultCisServers)){
|
if (!($global:DefaultCisServers)){
|
||||||
|
Add-Type -Assembly System.Windows.Forms
|
||||||
[System.Windows.Forms.MessageBox]::Show("It appears you have not created a connection to the CisServer. You will now be prompted to enter your vCenter credentials to continue" , "Connect to CisServer") | out-null
|
[System.Windows.Forms.MessageBox]::Show("It appears you have not created a connection to the CisServer. You will now be prompted to enter your vCenter credentials to continue" , "Connect to CisServer") | out-null
|
||||||
$Connection = Connect-CisServer $global:DefaultVIServer
|
$Connection = Connect-CisServer $global:DefaultVIServer
|
||||||
} else {
|
} else {
|
||||||
$Connection = $global:DefaultCisServers
|
$Connection = $global:DefaultCisServers
|
||||||
}
|
}
|
||||||
if ($FullBackup) {$parts = @("common","seat")}
|
if ($FullBackup) {$parts = @("common","seat")}
|
||||||
if ($SeatBackup) {$parts = @("seat")}
|
if ($CommonBackup) {$parts = @("common")}
|
||||||
}
|
}
|
||||||
Process{
|
Process{
|
||||||
$BackupAPI = Get-CisService com.vmware.appliance.recovery.backup.job
|
$BackupAPI = Get-CisService com.vmware.appliance.recovery.backup.job
|
||||||
|
|||||||
Reference in New Issue
Block a user