Global Settings via Powershell

PowerShell script exchange

Global Settings via Powershell

Veeam Logoby TParticke » Tue Apr 21, 2015 7:12 am

Hello,

Im trying to set specific Settings on all our backup Server in all Locations via Powershell.

For example:

I want to set global E-Mail Settings, like "Notify on success".

I know I can do this with "invoke-command", can you give me a Close example ( for more than one Server ) for this?

thanks in advance..
TParticke
Novice
 
Posts: 7
Liked: never
Joined: Sun Jun 29, 2014 6:50 am
Full Name: Thomas Particke

Re: Global Settings via Powershell

Veeam Logoby v.Eremin » Tue Apr 21, 2015 9:18 am

Global email settings in contrast to job specific ones are not configurable via our PowerShell snap-in. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: [solved]Global Settings via Powershell

Veeam Logoby TParticke » Tue Apr 21, 2015 10:11 am

ohh... Jesus..

ok, thanks anyway.
TParticke
Novice
 
Posts: 7
Liked: never
Joined: Sun Jun 29, 2014 6:50 am
Full Name: Thomas Particke

Re: Global Settings via Powershell

Veeam Logoby v.Eremin » Tue Apr 21, 2015 10:20 am

You can still make all existing jobs use job-specific notification settings, instead of global ones, and set the desired options for them via PS. Though, I understand that it's not exactly what you're looking for. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Global Settings via Powershell

Veeam Logoby TParticke » Tue Apr 21, 2015 10:38 am

Yes, but we want to set a Little bit more.

I give you an example

We have more than 30 Locations and want to Play around with throtteling Settings.
So this week we want to check out, what is if we set the throtteling to 2MB/s ....check the backups and logs and so on.
Next week we say, ok 2MB/s is not enough, we set to 4MB/s...on all Server, on all locations

If you cannot set this on a global Base via Poswershell or something else it is useless in a big Environment, My Opinion.
I still cannot understand , that its not possible to configure Veeam Backup Server with Enterprise Manager....

Is there any other way to solve such a Problem?
TParticke
Novice
 
Posts: 7
Liked: never
Joined: Sun Jun 29, 2014 6:50 am
Full Name: Thomas Particke

Re: Global Settings via Powershell

Veeam Logoby TParticke » Thu Apr 23, 2015 9:29 am

Ok, I got it after a Little testing.

Is there anywhere a complete powershell list for all Settings that are possible like

with GenerationPolicy.SyncIntervalStartTime you can set the time ....etc?

Here is my Script so far

Code: Select all

#========================================================================
# Created with: SAPIEN Technologies, Inc., PowerShell Studio 2012 v3.1.28
# Created on:   23.04.2015 11:26
# Created by:   Thomas.Particke@guh-gruppe.de
# Organization: GH Service IT
# Filename:     VBRemote.ps1
#========================================================================



if (Test-Path .\VBRServer.txt){$VBRServer = GC .\VBRServer.txt} else {write-host "No VBRServer.txt..."; exit}

foreach ($Server in $VBRServer)

{

$Session   = New-PSSession -Name VBRServer -ComputerName $Server

Write-Host "Accessing Backup Server $Server"
Invoke-Command -Session $Session -ScriptBlock {

Add-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue

$Jobs = Get-VBRJob

Foreach ($Job in $Jobs) {

$JobOptions = $Job.GetOptions()

$JobOptions.NotificationOptions.SnmpNotification  = $false #Default: $false
$JobOptions.NotificationOptions.SendEmailNotification2AdditionalAddresses  = $true #Default: $false
$JobOptions.NotificationOptions.EmailNotificationAdditionalAddresses = "e-Mail;e-Mail;e-Mail" #Default: ""
$JobOptions.NotificationOptions.UseCustomEmailNotificationOptions = $true #Default: $false
$JobOptions.NotificationOptions.EmailNotificationSubject = "[%JobResult%] %JobName% (%VmCount% VMs) %Issues%" #Default: "[%JobResult%] %JobName% (%VmCount% VMs) %Issues%"
$JobOptions.NotificationOptions.EmailNotifyOnSuccess = $false #Default: $true
$JobOptions.NotificationOptions.EmailNotifyOnWarning = $true #Default: $true
$JobOptions.NotificationOptions.EmailNotifyOnError = $true #Default: $true
$JobOptions.NotificationOptions.EmailNotifyOnLastRetryOnly  = $true #Default: $true
#$JobOptions.ViSourceOptions.VmAttributeName = "TestField1"   #Default: "Notes"
#$JobOptions.ViSourceOptions.SetResultsToVmNotes = $true #Default: $false
#$JobOptions.ViSourceOptions.VmNotesAppend = $false #Default: $true
#$JobOptions.NotificationOptions
#$JobOptions.ViSourceOptions


# Copy Job Options
$JobOptions.GenerationPolicy.SyncIntervalStartTime             = "19:55:00"
$JobOptions.GenerationPolicy.RetentionPolicyType               = "Simple"
$JobOptions.GenerationPolicy.EnableDeletedVmDataRetention      = $True
$JobOptions.GenerationPolicy.DeletedVmsDataRetentionPeriodDays = 30
$JobOptions.GenerationPolicy.SimpleRetentionRestorePoints      = 7
$JobOptions.GenerationPolicy.EnableCompactFull                 = $False
#$JobOptions.GenerationPolicy.CompactFullBackupScheduleKind    = Monthly
#$JobOptions.GenerationPolicy.CompactFullBackupDays            = {Saturday}
$JobOptions.JobOptions.BackupCopyJobCanRunAnyTime              = $True

# Local Job Options [Advanced]
$JobOptions.BackupStorageOptions.EnableDeletedVmDataRetention  = $true
$JobOptions.BackupStorageOptions.RetainDays                    = 30
$JobOptions.BackupTargetOptions.TransformFullToSyntethic       = $false
$JobOptions.BackupTargetOptions.TransformIncrementsToSyntethic = $false

# Local Job Options [Backup, mode]



$Job.SetOptions($JobOptions)

}
}
}


TParticke
Novice
 
Posts: 7
Liked: never
Joined: Sun Jun 29, 2014 6:50 am
Full Name: Thomas Particke

Re: Global Settings via Powershell

Veeam Logoby v.Eremin » Thu Apr 23, 2015 11:45 am

The best source of information regarding VB&R PS snap-in is our Help Center. However, you won't find there the list of all internal parameters and settings along with acceptable values.

You still can drill down to particular set of properties and use Get-Member commandlet to find out the acceptable type. Something like:

Code: Select all
$Job.GetOptions().backupstorageoptions | Get-Member

EnableDeduplication          Property   bool EnableDeduplication {get;set;}                     
EnableDeletedVmDataRetention Property   bool EnableDeletedVmDataRetention {get;set;}           
EnableFullBackup             Property   bool EnableFullBackup {get;set;}                       
EnableIntegrityChecks        Property   bool EnableIntegrityChecks {get;set;}                   
KeepFirstFullBackup          Property   bool KeepFirstFullBackup {get;set;}                     
RetainCycles                 Property   int RetainCycles {get;set;}                             
RetainDays                   Property   int RetainDays {get;set;} 


Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

[MERGED] Change Options/Notifications/Backup Storage

Veeam Logoby jed-hyper » Wed Nov 23, 2016 12:48 am

Is there a powershell command to change 'Options/Notifications/Backup Storage/Warm me when free disk space is below' setting ???
jed-hyper
Enthusiast
 
Posts: 33
Liked: 4 times
Joined: Wed Feb 26, 2014 4:42 am
Full Name: Jed Parkes

Re: Powershell to Change Options/Notifications/Backup Storag

Veeam Logoby v.Eremin » Wed Nov 23, 2016 10:47 am

Most of global options with the mentioned ones being no exception are not configurable via PowerShell. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Powershell to Change Options/Notifications/Backup Storag

Veeam Logoby jed-hyper » Thu Nov 24, 2016 12:50 am

OK Thanks, can you add a feature request. I need to configure this on all of my Veeam server and having to do it manually is going to take a while.
jed-hyper
Enthusiast
 
Posts: 33
Liked: 4 times
Joined: Wed Feb 26, 2014 4:42 am
Full Name: Jed Parkes

Re: Global Settings via Powershell

Veeam Logoby v.Eremin » Mon Nov 28, 2016 11:41 am

Your voice is counted. However, we cannot guarantee whether it will be implemented in the nearest future, as priority is given in accordance with demand a feature generates among customers.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Global Settings via Powershell

Veeam Logoby tdewin » Tue Nov 29, 2016 3:15 pm

In addition to Vladimir his post, here is a dump of common parameters and sub parameters (with scripts that have been used for discovery, essentially using get-member)

Please try to use the cmdlets where possible as these might be subject to change & might not be complete/inacurate:
https://github.com/tdewin/best-practice ... l_dumps.md
tdewin
Veeam Software
 
Posts: 1043
Liked: 361 times
Joined: Fri Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 3 guests