Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login
    1. Home
    2. EmrichT
    3. Posts
    E
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 1
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: API Nutzung : Beispiel für PowerShell

      Hallo, @stephan

      hier ein kleines Beispiel für die Erstellung eines Servers mit PowerShell. Du muss nur entsprechend den API Key und die URL anpassen.

      $parameter = @{
              "type" = "C__OBJTYPE__SERVER"
              "title" = "My little server"
              "apikey" = "HIER API KEY EINTRAGEN"}
      
      $Commands = @{
          "jsonrpc" = "2.0"
          "method" = "cmdb.object.create"
          "params" = $parameter
          "id" = 1
      }
      $Query = Invoke-RestMethod -Uri "HIER URL ZU I-DOIT EINTRAGEN/src/jsonrpc.php" -Body ($Commands | ConvertTo-Json) -Method "Post" -ContentType "application/json"
      $Query.result
      
      posted in Allgemein
      E
      EmrichT