Skip to content

A PowerShell module for working with the Ninja Web Service API. Allows full GUI functionality including operations not available in the Public API.

License

Notifications You must be signed in to change notification settings

greenloop-it-solutions/NinjaWSAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

To get started, download the ZIP and extract into your PowerShell 'modules' directory. Should also work with https://github.com/PsModuleInstall/FromGithub

To load:

Import-Module NinjaWSAPI

To create a new session:

$NINJA_BASE_FQDN = "TENANT_ID_GOES_HERE.rmmservice.com"

$adminUsername = Read-Host "Provide an admin username"
$adminPassword = Read-Host "Provide the password for this user"
$MFASECRET = Read-Host "Provide the OTP-Secret for this user"

Import-Module NinjaWSAPI

$Params = [ordered]@{
    username = $adminUsername 
    userPassword = $adminPassword
    mfatoken = get-otp -WINDOW 30 -LENGTH 6 -SECRET $MFASECRET
}

#use myKey as your $SESSIONKEY for subsequent calls to NinjaWS functions
$myKey = New-NinjaWSSession @Params

About

A PowerShell module for working with the Ninja Web Service API. Allows full GUI functionality including operations not available in the Public API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published