-
- Novice
- Posts: 4
- Liked: never
- Joined: Feb 01, 2016 7:19 am
- Full Name: Daniel Fehr
- Contact:
PowerShell Question - File Exclusions
Hi
Is there a possibility with Veeam PowerShell commands to import a list of "exclusions files" in the "VM Guest OS File Exclusion" function?
Thanks!
Is there a possibility with Veeam PowerShell commands to import a list of "exclusions files" in the "VM Guest OS File Exclusion" function?
Thanks!
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: PowerShell Question - File Exclusions
Just to clarify - you want to modify those settings or just output existing ones?
In the latter case, you can use this example and see whether it meets your expectations:
Otherwise, you will have to modify the shown portion and then pass it to Set-VBRJobObjectVssOptions cmdlet.
Thanks.
In the latter case, you can use this example and see whether it meets your expectations:
Code: Select all
asnp VEeamPssnapin
$Object = (Get-VBRJob -name "Name of your Job").GetObjectsInJob() | where {$_.name -eq "Name of your VM"}
$Object.VssOptions.GuestFSExcludeOptions.ExcludeList
Thanks.
-
- Novice
- Posts: 4
- Liked: never
- Joined: Feb 01, 2016 7:19 am
- Full Name: Daniel Fehr
- Contact:
Re: PowerShell Question - File Exclusions
Hi Vladimir
Many thanks for the quick answer!
The hint with "Set-VBRJobObjectVssOptions" was very helpful, my script works now!
Regads,
Dani
Many thanks for the quick answer!
The hint with "Set-VBRJobObjectVssOptions" was very helpful, my script works now!
Regads,
Dani
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: PowerShell Question - File Exclusions
You're welcome.
Generally speaking, in PowerShell as is in GUI there are two levels of VSS related options: job and job object ones. They can be got and modified differently.
Job:
Job Object:
Thanks.
Generally speaking, in PowerShell as is in GUI there are two levels of VSS related options: job and job object ones. They can be got and modified differently.
Job:
Code: Select all
Get-VBRJob
Get-VBRJobVSSOptions
Set-VBRJobVssOptions
Code: Select all
Get-VBRJobObject
Get-VBRJobObjectVssOptions
Set-VBRJobObjectVssOptions
-
- Lurker
- Posts: 1
- Liked: never
- Joined: Nov 02, 2016 9:50 pm
- Full Name: Mike
- Contact:
Re: PowerShell Question - File Exclusions
Hello, I hope it's okay to post a question here in the reply section.
TSM in powershell does not seem to be accepting a command that works fine from a command window.
In command window
C:\Program Files\Tivoli\TSM\baclient>dsmc.exe q ba "G:\Backup\WRDB$PRA\*" -ina -subdir=y
-fromdate=10/31/2016 -todate=11/01/2016 -querysummary
The return is the answer to the query -- not included here
In Powershell
begin
{
$select = "q ba 'G:\Backup\WRDB$PRA\*' -ina -subdir=y -fromdate=10/31/2016 -todate=11/01/2016 -querysummary"
echo $select
& cd C:\Progra~1\Tivoli\TSM\baclient\
& C:\Progra~1\Tivoli\TSM\baclient\dsmc.exe "$select"
}
The return is
ANS1038S Invalid option specified.
ANS1820E Command line options must be preceded by a '-'
I have added a '-' but I then receive the message: ANS1107E Invalid option/value: '-Q'
Help please. And thanks
TSM in powershell does not seem to be accepting a command that works fine from a command window.
In command window
C:\Program Files\Tivoli\TSM\baclient>dsmc.exe q ba "G:\Backup\WRDB$PRA\*" -ina -subdir=y
-fromdate=10/31/2016 -todate=11/01/2016 -querysummary
The return is the answer to the query -- not included here
In Powershell
begin
{
$select = "q ba 'G:\Backup\WRDB$PRA\*' -ina -subdir=y -fromdate=10/31/2016 -todate=11/01/2016 -querysummary"
echo $select
& cd C:\Progra~1\Tivoli\TSM\baclient\
& C:\Progra~1\Tivoli\TSM\baclient\dsmc.exe "$select"
}
The return is
ANS1038S Invalid option specified.
ANS1820E Command line options must be preceded by a '-'
I have added a '-' but I then receive the message: ANS1107E Invalid option/value: '-Q'
Help please. And thanks
Who is online
Users browsing this forum: No registered users and 15 guests