|
|
Data ONTAP® PowerShell Toolkit
|
Cmdlet: Initialize-NcObjectProperty
NAME
Initialize-NcObjectProperty
SYNOPSIS
Set one or more properties on Toolkit objects.
SYNTAX
Initialize-NcObjectProperty [-Object] <Object> [[-Name] <String[]>] [[-Count
] <Int32>] [-All] [-Recurse] [-PassThru] [<CommonParameters>]
DESCRIPTION
Set one or more properties on Toolkit objects.
A best practice for using the Toolkit is not to directly instantiate any of
the types returned by Toolkit cmdlets. However, some of the advanced querie
s and object manipulation features of clustered Data ONTAP require sending t
hese types back to the controller.
To support these features, the Toolkit provides means of creating the needed
objects and selectively filling in some or all of their properties. Value
properties, such as strings and integers, may be set directly. But embedded
reference types should be created using this cmdlet.
PARAMETERS
-Object <Object>
The object to modify.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Name <String[]>
The name of one or more properties to set.
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Count <Int32>
If the named field is an array, specify Count to fill the array with tha
t number of objects.
Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false
-All
Specify to initialize all reference-type properties in the object.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Recurse
Specify to fill in not only the named property, but all nested objects a
s well.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-PassThru
If specified, the modified object is written back to the pipeline.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".
INPUTS
OUTPUTS
System.Object
NOTES
Category: toolkit
-------------- Example 1 --------------
C:\PS>$q = Get-NcVol -Template
Initialize-NcObjectProperty $q VolumeIdAttributes
$q.VolumeIdAttributes.Name = "vol1|vol2"
$q.VolumeIdAttributes.OwningVserverName = "vserver1"
$a = Get-NcVol -Template
Initialize-NcObjectProperty $a VolumeIdAttributes
$a.VolumeIdAttributes.Comment = "Database volumes"
Update-NcVol -Query $q -Attributes $a
Using this cmdlet and others, execute an advanced query to set the comment f
ield on multiple volumes.
NcController : 10.61.172.155
SuccessCount : 2
FailureCount : 0
SuccessList : {vol1, vol2}
FailureList : {}
RELATED LINKS
Get-NcVol
| Copyright © 2013 NetApp. All rights reserved. Use is subject to license terms. |
|
Data ONTAP® PowerShell Toolkit
|