Missing Methods and Propertys on old Job Objects

PowerShell script exchange

Missing Methods and Propertys on old Job Objects

Veeam Logoby LarsWulf » Wed Dec 10, 2014 4:31 pm

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.
LarsWulf
Enthusiast
 
Posts: 36
Liked: 7 times
Joined: Mon Nov 28, 2011 9:05 pm
Full Name: Lars Wulf

Re: Missing Methods and Propertys on old Job Objects

Veeam Logoby nefes » Wed Dec 10, 2014 4:33 pm

Could you please provide couple of examples - what kind of job is it and what kind of methods are missing?
nefes
Veeam Software
 
Posts: 534
Liked: 125 times
Joined: Mon Dec 10, 2012 8:44 am
Full Name: Nikita Efes

Re: Missing Methods and Propertys on old Job Objects

Veeam Logoby LarsWulf » Wed Dec 10, 2014 5:00 pm

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.
LarsWulf
Enthusiast
 
Posts: 36
Liked: 7 times
Joined: Mon Nov 28, 2011 9:05 pm
Full Name: Lars Wulf

Re: Missing Methods and Propertys on old Job Objects

Veeam Logoby v.Eremin » Wed Dec 10, 2014 5:33 pm

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.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 974 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Missing Methods and Propertys on old Job Objects

Veeam Logoby LarsWulf » Wed Dec 10, 2014 5:45 pm

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.
LarsWulf
Enthusiast
 
Posts: 36
Liked: 7 times
Joined: Mon Nov 28, 2011 9:05 pm
Full Name: Lars Wulf

Re: Missing Methods and Propertys on old Job Objects

Veeam Logoby v.Eremin » Wed Dec 10, 2014 5:54 pm

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.
v.Eremin
Veeam Software
 
Posts: 13296
Liked: 974 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 5 guests