-
1. Re: SRM api with powershell_powercli
LucD Nov 19, 2019 3:40 AM (in response to jvm2016)Didn't we already discuss this in invoke-restmethod to use vsphere rest apis ?
Or do you mean something else?
Btw, I do not have access to that API Reference.
-
2. Re: SRM api with powershell_powercli
jvm2016 Nov 19, 2019 4:03 AM (in response to LucD)yes in the same line of the post you just mentioned .
however in process of exploring the document .
would you like to have a look if i share my credentials??
-
3. Re: SRM api with powershell_powercli
LucD Nov 19, 2019 4:32 AM (in response to jvm2016)I can have a look, but be aware that I currently don't have an active SRM setup of that version.
Send me a private mail (here or via my blog) -
-
5. Re: SRM api with powershell_powercli
jvm2016 Nov 19, 2019 6:06 AM (in response to LucD)i sent through blog .
-
6. Re: SRM api with powershell_powercli
LucD Nov 19, 2019 6:11 AM (in response to jvm2016)Thanks, I'm in
-
7. Re: SRM api with powershell_powercli
LucD Nov 19, 2019 6:20 AM (in response to jvm2016)As far as I can tell, that API is not a REST API, but based on SOAP.
That eliminates the use of Invoke-RestMethod.
It looks as if the methods available after you do a Connect-SrmServer, is currently the only way to access the API.
-
8. Re: SRM api with powershell_powercli
jvm2016 Nov 19, 2019 6:23 AM (in response to LucD)that means i cant use them powershell correct??
-
9. Re: SRM api with powershell_powercli
LucD Nov 19, 2019 6:41 AM (in response to jvm2016)You can use PS, just not the cmdlets that are intended for use with a REST API.
Xavier did a nice series on how to use the SRM API from PowerShell, see PowerCLI SRM module: How to use it