Powershell access to NAC controller

  • 0
  • 1
  • Question
  • Updated 12 months ago
  • Answered
Hello,
he have the challenge to assign new MAC adresses to groups in NACs for port based authentication. This will be part of a deployment solution which will be scripted in powershell. I have the documentation of the NAC request tool, but a web interface (REST API) would be prefferrd. I also have the documentation "OneFabric Connect API Reference Guide" but this doesn't state how the sytanx looks like or doesn't give script examples (ideally in powershell).

Could anyone give me a hint to get rolling?

__Leo
Photo of Leonhard Kurz

Leonhard Kurz

  • 120 Points 100 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Johannes Denninger

Johannes Denninger

  • 492 Points 250 badge 2x thumb
I used PowerShell to connect to NetSight using the method described in the "OneFabric Connect API Reference Guide" but we unfortunately don't have the license to use the API. But maybe this can help you:

https://gist.github.com/joxz/66694b99...
Photo of Leonhard Kurz

Leonhard Kurz

  • 120 Points 100 badge 2x thumb
That looks very promising :-) I'll give it a try.

Thank you!!

__Leo
Photo of Leonhard Kurz

Leonhard Kurz

  • 120 Points 100 badge 2x thumb
I have tried it but no success. I can get a connection, but with every request I get

Exception calling "getAllEndSystemMacs" with "0" argument(s): "The request failed with HTTP status 505: HTTP Version Not Supported."

Pasting the request into a browser on the same machine, I get the expected results. From what I understand I need to modify the HTML header and/or use authentication cookies, but as I have no experience with SOAP or REST, I'm completely lost. 

Anyone any idea? Input highly appreciated!!
__Leo