Coder Social home page Coder Social logo

Comments (6)

mikenelson-io avatar mikenelson-io commented on August 15, 2024

We cannot recreate this behavior. Running PureStoragePowerShellSDK2 on PowerShell 7.2.3. Once the module is imported, several cmdlets run without issue. Are you doing an Import-Module first, or relying on auto-loading?
Could you possibly create a quick video showing the Importing of the module & subsequent cmdlet executions with the requirement to run the Import again after every one cmdlet execution?

from powershellsdk2.

Annabellarooskie avatar Annabellarooskie commented on August 15, 2024

yes, once it is imported it works fine. Closing the session and creating a new session, and the cmdlets are gone. So your module doesn't support auto-loading?

from powershellsdk2.

Annabellarooskie avatar Annabellarooskie commented on August 15, 2024

I can create a video to show you what I am experiencing. I am working in PS 7.3.0

from powershellsdk2.

mikenelson-io avatar mikenelson-io commented on August 15, 2024

from powershellsdk2.

Annabellarooskie avatar Annabellarooskie commented on August 15, 2024

The way I understand it is that the module has to be designed in a way so that cmdlets can be used without importing each time. I can always just import module each time in my function that utilizes your cmdlets but it is just an extra step. I see in your manifest file (and when I look at the module with 'Get-module -ListAvailable') that there are no cmdlets or functions to export. I am assuming the module is created with C# and this property is what can be set to make that happen: https://learn.microsoft.com/en-us/dotnet/api/microsoft.powershell.commands.newmodulemanifestcommand.cmdletstoexport?view=powershellsdk-7.2.0

from powershellsdk2.

mikenelson-io avatar mikenelson-io commented on August 15, 2024

You are correct. The developers used a wildcard, which is not best practice, when specifying "CmdletsToLoad". I have attached an updated manifest file (rename to .psd1)
PureStoragePowerShellSDK2.txt
with all of the cmdlets specified and have tested it. Auto loading works with this new file.
Thank you for your assistance!

from powershellsdk2.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.