PowerShell script exchange
Post Reply
LarsWulf
Enthusiast
Posts: 38
Liked: 7 times
Joined: Nov 28, 2011 9:05 pm
Full Name: Lars Wulf
Contact:

Missing Methods and Propertys on old Job Objects

Post by LarsWulf »

I just wanted to mass edit some advanced scheduling options on my backup jobs.
While trying to do this I noticed that on my old jobs some are created end of 2012 (so it should have been v6) are missing various methods and propertys.

Is there any trick to get all the methods and propertys to all jobs ?
I know recreating all jobs would do the trick but to be honest this is not a nice option.
nefes
Veeam Software
Posts: 643
Liked: 162 times
Joined: Dec 10, 2012 8:44 am
Full Name: Nikita Efes
Contact:

Re: Missing Methods and Propertys on old Job Objects

Post by nefes »

Could you please provide couple of examples - what kind of job is it and what kind of methods are missing?
LarsWulf
Enthusiast
Posts: 38
Liked: 7 times
Joined: Nov 28, 2011 9:05 pm
Full Name: Lars Wulf
Contact:

Re: Missing Methods and Propertys on old Job Objects

Post by LarsWulf »

What I did is:

Code: Select all

$Job=Get-VBRjob -name "xxx"
$Job | get-member
Below you see the results of an old Job:

Code: Select all

Name                        MemberType
----                        ----------
CheckJobIsRunning           Method
CreateOib                   Method
CreatePoint                 Method
CreateStorage               Method
Delete                      Method
DeleteChildEntities         Method
DeleteEmptyPoints           Method
DeleteLastStorageSet        Method
DetachJob                   Method
Equals                      Method
FindAndDeleteChildBackups   Method
FindChildBackups            Method
FindFullOibInGroup          Method
FindFullPointInGroup        Method
FindJob                     Method
FindLastByTimePoint         Method
FindLastOib                 Method
FindLastOibInGroup          Method
FindLastPoint               Method
FindLastPointInGroup        Method
FindLastRetryPoint          Method
FindLastUncorruptedOib      Method
FindOib                     Method
FindPointByCreationTime     Method
FindPointByTimeAndLink      Method
FindPointByTimeWithLink     Method
FindRepository              Method
FindStorage                 Method
GetAwayStorages             Method
GetCatBackupRef             Method
GetCorruptedOibsInGroup     Method
GetDbSqlOibs                Method
GetDbSqlOibsForObject       Method
GetEmptyPoints              Method
GetEmptyStorages            Method
GetHashCode                 Method
GetHost                     Method
GetJob                      Method
GetLastOibs                 Method
GetLastPoint                Method
GetLastVbk                  Method
GetMetaFilePath             Method
GetObjectOibsAll            Method
GetObjects                  Method
GetOib                      Method
GetOibs                     Method
GetOibsByOriginalId         Method
GetOibsForObject            Method
GetOibsTape                 Method
GetPoints                   Method
GetRepository               Method
GetRepositoryName           Method
GetStorage                  Method
GetStorages                 Method
GetTargetHost               Method
GetType                     Method
GetVbksDependentFromOibs    Method
IsBasicPointExistsOnDay     Method
IsEmpty                     Method
IsJobExists                 Method
IsTemporary                 Method
RegisterAsTemporary         Method
RemoveVmFromDb              Method
SetBackupMetaFilePath       Method
SetJobTargetHost            Method
SetLastUserKeySet           Method
SetMetaUpdateTime           Method
SetTempRepository           Method
ToLogLine                   Method
ToString                    Method
Update                      Method
UpdateJobTargetHost         Method
UpdateJobTargetHostProtocol Method
BackupPlatform              Property
CreationTime                Property
DbAccessorId                Property
DirPath                     Property
Id                          Property
Info                        Property
IsBackup                    Property
IsBackupSync                Property
IsEndPointBackup            Property
IsHvReplica                 Property
IsLegacyReplica             Property
IsMetaExist                 Property
IsReplica                   Property
IsSnapReplica               Property
IsSqlBackup                 Property
IsTapeBackup                Property
IsViReplica                 Property
JobId                       Property
JobName                     Property
JobSourceType               Property
JobTargetHostId             Property
JobTargetHostProtocol       Property
JobTargetType               Property
JobType                     Property
LastPointCreationTime       Property
LastUsedCryptoSpec          Property
MetaFileName                Property
MetaUpdateTime              Property
Name                        Property
ParentBackupId              Property
Path                        Property
RepositoryId                Property
TypeToString                Property
VmCount                     Property
With an newer job the list is as following:

Code: Select all

Name                         MemberType
----                         ----------
CanRunByScheduler            Method
CheckDeleteAllowed           Method
Delete                       Method
DisableScheduler             Method
EnableScheduler              Method
Equals                       Method
FindChildSqlLogBackupJob     Method
FindInitialRepository        Method
FindLastBackup               Method
FindLastOib                  Method
FindLastSession              Method
FindLastStorage              Method
FindSourceWanAccelerator     Method
FindTargetRepository         Method
FindTargetWanAccelerator     Method
GetDesktopOij                Method
GetDiskEffectiveCompression  Method
GetFilesEffectiveCompression Method
GetHashCode                  Method
GetHvOijs                    Method
GetInitialRepository         Method
GetLastResult                Method
GetLastState                 Method
GetLastStorage               Method
GetObjectsInJob              Method
GetOptions                   Method
GetProxy                     Method
GetScheduleOptions           Method
GetSourceOffHostHvProxies    Method
GetSourceViProxies           Method
GetSourceWanAccelerator      Method
GetTargetHost                Method
GetTargetOffhostHvProxies    Method
GetTargetProxies             Method
GetTargetRepository          Method
GetTargetViProxies           Method
GetTargetWanAccelerator      Method
GetType                      Method
GetVcdOijs                   Method
GetViOijs                    Method
GetVssOptions                Method
IsFileCopy                   Method
IsInBackupWindow             Method
IsSanSnapshotOnly            Method
IsStopped                    Method
IsWanAcceleratorEnabled      Method
LogHvProxySettings           Method
LogJobOptions                Method
LogJobSession                Method
Reload                       Method
ResetScheduleDependentJobs   Method
SetLatestRecheck             Method
SetOptions                   Method
SetScheduleDependentJobs     Method
SetVssOptions                Method
SureMoveObj                  Method
SureObjAdded                 Method
ToString                     Method
Update                       Method
UpdateNextRunTime            Method
AutoScheduleOptions          Property
BackupPlatform               Property
BackupStorageOptions         Property
BackupTargetOptions          Property
Description                  Property
FreeBackupImpl               Property
HvReplicaTargetOptions       Property
HvSourceOptions              Property
Id                           Property
Info                         Property
IsBackup                     Property
IsBackupJob                  Property
IsBackupSync                 Property
IsContinuous                 Property
IsFileTapeBackup             Property
IsForeverIncremental         Property
IsFree                       Property
IsIddle                      Property
IsInitialReplica             Property
IsLegacyReplica              Property
IsMappingReplica             Property
IsReplica                    Property
IsRequireRetry               Property
IsRunning                    Property
IsScheduleEnabled            Property
IsSnapshotReplica            Property
IsTapeBackup                 Property
IsVmCopy                     Property
IsVmTapeBackup               Property
JobOptions                   Property
JobScriptCommand             Property
JobTargetType                Property
JobType                      Property
LinkedJobIds                 Property
LinkedJobs                   Property
LinkedRepositories           Property
LinkedRepositoryIds          Property
Name                         Property
NameWithDescription          Property
NotificationOptions          Property
Options                      Property
ParentJobId                  Property
PreviousJobIdInScheduleChain Property
ScheduleOptions              Property
SourceProxyAutoDetect        Property
SourceType                   Property
SqlEnabled                   Property
TargetDir                    Property
TargetFile                   Property
TargetHostId                 Property
TargetType                   Property
TypeToString                 Property
UserCryptoKey                Property
ViReplicaTargetOptions       Property
ViSourceOptions              Property
VssOptions                   Property
For example the "ScheduleOptions" Property is missing.

But I already found a way to fix this. When you change any detail on the old jobs and apply them all propertys and objects are existing afterwards.
veremin
Product Manager
Posts: 20283
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Missing Methods and Propertys on old Job Objects

Post by veremin »

Even though some parameters are missing in the obsolete product version, I believe you can still get them, using commandlets, instead of internals methods or properties. For instance, schedule settings can be gotten via Get-VBRJobSchedule. Thanks.
LarsWulf
Enthusiast
Posts: 38
Liked: 7 times
Joined: Nov 28, 2011 9:05 pm
Full Name: Lars Wulf
Contact:

Re: Missing Methods and Propertys on old Job Objects

Post by LarsWulf »

I am not sure... and unfortunatelly can´t check anymore as I changed my settings on all jobs already by hand. And now as stated all properties are there.
veremin
Product Manager
Posts: 20283
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Missing Methods and Propertys on old Job Objects

Post by veremin »

Your method should also do the trick. I was just trying to point out the potential workaround that might allow you to bypass the mentioned inconsistencies in PS object representations. Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests