The transition to NetApp MS Azure AD B2C is complete. If you missed the pre-registration, you will be invited to register at next log in.
Please note that access to your NetApp data may take up to 1 hour.
To learn more, read the FAQ and watch the video.
Need assistance? Complete this form and select “Registration Issue” as the Feedback Category.

Software Development Kit (SDK) and API Discussions

PowerShell module with cDot and Fpolicy

ChannelTapeFibre

Hi,

I'm sure I posted this a few hours, if it turns up as a duplicate perhaps the mods can remove it.

 

Anyway, I'm looking for the cmdlets to manage Fpolicy in cDOT. I've found the cmdlets for 7-mode, but there doesn't seem to be any exact counterpart for the Nc-* ones.

 

I looked under Nc-Vserver, but nothing obvious. Could someone point me in the right direction?

1 ACCEPTED SOLUTION

asulliva

That behavior is/was a result of the switch to the single "unified" toolkit deployer...where both ONTAP and E-Series modules were packaged together in a single installer.

 

Glad you were able to get it straightened out!

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

6 REPLIES 6

asulliva

Hello @ChannelTapeFibre,

 

There are a number of cmdlets for managing Fpolicies with ONTAP.  You can view all of them using the Get-Command cmdlet:

 

Get-Command -Module DataONTAP | ?{ $_.Name -match "NcFpolicy" }

CommandType     Name                                               Version    Source                                                                                                                        
-----------     ----                                               -------    ------                                                                                                                        
Cmdlet          Connect-NcFpolicyServer                            4.0.0      dataontap                                                                                                                     
Cmdlet          Disable-NcFpolicyPolicy                            4.0.0      dataontap                                                                                                                     
Cmdlet          Disconnect-NcFpolicyServer                         4.0.0      dataontap                                                                                                                     
Cmdlet          Enable-NcFpolicyPolicy                             4.0.0      dataontap                                                                                                                     
Cmdlet          Get-NcFpolicyEvent                                 4.0.0      dataontap                                                                                                                     
Cmdlet          Get-NcFpolicyExternalEngine                        4.0.0      dataontap                                                                                                                     
Cmdlet          Get-NcFpolicyPassthroughReadConnection             4.0.0      dataontap                                                                                                                     
Cmdlet          Get-NcFpolicyPolicy                                4.0.0      dataontap                                                                                                                     
Cmdlet          Get-NcFpolicyScope                                 4.0.0      dataontap                                                                                                                     
Cmdlet          Get-NcFpolicyServerStatus                          4.0.0      dataontap                                                                                                                     
Cmdlet          Get-NcFpolicyStatus                                4.0.0      dataontap                                                                                                                     
Cmdlet          New-NcFpolicyEvent                                 4.0.0      dataontap                                                                                                                     
Cmdlet          New-NcFpolicyExternalEngine                        4.0.0      dataontap                                                                                                                     
Cmdlet          New-NcFpolicyPolicy                                4.0.0      dataontap                                                                                                                     
Cmdlet          New-NcFpolicyScope                                 4.0.0      dataontap                                                                                                                     
Cmdlet          Remove-NcFpolicyEvent                              4.0.0      dataontap                                                                                                                     
Cmdlet          Remove-NcFpolicyExternalEngine                     4.0.0      dataontap                                                                                                                     
Cmdlet          Remove-NcFpolicyPolicy                             4.0.0      dataontap                                                                                                                     
Cmdlet          Remove-NcFpolicyScope                              4.0.0      dataontap                                                                                                                     
Cmdlet          Set-NcFpolicyEvent                                 4.0.0      dataontap                                                                                                                     
Cmdlet          Set-NcFpolicyExternalEngine                        4.0.0      dataontap                                                                                                                     
Cmdlet          Set-NcFpolicyPolicy                                4.0.0      dataontap                                                                                                                     
Cmdlet          Set-NcFpolicyScope                                 4.0.0      dataontap  

Alternatively, you can use the Get-NcCommand cmdlet from the PSTK:

 

Get-NcCommand -Category FPolicy | Format-Table -AutoSize

Hope that helps.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

ChannelTapeFibre

Thanks for the help, but I'm still struggling:

 

PS C:\> Get-NcFpolicyStatus
Get-NcFpolicyStatus : The 'Get-NcFpolicyStatus' command was found in the module 'DataONTAP', but the module could not b
e loaded. For more information, run 'Import-Module DataONTAP'.
At line:1 char:2
+ Get-NcFpolicyStatus
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-NcFpolicyStatus:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

 

PS C:\> Get-Command -Module DataONTAP | ?{ $_.Name -match "NcFpolicy" }
PS C:\> Get-NcCommand -Category FPolicy | Format-Table -AutoSize

 

Nothing is returned.

 

PS C:\> get-help Get-NcFpolicyStatus
get-help : Get-Help could not find Get-NcFpolicyStatus in a help file in this session. To download updated help topics
type: "Update-Help". To get help online, search for the help topic in the TechNet library at http://go.microsoft.com/fw
link/?LinkID=107116.
At line:1 char:1
+ get-help Get-NcFpolicyStatus
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [Get-Help], HelpNotFoundException
+ FullyQualifiedErrorId : HelpNotFound,Microsoft.PowerShell.Commands.GetHelpCommand

PS C:\>

 

The first error message indicates there is something found around the cmdlet Get-NcFpolicyStatus, but not much more and there is no help entry.

Could there be a problem with my version of Ontap? I'm running 8.3.2, and in another thread I read something about certain QoS cmdlets no longer available after 8.2.

asulliva

If appears there are some errors loading the module: "CouldNotAutoloadMatchingModule".  Are you able to load the module manually?

 

Import-Module DataONTAP

 

Also, what version of the PSTK are you using?  You can check using the "Get-NaToolkitVersion" cmdlet.

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

ChannelTapeFibre

A manual import seems to work, I at least don't get any error message. I should probably point out that I've successfully used other cmdlets in my setup, such as Get-NcVol, Get-NcVserver, Get-NcAggr and Get-NcSnapmirror. As such, I don't suspect I have a problem with importing the module.

 

PS C:\> Import-Module DataONTAP

 

(nothing is returned)


PS C:\> Get-NaToolkitVersion

Major Minor Build Revision
----- ----- ----- --------
2 3 0 86

Ah, obviously. I was running an older version of the module. It would appear that eventhough I downloaded the latest version of the PowerShell toolkit, an older version was installed and the new install did not upgrade the version. I removed the module folder manually, and reran the installer. 

New results:

PS C:\> Get-NaToolkitVersion

Major Minor Build Revision
----- ----- ----- --------
4 0 0 231

 

Thanks for nudging me in the right direction.

 

To summarize; newer installs of the toolkit may not always upgrade existing installs.

asulliva

That behavior is/was a result of the switch to the single "unified" toolkit deployer...where both ONTAP and E-Series modules were packaged together in a single installer.

 

Glad you were able to get it straightened out!

 

Andrew

If this post resolved your issue, please help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

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