ONTAP Discussions

no vserver option in New-NcSnapshotPolicy cmdlet?

djwarner2929
3,049 Views

I'm trying to automate creating snapshot policies with Powershell.  It looks like the New-NcSnapshotPolicy cmdlet doesn't have a vserver option.  So when I run it, all policies are created under the cluster vserver.  The cli command of snapshot policy create has the vserver option.  Any ideas why I can't do the same with Powershell?  I have toolkit 4.1 with CDOT of 8.3.1.  Thanks.

 

Dave

2 REPLIES 2

Jeff_Yao
2,863 Views

hi, 

 

try the help command to check the syntax... 

masson
2,724 Views

Hello,

 

I'm agree with

 

This options is not available event with the last PSTK 4.0.0.231

Here the help of the cmdlet:

NAME
    New-NcSnapshotPolicy

SYNOPSIS
    Create a new snapshot scheduling policy.


SYNTAX
    New-NcSnapshotPolicy [-Name] <String> [-Schedule] <String> [-Count] <Int32> [-Prefix <String>] [-Enabled [<Boolean>]] [-Comment <String>]
    [-SnapmirrorLabel <String>] [-Controller <NcController[]>] [-PipelineVariable <String>] [-ZapiRetryCount <Int32>] [<CommonParameters>]


DESCRIPTION
    Create a new snapshot scheduling policy.


PARAMETERS
    -Name <String>
        The name of the snapshot scheduling policy which has to be created.  This cmdlet creates a snapshot policy and adds a schedule to it.
        The maximum length of this string is 256 characters.

    -Schedule <String>
        First schedule to be added inside the policy.  At least one schedule has to be added to create a policy.

    -Count <Int32>
        Retention count for the snapshots created by the first schedule.  The count of all the snapshots to be retained for this policy cannot
        be more than 255.

    -Prefix <String>
        Snapshot name prefix for the first schedule.  Prefix name should be unique within the policy.

    -Enabled [<Boolean>]
        Status of the snapshot policy indicating whether the policy will be enabled or disabled.  If set to true, the policy will be enabled.

    -Comment <String>
        A human readable description associated with the snapshot policy.  The maximum length of this field can be 255 characters.

    -SnapmirrorLabel <String>
        Label for SnapMirror Operations. Maximum length of this field is 31 characters.

    -Controller <NcController[]>
        A clustered Data ONTAP controller to receive this cmdlet, as embodied by an NcController object.  This parameter is returned by the
        Connect-NcController cmdlet.  If not specified, the value in the global variable CurrentNcController is used.  In the latter case, if
        CurrentNcController contains a collection of NcController objects, this cmdlet is invoked on each controller in succession.

    -PipelineVariable <String>


    -ZapiRetryCount <Int32>


    <CommonParameters>
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, see
        about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

 

Is there any chance to see this option in the futur?

 

TIA

 

Regards

Public