NetApp DataONTAP Module

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
waynecierkowski
Posts: 28
Last visit: Mon Jul 10, 2023 10:51 am

NetApp DataONTAP Module

Post by waynecierkowski »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: PowerShell Studio 2019 5.6.167.0
32 or 64 bit version of product: 64 bit
Operating system: Windows 10 Version 1809
32 or 64 bit OS: 64 Bit

I'm trying to get the NetApp PowerShell Toolkit imported into Powershell Studio. I checked the $env:PSModulePath and the location is included.
After verifying that the PSModulePath contained the location for the NetApp TooKit I did a Import-Module DataONTAP, it worked fine. But
I don't see the DataONTAP in the Object Browser.

How can I resolve this issue so I can use the NetApp toolkit in some Powershell programs?

Thanks,

Wayne


DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: NetApp DataONTAP Module

Post by mxtrinidad »

Thanks for reporting the issue.

Our team will be investigating and we'll get back to you soon.
User avatar
mxtrinidad
Posts: 399
Last visit: Tue May 16, 2023 6:52 am

Re: NetApp DataONTAP Module

Post by mxtrinidad »

Make sure that the module is "checked" in the "PowerShell Cache Editor". This will refresh the "Object Browser" list.
Cache_01_2019-10-09_10-03-46.png
Cache_01_2019-10-09_10-03-46.png (227.06 KiB) Viewed 2781 times
User avatar
waynecierkowski
Posts: 28
Last visit: Mon Jul 10, 2023 10:51 am

Re: NetApp DataONTAP Module

Post by waynecierkowski »

I just looked at my Cache Editor and I do not see DataONTAP or any reference to NetApp in the list.

Let me just add this, when I downloaded the NetApp Powershell Tookit it came down as a MSI, installable. I ran the installer and was able to do a Import-module in a standalone PS Console window.

Even in Powershell Studio I'm able to reference the cmdlets in the Console window in PS Studio. But my compiled program I can't use them. Even if I do a Import-Module in the compiled program...

Thanks,

Wayne
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 3:14 pm
Answers: 39
Been upvoted: 30 times

Re: NetApp DataONTAP Module

Post by brittneyr »

Have you tried Reload All in the cache editor? If it appears, then build cache and reload from the ribbon:
SPS_Reload-Cache.png
SPS_Reload-Cache.png (29.3 KiB) Viewed 2767 times
Do you know what version of PowerShell the module is built for? It may be appearing in a different version like PowerShell V2 or V3:
SPS_CacheEditorVersionReload.png
SPS_CacheEditorVersionReload.png (48.9 KiB) Viewed 2767 times
Brittney
SAPIEN Technologies, Inc.
User avatar
waynecierkowski
Posts: 28
Last visit: Mon Jul 10, 2023 10:51 am

Re: NetApp DataONTAP Module

Post by waynecierkowski »

OK Resolved the issue. Here is what I did.

Doing some googling I found a Best Practice Guide for the Toolkit. In that guide it talked about the install of the toolkit, I referenced the location it should be in as - C:\Program Files(x86)\NetApp\Data ONTAP PowerShell Toolkit\DataONTAP

Now mine was at this location - C:\Program Files(x86)\NetApp\Data ONTAP PowerShell Toolkit\Modules
Under Modules was folders for DataONTAP and NetApp.SANtricity.PowerShell.

I copied the DataONTAP folder so it would reside under 'Data ONTAP PowerShell Toolkit'.

I then had to adjust the $Env:PSModulePath for this new location. When I looked at the contents of this variable it had in it - D:\Users\Wayne Cierkowski\Documents\WindowsPowerShell\Modules;C:\Program Files (x86)\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\NetApp\NetApp PowerShell Toolkit\Modules\.

Now notice the "." after the \ I didn't add that... Not sure if that "." should be there or not.

I change the contents of the env variable to look like this - D:\Users\Wayne Cierkowski\Documents\WindowsPowerShell\Modules;C:\Program Files (x86)\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\NetApp\NetApp PowerShell Toolkit\DataONTAP

In Powershell Studio I went back into the Cache Editor and did a Import Module and drilled down to the location of the DataONTAP Module. All of a sudden DataONTAP appeared.

Now I can use the NetApp CmdLets in my programs...

Thanks,

Wayne
User avatar
brittneyr
Site Admin
Posts: 1655
Last visit: Thu Mar 28, 2024 3:14 pm
Answers: 39
Been upvoted: 30 times

Re: NetApp DataONTAP Module

Post by brittneyr »

Happy to hear this has been resolved and thank you for posting the solution that worked for you. :D
Brittney
SAPIEN Technologies, Inc.
This topic is 4 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.