API connect with Powershell

 
Author
Message
SysAider
2
 
does anyone have a script that works? I have found one in the forum posted back in 2017 and that script does not work.
SysAider
21
 
Just connects to get a JSESSIONID or are you trying to do something specific?
Invoke-WebRequest -Uri "http://yournamegoeshere.sysaidit.com/api/v1/login" -Method Post -Headers @{"Content-Type"="application/json"} -Body '{"user_name": "yourusername", "password": "SuperSecurePassword!"}'