Microsoft Virtualization Discussions

How to set LIF DataProtocol with set-ncnetinterface?

oroemisc

Hi there,

 

DataProtocol is an (get;set) Option of get-ncnetinterface

 

PS C:\Users\oroemisc\My Documents> Get-NcNetInterface -Name cifs_admin_lif1 -Vserver cifs | gm


TypeName: DataONTAP.C.Types.Net.NetInterfaceInfo

Name MemberType Definition
---- ---------- ----------

.

.

DataProtocols Property string[] DataProtocols {get;set;}

.

 

I need to add CIFS to it, currently it is "none" because it was a management only LIF before.

 

So i used 

 

( Set-NcNetInterface -Vserver cifs -Name cifs_admin_lif1 ).DataProtocols = "cifs"

 

but this doesn't change the value.

 

I think it is more a "PowerShell lack of knowledge" from me than an CMDLet misbehaviour...

 

Any help appreciated.

 

Regards

Oli

 

1 ACCEPTED SOLUTION

Aparajita

The Set-NcNetInterface does not allow you to modify the data-protocol for a LIF, as far as I can see. Try using The Update-NcNetInterface command

 

$query = Get-NcNetInterface -Template
$attrs = Get-NcNetInterface -Template
$query.Vserver = "cifs"
$query.InterfaceName = "cifs_admin_lif_1" $attrs.DataProtocols = ("cifs") Update-NcNetInterface -Query $query -Attributes $attrs

Hope this helps,

Aparajita

View solution in original post

2 REPLIES 2

Aparajita

The Set-NcNetInterface does not allow you to modify the data-protocol for a LIF, as far as I can see. Try using The Update-NcNetInterface command

 

$query = Get-NcNetInterface -Template
$attrs = Get-NcNetInterface -Template
$query.Vserver = "cifs"
$query.InterfaceName = "cifs_admin_lif_1" $attrs.DataProtocols = ("cifs") Update-NcNetInterface -Query $query -Attributes $attrs

Hope this helps,

Aparajita

View solution in original post

mcgue

The data-protocol parameter is a requirement at creation time and cannot be modified later through any method PowerShell included.

 

From:  https://library.netapp.com/ecmdocs/ECMP1636021/html/GUID-CEE760DF-A059-4018-BE6C-6B3A034CB377.html

 

"The data-protocol parameter must be specified when the LIF is created, and cannot be modified later."

 

 

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public