I'm trying to speed up the process of acquiring the "Created" field on each snapshot returned from get-ncsnapshot. It currently takes many hours to return a generic get-ncsnapshot against a Ontap 9.1P2 cluster with >200K snapshots.
I've tried the following:
$snaptemplate = get-ncsnapshot -Template
get-ncsnapshot -Attributes $snaptemplate
While this does yield significant performance improvements, it doesn't include the "Created" property.
I can't initialize-ncobjectproperty against created as it's an alias for AccessTimeDT. I can't initialize AccessTimeDT as it's read-only as follows:
Initialize-NcObjectProperty -Object $snaptemplate -Name AccessTimeDT
WARNING: Property AccessTimeDT on object is not writable
Name Volume Vserver Created Total Cumulative Dependency
---- ------ ------- ------- ----- ---------- ----------
I need to be able to initialize AccessTimeDT within the $snaptemplate object in order to be able to return the results needed.
$snaptemplate | get-member
TypeName: DataONTAP.C.Types.Snapshot.SnapshotInfo
Name MemberType Definition
---- ---------- ----------
Created AliasProperty Created = AccessTimeDT
Cumulative AliasProperty Cumulative = CumulativeTotal
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
Validate Method void Validate()
AccessTime Property System.Object AccessTime {get;set;}
AccessTimeDT Property System.Nullable[datetime] AccessTimeDT {get;}
Anyone have any ideas on how to modify the template to have AccessTimeDT writable so it can be used to speed up get-ncsnapshot?
Thanks...