NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform.
You will still be able to view content, but posting and replying will be temporarily disabled.
To learn more, please review the information in this blog post.

Microsoft Virtualization Discussions

How to set LIF DataProtocol with set-ncnetinterface?

oroemisc
5,386 Views

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
5,376 Views

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
5,377 Views

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

mcgue
5,362 Views

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."

 

 

Public