This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Failure to Register the SWIS Snap-in in a PowerShell Session

Hello,

My employer has decided to use a new Capacity Management software, and it needs to plug into SolarWinds NPM via Orion SDK. There is a script that needs to be run, but when I run the script, it fails because the SWIS Snap-in failed to register in a PowerShell session.

Does anyone know what the cause of this is and how to fix it?

Many thanks.

  • The Snap-In is deprecated and should not be used.  There is a new PowerShell module (SwisPowerShell) that should be used instead.

    # Check to see if the module is installed, and if not, install it.
    if ( -not ( Get-Module -Name SwisPowerShell -ListAvailable -ErrorAction SilentlyContinue ) ) {
       Install-Module -Name SwisPowerShell -MinimumVersion 3.0.0 -Repository PSGallery -Confirm:$false -Force
    }
    # Import it now.
    Import-Module -Name SwisPowerShell

    It's hosted on the publicly accessible PowerShell Gallery: PowerShell Gallery | SwisPowerShell 3.1.0.343