Just wanted to share some information that I've managed to learn today.
So I was looking to create a local Orion Account within SolarWinds, but due to me having multiple environments, I didn't want to have to login to each one and create them, one-by-one, so I compiled this script to do exactly this;
POWERSHELL
$settings = Get-Content "$PSScriptRoot\Settings.json" -Raw | ConvertFrom-Json
$swis = Connect-Swis -Host $settings.SWIS_Host -UserName $settings.SWIS_User -Password $settings.SWIS_Password
$localsw = Invoke-SwisVerb $swis Orion.Accounts CreateOrionAccount @($settings.SolarAcc, $settings.SolarPwd)
JSON
{
"SWIS_Host" : "SWIS-IP",
"SWIS_User" : "admin",
"SWIS_Password" : "password",
"SolarAcc" : "TestAccount",
"SolarPwd" : "password"
}Having it setup like this, using the JSON file as well I feel is more secure as you can delete this file when you've used the script for its purposes in order to not hold your login credentials within an un-encrypted file on a server.
Anyway, hope this helps someone.